commit 63dcbae4b58377862868ba0877f4ad28f75651d7
parent 778b11a7f0bc72e232036ac37b14bc8126414d76
Author: Virgil Dupras <hsoft@hardcoded.net>
Date: Tue, 20 Jun 2023 14:09:21 -0400
fs/fatlo: alignment discipline
Some "w" fields in the FAT header are on odd offsets. This needs special
treatment.
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/fs/fs/fatlo.fs b/fs/fs/fatlo.fs
@@ -56,11 +56,15 @@ sfield fatwin \ FAT secwin
sfield dirwin \ DirEntry secwin
\ FAT header now
$0b sallot
-sfieldw secsz \ in bytes
+sfieldb secszl
+sfieldb secszh
+: secsz bi secszh 8 lshift | secszl or ;
sfieldb secpercluster
sfieldw reservedseccnt
sfieldb FATcnt
-sfieldw rootentcnt
+sfieldb rootentcntl
+sfieldb rootentcnth
+: rootentcnt bi rootentcnth 8 lshift | rootentcntl or ;
sfieldw seccnt
1 sallot
sfieldw FATsz \ in sectors