home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Brotikasten
/
BROTCD01.iso
/
c128
/
c142.d64
/
csx.bas
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
1995-08-09
|
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]: