home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1985 November / Ahoy_Magazine_85-11_1985_Double_L.d64 / tx2bas (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  1KB  |  39 lines

  1. 62990 a=peek(61)+256*peek(62)+3:poke786,int(a/256):poke785,a-256*peek(786)
  2. 62995 iferthenpokea-2,0:pokea-1,0:poke45,peek(785):poke46,peek(786):clr:end
  3. 63000 poke53280,0:poke53281,0:poke646,1
  4. 63009 printchr$(147)
  5. 63010 print "this program will turn text basic files into run basic programs";
  6. 63020 print "using the commodore datasette or disk drive."
  7. 63030 printchr$(17)"the program will delete any line"
  8. 63040 print"of the file in case it is not a program line."chr$(147)
  9. 63043 input"name of file to be converted";f$
  10. 63045 print "    "chr$(18)"t"chr$(146)"ape or "chr$(18)"d"chr$(146)"isk?"
  11. 63046 geta$:ifa$=""then63046
  12. 63047 ifa$="t"thend=1:sa=0:n=1:goto63080
  13. 63048 ifa$<>"d"then63046
  14. 63050 d=8:sa=3:n=3
  15. 63080 print "hit a key when ready!"
  16. 63085 geta$:if a$=""then63085
  17. 63090 printchr$(147)
  18. 63097 open3,d,sa,f$:print"reading file, please be patient!":forx=1to1000:next
  19. 63099 poke152,3:t$=""
  20. 63100 get#3,a$:if a$=""then63100
  21. 63105 if st=64then63250
  22. 63106 if a$=chr$(13)then63130
  23. 63110 t$=t$+a$
  24. 63115 a$="":goto63100
  25. 63130 iflen(t$)<3thent$="":goto63100
  26. 63140 ifleft$(t$,1)=chr$(10)then63250
  27. 63142 ifval(left$(t$,1))=0thenprintt$:t$=right$(t$,(len(t$)-1)):goto63140
  28. 63220 printchr$(147)"      translating text into basic..."
  29. 63225 printchr$(17)chr$(17);t$:print"goto 63099"
  30. 63235 poke198,2:poke631,13:poke632,13:printchr$(19):end
  31. 63240 ifval(left$(t$,1))=0thent$=right$(t$,(len(t$)-1)):goto63140
  32. 63250 printchr$(147)"conversion complete!!!":close3:print
  33. 63260 print"do you want this converter"
  34. 63262 print "deleted before you save the new program?"
  35. 63265 geta$:ifa$=""then63265
  36. 63266 ifa$="y"thener=1:goto62990
  37. 63270 print"all done! check it out!"
  38. 63280 end
  39.