Re: [stella] Atari 2600 BASIC compiler

Subject: Re: [stella] Atari 2600 BASIC compiler
From: Kirk Israel <kirkjerk@xxxxxxxxx>
Date: Fri, 8 Jul 2005 10:25:46 -0400
On 7/7/05, Thomas Boutell <boutell@xxxxxxxxxxx> wrote:
> Your kung fu is the best. (:

For some reason that was the first message I saw about this.

And then I downloaded a zip, but it wasn't the one with sample code so
I wasn't too impressed.

But now I've seen some of the Boutell->Slashdot coverage and I have to
say...very cool.  I haven't had the time to play with it yet, but I
think this is seriously nifty. Heck, sometimes even the "behind the
scenes" logic annoys *me*, so this might be a good "first
draft"/learning tool.

One comment...I did glance at the source. I know everyone writes in
the language they are most comfortable with, but I suspect C isn't the
easiest thing to do this kind of parsing in. (Of course somehow I got
my compsci degree without taking the usual "compilers" course, so I
know stuff like yacc is out there but all I know is Perl and Java) 
But I guess the difficulty of C is apparent to the user, since it's
pretty fragile with one space breaking things. It might be possible to
extract some of the cool work you've done and put it into something
that has more powerful "tokenizer" abilities.

One thing that would dramatically increase the games this thing can
do, though wouldn't be trivial to implement, is to somehow allow for
fixed point fractional math. Hmm.  Maybe this could be done by a
series of math functions that take 2 of the named integer values for
each 16 bit value (which I think would work well in practice; usually
you're interested in the "integer byte", but want to keep track of the
"fractional byte") So you might have functions like

would add the integery byte a / fraction byte b to int c frac d and
put the results back in a b.  You would also need a
fixedpointsubtract, as well as maybe making the functions smart enough
to deal with constants, not just variables.

Still, it's a supremely cool idea. There's been a lot of talk about
this and you get huge props for putting your money where the mouths
are :-)
Archives (includes files) at
Unsub & more at

Current Thread