You are here : assembly8086DIV

DIV - 8086

Unsigned divide.

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

DIV Memory
DIV Register


Example

MOV AX, 203   ; AX = 00CBh
MOV BL, 4
DIV BL        ; AL = 50 (32h), AH = 3
RET


Output / Return Value


Limitations


Alternatives / See Also


Reference