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 >
Commodore BASIC  |  2023-02-26  |  4KB  |  113 lines

  1. 1000 poke 53280,0:poke 53281,0:goto 1060
  2. 1010 "csx.bas":^"csx.bas":end
  3. 1020 close2:close3:close14:close15:end
  4. 1060 cpu=64:ip=12:if peek(122)=peek(122) then ip=10:cpu=128:(NULL)0
  5. 1070 if peek(ip*4096)=76 and peek(ip*4096+24)=76 then x=1
  6. 1080 on x goto 1100:x=1:if cpu=64 then load"csx64.ml",8,1
  7. 1090 (NULL)"csx128.ml",b0,p(ip*4096)
  8. 1100 if cpu=64 then mem=55:poke mem,0:poke mem+1,4*16:clr:cpu=64:ip=12
  9. 1110 if cpu=128 and (peek(215) and 128) then (NULL)%
  10. 1120 :
  11. 1130 ia=ip*4096:rem "[201]nitialize archive
  12. 1140 gh[178]ia[170]3   :[143] "chr$et next header
  13. 1150 ie=gh+3   :rem "[201]nitialize this entry
  14. 1160 da[178]ie[170]3   :[143] "(NULL)oop to unatn(NULL)len this entry
  15. 1170 gn=da+3   :rem "un[193][210][195] just one byte
  16. 1180 bo[178]gn[170]3   :[143] "peekuffered lenleft$(NULL)(NULL)(NULL)(NULL)
  17. 1190 cv=bo+3   :rem "[195]onvert [211]tandard [193][211][195][201][201] to [195][194][205] [193][211][195][201][201]
  18. 1200 ge[178]cv[170]3   :[143] "ascill input buffer
  19. 1210 pu=ge+3   :rem "[198]lush output buffer
  20. 1220 i0[178]pu[170]3   :[143] "(NULL)ointer to start of input buffer
  21. 1230 i1=i0+2   :rem "[208]ointer to end of input buffer
  22. 1240 o0[178]i1[170]2   :[143] "(NULL)ointer to start of output buffer
  23. 1250 o1=o0+2   :rem "[208]ointer to end of output buffer
  24. 1260 lc[178]o1[170]2   :[143] "right$nput buffer pointer where val(NULL)asc occured
  25. 1270 e=lc+2    :rem "[197]rror return code
  26. 1280 :
  27. 1290 me[178]e[170]2    :[143] "lenompresion method
  28. 1300 fl=me+1   :rem "[193][211][195][201][201][218] filename
  29. 1310 sl[178]fl[170]13  :[143] "(NULL)queezed length
  30. 1320 dt=sl+4   :rem "[196]ate
  31. 1330 tm[178]dt[170]2   :[143] "(NULL)ime
  32. 1340 c0=tm+2   :rem "[195][210][195]
  33. 1350 ln[178]c0[170]2   :[143] "(NULL)n(NULL)queezed (original) length
  34. 1360 :
  35. 1370 c1=ln+4   :rem "[195]alculated (new) [195][210][195]
  36. 1380 mo[178]c1[170]2   :[143] "(NULL)ode. x,e,p or v
  37. 1390 as=mo+1   :rem "[198]lag. 0=don't convert to [195][194][205] [193][211][195][201][201]
  38. 1400 al[178]as[170]1   :[143] "(NULL)ource logical file number
  39. 1410 ol=al+1   :rem "[196]estination logical file number
  40. 1420 :
  41. 1430 c$[178]",":[134] m$(9):[143] m$(peek(me)) returns compression method
  42. 1440 m$(0)[178]"val(NULL)asc     ":m$(1)[178]"(NULL)tored  ":m$(2)[178]"(NULL)(NULL)ored  ":m$(3)[178]"(NULL)acked  "
  43. 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)
  44. 1460 m$(9)[178]"(NULL)quashed"
  45. 1470 [153]:[153]:[153] [199](14);[199](147);
  46. 1480 [153] "ortantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantan^"
  47. 1490 [153] "(NULL)    open(NULL)(NULL)-str$(NULL)(NULL) atnrchive str$issolver       (NULL)"
  48. 1500 [153] "-tantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantan<"
  49. 1510 [153] "(NULL)      sys(NULL)(NULL).-done files are           (NULL)"
  50. 1520 [153] "(NULL)        open  all right                (NULL)"
  51. 1530 [153] "(NULL)      sysin spite of an error         (NULL)"
  52. 1540 [153] "(NULL)      sysat the end of the            (NULL)"
  53. 1550 [153] "(NULL)      sysdissolve-procedure.          (NULL)"
  54. 1560 [153] "-tantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantan<"
  55. 1570 [153] "(NULL)   open(NULL)(NULL) to copy, sysbut not to sell.    (NULL)"
  56. 1580 [153] "/tantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantantanexp"
  57. 1590 [153]
  58. 1600 [133] "openvalnter name of archive ";ar$:[139] ar$[178]"" [167] 1600
  59. 1610 [139] [201](ar$,4)[179][177]".arc" [167] ar$[178]ar$[170]".arc"
  60. 1620 [133] "                openstr$rive   0cmdcmdcmd";dr$
  61. 1630 [139] dr$[179][177]"0" [175] dr$[179][177]"1" [167] 1620
  62. 1640 [133] "                 open(NULL)nit   8cmdcmdcmd";dv
  63. 1650 [139] dv[179]8 [176] dv [177]14 [167] 1640
  64. 1660 [159] 15,dv,15:[159] 2,dv,2,(dr$[170]":"[170]ar$[170]",r")
  65. 1670 [132]15,e$,m$,t$,s$:[139] [197](e$) [167] [153] e$c$m$c$t$c$s$:[137]1020
  66. 1680 :
  67. 1690 [133] "sys(NULL)open)rint, sys(NULL)open)erify, or sysvalopen)xtract   ecmdcmdcmd";x$
  68. 1700 x$[178][199]([198](x$) [175] 127)
  69. 1710 [139] x$[178]"p" [176] x$[178]"v" [176] x$[178]"x" [176] x$[178]"e" [167] [153]:[137] 1730
  70. 1720 [137] 1690
  71. 1730 [139] x$[179][177]"x" [175] x$[179][177]"e" [167] 1780
  72. 1740 [139] x$[178]"x" [167] x$[178]"e"
  73. 1750 [133] "open(NULL)utput drive    0cmdcmdcmd";dr$:[139] dr$[179][177]"0" [175] dr$[179][177]"1" [167] 1750
  74. 1760 [133] "open(NULL)utput unit     8cmdcmdcmd";dv:[139] dv[179]8 [176] dv[177]14 [167] 1760
  75. 1770 [159] 14,dv,15
  76. 1780 [151] mo, [198](x$):[151] al,2:[151] ol,3
  77. 1790 [139] x$[179][177]"v" [167] [153]"atnnswer openy to dissolve or openn to bypass":[153]
  78. 1800 :
  79. 1810 [158](ia)
  80. 1820 [158](gh):[139] [194](me)[178]0 [167] [153] "atnll done. valnd of archive.":[137]1020
  81. 1830 [139] [194](e)[179][177]0 [167] [153] "str$isk error or file corrupt":[137]1020
  82. 1840 m[178][194](me):[139] m[177]9 [167] [153] "(NULL)nknown compression method":[137]1020
  83. 1850 f$[178]"":f[178]0
  84. 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
  85. 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)))
  86. 1880 a$[178][201](f$,4):z$[178]"n"
  87. 1890 [139] a$[178]".txt" [176] a$[178]".doc" [176] a$[178]".pas" [176] [201](f$,2)[178]".c" [167] z$[178]"y"
  88. 1900 :
  89. 1910 [153] [199](34)f$[199](34)[163]15)l" bytes. ";
  90. 1920 y$[178]"":yy$[178]x$:[139] x$[178]"v" [167] 1990
  91. 1930 [133] "open(y/n)   ycmdcmdcmd";y$
  92. 1940 [139] y$[179][177]"y" [175] y$[179][177]"(NULL)" [167] y$[178]"n":[151] mo,[198]("v"):x$[178]"v":[137]1990
  93. 1950 [153]:[153] "openlenonvert from atn(NULL)lenright$right$closeto lenpeek(NULL) atn(NULL)lenright$right$   ";z$;"cmdcmdcmd";:[133] z$
  94. 1960 [139] z$[179][177]"y" [175] z$[179][177]"n" [167] 1950
  95. 1970 [151] as,1:[139] z$[179][177]"y" [167] [151] as,0
  96. 1980 [139] x$[178]"p" [167] [153]:[153] ""
  97. 1990 [139] x$[179][177]"e" [167] [159] 3,3:[137] 2040
  98. 2000 [133]"openascile type (sysp openor syssopen)  scmdcmdcmd";ft$:[139]ft$[179][177]"p"[175]ft$[179][177]"s" [167]2000
  99. 2010 f$[178]dr$[170]":"[170]f$[170]","[170]ft$[170]",w"
  100. 2020 [159] 3,dv,3,f$:[132]14,e$,m$,t$,s$
  101. 2030 [139] [197](e$) [167] [153] e$c$m$c$t$c$s$:[137] 1020
  102. 2040 [158](ie):[139] [194](e)[179][177]0 [167] [153]"str$isk error or archive corrupt":[137]1020
  103. 2050 [158](da):[160]3:[139] x$[178]"e" [167] [132]14,e$,m$,t$,s$
  104. 2060 [139] x$[178]"p" [167] [153]:[153]
  105. 2070 [139] [194](e)[178]1 [167] [153]"clr len(NULL)len error!   ";
  106. 2080 [139] [194](e)[178]0 [167] [153]"clr (NULL)(NULL).   ";
  107. 2090 [139] [194](e)[178]3 [167] [153]"clr (NULL)(NULL)(NULL)/(NULL)(NULL)(NULL)(NULL) pressed   ";
  108. 2100 [139] x$[178]"e"[167] [153] e$c$m$c$t$c$s$;
  109. 2110 [139] y$[178]"n" [167] x$[178]yy$:[151] mo,[198](x$)
  110. 2120 [153]
  111. 2130 [137] 1820
  112. 2199 [128]:
  113.