home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 28
/
028.d81
/
unscratch
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
4KB
|
142 lines
1 gosub60100
5 goto500
10 dima$(255),g$(16):bk$=" [146]"
20 fori=1to16:s$=s$+chr$(160):next
30 printchr$(147):poke53281,15
40 print"[144][201]nsert [196]isk containing file to un[211][195][210][193][212][195][200]":print
50 print"[208]ress any key when done":print
60 getk$:ifk$=""then60
70 print"[201]nitializing disk ...":print
80 open15,8,15,"i0"
90 gosub450
100 print"[198]ile [212]o un[211][195][210][193][212][195][200]:";bk$;:mo=255:nc=16:gosub60500:f$=a$
110 f$=left$(f$+s$,16)
120 print:print"[204]ooking for ";f$
130 open1,8,2,"#"
140 gosub450
150 t=18:s=1
160 print#15,"u1:";2;0;t;s
170 gosub450
180 fori=0to255
190 get#1,a$(i):ifa$(i)=""thena$(i)=chr$(0)
200 next
210 f=0
220 b=32*f+4:ff$=""
230 fori=1to16
240 ff$=ff$+a$(b+i):next
250 iff$=ff$then290
260 f=f+1:iff<8then220
270 t=asc(a$(0)):ift=0thenprint:print"";f$;"[146] [206][207][212] [198][207][213][206][196]":goto440
280 s=asc(a$(1)):goto160
290 print:print"[198]ound ";f$
300 b=b-2
310 ifasc(a$(b))<>0thenprint:printf$;" is not a scratched file!":goto440
320 print:print"1 = seq, 2 = prg, 3 = usr, 4 = rel"
330 print"[215]hat type of file?";bk$;:nc=1:mo=2:gosub60500:n%=val(a$)
340 ifn%<1orn%>4then320
350 print"[201]s it [207][203] to un[211][195][210][193][212][195][200] ([217]/[206]): [157]";bk$;:mo=24:gosub60500:k$=a$
360 ifk$="n"ork$="[206]"then440
365 ifk$<>"y"andk$<>"[217]"thenprint"[145][145]";:goto350
370 print#15,"b-p:";2;b
380 print#1,chr$(128+n%);
390 print#15,"u2:";2;0;t;s
400 gosub450
410 print:print"[214]alidating disk ...."
420 print#15,"v"
430 gosub450
440 close1:close15
442 print" [208]ress [[210][197][212][213][210][206]] [212]o [195]ontinue."
444 geta$:ifa$<>chr$(13)then444
446 goto60000
450 input#15,en,em$,et,es
460 ifen=0thenreturn
470 printem$:close1:close15
500 print"[147] [213][206][211][195][210][193][212][195][200]"
510 print" [163][163][163][163][163][163][163][163][163]"
520 print" ([213]) [213]n[211]cratch a program"
530 print" ([210]) [210]eturn to [204][207][193][196][211][212][193][210]"
540 print" [208]ress [213] or [210]:"
550 geta$:ifa$=""then550
560 ifa$="u"ora$="[213]"then10
570 ifa$="r"ora$="[210]"then60030
580 goto550
60000 print"[147] [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
60003 print" [221][208]ress: '[210]' - [212]o [210][213][206] program again. [221]"
60005 print" [221][163][163][163][163][163] '[204]' - [212]o [210]eturn to [204][207][193][196][211][212][193][210].[221]"
60007 print" [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
60010 geta$:ifa$=""then60010
60015 ifa$="r"ora$="[210]"then20
60020 ifa$<>"l"anda$<>"[204]"then60010
60030 open15,8,15,"r0:hello connect=hello connect"
60040 input#15,er:ifer<>63thenend
60050 print"[147]";:load"hello connect",8
60100 pn$="un[211][195][210][193][212][195][200]":an$="[194][217]: [195][217][206][196][201][197] [205][197][210][212][197][206] & [193][205][217] [205][207][213][206][212][195][193][211][212][204][197]"
60110 bo=15:sc=01:cl=06:c1=09:c2=02:c3=09:c4=02:c5=00:c6=02:c7=09
60120 rem bo - border color
60121 rem sc - screen color
60122 rem cl - color poked on border
60123 rem c1 - top box outside color
60124 rem c2 - top box inside color
60125 rem c3 - bottom box outside color
60126 rem c4 - bottom box inside color
60127 rem c5 - 'copyright' color
60128 rem c6 - 'program name' color
60129 rem c7 - 'authors name' color
60130 poke53280,bo:poke53281,sc:print"[147]";
60140 poke646,c1:print" [164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
60150 poke646,c2:print" [165] [204][207][193][196][211][212][193][210] [208][210][197][211][197][206][212][211]: [167]"
60170 poke646,c1:print" [163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
60180 poke646,c6:print""tab(20-len(pn$)/2);pn$
60190 poke646,c7:print""tab(20-len(an$)/2);an$
60200 poke646,c5:print""tab(13)"[195][207][208][217][210][201][199][200][212] 1986"
60210 printtab(9)"[195][207][205][205][207][196][207][210][197] [208][213][194][204][201][195][193][212][201][207][206][211]"
60220 poke646,c3:print" [164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
60230 poke646,c4:print" [165] [167]"
60240 poke646,c3:print" [163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]":le=1044:ri=1043
60250 pokele,98:pokeri,98:le=le-1:ri=ri+1
60260 co=54272:pokeri+co,cl:pokele+co,cl
60270 ifle=1025then60290
60280 goto60250
60290 pokele,108:pokeri,123:pokele+co,cl:pokeri+co,cl:poke646,cl
60300 le=le+40:ri=ri+40:ifle=1985then60330
60305 ifle=1185thenprint"[183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183]"
60306 ifle=1825thenprint"[175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175][175]"
60310 pokele,225:pokeri,97:pokele+co,cl:pokeri+co,cl
60320 goto60300
60330 pokele,124:pokeri,126:pokele+co,cl:pokeri+co,cl
60340 le=le+1:ri=ri-1:ifle=2004thenpoke198,.:goto60360
60350 pokele,226:pokeri,226:pokele+co,cl:pokeri+co,cl:goto60340
60360 print"";
60370 poke646,c2:print"[165][208]ress the [[211][208][193][195][197] [194][193][210]] to continue.[167]"
60380 fora=1to100
60390 geta$:ifa$=" "ora$="[160]"thenreturn
60400 next
60410 print"";
60420 print"[165] [167]"
60430 fora=1to100
60440 geta$:ifa$=" "ora$="[160]"thenreturn
60450 next
60460 goto60360
60500 forz8=1tonc
60502 geta$:ifa$=""then60502
60503 ifa$="[147]"ora$=""ora$="[148]"ora$="[145]"ora$="[157]"ora$=""ora$=""then60502
60504 ifa$=chr$(13)ora$=chr$(141)thenprint"[157] ":goto60544
60506 ifa$=" "ora$="[160]"then60540
60508 ifa$=chr$(20)andz8=1then60502
60510 ifa$=chr$(20)thenz8=z8-1:print"[157][157] [157][157]";bk$;:goto60502
60520 ifa$>"/"anda$<":"and(moand2)then60540:numbers
60522 ifa$>" "anda$<"*"and(moand4)then60540:shift numbers
60524 ifa$>"[192]"anda$<"[219]"and(moand8)then60540:uppercase characters
60526 ifa$>"@"anda$<"["and(moand16)then60540:lowercase characters
60528 ifa$>chr$(160)anda$<chr$(192)and(moand32)then60540:commodore characters
60530 ifa$>=chr$(0)anda$<""and(moand64)then60540:ctrl characters
60532 ifa$>")"anda$<"0"and(moand128)then60540:misc characters group 1
60534 ifa$>"9"anda$<"a"and(moand128)then60540:misc characters group 2
60536 ifa$>"z"anda$<"[129]"and(moand128)then60540:misc characters group 3
60538 goto60502
60540 print"[157]";a$;:poke212,.:printbk$;
60542 g$(z8)=a$:next
60544 print"[157][146] "
60546 a$="":fora=1toz8-1:a$=a$+g$(a):next:ifz8=1thena$=""
60548 return