Code: Select all
jmp load_gdt
;global descriptor table
gdt:
gdt_null:
dq 0
gdt_code:
dw 0FFFFh
dw 0
db 0
db 10011010b
db 11001111b
db 0
gdt_data:
dw 0FFFFh
dw 0
db 0
db 10010010b
db 11001111b
db 0
gdt_end:
gdt_desc:
dw gdt_end - gdt - 1
dd gdt
;load gdt
load_gdt:
cli ;disable interrupts
lgdt [gdt_desc] ;load GDT
sti ;enable interrupts
Code: Select all
arch/i386/gdt.s: Assembler messages:
arch/i386/gdt.s:3: Error: no such instruction: `global descriptor table'
arch/i386/gdt.s:7: Error: no such instruction: `dq 0'
arch/i386/gdt.s:10: Error: no such instruction: `dw 0FFFFh'
arch/i386/gdt.s:11: Error: no such instruction: `dw 0'
arch/i386/gdt.s:13: Error: no such instruction: `db 0'
arch/i386/gdt.s:14: Error: no such instruction: `db 10011010b'
arch/i386/gdt.s:15: Error: no such instruction: `db 11001111b'
arch/i386/gdt.s:16: Error: no such instruction: `db 0'
arch/i386/gdt.s:19: Error: no such instruction: `dw 0FFFFh'
arch/i386/gdt.s:20: Error: no such instruction: `dw 0'
arch/i386/gdt.s:22: Error: no such instruction: `db 0'
arch/i386/gdt.s:23: Error: no such instruction: `db 10010010b'
arch/i386/gdt.s:24: Error: no such instruction: `db 11001111b'
arch/i386/gdt.s:25: Error: no such instruction: `db 0'
arch/i386/gdt.s:30: Error: no such instruction: `dw gdt_end - gdt - 1'
arch/i386/gdt.s:31: Error: no such instruction: `dd gdt'
arch/i386/gdt.s:33: Error: no such instruction: `load gdt'
arch/i386/gdt.s:35: Error: no such instruction: `disable interrupts'
arch/i386/gdt.s:36: Error: invalid char '[' beginning operand 1 `[gdt_desc]'
arch/i386/gdt.s:36: Error: no such instruction: `load GDT'
arch/i386/gdt.s:37: Error: no such instruction: `enable interrupts'
<builtin>: recipe for target 'arch/i386/gdt.o' failed
make: *** [arch/i386/gdt.o] Error 1