diff options
| author | Chloe M. <chloe@aptel.org> | 2026-08-20 07:10:18 +0000 |
|---|---|---|
| committer | Chloe M. <chloe@aptel.org> | 2026-08-20 07:10:18 +0000 |
| commit | 6d606dbd3d39e7a1dc1315822f8b8e57f9e44992 (patch) | |
| tree | de3889133d27dfe4584b5e7b1758d148c8492eb7 | |
| parent | c8bbd2e9eeecdd1160f0da7c2620c4b718eca915 (diff) | |
boot/amd64: mbr: Save drive and set stack
Signed-off-by: Chloe M. <chloe@aptel.org>
| -rw-r--r-- | boot/arch/amd64/mbr/mbr.S | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/boot/arch/amd64/mbr/mbr.S b/boot/arch/amd64/mbr/mbr.S index 4c8c993..fa33707 100644 --- a/boot/arch/amd64/mbr/mbr.S +++ b/boot/arch/amd64/mbr/mbr.S @@ -28,12 +28,19 @@ _start: /* Jump to our relocated self */ ljmp $BOOT_RELOC_SEG,$reloc - reloc: + /* Save the drive number */ + mov %dl, drive_num + + /* Set our stack */ + mov $0x7C00, %sp + cli hlt jmp reloc +drive_num: .byte 0x00 + .org 510 .byte 0x55 .byte 0xAA |
