Professional Documents
Culture Documents
MUL and DIV
MUL and DIV
BITS Pilani
Pilani Campus
Multiply & Divide
.CODE
.STARTUP
MOV AX, MULTIPLICAND
MUL MULTIPLIER
MOV PRODUCT1, AX
MOV PRODUCT2, DX
.EXIT
END
➢ Word/Byte
➢ Word in AX,
➢ Byte in Register/Memory location
➢ AL- quotient AH- reminder
To divide a byte by a byte, put the dividend byte in AL
and fill AH with 0’s
➢ DWORD/WORD
➢ DWORD in DX : AX
➢ Word in Register/Memory Location
➢ AX- Quotient DX- Reminder
Word/Byte
Dividend Word in AX,
Divisor Byte in Register/Memory location
AL- quotient AH- reminder
To divide a byte by a byte, put the dividend byte in AL
and fill AH with copies of the sign bit from AL.
DWORD/WORD
Dividend DWORD in DX : AX
Divisor Word in Register/Memory Location
AX- Quotient DX- Reminder