وو

وحید آنلاین . آرشیو وبلاگ وحیدمی دات آی آر . شرکت بیان. vahidmy.blog.ir

وو

وحید آنلاین . آرشیو وبلاگ وحیدمی دات آی آر . شرکت بیان. vahidmy.blog.ir

IDIV

IDIV

Usage:   IDIV   src                                  Modifies flags: (AF,CF,OF,PF,SF,ZF undefined)

Signed binary division of accumulator by 'src'.  If 'src' is a byte value, AX is divided by 'src' and the quotient is stored in AL and the remainder in AH.  If 'src' is a word value, DX:AX is divided by 'src', and the quotient is stored in AL and the remainder in DX. If 'src' operand is a doubleword value, then EDX:EAX is divided by 'src' and the quotient is stored in EAX and the remainder in EDX.

Signed Integer Divide


IDIV r/m8                     ; F6 /7                [8086]

IDIV r/m16                    ; o16 F7 /7            [8086]

IDIV r/m32                    ; o32 F7 /7            [386]


IDIV performs signed integer division. The explicit operand provided is the divisor; the dividend and destination operands are implicit, in the following way:


For IDIV r/m8, AX is divided by the given operand; the quotient is stored in AL and the remainder in AH.


For IDIV r/m16, DX:AX is divided by the given operand; the quotient is stored in AX and the remainder in DX.


For IDIV r/m32, EDX:EAX is divided by the given operand; the quotient is stored in EAX and the remainder in EDX.


Unsigned integer division is performed by the DIV instruction.


Example:

idiv Label