Intel 80286 Computer Accessories User Manual


 
THE
80286
INSTRUCTION SET
If
another exception
is
detected while attempting
to
perform the double fault exception, the 80286 will
enter shutdown (see section 11.5).
#GP
13
General Protection (Selector or Zero Error Code)
This exception
is
generated for all protection violations not covered by the other exceptions in this
section. Examples of this include:
1.
An attempt to address a memory location
by
using an offset that exceeds the limit for the segment
involved.
2.
An attempt to
jump
to a data segment.
3.
An attempt to load SS with a selector for a read-only segment.
4.
An attempt to write to a read-only segment.
5.
Exceeding the maximum instruction length of
10
bytes.
If
#GP occurred while loading a descriptor, the error code passed contains the selector involved. Other-
wise, the error code
is
zero.
If
the error code
is
not zero, the instruction can
be
restarted if the erroneous condition
is
rectified.
If
the error code
is
zero either a limit violation, a write protect violation, or an illegal
usc
of
invalid
segment register occurred. An invalid segment register
contains the values
0-3.
A write protect fault
on
ADC, SBB, RCL, RCR, or
XCHG
is not restartable.
#MF
16
Math Fault (No Error Code)
This exception
is
generated when the numeric processor extension (the 80287) detects an error signalled
by the
ERROR
input pin leading from the 80287 to the 80286. The
ERROR
pin
is
tested
at
the
beginning of most floating point instructions, and when a WAIT instruction
is
executed with the
EM
bit of the Machine Status Word set
to
0 (Le.,
no
emulation of the math unit). The floating point
instructions that
do
not cause the
ERROR
pin to be tested are FNCLEX,
FNINIT,
FSETPM,
FNSTCW, FNSTSW,
FNSA
VE, and FNSTENV.
If
the handler corrects the error condition causing the exception, the floating point instruction
that
caused #MF can be restarted. This
is
not accomplished
by
IRET, however, since the fault occurs at
the floating point instruction that follows the offending instruction. Before restarting the numeric
instruction, the handler must obtain from the
80287 the address of the offending instruction and the
address of the optional numeric operand.
#MP
9 Math Unit Protection Fault (No Error Code)
This exception
is
generated if the numeric operand
is
larger than one word and has the second or
subsequent words outside the segment's limit. Not all math addressing errors cause exception 9.
If
the
effective address of an
ESCAPE instruction
is
not
in
the segment's limit, or
if
a write
is
attempted
on
a read-only segment, or if a one-word operand violates a segment limit, exception
13
will
occur.
The #MP exception occurs during the execution of the numeric instruction by the
80287. Thus, the
80286 may be in an unrelated instruction stream at the time. Exception 9 may occur in a task unrelated
to the task that executed the
ESC instruction. The operating system should keep track of which task
last used the
NPX
(see section 11.4).
8-9