home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Disk User Volume 3 #12
/
Commodore_Disk_User_Vol.3_12_1990_-.d64
/
supersort64
(
.txt
)
< prev
Wrap
Commodore BASIC
|
2022-10-26
|
1KB
|
25 lines
10 rem supersort
20 rem sorts superscript file
30 rem starting at selected character
40 rem copyright jan 1990, mike gregory
50 :
60 dimc$(100):cr$=chr$(13)
70 open15,8,15,"i0"
80 open6,8,6,"0:sortfile,s,r":gosub220:ifergoto170
90 gosub190
100 n=n+1:c$(n)=c$:ifleft$(c$,3)<>"***"goto90
110 f$="0:"+mid$(c$,4)+",s,w"
120 open7,8,7,f$:gosub220:ifergoto170
130 fori=1ton-1:print#7,c$(i):next
140 gosub190
150 s=val(mid$(c$,4))-1
160 poke2980,s:sys2568:gosub220
170 close6:close7:close15:end
180 :
190 c$=""
200 get#6,a$:ifa$<>cr$thenc$=c$+a$:goto200
210 return
220 input#15,er,er$,t,s
230 iferthenprint""er;er$;t;s
240 return