home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette: SID64
/
SID64.D64
/
ss_wds.64
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
2KB
|
45 lines
100 print chr$(147) chr$(142):poke 53280,14:poke 53281,6
105 print " [154]sidplayer singalong":print " speedscript to word file converter"
110 print " by craig chamberlain":print
120 dn=8:sa=780:sx=781:sy=782:sp=783:ll=38
130 s$="abcdefghijklmnopqrstuvwxyz"+chr$(13)+" !"+chr$(34)+"#$%&'()"
131 s$=s$+"*+,-./0123456789:;<=>?@[193][194][195][196][197][198][199][200][201][202][203][204][205][206][207][208][209][210][211][212][213][214][215][216][217][218][\]^_"
132 for k=96 to 129:x$=x$+chr$(k):next:for k=224 to 255:z$=z$+chr$(k):next
133 y$="[133][134][153][136][137][138][139][155][152]"+chr$(142)+chr$(143)+"[144][145][150]"+"[147][148][149][146][151][152][153][154][155]"
134 y$=y$+chr$(156)+"[157]"+chr$(158)+chr$(159)+chr$(160)+"[161][162][163][164][165][166][167][168][169][170][171][172][173][174][175][176][177][178][179][180][181][182][183]"
135 y$=y$+"[184][185][186][187][188][189][190][191][192][193][159][196][197][198][200][201][202][144][204][205][149][129][156][209][211][212][213][216][158][218][219][220][221]"+chr$(222)+"[223]"
140 w$="[193][194][195][196][197][198][199][200][201][202][203][204][205][206][207][208][209][210][211][212][213][214][215][216][217][218]"+chr$(13)+" !"+chr$(34)+"#$%&'()"
141 x$=x$+"[154]"+chr$(131)+"[151]":s$=s$+x$+y$+z$
142 w$=w$+"*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_"+x$+y$+z$
150 la=peek(49)+256*peek(50)+500:x$="":y$="":z$="":k=fre(0):i=1
300 print " please enter the name of the"
301 print " speedscript file that you want":print " to convert to a .wds file"
302 print
305 f$="":input " name of speedscript file";f$:if f$="" or len(f$)>16 goto 305
310 print:poke sa,1:poke sx,dn:poke sy,0:sys 65466
320 for k=1 to len(f$):poke 584+k,asc(mid$(f$,k)):next
330 poke sa,len(f$):poke sx,73:poke sy,2:sys 65469
340 poke sa,0:poke sx,la-256*int(la/256):poke sy,la/256:sys 65493
345 if (peek(sp)and1)=0 goto 360
350 if peek(sa)=4 then print " error - file not found":print:goto 300
355 print " error loading " f$:end
360 ea=peek(sx)+256*peek(sy)-1:if peek(ea)<>31 then ea=ea+1:poke ea,31
400 print " what is the title of the song?":print " [146][157]";:t$="":l=0
410 wait 198,15:get g$:if g$=chr$(13) and l then print " ":print:goto 500
420 if g$=chr$(20) and l then print g$;:l=l-1:t$=left$(t$,l):k=fre(0):goto 410
430 if l=36 or g$<" " or g$>"_" or g$=chr$(34) goto 410
440 print g$ " [157][146]";:t$=t$+g$:l=l+1:goto 410
500 print " now enter the name for the .wds file"
501 print " (excluding the .wds extension)"
502 if len(f$)<=12 then print " or just press return for " f$
503 print
505 input " name of word file";f$:if f$="" or len(f$)>12 goto 505
510 f$=f$+".wds":open 1,8,15:print#1,"s0:" f$:close 1
520 open 1,8,2,f$+",w,p":print#1,chr$(34) t$ chr$(34)
540 print "[147][154]";:poke 53280,12:poke 53281,0:r=la-1:ml=ll+1
550 for k=la to ea:p=peek(k):print mid$(s$,p,i);:print#1,mid$(w$,p,i);
555 if p=31 then print " [154]";:l=k-r:r=k:if l>ml goto 570
560 next:print#1,chr$(0);:close 1:end
570 print:print " [197][210][210][207][210]: [204][201][206][197] [204][207][206][199][197][210] [212][200][193][206]" ll "[195][200][193][210][193][195][212][197][210][211]":close 1
580 open 1,8,15:print#1,"s0:"+f$:close 1:end