Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!ingr!infonode!palmerc From: palmerc@infonode.ingr.com (Chris Palmer) Newsgroups: comp.sys.cbm Subject: Re: Convertion from text-BASIC to run-BASIC? Message-ID: <1990Oct11.213035.20178@infonode.ingr.com> Date: 11 Oct 90 21:30:35 GMT References: <14423.27130fa4@max.u.washington.edu> Reply-To: palmerc@infonode.UUCP (Chris Palmer) Organization: Intergraph Corp. Huntsville, AL Lines: 38 In article <14423.27130fa4@max.u.washington.edu> scott@max.u.washington.edu writes: >Does anyone know or have written a routine that converts >from a BASIC program in text-format to a runnable-format? >If so, could you explain to me how to go about in achieving >this and/or send me the routine that already does this. >Thanks in advance. > >Sincerely, >Scott K. Stephen If this is what you're looking for, I am currently writing a set of programs that convert a text file BASIC listing to a runnable form or a runnable BASIC program to ASCII text. It's not completely finished (I don't have it working for screen control characters yet), but its getting there. The good (or bad) news about it is that am writing it in C for Unix and Amiga machines. I just acquired a C64 emulator for my Amiga and wanted to be able to write programs for my SX-64 on my Amiga (because I can no longer stand to use the C64 screen editor). I'll post or mail you a copy of the source code (probably post if enough people are interested, besides, my mailer is flakey) when I get it complete. If you can't wait (and if you are looking for code that doesn't run on the C64 itself, if you are this wont help you), all I did was write lex routines that read in each token and convert it to ASCII. In the reverse, it just reads in the keywords and outputs the tokens. I put all text in lower case letters so that it will be distinguished from BASIC keywords. For screen control characters, I created tokens like and to encode them in ASCII. The only really hard part was writing a routine that encodes the line numbers because they are in binary and have pointers to the next line number in memory. This was easy on the BASIC-ASCII but quite hard on the ASCII-BASIC. -- | Christopher M. Palmer #|Quote section| | | | | | || / Intergraph Corporation #| | Closed For| |o| | | | |\ \ Internet: b14!abulafia!palmerc@ingr.com #| | | |Repairs| | | | | | |/ | UUCP : ...uunet!ingr!b14!abulafia!palmerc #| | | | | | | | | | | | | ||