Developer network
>
development tools
>
Development column
>
VC
> Text 1. Introduction 80x86 series CPU has four-level protection mechanism. On the Windows 9x operating system only use only 0 and 3 to facilitate the transplantation of the streamlined instruction set, such as RS4000, etc., these processors generally only have two privileges, namely system-level and user-level. In the Windows 9x system environment, the application runs in Ring3 (Level 3). If you want to run the privilege, you must enter RING0 (0). In the same task, the common way to realize the privilege level from the outer layer to the inner layer is to use the inter-segment call command CALL, transfer through the call gate; realize the normal way to achieve the privilege level from the inner layer transformation is to return Command RET. Note that different privileged transformations within the task cannot be implemented with JMP instructions. The entry point of the calling door descriptor transfer contains 48-bit full pointers of the segment and offset of the target address. When performing the passage of the command CALL during the execution of the task door, the selection in the pointer in the instruction is used to determine the call gate, and the offset is discarded; the 48-bit full pointer within the call gate is discarded as the target Address pointer to transfer. Second, the basic idea acquires the global descriptor table, searching the table finds a temporary descriptor, install the call door, and perform a privileged instruction operation. Third, the data structure used 1 1 Global Descriptor GDT format: