A83: Re: Re: BASIC compiler


[Prev][Next][Index][Thread]

A83: Re: Re: BASIC compiler




Not really.  I think there's a ROM call available for every BASIC command.
It's not that complicated, it would just take a lot of work to put in all
the ROM calls.  Basically, you'd have a zillion IF's.  Then you need a good
parser.  I've written a TI-BASIC parser before (i made a ti82 basic
emulator, never released though cuz it looked like crap) and it's not that
hard to do, just a little recursion.  Remember that TI-BASIC doesn't allow
spacing and stuff, so you don't have to account for that.  The hard part
with the parsing is that you have to handle all the function calls.  Oh
yeah, and the hardcoded labels.  It's not a simple project, but it could
definitly be done.

-Justin Karneges [Infiniti]

>Trying to make a compiler for BASIC would be WAAAAAAAAAAAAAAAAY too
complicated.
>
>James Matthews (matthews@tkb.att.ne.jp)
>
>ICQ: 7413754
>http://home.att.ne.jp/gold/tomcat21/index.html
>http://library.advanced.org/18242/
>
>----------
>> From: The Man in the Moon <mecad@scv.net>
>> To: assembly digest <assembly-83-digest@lists.ticalc.org>; TCPA
<ti_alliance@listbot.com>
>> Subject: A83: BASIC compiler
>> Date: Saturday, December 05, 1998 11:13 AM
>>
>>
>> I was thinking, since BASIC convert the code to hex everytime it runs,
>> thats why it is slow. However, if there was a compiler to convert BASIC
to
>> hex, games like descent or Doom on the calc would be much faster.
>>
>> From: Chris
>> (Man in the Moon)
>> mecad@scv.net
>>
>