home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1985 November
/
Ahoy_Magazine_85-11_1985_Double_L.d64
/
tx2bas
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
1KB
|
39 lines
62990 a=peek(61)+256*peek(62)+3:poke786,int(a/256):poke785,a-256*peek(786)
62995 iferthenpokea-2,0:pokea-1,0:poke45,peek(785):poke46,peek(786):clr:end
63000 poke53280,0:poke53281,0:poke646,1
63009 printchr$(147)
63010 print "this program will turn text basic files into run basic programs";
63020 print "using the commodore datasette or disk drive."
63030 printchr$(17)"the program will delete any line"
63040 print"of the file in case it is not a program line."chr$(147)
63043 input"name of file to be converted";f$
63045 print " "chr$(18)"t"chr$(146)"ape or "chr$(18)"d"chr$(146)"isk?"
63046 geta$:ifa$=""then63046
63047 ifa$="t"thend=1:sa=0:n=1:goto63080
63048 ifa$<>"d"then63046
63050 d=8:sa=3:n=3
63080 print "hit a key when ready!"
63085 geta$:if a$=""then63085
63090 printchr$(147)
63097 open3,d,sa,f$:print"reading file, please be patient!":forx=1to1000:next
63099 poke152,3:t$=""
63100 get#3,a$:if a$=""then63100
63105 if st=64then63250
63106 if a$=chr$(13)then63130
63110 t$=t$+a$
63115 a$="":goto63100
63130 iflen(t$)<3thent$="":goto63100
63140 ifleft$(t$,1)=chr$(10)then63250
63142 ifval(left$(t$,1))=0thenprintt$:t$=right$(t$,(len(t$)-1)):goto63140
63220 printchr$(147)" translating text into basic..."
63225 printchr$(17)chr$(17);t$:print"goto 63099"
63235 poke198,2:poke631,13:poke632,13:printchr$(19):end
63240 ifval(left$(t$,1))=0thent$=right$(t$,(len(t$)-1)):goto63140
63250 printchr$(147)"conversion complete!!!":close3:print
63260 print"do you want this converter"
63262 print "deleted before you save the new program?"
63265 geta$:ifa$=""then63265
63266 ifa$="y"thener=1:goto62990
63270 print"all done! check it out!"
63280 end