Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- TASM 2.x / MASM 6.x Assembly Language - <b>fcomp compare real and pop exception flags: i d</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
FCOMP             Compare Real and Pop        Exception Flags: I D

FCOMP [source]


       Logic:      CMP ST, source
               sets condition codes in the status word as follows and then
               pops the stack:

                   C3 C2 C1 C0    Means
                   -- -- -- --    -----------
                   0  0  ?  0     ST > source
                   0  0  ?  1     ST < source
                   1  0  ?  0     ST = source
                   1  1  ?  1     ST not comparable to source

     FCOMP operates like FCOM, except that it also pops the stack. It
     compares two real numbers and leaves the result encoded in the status
     word as shown above. If no source is specified, ST(1) is compared to
     ST. Otherwise, the source is compared to ST.

  --------------------------------------------------------------------------
   Operands            Clocks         Bytes           Example
   FCOMP reg           42-52            3             FCOMP
   FCOMP MEMORY_REAL   63-77+EA         5             FCOMP REAL_NUMBER
  --------------------------------------------------------------------------

See Also: FCOM FCOMPP

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