
THE 80286 INSTRUCTION SET
2.Call
3.Task
4.Task State
For long calls involving no task switch, the return link is the pointer of the instruction that follows the CALL, Le., the caller's CS and updated IP. Task switches invoked by CALLs are linked by storing the outgoing task's TSS. selector in the incoming TSS's link field and setting the Nested Task flag in the new task. Nested tasks must be terminated by an IRET. IRET releases the nested task and follows the back link to the calling task if the NT flag is set.
A precise list of the protection checks made and the actions taken is given by the following list:
CALL FAR:
If indirect then check access of EA doubleword #GP(O) if limit violation New CS selector must not be null else #GP(O)
Check that new CS selector index is within its descriptor table limits; else #GP (new CS selector) Examine AR byte of selected descriptor for various legal values:
CALL CONFORMING CODE SEGMENT:
DPL must be ~ CPL else #GP (code segment selector)
Segment must be PRESENT else #NP (code segment selector)
Stack must be big enough for return address else #SS(O)
IP must be in code segment limit else #GP(O)
Load code segment descriptor into CS cache
Load CS with new code segment selector
Load IP with new offset
CALL NONCONFORMING CODE SEGMENT:
RPL must be ~ CPL else #GP (code segment selector)
DPL must be = CPL else #GP (code segment selector)
Segment must be PRESENT else #NP (code segment selector)
Stack must be big enough forreturn address else #SS(O)
IP must be in code segment limit else #GP(O)
Load code segment descriptor into CS cache
Load CS with new code segment selector
Set RPL of CS to CPL
Load IP with new offset
CALL TO CALL GATE:
Call gate DPL must be ~ CPL else #GP (call gate selector) Call gate DPL must be ~ RPL else #GP (call gate selector) Call gate must be PRESENT else #NP (call gate selector)
Examine code segment selector in call gate descriptor: Selector must not be null else #GP(O)
Selector must be within its descriptor table limits else #GP (code segment selector)
AR byte of selected descriptor must indicate code segment else #GP (code segment selector) DPL of selected descriptor must be ~ CPL else #GP( code segment selector)
If