home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette: SID64 / SID64.D64 / es_wds.64 (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1988-01-01  |  1.8 KB  |  41 lines

  1. 100 print chr$(147) chr$(142):poke 53280,14:poke 53281,6
  2. 105 print " sidplayer singalong":print " easyscript 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 w$="
  6. "+chr$(13)+""+chr$(20)+" !"+chr$(34)
  7. 131 w$=w$+"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_"
  8. 132 for k=96 to 132:x$=x$+chr$(k):next:for k=222 to 255:z$=z$+chr$(k):next
  9. 133 y$=""+chr$(141)+chr$(142)+chr$(143)+""+chr$(146)+""
  10. 134 y$=y$+chr$(156)+""+chr$(158)+chr$(159)+" {CBM-K}{CBM-I}{CBM-T}{CBM-@}{CBM-G}{CBM-+}{CBM-M}{CBM-POUND}{SHIFT-POUND}{CBM-N}{CBM-Q}{CBM-D}{CBM-Z}{CBM-S}{CBM-P}{CBM-A}{CBM-E}{CBM-R}{CBM-W}{CBM-H}{CBM-J}{CBM-L}{CBM-Y}{CBM-U}{CBM-O}{SHIFT-@}{CBM-F}{CBM-C}{CBM-X}{CBM-V}{CBM-B}{SHIFT-*}"
  11. 135 w$=w$+x$+y$+"abcdefghijklmnopqrstuvwxyz{SHIFT-+}{CBM--}{SHIFT--}"+z$
  12. 150 la=peek(49)+256*peek(50)+500:x$="":y$="":z$="":k=fre(0):i=1
  13. 300 print " please enter the name of the"
  14. 301 print " easyscript file that you want":print " to convert to a .wds file"
  15. 302 print
  16. 305 f$="":input " name of easyscript file";f$:if f$="" or len(f$)>16 goto 305
  17. 310 print:open 2,8,15:open 1,8,2,f$+",r,s"
  18. 320 input#2,e,e$,k,k:if e=0 goto 350
  19. 330 close 1:close 2:if e=62 then print " error - file not found":print:goto 300
  20. 340 print " error - " e$:end
  21. 350 sys 3872,la:close 1:close 2
  22. 360 ea=peek(251)+256*peek(252)-1:if peek(ea)<>13 then ea=ea+1:poke ea,13
  23. 400 print " what is the title of the song?":print "  ";:t$="":l=0
  24. 410 wait 198,15:get g$:if g$=chr$(13) and l then print " ":print:goto 500
  25. 420 if g$=chr$(20) and l then print g$;:l=l-1:t$=left$(t$,l):k=fre(0):goto 410
  26. 430 if l=36 or g$<" " or g$>"_" or g$=chr$(34) goto 410
  27. 440 print g$ " ";:t$=t$+g$:l=l+1:goto 410
  28. 500 print " now enter the name for the .wds file"
  29. 501 print " (excluding the .wds extension)"
  30. 502 if len(f$)<=12 then print " or just press return for " f$
  31. 503 print
  32. 505 input " name of word file";f$:if f$="" or len(f$)>12 goto 505
  33. 510 f$=f$+".wds":open 1,8,15:print#1,"s0:" f$:close 1
  34. 520 open 1,8,2,f$+",w,p":print#1,chr$(34) t$ chr$(34)
  35. 540 print "";:poke 53280,12:poke 53281,0:r=la-1:ml=ll+1
  36. 550 for k=la to ea:p=peek(k):print chr$(p);:print#1,mid$(w$,p,i);
  37. 555 if p=13 then print " ";:l=k-r:r=k:if l>ml goto 570
  38. 560 next:print#1,chr$(0);:close 1:end
  39. 570 print:print " ERROR: LINE LONGER THAN" ll "CHARACTERS":close 1
  40. 580 open 1,8,15:print#1,"s0:"+f$:close 1:end
  41.