commit ede2be1
zzo38
·
2022-11-17 04:22:30 +0000 UTC
parent e3dea70
Add prg/unlump.tal to extract lumps from a Hamster archive file.
2 files changed,
+54,
-2
+52,
-0
1@@ -0,0 +1,52 @@
2+\\ Extract files from a Hamster archive file.
3+\\ (Public domain)
4+
5+|0100
6+ LITr 00
7+ [; #10 DEO2 BRK ]@
8+
9+ #12 DEI DUP #0a EQU [, JCN STHrk STZ INCr BRK ]@
10+
11+ #00 STHr STZ
12+ #0000 DUP2 #10 DEO2 #a8 DEO2
13+
14+@next-lump
15+ LITr 00
16+ [@
17+ #ac DEI
18+ #a3 DEI [, JCN #010f DEO ]@
19+ DUP #00 EQU ,end-name JCN
20+ DUP #18 DEO
21+ STHrk STZ INCr
22+ ], JMP
23+
24+@end-name
25+ #00 STHr STZ
26+ #0a18 DEO
27+ #0000 #b8 DEO2
28+
29+\\ Big units
30+ #ac DEI2 SWP
31+ ORAk #00 EQU [, JCN
32+ [@
33+ #8000 ,copy JSR
34+ #8000 ,copy JSR
35+ #0001 SUB2
36+ ORAk ], JCN
37+ ]@ POP2
38+
39+\\ Small units
40+ #ac DEI2
41+ DUP #80 LTH [, JCN
42+ #8000 ,copy JSR
43+ #7f AND
44+ ]@
45+ SWP ,copy JSR
46+
47+,next-lump JMP
48+
49+@copy
50+ DUP2 #aa DEO2 #ba DEO2
51+ #8000 DUP2 #ac DEO2 #be DEO2
52+ JMP2r
53+
+2,
-2
1@@ -211,8 +211,8 @@ write the address of the data to the stat/read/write port. The 0xA2 port
2 have been successfully transferred, or zero if it is not successful.
3
4 If there are multiple reads without other operations (including setting
5-the file name) in betwee, or multiple writes without other operations
6-(including setting the file name) in betwee, then it will continue from
7+the file name) in between, or multiple writes without other operations
8+(including setting the file name) in between, then it will continue from
9 where it left off in the file; otherwise it starts from the beginning.
10
11 For the first write, it will truncate the file if the append byte is