FICOM
Usage: FICOM src Modifies flags: See below
Compares the value in ST(0) with an integer 'src' operand and sets the condition code flags C0, C2, and C3 in the FPU status word according to the results (see table below). The integer value is converted to double extended-precision floating-point format before the comparison is made.
Floating-Point/Integer Compare
FICOM mem16 ; DE /2 [8086,FPU]
FICOM mem32 ; DA /2 [8086,FPU]
FICOMP mem16 ; DE /3 [8086,FPU]
FICOMP mem32 ; DA /3 [8086,FPU]
FICOM compares ST0 with the 16-bit or 32-bit integer stored in the given memory location, and sets the FPU flags accordingly. FICOMP does the same, but pops the register stack afterwards.
FICOM/FICOMP Results
Condition C3 C2 C0
ST(0) >SRC 0 0 0
ST(0) <SRC 0 0 1
ST(0) =SRC 1 0 0
Unordered 1 1 1
Example:
ficom Label