وو

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

وو

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

FDIVP

FDIVP 

Usage: FDIVP  dest,src                             Modifies flags: None.

Divides the 'dest' by the 'src' operand and stores the result in the 'dest'. The 'dest' (dividend) is always in an FPU register; the 'src' operand (divisor) can be a register or a memory location.

Floating-Point Division


FDIV mem32                    ; D8 /6                [8086,FPU]

FDIV mem64                    ; DC /6                [8086,FPU]


FDIV fpureg                   ; D8 F0+r              [8086,FPU]

FDIV ST0,fpureg               ; D8 F0+r              [8086,FPU]


FDIV TO fpureg                ; DC F8+r              [8086,FPU]

FDIV fpureg,ST0               ; DC F8+r              [8086,FPU]


FDIVR mem32                   ; D8 /0                [8086,FPU]

FDIVR mem64                   ; DC /0                [8086,FPU]


FDIVR fpureg                  ; D8 F8+r              [8086,FPU]

FDIVR ST0,fpureg              ; D8 F8+r              [8086,FPU]


FDIVR TO fpureg               ; DC F0+r              [8086,FPU]

FDIVR fpureg,ST0              ; DC F0+r              [8086,FPU]


FDIVP fpureg                  ; DE F8+r              [8086,FPU]

FDIVP fpureg,ST0              ; DE F8+r              [8086,FPU]


FDIVRP fpureg                 ; DE F0+r              [8086,FPU]

FDIVRP fpureg,ST0             ; DE F0+r              [8086,FPU]


FDIV divides ST0 by the given operand and stores the result back in ST0, unless the TO qualifier is given, in which case it divides the given operand by ST0 and stores the result in the operand.


FDIVR does the same thing, but does the division the other way up: so if TO is not given, it divides the given operand by ST0 and stores the result in ST0, whereas if TO is given it divides ST0 by its operand and stores the result in the operand.


FDIVP operates like FDIV TO, but pops the register stack once it has finished.


FDIVRP operates like FDIVR TO, but pops the register stack once it has finished.


Source operands in memory can be in single-precision or double-precision floating-point format, word or doubleword integer format.


C1 Set to 0 if stack underflow occurred. Set if result was rounded up; cleared otherwise. C0, C2, C3 Undefined.


For FP/Integer divisions, see FIDIV.


FDIV/FDIVP/FIDIV-Divide

Opcode        Instruction                Description

D8 /6            FDIV m32fp                Divide ST(0) by m32fp and store result in ST(0).

DC /6           FDIV m64fp                Divide ST(0) by m64fp and store result in ST(0).

D8 F0 +i       FDIV ST(0), ST(i)         Divide ST(0) by ST(i) and store result in ST(0).

DC F8 +i      FDIV ST(i), ST(0)         Divide ST(i) by ST(0) and store result in ST(i).

DE F8 +i      FDIVP ST(i), ST(0)       Divide ST(i) by ST(0), store result in ST(i), and pop the register stack.

DE F9          FDIVP                        Divide ST(1) by ST(0), store result in ST(1), and pop the register stack.

DA /6           FIDIV m32int               Divide ST(0) by m32int and store result in ST(0).

DE /6           FIDIV m16int               Divide ST(0) by m64int and store result in ST(0).


EXAMPLE:

fdivp st0 st7