-
Notifications
You must be signed in to change notification settings - Fork 0
/
boot.inc
54 lines (46 loc) · 1.67 KB
/
boot.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
LOADER_BASE_ADDR equ 0x7e00
LOADER_START_SECTOR equ 0x2
LOADER_SECTOR_NUMBER equ 5
COFF_START_SECTOR equ 0x10
COFF_SECTOR_NUMBER equ 0xE0
COFF_BASE_ADDR equ 0x10000
;KERNEL_START_SECTOR equ 0x9
;KERNEL_BIN_BASE_ADDR equ 0x70000
;KERNEL_SECTOR_NUMBER equ 200
;KERNEL_ENTRY_POINT equ 0xc0001500
DESC_G_4K equ 100000000000000000000000b
DESC_D_32 equ 10000000000000000000000b
DESC_L equ 1000000000000000000000b
DESC_AVL equ 100000000000000000000b
DESC_P equ 1000000000000000b
DESC_DPL_0 equ 000000000000000b
DESC_DPL_1 equ 010000000000000b
DESC_DPL_2 equ 100000000000000b
DESC_DPL_3 equ 110000000000000b
DESC_TYPE_SYSTEM equ 0000000000000b
DESC_TYPE_CODE equ 1100000000000b ;x=1,c=0,r=0,a=0 code seg is executable, nonconfirming, unreadable, accessed bit a set 0.
DESC_TYPE_DATA equ 1000000000000b ;x=0,e=0,w=1,a=0 data seg is inexecutable, upward, writeable, accessed bit a set 0.
DESC_CODE_CONFIRMING equ 10000000000b
DESC_CODE_READABLE equ 1000000000b
DESC_CODE_ACCESSED equ 100000000b
DESC_DATA_EXTEND_DIR equ 10000000000b
DESC_DATA_WRITABLE equ 1000000000b
DESC_DATA_ACCESSED equ 100000000b
INTR_TYPE_INT32 equ 111000000000b
INTR_TYPE_TRAP32 equ 111100000000b
INTR_TYPE_INT16 equ 011000000000b
INTR_TYPE_TRAP16 equ 011100000000b
INTR_TYPE_TASK32 equ 010100000000b
RPL0 equ 00b
RPL1 equ 01b
RPL2 equ 10b
RPL3 equ 11b
TI_GDT equ 000b
TI_LDT equ 100b
PAGE_DIR_TABLE_POS equ 0x100000
PG_P equ 1b
PG_RW_R equ 00b
PG_RW_W equ 10b
PG_US_S equ 000b
PG_US_U equ 100b
PT_NULL equ 0