Assembly 模拟十进制递增计数器的汇编语言程序
这是一个模拟十进制递增计数器的汇编语言程序。但是输出被固定在00。为什么?Assembly 模拟十进制递增计数器的汇编语言程序,assembly,x86,dos,Assembly,X86,Dos,这是一个模拟十进制递增计数器的汇编语言程序。但是输出被固定在00。为什么? .model small .code call cls mov ch,30h mov cl,30h next: mov dh,12 mov dl,38 mov bx,00 mov ah,2 int 10h mov dl,ch mov ah,2 int
.model small
.code
call cls
mov ch,30h
mov cl,30h
next: mov dh,12
mov dl,38
mov bx,00
mov ah,2
int 10h
mov dl,ch
mov ah,2
int 21h
mov dl,cl
mov ah,2
int 21h
inc cl
call dely
cmp cl,39h
jbe next
mov cl,30h
inc ch
cmp ch,39h
jbe next
mov ah,4ch
int 21h
cls proc near
mov cx,55
mov dl,13
nl: mov ah,2
int 21h
loop nl
ret
cls endp
dely proc near
mov SI,05fffh
L1:mov DI,05fffh
L2:dec DI
jnz L2
dec SI
jnz L1
ret
dely endp
end
代码的唯一问题是
dely
过程等待时间太长,因此您认为它卡住了。尝试用更少的东西加载SI
,10左右的值在这里似乎可以正常工作。int 10h
可能会破坏您的CX
寄存器。