[BOOTSECTORS]

- fat.asm: remove trailing whitespace.
- fat32.asm: backport the fixes from fat32.S introduced a long time ago.
- fat32.S/faty.S: use .space 12, 0 instead of the long .byte array (generates the same code, but is better readable).
- isoboot/btrt: whitespace fix only.

svn path=/trunk/; revision=70432
This commit is contained in:
Hermès Bélusca-Maïto 2015-12-26 21:28:01 +00:00
parent 631d55b60c
commit ccda8278da
6 changed files with 30 additions and 29 deletions

View file

@ -314,8 +314,8 @@ ReadSectorsLBALoop:
; jz PrintDiskError ; Bit 0, extended disk access functions (AH=42h-44h,47h,48h) supported
; Good, we're here so the computer supports LBA disk access
; So finish the extended read
; Good, we're here so the computer supports LBA disk access
; So finish the extended read
mov dl,[BYTE bp+BootDrive] ; Drive number
mov ah,42h ; Int 13h, AH = 42h - Extended Read
int 13h ; Call BIOS

View file

@ -62,9 +62,9 @@ FSInfoSector:
BackupBootSector:
.word 6
Reserved1:
.byte 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
.space 12, 0
// End FAT32 Inserted Info
BootDrive:
.byte 0
Reserved:
@ -355,8 +355,8 @@ ContinueSearch:
jmp PrintFileNotFound
FindFile:
mov ax, es // We didn't find it in the previous dir entry
add ax, 2 // So lets move to the next one
mov ax, es // We didn't find it in the previous dir entry
add ax, 2 // So lets move to the next one
mov es, ax // And search again
xor di, di
mov si, offset filename

View file

@ -122,6 +122,7 @@ LoadExtraBootCode:
; EAX has logical sector number to read
; CX has number of sectors to read
ReadSectors:
push es
cmp eax,DWORD [BiosCHSDriveSize] ; Check if they are reading a sector outside CHS range
jae ReadSectorsLBA ; Yes - go to the LBA routine
; If at all possible we want to use LBA routines because
@ -181,6 +182,7 @@ ReadSectorsSetupDiskAddressPacket:
sub cx,[LBASectorsRead]
jnz ReadSectorsLBA ; Read next sector
pop es
ret
LBASectorsRead:
@ -340,7 +342,6 @@ FindFile:
jmp StartSearch
FoundFile:
; Display "Loading FreeLoader..." message
mov si,msgLoading ; Loading message
call PutChars ; Display it
@ -437,21 +438,21 @@ GetActiveFatOffset:
LoadFatSector:
push ecx
mov bx, 9000h ; We will load it to [9000:0000h]
mov es, bx
; EAX holds logical FAT sector number
; Check if we have already loaded it
cmp eax,DWORD [FatSectorInCache]
je LoadFatSectorAlreadyLoaded
mov DWORD [FatSectorInCache],eax
mov bx,9000h
mov es,bx
xor bx,bx ; We will load it to [9000:0000h]
xor bx,bx
mov cx,1
call ReadSectors
LoadFatSectorAlreadyLoaded:
mov bx,9000h
mov es,bx
pop ecx
mov eax,DWORD [es:ecx] ; Get FAT entry
and eax,0fffffffh ; Mask off reserved bits

View file

@ -112,7 +112,7 @@ FSInfoSector:
BackupBootSector:
.word 6
Reserved1:
.byte 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
.space 12, 0
#endif // FAT32
BootDrive: