summaryrefslogtreecommitdiff
path: root/Source/Kernel/MemoryManager/GDT.wtf.asm
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Kernel/MemoryManager/GDT.wtf.asm')
-rw-r--r--Source/Kernel/MemoryManager/GDT.wtf.asm17
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/Kernel/MemoryManager/GDT.wtf.asm b/Source/Kernel/MemoryManager/GDT.wtf.asm
new file mode 100644
index 0000000..eb216ed
--- /dev/null
+++ b/Source/Kernel/MemoryManager/GDT.wtf.asm
@@ -0,0 +1,17 @@
+[GLOBAL gdt_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
+