From 5f6d47797ec5c410fb34b480bfe4fb66d87ee9b1 Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Fri, 3 Oct 2003 13:50:38 +0000 Subject: [PATCH] Fix problem with FAT12 git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@711 6ac86273-5f31-0410-b378-82cca8765d1b --- boot/boot.asm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/boot/boot.asm b/boot/boot.asm index afe2473..8482933 100644 --- a/boot/boot.asm +++ b/boot/boot.asm @@ -308,7 +308,8 @@ fat_12: add si, si ; multiply cluster number by 3... ; the number was odd, CF was set in the last shift instruction. jnc fat_even - div word[LBA_PACKET]; luckily 16 !! -- divide the cluster number + mov cl, 4 + shr ax, cl fat_even: and ah, 0x0f ; mask off the highest 4 bits cmp ax, 0x0ff8 ; check for EOF @@ -449,7 +450,7 @@ read_next: read_normal_BIOS: ;******************** END OF LBA_READ ************************ - mov ax,LBA_SECTOR_0 + mov cx,LBA_SECTOR_0 mov dx,LBA_SECTOR_16 @@ -462,7 +463,6 @@ read_normal_BIOS: ; + head * sectPerTrack offset in cylinder ; + track * sectPerTrack * nHeads offset in platter ; - xchg ax, cx mov al, [sectPerTrack] mul byte [nHeads] xchg ax, cx