home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette: SID64 / SID64.D64 / ss_wds.64 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  2KB  |  45 lines

  1. 100 print chr$(147) chr$(142):poke 53280,14:poke 53281,6
  2. 105 print " [154]sidplayer singalong":print " speedscript to word file converter"
  3. 110 print " by craig chamberlain":print
  4. 120 dn=8:sa=780:sx=781:sy=782:sp=783:ll=38
  5. 130 s$="abcdefghijklmnopqrstuvwxyz"+chr$(13)+" !"+chr$(34)+"#$%&'()"
  6. 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][\]^_"
  7. 132 for k=96 to 129:x$=x$+chr$(k):next:for k=224 to 255:z$=z$+chr$(k):next
  8. 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]"
  9. 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]"
  10. 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]"
  11. 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)+"#$%&'()"
  12. 141 x$=x$+"[154]"+chr$(131)+"[151]":s$=s$+x$+y$+z$
  13. 142 w$=w$+"*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[\]^_"+x$+y$+z$
  14. 150 la=peek(49)+256*peek(50)+500:x$="":y$="":z$="":k=fre(0):i=1
  15. 300 print " please enter the name of the"
  16. 301 print " speedscript file that you want":print " to convert to a .wds file"
  17. 302 print
  18. 305 f$="":input " name of speedscript file";f$:if f$="" or len(f$)>16 goto 305
  19. 310 print:poke sa,1:poke sx,dn:poke sy,0:sys 65466
  20. 320 for k=1 to len(f$):poke 584+k,asc(mid$(f$,k)):next
  21. 330 poke sa,len(f$):poke sx,73:poke sy,2:sys 65469
  22. 340 poke sa,0:poke sx,la-256*int(la/256):poke sy,la/256:sys 65493
  23. 345 if (peek(sp)and1)=0 goto 360
  24. 350 if peek(sa)=4 then print " error - file not found":print:goto 300
  25. 355 print " error loading " f$:end
  26. 360 ea=peek(sx)+256*peek(sy)-1:if peek(ea)<>31 then ea=ea+1:poke ea,31
  27. 400 print " what is the title of the song?":print "  [146][157]";:t$="":l=0
  28. 410 wait 198,15:get g$:if g$=chr$(13) and l then print " ":print:goto 500
  29. 420 if g$=chr$(20) and l then print g$;:l=l-1:t$=left$(t$,l):k=fre(0):goto 410
  30. 430 if l=36 or g$<" " or g$>"_" or g$=chr$(34) goto 410
  31. 440 print g$ " [157][146]";:t$=t$+g$:l=l+1:goto 410
  32. 500 print " now enter the name for the .wds file"
  33. 501 print " (excluding the .wds extension)"
  34. 502 if len(f$)<=12 then print " or just press return for " f$
  35. 503 print
  36. 505 input " name of word file";f$:if f$="" or len(f$)>12 goto 505
  37. 510 f$=f$+".wds":open 1,8,15:print#1,"s0:" f$:close 1
  38. 520 open 1,8,2,f$+",w,p":print#1,chr$(34) t$ chr$(34)
  39. 540 print "[147][154]";:poke 53280,12:poke 53281,0:r=la-1:ml=ll+1
  40. 550 for k=la to ea:p=peek(k):print mid$(s$,p,i);:print#1,mid$(w$,p,i);
  41. 555 if p=31 then print " [154]";:l=k-r:r=k:if l>ml goto 570
  42. 560 next:print#1,chr$(0);:close 1:end
  43. 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
  44. 580 open 1,8,15:print#1,"s0:"+f$:close 1:end
  45.