You are here : assembly8086IDIV

IDIV - 8086

Division of Signed Number.

Algorithm:
when operand is a byte:
AL = AX / operand
AH = remainder (modulus)

when operand is a word:
AX = (DX AX) / operand
DX = remainder (modulus)


Syntax

IDIV Reg
IDIV Memory


Example

MOV AX, -203 ; AX = 0FF35h
MOV BL, 4
IDIV BL      ; AL = -50 (0CEh), AH = -3 (0FDh)
RET


Output / Return Value


Limitations


Alternatives / See Also


Reference