User's Manual

PROGRAMMING NUMERIC APPLICATIONS
FLDLG2
FLDLG2 (load log base
10
of
2)
loads (pushes) the value LOG
lO
2 onto the stack.
FLDLN2
FLDLN2 (load
log
base e of
2)
loads (pushes) the value LOG
e
2 onto the stack.
Processor Control Instructions
The processor control instructions shown
in
table
2-11
are not typically used
in
calculations; they provide
control over the
80287
NPX
for system-level activities. These activities include initialization, exception
handling, and task switching.
As
shown
in
table 2-11, many of the
NPX
processor control instructions have two forms of assembler
mnemonic:
A wait form, where the mnemonic
is
prefixed only with an F, such
as
FSTSW. This form checks
for unmasked numeric errors.
A no-wait form, where the mnemonic
is
prefixed with an FN, such
as
FNSTSW. This form ignores
unmasked numeric errors.
When the control instruction
is
coded using the no-wait form of the mnemonic, the ASM286 assembler
does not precede the
ESC instruction with a wait instruction, and the CPU does not test the
ERROR
status line from the
NPX
before executing the processor control instruction.
Only the processor control class of instructions have this alternate no-wait form. All numeric instruc-
tions are automatically synchronized by the
80286, with the CPU testing the BUSY status line and
only executing the numeric instruction when this line
is
inactive. Because of this automatic synchroni-
zation
by
the 80286, numeric instructions for the 80287 need not be preceded by a
CPU
wait instruc-
tion
in
order to execute correctly.
Table
2-11.
Processor Control Instructions
FINITjFNINIT
FSETPM
FLDCW
FSTCWjFNSTCW
FSTSWjFNSTSW
FSTSW AXjFNSTSW
AX
FCLEXjFNCLEX
FSTENV jFNSTENV
FLDENV
FSAVEjFNSAVE
FRSTOR
FINCSTP
FDECSTP
FFREE
FNOP
FWAIT
2-15
Initialize processor
Set Protected Mode
Load control word
Store control word
Store status word
Store status word to AX
Clear exceptions
Store Environment
Load environment
Save state
Restore state
Increment stack pointer
Decrement stack pointer
Free register
No
operation
CPU
Wait