diff --git a/boot/fat.asm b/boot/fat.asm index 7abafa5..85dabf5 100644 --- a/boot/fat.asm +++ b/boot/fat.asm @@ -24,6 +24,7 @@ params: times bpb_size db 0 init: xor ax, ax mov ss, ax mov sp, stack + push sp ; save potential partition table entry push ds @@ -194,7 +195,7 @@ loadclus: lodsw .jump: mov dl, [bp+bpb.drivenum] pop si pop ds - jmp 0x7C00 + ret err_not_found: hlt: hlt @@ -203,4 +204,3 @@ hlt: hlt times (0x1F3 - ($-$$)) db 0 filename: db "KERNEL ", "BS " dw 0xAA55 -buf: