汇编作业 实验10(2)
assume cs:code
code segment
start:
mov ax, 4240H
mov dx, 000fH
mov cx, 0aH
call divdw
mov ax, 4c00H
int 21H
divdw:
push bx
mov bx, ax; 低16位L暂时存在bx
mov ax, dx; 高16位H送到ax
mov dx, 0
div cx ; H/N
push ax ; int(H/N)入栈
mov ax, bx
div cx ; /N
mov cx, dx; 余数送到cx
pop dx ; int(H/N)出栈
pop bx
ret
code ends
end start
串门串门:)
页:
[1]