home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Rockford Magazine
/
Rockford_Magazine_022_19xx_-_de_Disk_3_of_4_Side_A.d64
/
csx.bas
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
4KB
|
113 lines
1000 poke 53280,0:poke 53281,0:goto 1060
1010 "csx.bas":^"csx.bas":end
1020 close2:close3:close14:close15:end
1060 cpu=64:ip=12:if peek(122)=peek(122) then ip=10:cpu=128:(NULL)0
1070 if peek(ip*4096)=76 and peek(ip*4096+24)=76 then x=1
1080 on x goto 1100:x=1:if cpu=64 then load"csx64.ml",8,1
1090 (NULL)"csx128.ml",b0,p(ip*4096)
1100 if cpu=64 then mem=55:poke mem,0:poke mem+1,4*16:clr:cpu=64:ip=12
1110 if cpu=128 and (peek(215) and 128) then (NULL)%
1120 :
1130 ia=ip*4096:rem "[201]nitialize archive
1140 gh[178]ia[170]3 :[143] "chr$et next header
1150 ie=gh+3 :rem "[201]nitialize this entry
1160 da[178]ie[170]3 :[143] "(NULL)oop to unatn(NULL)len this entry
1170 gn=da+3 :rem "un[193][210][195] just one byte
1180 bo[178]gn[170]3 :[143] "peekuffered lenleft$(NULL)(NULL)(NULL)(NULL)
1190 cv=bo+3 :rem "[195]onvert [211]tandard [193][211][195][201][201] to [195][194][205] [193][211][195][201][201]
1200 ge[178]cv[170]3 :[143] "ascill input buffer
1210 pu=ge+3 :rem "[198]lush output buffer
1220 i0[178]pu[170]3 :[143] "(NULL)ointer to start of input buffer
1230 i1=i0+2 :rem "[208]ointer to end of input buffer
1240 o0[178]i1[170]2 :[143] "(NULL)ointer to start of output buffer
1250 o1=o0+2 :rem "[208]ointer to end of output buffer
1260 lc[178]o1[170]2 :[143] "right$nput buffer pointer where val(NULL)asc occured
1270 e=lc+2 :rem "[197]rror return code
1280 :
1290 me[178]e[170]2 :[143] "lenompresion method
1300 fl=me+1 :rem "[193][211][195][201][201][218] filename
1310 sl[178]fl[170]13 :[143] "(NULL)queezed length
1320 dt=sl+4 :rem "[196]ate
1330 tm[178]dt[170]2 :[143] "(NULL)ime
1340 c0=tm+2 :rem "[195][210][195]
1350 ln[178]c0[170]2 :[143] "(NULL)n(NULL)queezed (original) length
1360 :
1370 c1=ln+4 :rem "[195]alculated (new) [195][210][195]
1380 mo[178]c1[170]2 :[143] "(NULL)ode. x,e,p or v
1390 as=mo+1 :rem "[198]lag. 0=don't convert to [195][194][205] [193][211][195][201][201]
1400 al[178]as[170]1 :[143] "(NULL)ource logical file number
1410 ol=al+1 :rem "[196]estination logical file number
1420 :
1430 c$[178]",":[134] m$(9):[143] m$(peek(me)) returns compression method
1440 m$(0)[178]"val(NULL)asc ":m$(1)[178]"(NULL)tored ":m$(2)[178]"(NULL)(NULL)ored ":m$(3)[178]"(NULL)acked "
1450 m$(4)[178]"(NULL)queezed":m$(5)[178]"lenrunched":m$(6)[178]m$(5):m$(7)[178]m$(5):m$(8)[178]m$(5)
1460 m$(9)[178]"(NULL)quashed"
1470 [153]:[153]:[153] [199](14);[199](147);
1480 [153] "ortantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantan^"
1490 [153] "(NULL) open(NULL)(NULL)-str$(NULL)(NULL) atnrchive str$issolver (NULL)"
1500 [153] "-tantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantan<"
1510 [153] "(NULL) sys(NULL)(NULL).-done files are (NULL)"
1520 [153] "(NULL) open all right (NULL)"
1530 [153] "(NULL) sysin spite of an error (NULL)"
1540 [153] "(NULL) sysat the end of the (NULL)"
1550 [153] "(NULL) sysdissolve-procedure. (NULL)"
1560 [153] "-tantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantan<"
1570 [153] "(NULL) open(NULL)(NULL) to copy, sysbut not to sell. (NULL)"
1580 [153] "/tantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantanexp"
1590 [153]
1600 [133] "openvalnter name of archive ";ar$:[139] ar$[178]"" [167] 1600
1610 [139] [201](ar$,4)[179][177]".arc" [167] ar$[178]ar$[170]".arc"
1620 [133] " openstr$rive 0cmdcmdcmd";dr$
1630 [139] dr$[179][177]"0" [175] dr$[179][177]"1" [167] 1620
1640 [133] " open(NULL)nit 8cmdcmdcmd";dv
1650 [139] dv[179]8 [176] dv [177]14 [167] 1640
1660 [159] 15,dv,15:[159] 2,dv,2,(dr$[170]":"[170]ar$[170]",r")
1670 [132]15,e$,m$,t$,s$:[139] [197](e$) [167] [153] e$c$m$c$t$c$s$:[137]1020
1680 :
1690 [133] "sys(NULL)open)rint, sys(NULL)open)erify, or sysvalopen)xtract ecmdcmdcmd";x$
1700 x$[178][199]([198](x$) [175] 127)
1710 [139] x$[178]"p" [176] x$[178]"v" [176] x$[178]"x" [176] x$[178]"e" [167] [153]:[137] 1730
1720 [137] 1690
1730 [139] x$[179][177]"x" [175] x$[179][177]"e" [167] 1780
1740 [139] x$[178]"x" [167] x$[178]"e"
1750 [133] "open(NULL)utput drive 0cmdcmdcmd";dr$:[139] dr$[179][177]"0" [175] dr$[179][177]"1" [167] 1750
1760 [133] "open(NULL)utput unit 8cmdcmdcmd";dv:[139] dv[179]8 [176] dv[177]14 [167] 1760
1770 [159] 14,dv,15
1780 [151] mo, [198](x$):[151] al,2:[151] ol,3
1790 [139] x$[179][177]"v" [167] [153]"atnnswer openy to dissolve or openn to bypass":[153]
1800 :
1810 [158](ia)
1820 [158](gh):[139] [194](me)[178]0 [167] [153] "atnll done. valnd of archive.":[137]1020
1830 [139] [194](e)[179][177]0 [167] [153] "str$isk error or file corrupt":[137]1020
1840 m[178][194](me):[139] m[177]9 [167] [153] "(NULL)nknown compression method":[137]1020
1850 f$[178]"":f[178]0
1860 c[178][194](fl[170]f):[139] (c [175] f[179]12) [167] f$[178]f$[170][199](c):f[178]f[170]1:[137] 1860
1870 l[178][194](ln)[170]256[172]([194](ln[170]1)[170]256[172]([194](ln[170]2)[170]256[172][194](ln[170]3)))
1880 a$[178][201](f$,4):z$[178]"n"
1890 [139] a$[178]".txt" [176] a$[178]".doc" [176] a$[178]".pas" [176] [201](f$,2)[178]".c" [167] z$[178]"y"
1900 :
1910 [153] [199](34)f$[199](34)[163]15)l" bytes. ";
1920 y$[178]"":yy$[178]x$:[139] x$[178]"v" [167] 1990
1930 [133] "open(y/n) ycmdcmdcmd";y$
1940 [139] y$[179][177]"y" [175] y$[179][177]"(NULL)" [167] y$[178]"n":[151] mo,[198]("v"):x$[178]"v":[137]1990
1950 [153]:[153] "openlenonvert from atn(NULL)lenright$right$closeto lenpeek(NULL) atn(NULL)lenright$right$ ";z$;"cmdcmdcmd";:[133] z$
1960 [139] z$[179][177]"y" [175] z$[179][177]"n" [167] 1950
1970 [151] as,1:[139] z$[179][177]"y" [167] [151] as,0
1980 [139] x$[178]"p" [167] [153]:[153] ""
1990 [139] x$[179][177]"e" [167] [159] 3,3:[137] 2040
2000 [133]"openascile type (sysp openor syssopen) scmdcmdcmd";ft$:[139]ft$[179][177]"p"[175]ft$[179][177]"s" [167]2000
2010 f$[178]dr$[170]":"[170]f$[170]","[170]ft$[170]",w"
2020 [159] 3,dv,3,f$:[132]14,e$,m$,t$,s$
2030 [139] [197](e$) [167] [153] e$c$m$c$t$c$s$:[137] 1020
2040 [158](ie):[139] [194](e)[179][177]0 [167] [153]"str$isk error or archive corrupt":[137]1020
2050 [158](da):[160]3:[139] x$[178]"e" [167] [132]14,e$,m$,t$,s$
2060 [139] x$[178]"p" [167] [153]:[153]
2070 [139] [194](e)[178]1 [167] [153]"clr len(NULL)len error! ";
2080 [139] [194](e)[178]0 [167] [153]"clr (NULL)(NULL). ";
2090 [139] [194](e)[178]3 [167] [153]"clr (NULL)(NULL)(NULL)/(NULL)(NULL)(NULL)(NULL) pressed ";
2100 [139] x$[178]"e"[167] [153] e$c$m$c$t$c$s$;
2110 [139] y$[178]"n" [167] x$[178]yy$:[151] mo,[198](x$)
2120 [153]
2130 [137] 1820
2199 [128]: