15 lines
251 B
NASM
15 lines
251 B
NASM
global gdt_flush
|
|
|
|
gdt_flush:
|
|
mov eax, [esp + 4]
|
|
lgdt [eax]
|
|
jmp 0x08:.flush_label ; long jump to reload CS with new segment
|
|
.flush_label:
|
|
mov ax, 0x10
|
|
mov ds, ax
|
|
mov es, ax
|
|
mov fs, ax
|
|
mov gs, ax
|
|
mov ss, ax
|
|
ret
|