Files
Espresso/gdt.asm

15 lines
251 B
NASM
Raw Permalink Normal View History

2025-05-28 14:41:02 -05:00
global gdt_flush
gdt_flush:
mov eax, [esp + 4]
lgdt [eax]
2025-06-13 18:03:39 -05:00
jmp 0x08:.flush_label ; long jump to reload CS with new segment
.flush_label:
mov ax, 0x10
2025-05-28 14:41:02 -05:00
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax
ret