Saturday, June 9, 2012

Tiny Basic for the Replica 1

Tiny BASIC is a dialect of the BASIC programming language that was written by Dennis Allison for early microcomputers including 6502 systems like the KIM-1. It could fit into as little as 2 or 3 kilobytes of memory.

I came across this web page with a lot of information about this version by Tom Pittman.

It's a little more primitive than the Apple BASIC for the Apple 1, lacking even FOR NEXT loops. It's also quite slow because it is implemented using an interpreted language called (so it's an interpreter written in an interpreter written in machine language).

Tiny Basic spawned a newsletter called Dr. Dobb's Journal of Tiny BASIC Calisthenics and Orthodontia which evolved into the Dr. Dobb's Journal which is still published today.

Bill O'Neill disassembled a 6502 version of Tiny Basic, added comments, and got it working with generic 6502 systems using a serial ACIA for input and output. I ported it  to the Replica 1 in an evening, only having to make a few changes:

  • modifications to assemble with the CC65 assembler
  • modifying the input and output routines for the Replica 1
  • making some memory map changes to run out of RAM by default

The picture below shows Tiny Basic on startup.

Tiny Basic Startup
And running some simple BASIC code:

Running Some BASIC Code

Many programs were written in Tiny Basic including some quite large adventure type games. Below is a screen shot of one such game:

An Adventure Game

So I now have one more BASIC to add to my collection of ports to the Replica 1 which now includes Apple BASIC, Applesoft Lite, Microsoft Basic (based on the Ohio Scientific version), Enhanced Basic, and Tiny Basic.

No comments: