Generic Square Box

; You may customize this and other start-up templates;
; The location of this template is c:\emu8086\inc\0_com_template.txt

org 100h

.data
A db 0
B db 0
C db 0ah
D db 0dh

str1 db ‘Enter square No $’
str2 db ‘*’

.code

lea dx,str1
mov ah,9
int 21h

mov ah,1
int 21h

mov a,al
sub a,48
mov cl,a

mov dl,c
mov ah,2
int 21h

mov dl,d
mov ah,2
int 21h

lableouter:

mov bl,cl
mov cl,a

label:

mov dx,’*’
mov ah,2
int 21h

loop label
mov cl,bl

mov dl,c
mov ah,2
int 21h

mov dl,d
mov ah,2
int 21h

loop lableouter

ret

OutPut Screen:

Generic Square Box Code

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.