Programming <4>
This code, we can use the previous figure. To use LDT, we need to use MOV AX, GDTSEG, LLDT AX these two commands are sent to the global description table into the local descriptor table register. In implementing these two After the command, I can use it.
The various paragraphs in the table in the local descriptor. Oh, huh.
The following code demonstrates the transformation of the inner privilege level in this program, I demonstrate how to achieve the privilege level of the task by calling the door and RETF. Every privileged level has its own stack. In my program I use 0 and level 3, in a non-committed privileged transformation, I use the stack to implement the transformation. First build a level 0 stack, then press the 3-level stack of pointers into this level 0 stack. In theory, it is also necessary to press the parameters used by the 3 segment into the 0-level stack. This makes it easy to call these parameters directly, but my programs do not do this because the program can be pressed. Then use RETF to point to the segment described by the VCODE_SEL descriptor, and EIP points to compile VSTART, which is implemented in the segment.
Then use the write screen technology to display what I want to display, and use the calling door to achieve the level 3 from 0. I will introduce the call gate.
The door is also one of the descriptor. His structure is as follows:
Gate struch
OFFSETL DW 0; 32-bit offset low 16 bits
Selector dw 0; selector
DCOUNT DB 0; double word calculation field
GTYPE DB 0; Type
OFFSEth DW 0; 32-bit offset high 16-bit
Gate Ends
Such as Tovbuf Gate
Since the file plus coded is very long, the code should see the protection mode programming five