程序可以执行到mov 4c00h,int 21h,但还是陷入循环
第十章 实验10 的第三个,debug的时候确实到了mov 4c00h,int 21h,但直接运行程序却还是死循环assume cs:code
data segment
db 10 dup(0)
data ends
code segment
start:mov ax,12666
mov bx,data
mov ds,bx
mov si,0
call dtoc
mov dh,8
mov dl,3
mov cl,2
call show_str
mov ax,4c00h
int 21h
dtoc:mov bx,0
s1: mov cx,10
div cx
add dx,30h
push dx ;压栈入栈是以字为单位的
mov dx,0
inc bx
inc si
mov cx,ax
add cx,1
loop s1
mov ds:,cl
mov cx,bx
mov si,0
s0: pop ds:
inc si
loop s0
ret
show_str: mov bx,4
mov si,0
s: mov ax,0b846h
mov es,ax
mov al,ds:
mov es:,al
mov es:1,cl
add si,1
add bx,2
mov cx,ds:
add cx,1
loop s
ret
code ends
end start add cx,1
loop s
你这不永远循环了吗
页:
[1]