-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathgdt.inc
63 lines (45 loc) · 1.06 KB
/
gdt.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
align 4
GDT:
dw .GDTEnd - .GDTStart - 1 ; GDT size
dd .GDTStart ; GDT start
align 16
.GDTStart:
; Null descriptor (required)
.NullDescriptor:
dw 0x0000 ; Limit
dw 0x0000 ; Base (low 16 bits)
db 0x00 ; Base (mid 8 bits)
db 00000000b ; Access
db 00000000b ; Granularity
db 0x00 ; Base (high 8 bits)
; Unreal mode
.UnrealCode:
dw 0xFFFF ; Limit
dw 0x0000 ; Base (low 16 bits)
db 0x00 ; Base (mid 8 bits)
db 10011010b ; Access
db 10001111b ; Granularity
db 0x00 ; Base (high 8 bits)
.UnrealData:
dw 0xFFFF ; Limit
dw 0x0000 ; Base (low 16 bits)
db 0x00 ; Base (mid 8 bits)
db 10010010b ; Access
db 10001111b ; Granularity
db 0x00 ; Base (high 8 bits)
; Protected mode
.PmodeCode:
dw 0xFFFF ; Limit
dw 0x0000 ; Base (low 16 bits)
db 0x00 ; Base (mid 8 bits)
db 10011010b ; Access
db 11001111b ; Granularity
db 0x00 ; Base (high 8 bits)
.PmodeData:
dw 0xFFFF ; Limit
dw 0x0000 ; Base (low 16 bits)
db 0x00 ; Base (mid 8 bits)
db 10010010b ; Access
db 11001111b ; Granularity
db 0x00 ; Base (high 8 bits)
.GDTEnd: