Intel 80286 Computer Accessories User Manual


 
PROGRAMMING NUMERIC APPLICATIONS
It
should also be noted
that
the
8087 instructions
FENI
and
FDISI
perform no function in the 80287.
If
these opcodes
are
detected in an 80286/80287 instruction stream,
the
80287 will perform no specific
operation and no internal states will be affected. For programmers interested in porting numeric software
from 8087 environments to the 80286, however, it should be noted
that
program sections containing
these exception-handling instructions
are
not likely to be completely portable to
the
80287. Appendix
B contains a more complete description
of
the differences between the 80287
and
the 8087
NPX.
FINIT
IFNINIT
FINIT
/FNINIT
(initialize processor) sets
the
80287
NPX
into a known state, unaffected by any
previous activity. The no-wait form of this instruction will cause the 80287 to abort any previous numeric
operations currently executing in
the
NEU.
This instruction performs the functional equivalent
of
a
hardware
RESET,
with one exception;
FINIT
/FNINIT
does not affect the current 80287 operating
mode (either Real-Address mode
or
Protected mode).
FINIT
checks for unmasked numeric exceptions,
FNINIT
does not.
Note
that
if
FNINIT
is
executed while a previous 80287 memory-referencing instruction
is
running,
80287 bus cycles in progress will be aborted. This instruction may be necessary to clear
the
80287
if
a
Processor Extension
Segment Overrun Exception
(Interrupt
9)
is
detected by the
CPU.
FSETPM
FSETPM
(set Protected mode) sets the operating mode
of
the
80287 to Protected Virtual-Address
mode.
When
the
80287
is
first initialized following hardware
RESET,
it operates in Real-Address
mode,
just
as does the 80286 CPU. Once the 80287
NPX
has been set into Protected mode, only a
hardware
RESET
can return
the
NPX
to operation in Real-Address mode.
When
the
80287 operates in Protected mode, the
NPX
exception pointers
are
represented differently
than
they
are
in
Real-Address mode (see
the
FSAVE
and
FSTENV
instructions
that
follow). This
distinction
is
evident primarily to writers
of
numeric
exception handlers, however.
Forgeneral
appli-
cation programmers, the operating mode
of
the
80287 need not be a concern. .
FLDCW source
FLDCW
(load control word) replaces
the
current processor control word with the .word defined by the
source operand. This instruction
is
typically used to establish or change the·80287's mode
of
operation.
Note
that
if an exception bit in
the
status word
is
set, loading a new control word
that
unmasks
that
exception
and
clears
the
interrupt enable
mask
will generate an immediate interrupt request before the
ne~t
instr!!o::ti0!!
is
~x~~nt""L
When changing modes, the recomme\1ded procedure
is
to first clear any
exceptions
and
then
load the new control word.
FSTCW/FNSTCW
destination
FSTCW
/FNSTCW
(store control word) writes the current processor control word to the memory
location defined by
the
destination.
FSTCW
checks for unmasked numeric exceptions,
FNSTCW
does not.
2-16