fix biosboot read next cluster logic

This commit is contained in:
Hojun-Cho 2024-12-03 20:11:32 +09:00
parent cb56f42e08
commit f18775bfdd

View File

@ -79,14 +79,16 @@ load_boot:
call read_cluster call read_cluster
read_fat: read_fat:
pushw %bx
pushw %ax pushw %ax
shift_magic = .+1 shift_magic = .+1
movb $0x90, %cl movb $0x90, %cl
shrw %cl, %ax shrw %cl, %ax // get sector
addw %ds:0x0e, %ax addw %ds:0x0e, %ax // add reserved sector
movw $FATSEG, %bx movw $FATSEG, %bx
call read_sector call read_sector
popw %cx popw %cx
popw %bx
and_magic = .+2 and_magic = .+2
andw $0x9090, %cx andw $0x9090, %cx
movw %es:(,%ecx, 2), %ax movw %es:(,%ecx, 2), %ax