assume cs:code
code segment
start:
mov ax,4200h
mov dx,000fh
mov cx,0ah
call divdw
mov ax,4c00h
int 21h
;----------------------------------------------
divdw:
push ax
push dx
push cx
;-------------------------INT(F/A)*65536
mov ax,dx
mov dx,0
div cx
mov si,ax
;-------------------------[REM(F/A)*65536+4240]/A
mov ax,4240h
div cx
mov cx,dx
mov dx,si
ret
;----------------------------------------------
code ends
;H:F
;L:4240
;F4240/0AH=INT(F/A)*65536+[REM(F/A)*65536+4240]/A
end start |