Unsigned Divide                               

86/88

Y

186

Y

286

Y

386

Y

486

Y

DIV source

Ovfl

?

Dir

N

Int

N

Trap

N

Sign

?

Zero

?

Aux

?

Prty

?

Carry

?

    This instruction performs unsigned division. If the source is a byte,
    DIV divides the word value in AX by source, returning the quotient in
    AL and the remainder in AH. If the source is a word, DIV divides the
    double-word value in DX:AX by the source, returning the quotient in AX
    and the remainder in DX.

       Notes:         If the result is too large to fit in the destination
                      (AL or AX), 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 and 80386 points
                      to the instruction that failed (the DIV
                      instruction).  On the 8088/8086, however, CS:IP
                      points to the instruction following the failed DIV
                      instruction.

------------------------------------ Timing ----------------------------------

OpCode          Instruction             386     286     86
F6/6            DIV AL, r/m8            14/17   14/17   90/96+EA
F7/6            DIV AX, r/m16           22/25   22/25   162/168+EA
F7/6            DIV EAX, r/m32          38/41

------------------------------------ Logic -----------------------------------

        AL = AX / Source
        AH = Remainder
    or
        AX = DX:AX / Source
        DX = Remainder

See Also IDIV SHR AAD CBW CWD CWDE CDQ INT/00 Flags


Copyright © 1985 to 2022 Beta Systems                            Last modified: Wednesday, January 05, 2022 .