wok rev 25704
BootProg: contiguous file support
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Jun 04 16:57:31 2024 +0000 (5 months ago) |
parents | 0af8df0b46fc |
children | 7db7b7aaf63e |
files | BootProg/stuff/bootex.asm |
line diff
1.1 --- a/BootProg/stuff/bootex.asm Tue Jun 04 16:09:04 2024 +0000 1.2 +++ b/BootProg/stuff/bootex.asm Tue Jun 04 16:57:31 2024 +0000 1.3 @@ -80,7 +80,7 @@ 1.4 %define si(label) si+label-boot 1.5 NullEntryCheck equ 1 ; +3/5 bytes 1.6 ReadRetry equ 1 ; +7 bytes 1.7 -SectorOf512Bytes equ 0 ; -12 bytes 1.8 +SectorOf512Bytes equ 1 ; -12 bytes 1.9 CheckAttrib equ 0 ; +16/18 bytes 1.10 WaitForKey equ 0 ; +5 bytes 1.11 TfatSupport equ 1 ; +10 bytes 1.12 @@ -238,6 +238,8 @@ 1.13 ;; dword [bx+FileSize] file size ;; 1.14 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1.15 1.16 +FLAG_CONTIGUOUS equ 2 1.17 +FileFlags equ 01h ; 1 byte 1.18 CurNameSize equ 03h ; 1 byte 1.19 StartCluster equ 14h ; 4 bytes 1.20 FileSize equ 18h ; 8 bytes 1.21 @@ -322,7 +324,10 @@ 1.22 FileReadContinue: 1.23 %endif 1.24 call ReadCluster ; read one more sector of the boot file 1.25 + test byte [bx+FileFlags], FLAG_CONTIGUOUS 1.26 + jne SameCluster 1.27 dec cx 1.28 +SameCluster: 1.29 sub [bx+FileSize], ebp ; max FileSize is < 640KB : check low 32 bits only 1.30 %if SectorOf512Bytes != 0 1.31 mov bp, es