level 5
长城之乐曲h
楼主
assume cs:code
stack segment
dw 8 dup (0)
stack ends
code segment
start: mov ax,stack
mov ss,ax
mov sp,10h
mov ax,4240h
mov dx,000fh
mov cx,0ah
call divdw
mov ax,4c00h
int 21h
divdw: push ax
mov ax,dx
mov dx,0
div cx
push ax
add sp,2
pop ax
div cx
mov cx,dx
sub sp,4
pop dx ---------进行到这里的时候出栈的数据不对了,但我核对过sp,未出栈前的sp和入栈后的sp是一样的
ret
code ends
end start
2013年04月13日 15点04分
1
stack segment
dw 8 dup (0)
stack ends
code segment
start: mov ax,stack
mov ss,ax
mov sp,10h
mov ax,4240h
mov dx,000fh
mov cx,0ah
call divdw
mov ax,4c00h
int 21h
divdw: push ax
mov ax,dx
mov dx,0
div cx
push ax
add sp,2
pop ax
div cx
mov cx,dx
sub sp,4
pop dx ---------进行到这里的时候出栈的数据不对了,但我核对过sp,未出栈前的sp和入栈后的sp是一样的
ret
code ends
end start

