Skip to content

Instantly share code, notes, and snippets.

@heatd

heatd/boot.asm Secret

Created September 19, 2023 09:48
Show Gist options
  • Save heatd/4999498a62eeaa494a9e01a9199accc2 to your computer and use it in GitHub Desktop.
Save heatd/4999498a62eeaa494a9e01a9199accc2 to your computer and use it in GitHub Desktop.
diff --git a/src/boot/boot.asm b/src/boot/boot.asm
index 0e73054..295c471 100644
--- a/src/boot/boot.asm
+++ b/src/boot/boot.asm
@@ -129,15 +129,16 @@ start:
mov ecx, 64
mov ebx, 0
-
+ mov edx, 0
; EAX is our PDP
; ECX is slots to fill
- ; EDX is location of page
+ ; EDX is the page directory index
.setup_table_pdp:
mov eax, ebx ; Copy PT address to PDP slot
or eax, 0b10000011 ; Set flags (huge + writabe + presnet)
- add eax, 8 ; Next slot
+ mov [PDP + edx], eax
+ add edx, 8 ; Next slot
add ebx, 0x200000
loop .setup_table_pdp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment