wok-current rev 25458
Update some web_site
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Sep 27 16:21:52 2022 +0000 (2022-09-27) |
parents | ad0bc3efbf37 |
children | 715a7620dc23 |
files | BootProg/stuff/boot16.asm BootProg/stuff/boot32.asm BootProg/stuff/bootex.asm liblo/receipt libsdl-pango-dev/receipt libsdl-pango/receipt w3m/receipt |
line diff
1.1 --- a/BootProg/stuff/boot16.asm Fri Sep 23 08:28:09 2022 +0000 1.2 +++ b/BootProg/stuff/boot16.asm Tue Sep 27 16:21:52 2022 +0000 1.3 @@ -84,11 +84,12 @@ 1.4 1.5 %define bx(label) bx+label-boot 1.6 %define si(label) si+label-boot 1.7 -NullEntryCheck equ 1 ; +3 bytes 1.8 +NullEntryCheck equ 1 ; +2 bytes 1.9 ReadRetry equ 1 ; +9 bytes 1.10 LBAsupport equ 1 ; +16 bytes 1.11 Over2GB equ 1 ; +5 bytes 1.12 GeometryCheck equ 1 ; +18 bytes 1.13 +SectorOf512Bytes equ 1 ; -4/-6 bytes 1.14 1.15 [BITS 16] 1.16 [CPU 8086] 1.17 @@ -134,8 +135,8 @@ 1.18 bsUnused DB 0 ; 0x25 1.19 bsExtBootSignature DB 0 ; 0x26 1.20 bsSerialNumber DD 0 ; 0x27 1.21 -bsVolumeLabel DB "NO NAME " ; 0x2B 1.22 -bsFileSystem DB "FAT12 " ; 0x36 1.23 +bsVolumeLabel times 11 DB " " ; 0x2B "NO NAME " 1.24 +bsFileSystem times 8 DB " " ; 0x36 "FAT12 " or "FAT16 " 1.25 1.26 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1.27 ;; Boot sector code starts here ;; 1.28 @@ -223,26 +224,32 @@ 1.29 push es 1.30 1.31 mul bx ; dx:ax = 0 = LBA (LBA are relative to FAT) 1.32 - mov cx, word [bx(bpbSectorsPerFAT)] 1.33 + mov di, word [bx(bpbSectorsPerFAT)] 1.34 1.35 - call ReadCXSectors ; read fat and clear ax & cx; bp = SectorsPerFAT 1.36 + call ReadDISectors ; read fat; clear ax, cx, di; bp = SectorsPerFAT 1.37 1.38 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1.39 ;; load the root directory in ;; 1.40 ;; its entirety (16KB max) ;; 1.41 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1.42 1.43 +%if SectorOf512Bytes != 0 1.44 + mov di, word [bx(bpbRootEntries)] 1.45 + mov cl, 4 1.46 + shr di, cl ; di = root directory size in sectors 1.47 +%else 1.48 mov al, 32 1.49 1.50 mul word [bx(bpbRootEntries)] 1.51 div word [bx(bpbBytesPerSector)] 1.52 - xchg ax, cx ; cx = root directory size in sectors, clear ax 1.53 + xchg ax, di ; di = root directory size in sectors, clear ah 1.54 +%endif 1.55 1.56 mov al, [bpbNumberOfFATs] 1.57 - mul bp ; [bx(bpbSectorsPerFAT)], set by ReadCXSectors 1.58 + mul bp ; [bx(bpbSectorsPerFAT)], set by ReadDISectors 1.59 1.60 push es ; read root directory 1.61 - call ReadCXSectors ; clear ax, cx & di; bp = first data sector 1.62 + call ReadDISectors ; clear ax, cx, di; bp = first data sector 1.63 pop es 1.64 1.65 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1.66 @@ -267,14 +274,16 @@ 1.67 pop di 1.68 je FindNameFound 1.69 %if NullEntryCheck != 0 1.70 - scasb 1.71 - je FindNameFailed ; end of root directory (NULL entry found) 1.72 - add di, byte 31 1.73 + scasb ; Z == NC 1.74 + cmc 1.75 + lea di, [di+31] 1.76 + dec word [bx(bpbRootEntries)] 1.77 + ja FindNameCycle ; next root entry 1.78 %else 1.79 add di, byte 32 1.80 -%endif 1.81 dec word [bx(bpbRootEntries)] 1.82 jnz FindNameCycle ; next root entry 1.83 +%endif 1.84 1.85 FindNameFailed: 1.86 call Error 1.87 @@ -304,9 +313,9 @@ 1.88 ;; CH = 0 ;; 1.89 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1.90 1.91 -FAT12 equ 1 1.92 -FAT16 equ 1 1.93 -TINYFAT16 equ 1 1.94 +FAT12 equ 1 1.95 +FAT16 equ 1 1.96 +TINYFAT16 equ 1 1.97 push di ; up to 2 * 635K / BytesPerCluster = 2540 bytes 1.98 %if FAT12 == 1 1.99 mov cl, 12 1.100 @@ -323,10 +332,11 @@ 1.101 mov dx, 0FFF6h 1.102 %if TINYFAT16 == 1 1.103 test [bx(bsFileSystem+4)], cl ; FAT12 or FAT16 ? clear C 1.104 + jne ReadClusterFat16 1.105 %else 1.106 cmp [bx(bpbSectorsPerFAT)], cx ; 1..12 = FAT12, 16..256 = FAT16 1.107 + ja ReadClusterFat16 1.108 %endif 1.109 - jne ReadClusterFat16 1.110 mov dh, 0Fh 1.111 %endif 1.112 %endif 1.113 @@ -388,9 +398,9 @@ 1.114 add ax, bp ; LBA for cluster data 1.115 adc dx, bx ; dx:ax = LBA 1.116 1.117 - call ReadSector ; clear ax, restore dx 1.118 + call ReadSectors ; clear ax, restore dx 1.119 1.120 - jne ReadClusters 1.121 + jne ReadClusters ; until end of file 1.122 1.123 pop bp ; ImageLoadSeg 1.124 1.125 @@ -470,14 +480,52 @@ 1.126 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1.127 retf 1.128 1.129 -ReadCXSectors: 1.130 - mov bp, cx 1.131 +;;;;;;;;;;;;;;;;;;;;;;;;;; 1.132 +;; Error Messaging Code ;; 1.133 +;;;;;;;;;;;;;;;;;;;;;;;;;; 1.134 + 1.135 +Error: 1.136 + pop si 1.137 + 1.138 +PutStr: 1.139 + mov ah, 0Eh 1.140 + mov bl, 7 1.141 + lodsb 1.142 + int 10h 1.143 + cmp al, "." 1.144 + jne PutStr 1.145 + 1.146 + cbw 1.147 + int 16h ; wait for a key... 1.148 + int 19h ; bootstrap 1.149 + 1.150 +Stop: 1.151 + hlt 1.152 + jmp short Stop 1.153 + 1.154 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1.155 +;; Read sectors using BIOS Int 13h ;; 1.156 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1.157 +;; Input: DX:AX = LBA relative to FAT ;; 1.158 +;; BX = 0 ;; 1.159 +;; DI = sector count ;; 1.160 +;; ES:BX -> buffer address ;; 1.161 +;; Output: ES:BX -> next address ;; 1.162 +;; BX = 0 ;; 1.163 +;; CX = 0 ;; 1.164 +;; DI = 0 ;; 1.165 +;; DL = drive number ;; 1.166 +;; DX:BP = next LBA from FAT ;; 1.167 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1.168 + 1.169 +ReadDISectors: 1.170 + mov bp, di 1.171 add bp, ax ; adjust LBA for cluster data 1.172 1.173 - mov di, cx ; no file size limit 1.174 + mov cx, di ; no cluster size limit 1.175 1.176 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1.177 -;; Reads sectors using BIOS Int 13h ;; 1.178 +;; Read sectors using BIOS Int 13h ;; 1.179 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1.180 ;; Input: DX:AX = LBA relative to FAT ;; 1.181 ;; BX = 0 ;; 1.182 @@ -490,7 +538,7 @@ 1.183 ;; DL = drive number ;; 1.184 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1.185 1.186 -ReadSector: 1.187 +ReadSectors: 1.188 add ax, [bx(bpbHiddenSectors)] 1.189 adc dx, [bx(bpbHiddenSectors)+2] 1.190 add ax, [bx(bpbReservedSectors)] 1.191 @@ -538,10 +586,11 @@ 1.192 idiv word [bx(bpbHeadsPerCylinder)] 1.193 ; ax = (LBA / SPT) / HPC = cylinder 1.194 ; dx = (LBA / SPT) % HPC = head 1.195 - mov ch, al 1.196 + 1.197 + xchg ch, al ; clear al 1.198 ; ch = LSB 0...7 of cylinder no. 1.199 - mov al, 64 1.200 - mul ah 1.201 + shr ax, 1 1.202 + shr ax, 1 1.203 or cl, al 1.204 ; cl = MSB 8...9 of cylinder no. + sector no. 1.205 mov dh, dl 1.206 @@ -577,14 +626,22 @@ 1.207 1.208 %if LBAsupport != 0 1.209 pop ax ; al = 16 1.210 + %if SectorOf512Bytes != 0 1.211 + add word [si+6], byte 32 ; adjust segment for next sector 1.212 + %else 1.213 mul byte [bx(bpbBytesPerSector)+1] ; = (bpbBytesPerSector/256)*16 1.214 + add [si+6], ax ; adjust segment for next sector 1.215 + %endif 1.216 pop cx ; sector count = 1 1.217 pop bx 1.218 - add [si+6], ax ; adjust segment for next sector 1.219 %else 1.220 + %if SectorOf512Bytes != 0 1.221 + add word [si], byte 32 ; adjust segment for next sector 1.222 + %else 1.223 mov al, 16 1.224 mul byte [bx(bpbBytesPerSector)+1] ; = (bpbBytesPerSector/256)*16 1.225 add [si], ax ; adjust segment for next sector 1.226 + %endif 1.227 %endif 1.228 pop es ; es:0 updated 1.229 pop ax 1.230 @@ -611,30 +668,7 @@ 1.231 ;; Fill free space with zeroes ;; 1.232 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1.233 1.234 - times (512-13-20-($-$$)) db 0 1.235 - 1.236 -;;;;;;;;;;;;;;;;;;;;;;;;;; 1.237 -;; Error Messaging Code ;; 1.238 -;;;;;;;;;;;;;;;;;;;;;;;;;; 1.239 - 1.240 -Error: 1.241 - pop si 1.242 - 1.243 -PutStr: 1.244 - mov ah, 0Eh 1.245 - mov bl, 7 1.246 - lodsb 1.247 - int 10h 1.248 - cmp al, "." 1.249 - jne PutStr 1.250 - 1.251 - cbw 1.252 - int 16h ; wait for a key... 1.253 - int 19h ; bootstrap 1.254 - 1.255 -Stop: 1.256 - hlt 1.257 - jmp short Stop 1.258 + times (512-13-($-$$)) db 0 1.259 1.260 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1.261 ;; Name of the file to load and run ;;
2.1 --- a/BootProg/stuff/boot32.asm Fri Sep 23 08:28:09 2022 +0000 2.2 +++ b/BootProg/stuff/boot32.asm Tue Sep 27 16:21:52 2022 +0000 2.3 @@ -80,11 +80,14 @@ 2.4 %define bx(label) bx+label-boot 2.5 %define si(label) si+label-boot 2.6 ClusterMask equ 1 ; +9 bytes 2.7 -NullEntryCheck equ 1 ; +5 bytes 2.8 +NullEntryCheck equ 0 ; +5 bytes 2.9 ReadRetry equ 1 ; +7 bytes 2.10 -LBA48bits equ 1 ; +13 bytes 2.11 +LBA48bits equ 1 ; +15 bytes 2.12 CHSsupport equ 1 ; +27 bytes 2.13 -CHShardDisk equ 0 ; +11 bytes 2.14 +CHSupTo8GB equ 1 ; +11 bytes 2.15 +CHSupTo32MB equ 1 ; +7 bytes 2.16 +SectorOf512Bytes equ 1 ; -5 bytes 2.17 +Always2FATs equ 0 ; -4 bytes 2.18 2.19 [BITS 16] 2.20 2.21 @@ -99,6 +102,8 @@ 2.22 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.23 2.24 boot: 2.25 +DriveNumber equ boot+0 2.26 +HiLBA equ boot+2 2.27 jmp short start ; MS-DOS/Windows checks for this jump 2.28 nop 2.29 bsOemName DB "BootProg" ; 0x03 2.30 @@ -136,17 +141,11 @@ 2.31 bsBackupBootSectorNo DW 0 ; 0x32 2.32 bsreserved times 12 DB 0 ; 0x34 2.33 bsDriveNumber DB 0 ; 0x40 2.34 -%if LBA48bits != 0 2.35 -HiLBA equ boot+0 2.36 -DriveNumber equ bsDriveNumber+0 2.37 -%else 2.38 -DriveNumber equ boot+0 2.39 -%endif 2.40 bsreserved1 DB 0 ; 0x41 2.41 bsExtendedBootSignature DB 0 ; 0x42 2.42 bsVolumeSerialNumber DD 0 ; 0x43 2.43 -bsVolumeLabel DB "NO NAME " ; 0x47 2.44 -bsFileSystemName DB "FAT32 " ; 0x52 2.45 +bsVolumeLabel times 11 DB " " ; 0x47 "NO NAME " 2.46 +bsFileSystemName times 8 DB " " ; 0x52 "FAT32 " 2.47 2.48 ;;;;;;;;;;;;;;;;;;;; 2.49 ;; BPB2 ends here ;; 2.50 @@ -210,8 +209,7 @@ 2.51 pop es 2.52 2.53 RootDirReadContinue: 2.54 - call ReadCluster ; read one cluster of root dir 2.55 - pushf ; save carry="not last cluster" flag 2.56 + call ReadClusterSector ; read one sector of the root dir 2.57 2.58 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.59 ;; Look for the COM/EXE file to load and run ;; 2.60 @@ -243,8 +241,9 @@ 2.61 dec bp 2.62 dec bp 2.63 jnz FindNameCycle ; next root entry 2.64 - popf ; restore carry="not last cluster" flag 2.65 - jc RootDirReadContinue ; continue to the next root dir cluster 2.66 + loop RootDirReadContinue ; next sector in cluster 2.67 + cmp esi, 0FFFFFF6h ; carry=0 if last cluster, and carry=1 otherwise 2.68 + jnc RootDirReadContinue ; continue to the next root dir cluster 2.69 ErrFind: 2.70 call Error ; end of root directory (dir end reached) 2.71 db "File not found." 2.72 @@ -263,7 +262,8 @@ 2.73 push es 2.74 FileReadContinue: 2.75 push di 2.76 - call ReadCluster ; read one cluster of root dir 2.77 + call ReadClusterSector ; read one sector of the boot file 2.78 + dec cx 2.79 mov di, es 2.80 add di, bp 2.81 mov es, di ; es:bx updated 2.82 @@ -350,56 +350,97 @@ 2.83 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.84 retf 2.85 2.86 -ReadCluster: 2.87 +;;;;;;;;;;;;;;;;;;;;;;;;;; 2.88 +;; Error Messaging Code ;; 2.89 +;;;;;;;;;;;;;;;;;;;;;;;;;; 2.90 + 2.91 +Error: 2.92 + pop si 2.93 +puts: 2.94 + mov ah, 0Eh 2.95 + mov bl, 7 2.96 + lodsb 2.97 + int 10h 2.98 + cmp al, '.' 2.99 + jne puts 2.100 + cbw 2.101 + int 16h ; wait for a key... 2.102 + int 19h ; bootstrap 2.103 + 2.104 +Stop: 2.105 + hlt 2.106 + jmp short Stop 2.107 + 2.108 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.109 +;; Reads a FAT32 sector ;; 2.110 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.111 +;; Inout: ES:BX -> buffer ;; 2.112 +;; EAX = prev sector ;; 2.113 +;; CX = rem sectors in cluster ;; 2.114 +;; ESI = next cluster ;; 2.115 +;; Output: EAX = current sector ;; 2.116 +;; CX = rem sectors in cluster ;; 2.117 +;; ESI = next cluster ;; 2.118 +;; BP -> para / sector ;; 2.119 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.120 + 2.121 +ReadClusterSector: 2.122 +%if SectorOf512Bytes != 0 2.123 + mov bp, 32 ; bp = paragraphs per sector 2.124 +%else 2.125 mov bp, [bx(bpbBytesPerSector)] 2.126 shr bp, 4 ; bp = paragraphs per sector 2.127 +%endif 2.128 mov dx, 1 ; adjust LBA for next sector 2.129 inc cx 2.130 loop ReadSectorLBA 2.131 2.132 -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.133 -;; Reads a FAT32 cluster ;; 2.134 -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.135 -;; Inout: ES:BX -> buffer ;; 2.136 -;; ESI = cluster no ;; 2.137 -;; Output: ESI = next cluster ;; 2.138 -;; BP -> para / sector ;; 2.139 -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.140 - 2.141 mul ebx ; edx:eax = 0 2.142 +%if SectorOf512Bytes != 0 2.143 + mov al, 128 ; ax=# of FAT32 entries per sector 2.144 +%else 2.145 imul ax, bp, byte 4 ; ax=# of FAT32 entries per sector 2.146 +%endif 2.147 lea edi, [esi-2] ; esi=cluster # 2.148 xchg eax, esi 2.149 div esi ; eax=FAT sector #, edx=entry # in sector 2.150 2.151 imul si, dx, byte 4 ; si=entry # in sector, clear C 2.152 %if LBA48bits != 0 2.153 - xor dx, dx ; clear C 2.154 + xor dx, dx 2.155 %endif 2.156 - call ReadSectorLBAabsolute ; read 1 FAT32 sector 2.157 + call ReadSectorLBAfromFAT ; read 1 FAT32 sector 2.158 2.159 %if ClusterMask != 0 2.160 and byte [es:si+3], 0Fh ; mask cluster value 2.161 %endif 2.162 mov esi, [es:si] ; esi=next cluster # 2.163 2.164 +%if Always2FATs != 0 2.165 + imul eax, dword [bx(bsSectorsPerFAT32)], 2 2.166 +%else 2.167 movzx eax, byte [bx(bpbNumberOfFATs)] 2.168 mul dword [bx(bsSectorsPerFAT32)] 2.169 +%endif 2.170 2.171 xchg eax, edi 2.172 movzx ecx, byte [bx(bpbSectorsPerCluster)] ; 8..128 2.173 mul ecx ; edx:eax=sector number in data area 2.174 add eax, edi 2.175 +%if LBA48bits != 0 2.176 + adc dx, bx 2.177 +%endif 2.178 2.179 -ReadSectorLBAabsolute: 2.180 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.181 +;; Reads a sector form the start of FAT ;; 2.182 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.183 + 2.184 +ReadSectorLBAfromFAT: 2.185 + add eax, [bx(bpbHiddenSectors)] 2.186 %if LBA48bits != 0 2.187 adc dx, bx 2.188 mov word [bx(HiLBA)], dx 2.189 %endif 2.190 - add eax, [bx(bpbHiddenSectors)] 2.191 -%if LBA48bits != 0 2.192 - adc word [bx(HiLBA)], bx 2.193 -%endif 2.194 mov dx, [bx(bpbReservedSectors)] 2.195 2.196 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.197 @@ -432,7 +473,7 @@ 2.198 push byte 16 ; packet size byte = 16, reserved byte = 0 2.199 2.200 %if CHSsupport != 0 2.201 -%if CHShardDisk != 0 2.202 + %if CHSupTo8GB != 0 2.203 push eax 2.204 pop cx ; save low LBA 2.205 pop ax ; get high LBA 2.206 @@ -440,12 +481,16 @@ 2.207 idiv word [bx(bpbSectorsPerTrack)] ; up to 8GB disks, avoid divide error 2.208 2.209 xchg ax, cx ; restore low LBA, save high LBA / SPT 2.210 -%else 2.211 + %else 2.212 ; Busybox mkdosfs creates fat32 for floppies. 2.213 ; Floppies may support CHS only. 2.214 + %if CHSupTo32MB != 0 2.215 + xor dx, dx ; clear dx (LBA offset <32MB) 2.216 + %else 2.217 cwd ; clear dx (LBA offset <16MB) 2.218 + %endif 2.219 xor cx, cx ; high LBA / SPT = 0 2.220 -%endif 2.221 + %endif 2.222 idiv word [bx(bpbSectorsPerTrack)] 2.223 ; ax = LBA / SPT 2.224 ; dx = LBA % SPT = sector - 1 2.225 @@ -456,13 +501,13 @@ 2.226 ; ax = (LBA / SPT) / HPC = cylinder 2.227 ; dx = (LBA / SPT) % HPC = head 2.228 2.229 - mov ch, al 2.230 + xchg ch, al ; clear al 2.231 ; ch = LSB 0...7 of cylinder no. 2.232 -%if CHShardDisk != 0 2.233 - shl ah, 6 2.234 - or cl, ah 2.235 + %if CHSupTo8GB != 0 || CHSupTo32MB != 0 2.236 + shr ax, 2 2.237 + or cl, al 2.238 ; cl = MSB 8...9 of cylinder no. + sector no. 2.239 -%endif 2.240 + %endif 2.241 mov dh, dl 2.242 ; dh = head no. 2.243 mov dl, [bx(DriveNumber)] ; restore BIOS boot drive number 2.244 @@ -482,11 +527,11 @@ 2.245 jnc ReadSuccess ; CF = 0 if no error 2.246 %endif 2.247 %if ReadRetry != 0 2.248 -%if CHSsupport != 0 2.249 + %if CHSsupport != 0 2.250 cbw ; ah = 0 = reset function 2.251 -%else 2.252 + %else 2.253 xor ax, ax ; ah = 0 = reset function 2.254 -%endif 2.255 + %endif 2.256 int 13h ; reset drive (DL) 2.257 2.258 dec bp ; up to 32 retries 2.259 @@ -499,43 +544,14 @@ 2.260 ReadSuccess: 2.261 2.262 popa ; sp += 16 2.263 - 2.264 popa 2.265 - 2.266 - stc 2.267 - loop ReadSectorNext 2.268 - 2.269 - cmp esi, 0FFFFFF6h ; carry=0 if last cluster, and carry=1 otherwise 2.270 - 2.271 -ReadSectorNext: 2.272 ret 2.273 2.274 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.275 ;; Fill free space with zeroes ;; 2.276 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.277 2.278 - times (512-13-20-($-$$)) db 0 2.279 - 2.280 -;;;;;;;;;;;;;;;;;;;;;;;;;; 2.281 -;; Error Messaging Code ;; 2.282 -;;;;;;;;;;;;;;;;;;;;;;;;;; 2.283 - 2.284 -Error: 2.285 - pop si 2.286 -puts: 2.287 - mov ah, 0Eh 2.288 - mov bl, 7 2.289 - lodsb 2.290 - int 10h 2.291 - cmp al, '.' 2.292 - jne puts 2.293 - cbw 2.294 - int 16h ; wait for a key... 2.295 - int 19h ; bootstrap 2.296 - 2.297 -Stop: 2.298 - hlt 2.299 - jmp short Stop 2.300 + times (512-13-($-$$)) db 0 2.301 2.302 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2.303 ;; Name of the file to load and run ;;
3.1 --- a/BootProg/stuff/bootex.asm Fri Sep 23 08:28:09 2022 +0000 3.2 +++ b/BootProg/stuff/bootex.asm Tue Sep 27 16:21:52 2022 +0000 3.3 @@ -80,6 +80,7 @@ 3.4 %define si(label) si+label-boot 3.5 NullEntryCheck equ 1 ; +3 bytes 3.6 ReadRetry equ 1 ; +8 bytes 3.7 +SectorOf512Bytes equ 1 ; -13 bytes 3.8 3.9 [BITS 16] 3.10 [CPU 386] 3.11 @@ -98,7 +99,7 @@ 3.12 DriveNumber: 3.13 jmp short start ; Windows checks for this jump 3.14 nop 3.15 -bsOemName DB "EXFAT " ; 0x03 3.16 +bsOemName times 8 db " " ; 0x03 "EXFAT " 3.17 times 53 db 0 ; 0x0B 3.18 3.19 ;;;;;;;;;;;;;;;;;;;;; 3.20 @@ -182,7 +183,6 @@ 3.21 3.22 RootDirReadContinue: 3.23 call ReadCluster ; read one sector of root dir 3.24 - pushf ; save carry="not last sector" flag 3.25 3.26 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3.27 ;; Look for the COM/EXE file to load and run ;; 3.28 @@ -237,7 +237,8 @@ 3.29 add di, byte 32 3.30 cmp di, bp 3.31 jne FindNameCycle ; next root entry 3.32 - popf ; restore carry="not last sector" flag 3.33 + loop RootDirReadContinue ; continue to the next root dir sector 3.34 + cmp esi, byte -10 ; carry=0 if last cluster, and carry=1 otherwise 3.35 jc RootDirReadContinue ; continue to the next root dir cluster 3.36 FindNameFailed: ; end of root directory (dir end reached) 3.37 mov dl, [bx(DriveNumber)] ; restore BIOS boot drive number 3.38 @@ -251,14 +252,24 @@ 3.39 ;;;;;;;;;;;;;;;;;;;;;;;;;; 3.40 3.41 push es 3.42 +%if SectorOf512Bytes == 0 3.43 xor bp, bp 3.44 FileReadContinue: 3.45 shr bp, 4 ; bytes to paragraphs 3.46 mov di, es 3.47 add di, bp ; adjust segment for next sector 3.48 mov es, di ; es:0 updated 3.49 +%else 3.50 +FileReadContinue: 3.51 +%endif 3.52 call ReadCluster ; read one more sector of the boot file 3.53 + dec cx 3.54 sub [bx+FileSize], ebp ; max FileSize is < 640KB : check low 32 bits only 3.55 +%if SectorOf512Bytes != 0 3.56 + mov bp, es 3.57 + lea bp, [bp+32] 3.58 + mov es, bp ; es:0 updated 3.59 +%endif 3.60 ja FileReadContinue 3.61 mov dx, [bx(DriveNumber)] ; restore BIOS boot drive number 3.62 xchg ax, di 3.63 @@ -340,6 +351,29 @@ 3.64 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3.65 retf 3.66 3.67 +;;;;;;;;;;;;;;;;;;;;;;;;;; 3.68 +;; Error Messaging Code ;; 3.69 +;;;;;;;;;;;;;;;;;;;;;;;;;; 3.70 + 3.71 +Error: 3.72 + pop si 3.73 + 3.74 +PutStr: 3.75 + mov ah, 0Eh 3.76 + mov bl, 7 3.77 + lodsb 3.78 + int 10h 3.79 + cmp al, "." 3.80 + jne PutStr 3.81 + 3.82 + cbw 3.83 + int 16h ; wait for a key... 3.84 + int 19h ; bootstrap 3.85 + 3.86 +Stop: 3.87 + hlt 3.88 + jmp short Stop 3.89 + 3.90 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3.91 ;; Reads a exFAT cluster ;; 3.92 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3.93 @@ -362,9 +396,13 @@ 3.94 loop ReadSectorC 3.95 3.96 mul ebx ; edx:eax = 0 3.97 +%if SectorOf512Bytes != 0 3.98 + mov al, 128 3.99 +%else 3.100 mov cl, -2 3.101 add cl, [bx(bpbSectorSizeBits)] 3.102 bts ax, cx ; eax=# of exFAT entries per sector 3.103 +%endif 3.104 lea edi, [esi-2] ; edi=cluster #-2 3.105 xchg eax, esi 3.106 div esi ; eax=FAT sector #, edx=entry # in sector 3.107 @@ -402,8 +440,11 @@ 3.108 ;; ES:0 -> next address ;; 3.109 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3.110 3.111 - xor ebp, ebp 3.112 - inc bp 3.113 +%if SectorOf512Bytes != 0 3.114 + lea ebp, [bx+512] 3.115 +%else 3.116 + lea ebp, [bx+1] 3.117 +%endif 3.118 3.119 pushad 3.120 3.121 @@ -414,7 +455,11 @@ 3.122 push eax 3.123 push es 3.124 push bx 3.125 +%if SectorOf512Bytes != 0 3.126 + push byte 1 ; sector count word = 1 3.127 +%else 3.128 push bp ; sector count word = 1 3.129 +%endif 3.130 push byte 16 ; packet size byte = 16, reserved byte = 0 3.131 ReadSectorRetry: 3.132 mov si, sp 3.133 @@ -428,53 +473,30 @@ 3.134 xor ax, ax 3.135 int 13h ; reset drive (DL) 3.136 dec bp 3.137 + %if SectorOf512Bytes != 0 3.138 + jne ReadSectorRetry ; up to 511 tries 3.139 + %else 3.140 jpe ReadSectorRetry ; up to 3 tries 3.141 + %endif 3.142 %endif 3.143 3.144 call Error 3.145 db "Read error." 3.146 3.147 ReadSuccess: 3.148 +%if SectorOf512Bytes == 0 3.149 mov cl, [bx(bpbSectorSizeBits)] 3.150 shl word [si+16+8], cl ; (e)bp si+16: EDI ESI EBP ESP EBX EDX ECX EAX 3.151 +%endif 3.152 popa ; sp += 16 3.153 popad ; real registers 3.154 - 3.155 - stc 3.156 - loop ReadSectorNext 3.157 - 3.158 - cmp esi, byte -10 ; carry=0 if last cluster, and carry=1 otherwise 3.159 -ReadSectorNext: 3.160 ret 3.161 3.162 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3.163 ;; Fill free space with zeroes ;; 3.164 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3.165 3.166 - times (512-13-20-($-$$)) db 0 3.167 - 3.168 -;;;;;;;;;;;;;;;;;;;;;;;;;; 3.169 -;; Error Messaging Code ;; 3.170 -;;;;;;;;;;;;;;;;;;;;;;;;;; 3.171 - 3.172 -Error: 3.173 - pop si 3.174 - 3.175 -PutStr: 3.176 - mov ah, 0Eh 3.177 - mov bl, 7 3.178 - lodsb 3.179 - int 10h 3.180 - cmp al, "." 3.181 - jne PutStr 3.182 - 3.183 - cbw 3.184 - int 16h ; wait for a key... 3.185 - int 19h ; bootstrap 3.186 - 3.187 -Stop: 3.188 - hlt 3.189 - jmp short Stop 3.190 + times (512-13-($-$$)) db 0 3.191 3.192 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 3.193 ;; Name of the file to load and run ;;
4.1 --- a/liblo/receipt Fri Sep 23 08:28:09 2022 +0000 4.2 +++ b/liblo/receipt Tue Sep 27 16:21:52 2022 +0000 4.3 @@ -6,7 +6,7 @@ 4.4 MAINTAINER="jozee@slitaz.org" 4.5 LICENSE="LGPL2.1" 4.6 SHORT_DESC="Lightweight OSC implementation: an implementation of the Open Sound Control protocol for POSIX systems" 4.7 -WEB_SITE="https://sourceforge.net/projects///liblo" 4.8 +WEB_SITE="https://sourceforge.net/projects/liblo" 4.9 4.10 TARBALL="$PACKAGE-$VERSION.tar.gz" 4.11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
5.1 --- a/libsdl-pango-dev/receipt Fri Sep 23 08:28:09 2022 +0000 5.2 +++ b/libsdl-pango-dev/receipt Tue Sep 27 16:21:52 2022 +0000 5.3 @@ -6,7 +6,7 @@ 5.4 SHORT_DESC="devel files for libsdl-pango" 5.5 MAINTAINER="slaxemulator@gmail.com" 5.6 LICENSE="LGPL2.1" 5.7 -WEB_SITE="http://sdlpango.sourceforge.net/" 5.8 +WEB_SITE="https://sdlpango.sourceforge.net/" 5.9 WANTED="libsdl-pango" 5.10 HOST_ARCH="i486 arm" 5.11
6.1 --- a/libsdl-pango/receipt Fri Sep 23 08:28:09 2022 +0000 6.2 +++ b/libsdl-pango/receipt Tue Sep 27 16:21:52 2022 +0000 6.3 @@ -8,7 +8,7 @@ 6.4 LICENSE="LGPL2.1" 6.5 SOURCE="SDL_Pango" 6.6 TARBALL="$SOURCE-$VERSION.tar.gz" 6.7 -WEB_SITE="http://sdlpango.sourceforge.net/" 6.8 +WEB_SITE="https://sdlpango.sourceforge.net/" 6.9 WGET_URL="$SF_MIRROR/sdlpango/$TARBALL" 6.10 HOST_ARCH="i486 arm" 6.11
7.1 --- a/w3m/receipt Fri Sep 23 08:28:09 2022 +0000 7.2 +++ b/w3m/receipt Tue Sep 27 16:21:52 2022 +0000 7.3 @@ -6,7 +6,7 @@ 7.4 SHORT_DESC="Text Mode Web Browser" 7.5 MAINTAINER="mojo@slitaz.org" 7.6 LICENSE="MIT" 7.7 -WEB_SITE="http://w3m.sourceforge.net" 7.8 +WEB_SITE="http://w3m.sourceforge.net/index.en.html" 7.9 TARBALL="$PACKAGE-$VERSION.tar.gz" 7.10 WGET_URL="$SF_MIRROR/$PACKAGE/$PACKAGE/$TARBALL" 7.11 TAGS="web-browser"