本文为《汇编语言程序设计》0904小节例程。点击链接…进课程主页。
jcxz指令
assume cs:codesg
codesg segment
start: mov ax,2000H
mov ds, ax
mov bx,0
s: mov cx, [bx]
jcxz ok
inc bx
inc bx
jmp short s
ok: mov dx, bx
mov ax, 4c00H
int 21H
codesg ends
end start
loop指令
assume cs:codesg
codesg segment
start: mov cx, 6h
mov ax,10h
s: add ax, ax
loop s
mov ax, 4c00H
int 21H
codesg ends
end start