User's Manual

THE
80286
INSTRUCTION SET
If Nested Task Flag=O then
INTERRUPT RETURN
ON
STACK:
Second
word on stack must be within stack limits else #SS(O)
Return CS selector RPL must be
;:::
CPL else
#GP
(Return selector)
If
return selector RPL = CPL then
Else
INTERRUPT
RETURN TO SAME LEVEL:
Top 6 bytes on stack must be within
limits else #SS(O)
Return CS selector (at
SP+2)
must be non-null else #GP(O)
Selector index must be within its descriptor table limits else
#GP(
Return selector)
AR byte mustJndicate code segment else
#GP
(Return selector)
If
non-conforming then code segment OPL must = CPL else
#GP
(Return selector)
If
conforming then code segment OPL must be
::s;
CPL else
#GP
(Return selector)
Segment
must be PRESENT else
#NP
(Return selector)
IP
must be in code segment limit else #GP(O)
Load
CS:IP from stack
Load
CS-cache with new code segment descriptor
Load
flags with third word on stack
Increment SP by 6
INTERRUPT RETURN TO OUTER PRIVILEGE LEVEL:
Top
10 bytes on stack must be within 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
(Return selector)
AR byte must indicate code segment else
#GP
(Return selector)
If
non-conforming then code segment OPL must =
CS
selector RPL else
#GP
(Return
selector)
If
conforming then code segment OPL must be > CPL else
#GP
(Return selector)
Segment
must be PRESENT else
#NP
(Return selector)
Examine return SS selector (at
SP+8)
and associated descriptor:
Selector must be non-nUll else #GP(O)
Selector index must be within its descriptor table limits else
#GP
(SS selector)
Selector
RPL must equal the RPL
of
the return CS selector else
#GP
(SS selector)
AR byte must indicate a writable data segment else
#GP
(SS
selector)
Stack
segment OPL must equal the RPL
of
the return CS selector else
#GP
(SS selector)
SS
must be PRESENT else
#SS
(SS selector)
IP
must be in code segment limit else #GP(O)
Load
C5:IP from stack
Load
flags with values at
(SP+4)
Load SS:SP from stack
Set CPL to the RPL
of
the return CS selector
Load the CS-cache with the CS descriptor
Load the 5S-cache with the
SS descriptor
For each
of
ES
and
OS:
If the current register setting is
not
valid
for
the outer level, then zero the register and
clear the valid flag
To
be valid, the register setting must satisfy the following properties:
Selector index must be within descriptor table limits
AR byte must indicate data
or
readable code segment
If segment is data
or
non-conforming code, then:
DPL must be
;:::
CPL.
or
OPL must be
;:::
RPL.
8-52