From 909349a4cfae2467032f4e5f3c38b59743b12bb2 Mon Sep 17 00:00:00 2001 From: Nero <41307858+nero@users.noreply.github.com> Date: Sun, 27 Sep 2020 11:25:57 +0000 Subject: [PATCH] boot/fat: Shave off a byte by storing final address on stack --- boot/fat.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: