[su_box title=”Generic Hollow Square” style=”bubbles” box_color=”#1d318d”]

; You may customize this and other start-up templates;
; The location of this template is c:emu8086inc_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
;Enter square No
lea dx,str1
mov ah,9
int 21h

;Taking Number
mov ah,1
int 21h
;Saving in ‘a’
mov a,al
sub a,48
mov cl,a
;For Next Line
mov dl,c
mov ah,2
int 21h
mov dl,d
mov ah,2
int 21h

;For Line of *
;mov cx,5
label:
mov dx,’*’
mov ah,2
int 21h
loop label

;For * * Line
mov cl,a
sub cl,2
label1:
mov bx,cx

;For Next Line
mov dl,c
mov ah,2
int 21h
mov dl,d
mov ah,2
int 21h

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

mov cl,a
sub cl,2
label2:
mov dx,’ ‘
mov ah,2
int 21h
loop label2

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

mov cx,bx
loop label1

;For Next Line
mov dl,c
mov ah,2
int 21h
mov dl,d
mov ah,2
int 21h

mov cl,a
label4:
mov dx,’*’
mov ah,2
int 21h
loop label4

;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

[/su_box]

OutPut Screen:

Generic Hollow Square Code

 

Find More Assembly Codes Here!

" data-link="https://twitter.com/intent/tweet?text=Generic+Hollow+Square+-+Assembly+Language+Code&url=http%3A%2F%2Ftheencarta.com%2Fgeneric-hollow-square-assembly-language-code%2F&via=">">Tweet
0 Shares

2 COMMENTS

  1. Excellent post. I was checking constantly this weblog and I’m impressed! Very useful info specially the remaining section 🙂 I take care of such information much. I was looking for this certain information for a long time. Thank you and best of luck.

LEAVE A REPLY

Please enter your comment!
Please enter your name here