User's Manual

THE
80286
INSTRUCTION SET
RETURN TO SAME LEVEL:
Return
selector must be non-null else #GP(O)
Selector index must be within its descriptor table limits else
#GP
(selector)
Descriptor AR byte must indicate code segment else
#GP
(selector)
If
non-conforming then code segment DPL must equal CPL else
#GP
(selector)
If
conforming then code segment DPL must be
:s;
CPL else
#GP
(selector)
Code segment must be PRESENT else
#NP
(selector)
Top word on stack must be within stack limits else #SS(O)
IP
must be in code segment limit else #GP(O)
Load
CS:IP from stack
Load CS-cache with descriptor
Increment SP by 4 plus the immediate offset if it exists
Else
RETURN TO OUTER PRIVILEGE LEVEL:
Top
(8
+ immeqiate) bytes on stack must be within stack limits else #SS(O)
Examine return CS selector (at
SP+2)
and associated descriptor:
Selector must be non-null else #GP(O)
Selector index must be within its descriptor table limits else
#GP
(selector)
Descriptor AR byte must indicate code segment else
#GP
(selector)
If
non-cohforming then code segment DPL must equal return selector RPL else
#GP
(selector)
If
conforming then code segment DPL must be :s; return selector RPL else
#GP
(selector)
Segment must be PRESENT else
#NP
(selector)
Examine return SS selector (at
SP+6+imm)
and associated descriptor:
Selector must be non-null
elSe
#GP(O)
Selector index must be within its descriptor table limits else
#GP
(selector)
Selector
RPL must equal the RPL
of
the return
CS
selector else
#GP
(selector)
Descriptor AR byte must indicate a writable data segment else
#GP
(selector)
Descriptor DPL must equal the RPL
of
the return CS selector else
#GP
(selector)
Segment must be PRESENT else
#SS
(selector)
IP
must be in code segment limit else #
GP(O)
Set CPL
to
the RPL
of
the return CS selector
Load CS:IP from stack
Set CS RPL to CPL
Increment SP
by 4 plus the immediate offset if it exists
Load
SS:SP from stack
Load the CS-cache with the return
CS
descriptor
Load the SS-cache with the return
SS
descriptor
For each
of
ES
and DS:
If
the current register setting is not valid
for
the outer level, set the
register to
null (selector =
AR
=
0)
To be valid, the register setting must satisfy the following properties:
Selector index must be within descriptor table limits
Descriptor AR byte must indicate data
or
readable code segment
If segment is data
or
non-conforming code, then:
DPL must be
2:: CPL,
or
DPL must be 2:: RPL
PROTECTED MODE EXCEPTIONS
#GP, #NP, or #SS,
as
described
in
the above listing.
REAL ADDRESS MODE EXCEPTIONS
Interrupt
13
if the stack pop wraps around from OFFFFH to
O.
8-95