name "loops"
org 100h
mov bx, 0 ; total step counter
mov cx, 1
k1: add bx, 1
mov al, '8'
mov ah, 0eh
int 10h
push cx
mov cx, 1
k2: add bx, 1
mov al, '8'
mov ah, 0eh
int 10h
push cx
mov cx, 1
k3: add bx, 1
mov al, '8'
mov ah, 0eh
int 10h
push cx
mov cx, 1
k4: add bx, 1
mov al, '8'
mov ah, 0eh
int 10h
loop k3 ; internal in internal loop.
pop cx
loop k2 ; internal loop.
pop cx
loop k1 ; external loop.
; wait any key...
mov ah, 1
int 21h
ret
include 'emu8086.inc'
ORG 100h
MOV AL, 1
JA label1
PRINT '8888'
JMP exit
label1:
PRINT '8888'
exit:
RET
Tidak ada komentar:
Posting Komentar