User's Manual

PROGRAMMING NUMERIC APPLICATIONS
FSTENV
/FNSTENV
must be allowed
to
complete before any other 80287 instruction
is
decoded.
When FSTENV
is
coded, an explicit FWAIT, or assembler-generated WAIT, should precede any
subsequent 80287 instruction.
FLDENV source
FLDENV
(load environment) reloads the environment from the memory area defined
by
the source
operand. This data should have been written by a previous FSTENV
/FNSTENV
instruction.
CPU
instructions (that
do
not reference the environment image) may immediately follow FLDENV. An
FWAIT
is
not required after FLDENV. FLDENV
will
automatically wait for all data transfers to
complete before executing the next instruction.
Note that loading an environment image that contains
an
unmasked exception
will
cause a numeric
exception when the next WAIT or error-checking-ESC instruction
is
executed.
FINCSTP
FINCSTP
(increment stack pointer) adds 1 to the stack top pointer (ST) in the status word.
It
does
not alter tags or register contents, nor does it transfer data.
It
is
not equivalent
to
popping the stack,
because it does not set the tag of the previous stack top to empty. Incrementing the stack pointer when
ST=7
produces ST=O.
FDECSTP
FDECSTP (decrement stack pointer) subtracts 1 from ST, the stack top pointer
in
the status word.
No tags or registers are altered, nor
is
any data transferred. Executing FDECSTP when
ST=O
produces
ST=7.
FFREE destination
FFREE
(free register) changes the destination register's tag to empty; the content of the register
is
unaffected.
FNOP
FNOP
(no
operation) stores the stack top to the stack top (FST ST,ST(O)) and thus effectively performs
no
operation. '
FWAIT (CPU INSTRUCTION)
FW
AIT
is
not actually an 80287 instruction, but an alternate mnemonic for the
CPU
WAIT instruc-
tion. The FW AIT or WAIT mnemonic should be coded whenever the programmer wants to synchro-
nize the
CPU
to
the NPX, that
is,
to
suspend further instruction decoding until the
NPX
has completed
the current instruction. FW AIT will check for unmasked numeric exceptions.
2-20