;gdt.inc
;Author: Josh Holtrop
;for HOS
;Modified: 10/30/03

gdtr:
	dw	gdt_end-gdt-1
	dd	GDT
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
VESA_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	0x40	;flags ([G][D/B][0][0]) / limit 19:16
	db	0x00	;base  31:24
VESA_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	0x40	;flags ([G][D/B][0][0]) / limit 19:16
	db	0x00	;base  31:24
VIDEO_TEXT equ $-gdt
	dw	0x7FFF	;limit 15:0
	dw	0x8000	;base  15:0
	db	0x0B	;base  23:16
	db	0x92	;access ([P][DPL][1][Executable][Direction/Conforming][Writable/Readable][A])
	db	0x40	;flags ([G][D/B][0][0]) / limit 19:16
	db	0x00	;base  31:24
VIDEO_GRAPHICS equ $-gdt
	dw	0xFFFF	;limit 15:0
	dw	0x0000	;base  15:0
	db	0x0A	;base  23:16
	db	0x92	;access ([P][DPL][1][Executable][Direction/Conforming][Writable/Readable][A])
	db	0x40	;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
gdt_end:



