mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 23:22:57 +00:00
[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:
parent
631d55b60c
commit
ccda8278da
6 changed files with 30 additions and 29 deletions
|
@ -62,9 +62,9 @@ FSInfoSector:
|
||||||
BackupBootSector:
|
BackupBootSector:
|
||||||
.word 6
|
.word 6
|
||||||
Reserved1:
|
Reserved1:
|
||||||
.byte 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
.space 12, 0
|
||||||
|
|
||||||
// End FAT32 Inserted Info
|
// End FAT32 Inserted Info
|
||||||
|
|
||||||
BootDrive:
|
BootDrive:
|
||||||
.byte 0
|
.byte 0
|
||||||
Reserved:
|
Reserved:
|
||||||
|
|
|
@ -122,6 +122,7 @@ LoadExtraBootCode:
|
||||||
; EAX has logical sector number to read
|
; EAX has logical sector number to read
|
||||||
; CX has number of sectors to read
|
; CX has number of sectors to read
|
||||||
ReadSectors:
|
ReadSectors:
|
||||||
|
push es
|
||||||
cmp eax,DWORD [BiosCHSDriveSize] ; Check if they are reading a sector outside CHS range
|
cmp eax,DWORD [BiosCHSDriveSize] ; Check if they are reading a sector outside CHS range
|
||||||
jae ReadSectorsLBA ; Yes - go to the LBA routine
|
jae ReadSectorsLBA ; Yes - go to the LBA routine
|
||||||
; If at all possible we want to use LBA routines because
|
; If at all possible we want to use LBA routines because
|
||||||
|
@ -181,6 +182,7 @@ ReadSectorsSetupDiskAddressPacket:
|
||||||
sub cx,[LBASectorsRead]
|
sub cx,[LBASectorsRead]
|
||||||
jnz ReadSectorsLBA ; Read next sector
|
jnz ReadSectorsLBA ; Read next sector
|
||||||
|
|
||||||
|
pop es
|
||||||
ret
|
ret
|
||||||
|
|
||||||
LBASectorsRead:
|
LBASectorsRead:
|
||||||
|
@ -340,7 +342,6 @@ FindFile:
|
||||||
jmp StartSearch
|
jmp StartSearch
|
||||||
|
|
||||||
FoundFile:
|
FoundFile:
|
||||||
|
|
||||||
; Display "Loading FreeLoader..." message
|
; Display "Loading FreeLoader..." message
|
||||||
mov si,msgLoading ; Loading message
|
mov si,msgLoading ; Loading message
|
||||||
call PutChars ; Display it
|
call PutChars ; Display it
|
||||||
|
@ -437,21 +438,21 @@ GetActiveFatOffset:
|
||||||
|
|
||||||
LoadFatSector:
|
LoadFatSector:
|
||||||
push ecx
|
push ecx
|
||||||
|
|
||||||
|
mov bx, 9000h ; We will load it to [9000:0000h]
|
||||||
|
mov es, bx
|
||||||
|
|
||||||
; EAX holds logical FAT sector number
|
; EAX holds logical FAT sector number
|
||||||
; Check if we have already loaded it
|
; Check if we have already loaded it
|
||||||
cmp eax,DWORD [FatSectorInCache]
|
cmp eax,DWORD [FatSectorInCache]
|
||||||
je LoadFatSectorAlreadyLoaded
|
je LoadFatSectorAlreadyLoaded
|
||||||
|
|
||||||
mov DWORD [FatSectorInCache],eax
|
mov DWORD [FatSectorInCache],eax
|
||||||
mov bx,9000h
|
xor bx,bx
|
||||||
mov es,bx
|
|
||||||
xor bx,bx ; We will load it to [9000:0000h]
|
|
||||||
mov cx,1
|
mov cx,1
|
||||||
call ReadSectors
|
call ReadSectors
|
||||||
|
|
||||||
LoadFatSectorAlreadyLoaded:
|
LoadFatSectorAlreadyLoaded:
|
||||||
mov bx,9000h
|
|
||||||
mov es,bx
|
|
||||||
pop ecx
|
pop ecx
|
||||||
mov eax,DWORD [es:ecx] ; Get FAT entry
|
mov eax,DWORD [es:ecx] ; Get FAT entry
|
||||||
and eax,0fffffffh ; Mask off reserved bits
|
and eax,0fffffffh ; Mask off reserved bits
|
||||||
|
|
|
@ -112,7 +112,7 @@ FSInfoSector:
|
||||||
BackupBootSector:
|
BackupBootSector:
|
||||||
.word 6
|
.word 6
|
||||||
Reserved1:
|
Reserved1:
|
||||||
.byte 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
.space 12, 0
|
||||||
#endif // FAT32
|
#endif // FAT32
|
||||||
|
|
||||||
BootDrive:
|
BootDrive:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue