Posted on

Back to (Tiny) BASICs!

Waaay back in the 1970s one of my goals was to get a high level language, such as Tiny BASIC, running on my KIM-1.  I never quite had enough RAM for BASIC but there was an article in MICRO magazine about a Tiny PILOT which I did get running on my KIM.  One of my goals was to write a Tiny BASIC interpreter for the 6502 using the IL approach proposed in the first few issues of Dr Dobb’s Journal.  While they published source code for several different BASICs, they were always for the 8080, not the 6502.

Every few years I started to work on my own, then shelved the project, lots the floppy disks with the source, etc.  A few months ago I figured it was time to start again, hopefully being able to put it into the KIM Clone board’s EEPROM.  Well, it still has some rough edges, but is basically working:

0200 4C G

Bob's Tiny BASIC

> 10 LET A = 0
> 20 PRINT "This actually works!"
> 30 LET A = A + 1
> 40 IF A < 5 THEN GOTO 20
This actually works!
This actually works!
This actually works!
This actually works!
This actually works!

There are only 26 variables (A to Z), upper case only, and not many functions: ABS(), RND(), FREE().  There are two bugs I’m aware of but probably many more lurking, waiting to be discovered.

Right now it’s ORG’ed to 0200 and takes just under 3K bytes.  The KIM has 5K in that region, 512 bytes reserved for pages 0 and 1, which is why only 1.5K bytes are free.  I still need to add the functions to save/load programs to the SD card system.

If anyone wants to play with the current test version, email me.



Leave a Reply