DIV Division, Unsigned Flags: O D I T S Z A P C ? - - - ? ? ? ? ? DIV source
Logic AL ← AX / source AH ← remainder or AX ← DX:AX / source DX ← remainder or EAX ← EDX:EAX / source ; 386+ EDX ← remainder
DIV performs an unsigned division. The dividend is implicit; only the divisor is given as an operand. The type of the divisor determines which registers are used:
Notes If the result is too large to fit in the destination, an INT 0 (Divide by Zero) is generated, and the quotient and remainder are undefined.
When an Interrupt 0 (Divide by Zero) is generated, the saved CS:IP value on the 80286+ points to the instruction that failed (the DIV instruction). On the 8086, however, CS:IP points to the instruction following the failed DIV instruction.
Opcode Format F6 /6 DIV r/m8 F7 /6 DIV r/m16 F7 /6 DIV r/m32