;gdt.inc ;Author: Josh Holtrop ;Date: 10/30/03 ;Modified: 03/02/04 gdtr: dw gdt_end-gdt-1 dd GDT_V gdt: dd 0 dd 0 KERNEL_CODE equ $-gdt dw 0xffff ;limit 15:0 dw 0x0000 ;base 15:0 db 0x00 ;base 23:16 db 0x9A ;access ([P][DPL][1][Executable][Direction/Conforming][Writable/Readable][A]) db 0xCF ;flags ([G][D/B][0][0]) / limit 19:16 db 0x00 ;base 31:24 KERNEL_DATA equ $-gdt dw 0xffff ;limit 15:0 dw 0x0000 ;base 15:0 db 0x00 ;base 23:16 db 0x92 ;access ([P][DPL][1][Executable][Direction/Conforming][Writable/Readable][A]) db 0xCF ;flags ([G][D/B][0][0]) / limit 19:16 db 0x00 ;base 31:24 USER_CODE equ $-gdt dw 0xffff ;limit 15:0 dw 0x0000 ;base 15:0 db 0x00 ;base 23:16 db 0xFA ;access ([P][DPL][1][Executable][Direction/Conforming][Writable/Readable][A]) db 0xCF ;flags ([G][D/B][0][0]) / limit 19:16 db 0x00 ;base 31:24 USER_DATA equ $-gdt dw 0xffff ;limit 15:0 dw 0x0000 ;base 15:0 db 0x00 ;base 23:16 db 0xF2 ;access ([P][DPL][1][Executable][Direction/Conforming][Writable/Readable][A]) db 0xCF ;flags ([G][D/B][0][0]) / limit 19:16 db 0x00 ;base 31:24 TSS0_SEG equ $-gdt dw 0x67 ;limit 15:0 dw 0 ;base 15:0 db 0 ;base 23:16 db 0xE9 ;access ([P][DPL][0][1][0][Busy][1]) db 0x00 ;flags ([G][0][0][AVL]) / limit 19:16 db 0 ;base 31:24 gdt_end: