Loop in Assembly Language


Loop in Assembly Language

TITLE for (int i = 10; i!=0; i++)
; print 'A'

.model small
.stack

.code
;initializing
mov al,10;
mov bl,al;

;condition
wapis:
cmp bl,0;
;if (bl == 0)
je false
; else
; if (bl != 0)
; print 'A'
mov dl,'A'
mov ah,02h
;decrement
sub bl,1
int 21h
jmp wapis

false:
;Give control back to OS
mov ah,4ch
int 21h

end

1 comment:

  1. 888 casino online - Xn--O80b910a26eepc81il5g.online
    888 casino 우리카지노 쿠폰 online - Xn--O80b910a26eepc81il5g.online. sbobet ทางเข้า (9-8) 바카라 1.00 PM.

    ReplyDelete