EmbeddedRelated.com
Forums

Basic compiler

Started by Guy Robinson June 27, 2004
Hi Paul,

> LABEL is another keyword.  The interpeter looks
down the linked list of
> line numbers, notes each line that starts with a LABEL and registers its
> address.  Then, GOSUB LABEL A is a cinch and performed in constant time.
> If the program were held in RAM, it's easy to fix things up, but with
> the program in FLASH you really do need some extra help.  The LABEL
> concept certainly does help the interpreter and is a good programmer
> aid.
> 
> Giving away all the secrets here, but I'm going to publish the
> interpreter at some point anyway.

Are you referring to Butterfly Basic here ?
Using that kind of labels would seem like a nice happy medium.

Ultimately the target is to provide potential users of RF with something that
will
fire up in minutes, fully programmable and more - not to provide a super
advanced 
Basic machine - every man and his dog's already done Basic interpreters.
(Although it's got pretty much everything you'd want in Basic)

-- Kris





Beginning Microcontrollers with the MSP430

> Yep.  MSP430 only, of course, and integer only (although FP
wouldn't be
> had to do).
> 
> -- Paul.

Allowing for simultaneous integer and floats was really fun though in many
parts of the interpreter's procs :-)

-- Kris