FCOM floating point comparison fails-Collection of common programming errors

Change JL to JB, since you can only do unsigned comparisons with the FPU flags.

The reason is that 8087 has only 2 equivalent status bits at the same positions as 8086. Those are CF and ZF. When doing a signed comparison, the processor uses OF state from any preceding operation and the 8087 Busy State as the sign bit.

 8087:   [Busy] [ EQ ] [ Top of Stack Ptr ] [UND] [SOF] [ LT ]
                  C3                         C2     C1    C0

Originally posted 2013-11-09 22:49:25.