home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1992 July
/
1992-07.d64
/
speedpurge
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
1KB
|
49 lines
5 rem copyright 1992
10 rem compute publications intl ltd
15 rem all rights reserved
20 clr:dima$(500):open15,8,15
25 print"[147][154]speedpurge"
30 poke53280,0:poke53281,0
35 input"file (a-z) ";f$
40 iflen(f$)>1then25
45 ifasc(f$)<65orasc(f$)>90then25
50 open2,8,2,"0:"+f$+",s,r":gosub225:b$=f$:x=1:poke781,2:sys65478:sys65487
55 sys65487:a=peek(780)
60 ifa>127thena=a-64:b$=b$+chr$(a):a$(x)=b$:b$=f$:x=x+1:goto80
65 ifa=39then75
70 ifa<64thena=a+64
75 b$=b$+chr$(a)
80 ifst=0then55
85 close2:poke781,0:sys65478:x=x-1
90 z=1
95 it=0:print"[154]":fort=ztox:a$=a$(t):print"[145] [157][157][157][157][157][157][157][157]";t;"-";x:forr=1tox
100 ifa$=a$(r)thenifr<>tthengosub220
105 nextr,t
110 ifit=0then125
115 ifit=xthenx=x-1:goto95
120 fort=ittox-1:a$(t)=a$(t+1):nextt:x=x-1:goto95
125 print"":fort=1tox:printt;a$(t):a$(t)=right$(a$(t),len(a$(t))-1)
130 b$="":forr=1tolen(a$(t))-1:a=asc(mid$(a$(t),r,1)):ifa>63thena=a-64
135 b$=b$+chr$(a):nextr:a=asc(right$(a$(t),1)):a=a+64:b$=b$+chr$(a)
140 a$(t)=b$:nextt
145 print"[154]save this file y/n"
150 geta$:ifa$=""then150
155 ifa$="n"then190
160 ifa$<>"y"then150
165 print#15,"s0:"+f$:gosub230
170 open2,8,2,"0:"+f$+",s,w":poke781,2:sys65481:poke780,13:sys65490
175 fort=1tox:forr=1tolen(a$(t)):a$=mid$(a$(t),r,1):a=asc(a$):poke780,a
180 sys65490
185 nextr,t:close2:poke781,3:sys65481:gosub230
190 print"[150]finished!"
195 print"[154]do another file y/n"
200 geta$:ifa$=""then200
205 ifa$="y"then20
210 ifa$="n"thenclose15:end
215 goto200
220 print"found a match! ";chr$(34);a$(r);chr$(34);" ";t;"&";r
225 z=t:it=r:t=x:r=x:return
230 input#15,en,em$,et,es
235 print""en;em$;et;es:ifen>1thenclose15:stop
240 return