cleans up gdt code

This commit is contained in:
2025-06-13 14:37:22 -04:00
parent 2ec3e259d8
commit ed2c0a3568
3 changed files with 86 additions and 62 deletions

View File

@ -1,8 +1,8 @@
gdtr DW 0 ; limit store
DD 0 ; base storage
global setGdt
setGdt:
global set_gdt
set_gdt:
mov ax, [esp + 4]
mov [gdtr], ax
mov eax, [esp + 8]
@ -10,8 +10,8 @@ setGdt:
lgdt [gdtr]
ret
global reloadSegments
reloadSegments:
global reload_segments
reload_segments:
jmp 0x08:.reload_CS ; 0x08 is a stand in for the code segment
.reload_CS:
mov ax, 0x10 ; stand in for the data segment