16 bit Assembly

Home   Site Map   Instruction Index  


IDIV   - Divide Instruction

The IDIV instruction is used to divide AX by the second operand.
If the operand is 16 bit then the result is in DX:AX. If the operand if 8 bit the the result is in AH:AL.
This command has 2 parts, Instruction, then either a Register or a memory address.

Assembly Sample Description   16 bit Machine Code
IDIV BL ;  Divides AL by an 8 bit Register   F6 F8
IDIV BX ;  Divides AX by a 16 bit Register   F7 F8
IDIV [BX] ;  Divides AX by a memory address   F7 3F
IDIV [BX+2] ;  Divides AX by a memory address   F7 3F 02




Last Update 14/02/2023