25 lines
591 B
NASM
25 lines
591 B
NASM
gdt:
|
|
dw .size - 1 + 8 ; GDT size
|
|
dd .start - 8 ; GDT start address
|
|
|
|
.start:
|
|
; 32-bit code
|
|
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)
|
|
|
|
; 32-bit data
|
|
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)
|
|
|
|
.end:
|
|
|
|
.size: equ .end - .start
|