Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Assembly Language - <b>div divide, unsigned flags: o d i t s z a p c</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
DIV              Divide, Unsigned                    Flags: O D I T S Z A P C
                                                            ?       ? ? ? ? ?
DIV source

          Logic:    AL . AX / source                ; Source is byte
                    AH . remainder
               or
                    AX . DX:AX / source             ; Source is word
                    DX . remainder

    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.

  --------------------------------------------------------------------------
   Operands                  Clocks   Transfers  Bytes   Example
   reg8                       0-90        -        2     DIV BL
   reg16                     4-162        -        2     DIV BX
   mem8                   (86-96) + EA    1       2-4    DIV VYUP
   mem16                 (154-172) + EA   1       2-4    DIV NCONQUER[SI]
  --------------------------------------------------------------------------

       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.

See Also: IDIV SHR AAD CBW CWD INT 00h EA Flags

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson