
PROGRAMMING NUMERIC APPLICATIONS
FIST destination
FIST (integer store) rounds the content of the stack top to an integer according to the RC field of the control word and transfers the result to the destination. The destination may define a word or short integer variable. Negative zero is stored in the same encoding as positive zero: 0000...00.
FISTP destination
FISTP (integer and pop) operates like FIST and also pops the stack following the transfer. The desti- nation may be any of the binary integer data types.
FBLD source
FBLD (packed decimal (BCD) load) converts the content of the source operand from packed decimal to temporary real and loads (pushes) the result onto the stack. The sign of the source is preserved, including the case where the value is negative zero. FBLD is an exact operation; the source is loaded with no rounding error.
The packed decimal digits of the source are assumed to be in the range
FBSTP destination
FBSTP (packed decimal (BCD) store and pop) converts the content of the stack top to a packed decimal integer, stores the result at the destination in memory, and pops the stack. FBSTP produces a rounded integer from a nonintegral value by adding 0.5 to the value and then chopping. Users who arc concerned about rounding may precede FBSTP with FRNDINT.
Arithmetic Instructions
The 80287's arithmetic instruction set (table
The 80287's basic arithmetic instructions (addition, subtraction, multiplication, and division) are designed to encourage the development of very efficient algorithms. In particular, they allow the programmer to minimize memory references and to make optimum use of the NPX register stack.
Table
addition io the fuur 11u1111&1 opcrati0li3, t;;"G "re\'er~ed" i!!st!'~ctiQn5
"symmetrical" like addition and multiplication. The variety of instruction and operand forms give the programmer unusual flexibility:
Operands may be located in registers or memory.
Results may be deposited in a choice of registers.
•Operands may be a variety of NPX data types: temporary real, long real, short real, short integer or word integer, with automatic conversion to temporary real performed by the 80287.