assume cs:code,ss:stack
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,0fh
mov cx,0ah
call divdw
mov ax,4c00h
int 21h
divdw: ;子程序定义开始
push ax
mov ax,dx
mov dx,0
div cx
mov bx,ax
pop ax
div cx
mov cx,dx
mov dx,bx
ret ;子程序定义结束
code ends
end start
阅读(1322) | 评论(0) | 转发(0) |