MATH COPROCESSING

11.3.1.3Comparison Instructions

Each comparison instruction (see Table 11-3) analyzes the stack top element, often in relationship to another operand. Then it reports the result in the Status Word condition code. The basic oper- ations are compare, test (compare with zero) and examine (report tag, sign and normalization).

Table 11-3. 80C187 Comparison Instructions

FCOM

Compare real

FCOMP

Compare real and pop

FCOMPP

Compare real and pop twice

FICOM

Integer compare

FICOMP

Integer compare and pop

FTST

Test

FXAM

Examine

FUCOM

Unordered compare

FUCOMP

Unordered compare and pop

FUCOMPP

Unordered compare and pop twice

 

 

11.3.1.4Transcendental Instructions

Transcendental instructions (see Table 11-4) perform the core calculations for common trigono- metric, hyperbolic, inverse hyperbolic, logarithmic and exponential functions. Use prologue code to reduce arguments to a range accepted by the instruction. Use epilogue code to adjust the result to the range of the original arguments. The transcendentals operate on the top one or two stack elements and return their results to the stack.

Table 11-4. 80C187 Transcendental Instructions

FPTAN

FPATAN

F2XM1

FYL2X

FYL2XP1

FCOS

FSIN

FSINCOS

Partial tangent

Partial arctangent

2X – 1

Y log2 X

Ylog2 (X+1) Cosine Sine

Sine and Cosine

11-5

Page 290
Image 290
Intel 80C188XL, 80C186XL user manual C187 Comparison Instructions, C187 Transcendental Instructions