<<<    Index    >>>
3-313
INSTRUCTION SET REFERENCE
INT n/INTO/INT 3—Call to Interrupt Procedure (Continued)
IF 32-bit gate
THEN
IF new stack does not have room for 40 bytes (error code pushed) 
OR 36 bytes (no error code pushed);
THEN #SS(segment selector + EXT); 
FI;
ELSE (* 16-bit gate *)
IF new stack does not have room for 20 bytes (error code pushed) 
OR 18 bytes (no error code pushed);
THEN #SS(segment selector + EXT); 
FI;
FI;
IF instruction pointer is not within code segment limits THEN #GP(0); FI;
tempEFLAGS 
<
 EFLAGS;
VM 
<
 0;
TF 
<
 0;
RF 
<
 0;
IF service through interrupt gate THEN IF 
<
 0; FI;
TempSS 
<
 SS;
TempESP 
<
 ESP;
SS:ESP 
<
 TSS(SS0:ESP0); (* Change to level 0 stack segment *)
(* Following pushes are 16 bits for 16-bit gate and 32 bits for 32-bit gates *)
(* Segment selector pushes in 32-bit mode are padded to two words *)
Push(GS);
Push(FS);
Push(DS);
Push(ES);
Push(TempSS);
Push(TempESP);
Push(TempEFlags);
Push(CS);
Push(EIP);
GS 
<
 0; (*segment registers nullified, invalid in protected mode *)
FS 
<
 0;
DS 
<
 0;
ES 
<
 0;
CS 
<
 Gate(CS);
IF OperandSize=32
THEN
EIP 
<
 Gate(instruction pointer);
ELSE (* OperandSize is 16 *)
EIP 
<
 Gate(instruction pointer) AND 0000FFFFH;
FI;
(* Starts execution of new routine in Protected Mode *)
END;
<<<    Index    >>>