求助,为什么这个程序运行死循环
assume cs:code,ds:datadata segment
dd 100001;0 1 2 3
dw 100;4 5
dw 0;6
data ends
code segment
start:
mov ax,data;
mov ds,ax;
mov ax,ds:;
mov dx,ds:;
div word ptr ds:;
mov ds:,ax;
mov ax,4c00h;
int 21h;
code ends;
end start; 本帖最后由 jackz007 于 2023-1-13 16:51 编辑
你根据什么说程序死循环了?代码里有循环吗?
assume cs:code , ds:data
stack segment para stack 'STACK'
dw 400h dup(0)
stack ends
data segment para public 'DATA'
dd 100001
dw 100
buff01db 20h dup(00)
data ends
code segment para public 'CODE'
show_dec proc near
push bp
mov bp,sp
push ax
push cx
push dx
push si
push di
push ds
mov dx,
mov ax,
mov si,offset buff01
push si
mov cx,10
dec01:div cx
add dl,'0'
mov byte ptr ds:,dl
inc si
xor dx,dx
or ax,ax
jnz dec01
mov byte ptr ds:,al
lea di,
pop si
push si
dec02:cmp si,di
jae dec03
mov al,byte ptr
xchg byte ptr,al
mov byte ptr ds:,al
inc si
dec di
jmp short dec02
dec03:pop si
mov ah,2
dec04:mov dl,ds:byte ptr
or dl,dl
jz dec05
int 21h
inc si
jmp short dec04
dec05:pop ds
pop di
pop si
pop dx
pop cx
pop ax
mov sp,bp
pop bp
ret 04
show_dec endp
main proc far
mov ax,data
mov ds,ax
mov ax, word ptr ds:
mov dx, word ptr ds:
div word ptr ds:
xor dx,dx
push ax
push dx
call show_dec
mov ax,4c00h
int 21h
main endp
code ends
end main jackz007 发表于 2023-1-13 16:27
你根据什么说程序死循环了?代码里有循环吗?
就是在dosbox里运行无端循环出不来
页:
[1]