; This is what's going to be on most USB sticks and HDDs, for now
bits 16
-org 0x7c00
+org 0xfe00
cpu 686
-STAGE3_ADDRESS equ 0x8000
+STAGE3_ADDRESS equ 0x1800
STAGE3_SEGMENT equ STAGE3_ADDRESS >> 4
STAGE3_OFFSET equ STAGE3_ADDRESS & 0xf
real_start:
sti
; no need to set up segments and stack again, because MBR did it for us
- mov bp, 0x7c00
+ mov bp, 0xfe00
; we expect the boot drive to be in DL and our partition table entry in DS:SI
mov [BOOT_DRIVE], dl
mov di, STAGE3_OFFSET
call read_cluster_chain ; read stage 3
mov dl, [BOOT_DRIVE]
- call STAGE3_ADDRESS ; call stage 3
- jmp .halt ; halt in case we return, which should never happen
+ jmp 0:STAGE3_ADDRESS ; call stage 3
+ nop
.stage3_missing:
print stage3_missing