Intel 80286 Computer Accessories User Manual


 
PROGRAMMING NUMERIC APPLICATIONS
NaNs and co (projective) cannot be compared and return
C3
=CO=
1
as
shown in the table.
FCOMP /
/source
FCOMP
(compare real and pop) operates like FCOM, and in addition pops the stack.
FCOMPP
FCOMPP
(compare real and pop twice) operates like FCOM and additionally pops the stack twice,
discarding both operands. The comparison
is
of the stack top
to
ST(1);
no
operands may
be
explicitly
coded.
FICOM source
FICOM (integer compare) converts the source operand, which may reference a word or short binary
integer variable, to temporary real and compares the stack top to it.
FICOMP source
FICOMP
(integer compare and pop) operates identically to FICOM and additionally discards the
value in
ST
by popping the stack.
FTST
FTST (test) tests the top stack element by comparing it to zero. The result
is
posted
to
the condition
codes
as
shown in table
2-7.
FXAM
FXAM (examine) reports the content of the top stack element
as
positive/negative and NaN/unnor-
mal/denormal/normal/zero, or empty. Table
2-8
lists and interprets all the condition code values that
FXAM generates. Although four different encodings may be returned for an empty register, bits
C3
and
CO
of the condition code are both 1 in all encodings. Bits C2 and
Cl
should be ignored when
examining for empty.
Table 2-7.
Condition
Code
Interpretation
after
FTST
Condition Code
Interpretation
after
FTST
C3
C2
C1
CO
0 0 X 0
ST>
0
0 0
X
1
ST<
0
1 0 X 0
ST
= 0
1
1
X 1 ST
is
not comparable; (i.e., it
is
a
NaN
or
projective infinity)
2-11