diff options
| -rw-r--r-- | stage1/main.asm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/stage1/main.asm b/stage1/main.asm index ce4ead4..f14c1f0 100644 --- a/stage1/main.asm +++ b/stage1/main.asm @@ -13,7 +13,7 @@ boot: mov ss, ax ; init stack - mov bp, KSTART ; stack grows down, overwriting MBR + mov bp, 0x7C00 mov sp, bp ; print message @@ -30,6 +30,10 @@ boot: ; load stage2 and stage3 call load_stages + ; reclaim MBR space for stack + mov bp, KSTART + mov sp, bp + ; jump into stage2 jmp KSTART |
