.nolist ;******************************************************************************************************************************** ;* * ;* File: GDT.inc * ;* * ;* This file defines the structures, constants, and macros for the Global Descriptor Table, or , and its selectors. * ;* * ;* See Also: * ;* - * ;* * ;* Authors: * ;* - Neil G. Dickson * ;* * ;******************************************************************************************************************************** ;******************************************************************************************************************************** ;* * ;* Constants: GDT Selector Constants * ;* * ;* These constants define segment selectors into the . * ;* * ;* SELECTOR_CORE_CODE - code segment selector * ;* SELECTOR_CORE_DATA - data segment selector * ;* SELECTOR_CORE_CALL_GATE - selector * ;* SELECTOR_THREAD_SCHEDULER_TSS - selector * ;* SELECTOR_USER_CODE - Code segment selector for all applications * ;* SELECTOR_USER_DATA - Data segment selector for all applications * ;* SELECTOR_BOOT_TSS - TSS selector (until is unloaded) * ;* * ;* SZ_STORED_GDT - Size of the initial * ;* * ;******************************************************************************************************************************** SELECTOR_CORE_CODE equ 08h SELECTOR_CORE_DATA equ 10h SELECTOR_CORE_CALL_GATE equ 18h SELECTOR_THREAD_SCHEDULER_TSS equ 20h SELECTOR_USER_CODE equ 28h SELECTOR_USER_DATA equ 30h SZ_STORED_GDT equ 38h ;******************************************************************************************************************************** ;* * ;* Macro: TSS_DESC * ;* * ;* Define a qword of data containing a TSS descriptor. * ;* * ;* Parameters: * ;* address - the address of the TSS * ;* privilege - the privilege level of the descriptor * ;* * ;******************************************************************************************************************************** TSS_DESC MACRO address,privilege dw sizeof TSS32 dw lowword address db (highword address) and 0FFh db DESC_S_TSS_AVL_32 or DESC_PRESENT_BIT or privilege db 0 db high address ENDM .list