summaryrefslogtreecommitdiffstats
path: root/arch/x86/gdt/GoToGdtMemSeg.s
diff options
context:
space:
mode:
authorAlexey Gavrilov <rebovas@yahoo.com>2023-11-04 10:09:44 +0700
committerAlexey Gavrilov <rebovas@yahoo.com>2023-11-04 10:09:44 +0700
commitc18781e37e6bfe153e7c0f2bc8b04df0aecf151d (patch)
tree42bb0e00e58ccf85aa3b93c20347d4939464066e /arch/x86/gdt/GoToGdtMemSeg.s
parenta93807ad337dd982c49f898cd5205d2b028f365d (diff)
Support for GDT has been written + add makefile debug mode
Diffstat (limited to 'arch/x86/gdt/GoToGdtMemSeg.s')
-rw-r--r--arch/x86/gdt/GoToGdtMemSeg.s13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/x86/gdt/GoToGdtMemSeg.s b/arch/x86/gdt/GoToGdtMemSeg.s
new file mode 100644
index 0000000..2b5dd62
--- /dev/null
+++ b/arch/x86/gdt/GoToGdtMemSeg.s
@@ -0,0 +1,13 @@
+global GOTOGDTMEMSEG
+GOTOGDTMEMSEG:
+ lgdt [esp + 4]
+ jmp 0x08:.reloadCS
+.reloadCS:
+ mov ax, 0x10
+ mov ds, ax
+ mov es, ax
+ mov fs, ax
+ mov gs, ax
+ mov ss, ax
+ ret
+.end: