mirror of
https://github.com/tailix/kernel.git
synced 2024-10-30 12:03:52 -04:00
21 lines
271 B
NASM
21 lines
271 B
NASM
[GLOBAL gdt_flush]
|
|
[GLOBAL idt_flush]
|
|
|
|
gdt_flush:
|
|
mov eax, [esp+4]
|
|
lgdt [eax]
|
|
|
|
mov ax, 0x10
|
|
mov ds, ax
|
|
mov es, ax
|
|
mov fs, ax
|
|
mov gs, ax
|
|
mov ss, ax
|
|
jmp 0x08:.flush
|
|
.flush:
|
|
ret
|
|
|
|
idt_flush:
|
|
mov eax, [esp+4]
|
|
lidt [eax]
|
|
ret
|