From f18775bfddb0b2876d25371218aa5945634e3141 Mon Sep 17 00:00:00 2001 From: Hojun-Cho Date: Tue, 3 Dec 2024 20:11:32 +0900 Subject: [PATCH] fix biosboot read next cluster logic --- biosboot/biosboot.S | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/biosboot/biosboot.S b/biosboot/biosboot.S index 3721988..4b7e60b 100644 --- a/biosboot/biosboot.S +++ b/biosboot/biosboot.S @@ -79,14 +79,16 @@ load_boot: call read_cluster read_fat: + pushw %bx pushw %ax shift_magic = .+1 movb $0x90, %cl - shrw %cl, %ax - addw %ds:0x0e, %ax + shrw %cl, %ax // get sector + addw %ds:0x0e, %ax // add reserved sector movw $FATSEG, %bx call read_sector popw %cx + popw %bx and_magic = .+2 andw $0x9090, %cx movw %es:(,%ecx, 2), %ax