From ee9fd9b684dbe002e7a127a9bd171aca6d0318b3 Mon Sep 17 00:00:00 2001 From: Elaina Claus Date: Sat, 19 Oct 2024 11:08:19 -0400 Subject: [PATCH] corrected a few instances of accessing boot_drive incorrectly after the location change --- include/fat32/FAT32_SYS.inc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/fat32/FAT32_SYS.inc b/include/fat32/FAT32_SYS.inc index 347b852..27f5add 100644 --- a/include/fat32/FAT32_SYS.inc +++ b/include/fat32/FAT32_SYS.inc @@ -257,7 +257,7 @@ NextCluster: add eax, ecx ; fat_sector + first_fat_sector mov dword [si + FAT32_NextClusterData_t.fat_sector], eax .load_fat_table: - mov ax, word [boot_drive] + movzx ax, byte [boot_drive] push ax mov ax, 0x1 @@ -321,7 +321,6 @@ ClusterToLBA: .error: ERROR STAGE2_FAT32_CLS2LBA_CF -; bp - 2 - byte boot_drive ; uint8_t ReadFATCluster(uint16_t seg, uint16_t offset, uint32_t cluster) ALIGN 4, db 0x90 ReadFATCluster: @@ -329,7 +328,7 @@ ReadFATCluster: .func: print_string ReadFATCluster_info - mov ax, word [boot_drive] + movzx ax, byte [boot_drive] push ax mov ax, 0x1 ; count = 1