Refer ramesh gaonkar for basics or just google it....
When dividing, you either divide a 16 bit number by an 8 bit number or a
32 bit number by a 16 bit number.
Dividing a 16 bit number by an 8 bit number:
The number to divide is to be in AX. The number to divide by (the
denominator) can be in any 8 bit register. The qotient is returned in AL
and the remainder in AH.
Example:
MOV AX,100
MOV CL,2
DIV CL
In a 32 bit by 16 bit divide, place the number to be divided (the numerator
in the AX
X pair where AX is the low word). Divide by any other 16 bit
register.
Example:
MOV AX,0
MOV DX,1 ;the ax:dx 32 bit pair now contains the value 65536
DIV CX
The quotient is returned in AX and the remainder in DX.
---------- Post added at 19:26 ---------- Previous post was at 19:25 ----------
**broken link removed**