TinyBasicLike: A Target-Independent BASIC Interpreter

In the long and winding history of BASIC, it’s sometimes hard to keep track of all the different variants and dialects. Some may still remember TinyBASIC, which was published in 1976 as Palo Alto Tiny BASIC by [Gordon Brandly]. Later, TinyBASIC was modified by a number of people including [Scott Lawrence] who created TinyBASIC Plus (TBP). Inspired by this, [Karl] figured he could improve on TBP by making the original C-based project even easier to port by removing whatever platform dependencies he could find, creating what he calls TinyBasicLike.

The main change is that TinyBasicLike consists out of two C files, with one containing the core code, and the second the platform-specific details that can be used by the core. Although [Karl] started off with the Palo Alto Tiny BASIC-like code by [Scott Lawrence], he decided to make it into his own by making a few alterations, such as adding left and right shift operators, adding an ADDR() function, expanding the features of INPUT and adding multiple logical operators.

In the example STM32F4 project linked on the project page it is demonstrated how to target a new platform with TinyBasicLike. Performance on the STM32F4 Discovery board with a simple counting loop yielded about 6 lines of TBL program code per millisecond. For a 168 MHz STM32 MCU that’s definitely not astounding, but considering how straightforward Tiny BASIC (and TBL as a consequence) is, it’s definitely no slouch.

This is probably a good time to remind that BASIC was the original champion of cross-platform programming and the source of countless fond (and frustrating) memories.

An Exceptional BASIC Computer

BASIC

Since [Dan] has started using microcontrollers, he’s been absolutely fascinated by the fact these chips are essentially low performance computers. Once he caught wind of TinyBASIC, he decided he would have a go at creating a simple, tiny computer that’s very simple to the old, tiny, 8-bit computers of yore.

The computer is built on an Arduino shield, using TinyBASIC, the TVout library, and the PS/2 keyboard library. After piecing together a little bit of code, the Arduino IDE alerted [Dan] to the fact the TVout and PS/2 libraries were incompatible with each other. This inspired [Dan] to use the ATMega328P as a coprocessor running the TVout library, and using the capacious ATMega1284P as the home of TinyBASIC and the PS/2 library.

A circuit was put together in Fritzing using minimal components, and a PCB milled out of copper board. After the board was tinned, [Dan] had a beautiful minimalist retro computer with nearly 14kB of RAM free and an RCA display.

Future versions of the build will probably be based around the Arduino Mega, allowing for a TV resolution of 720×480. Also on tap are an SD card slot, LEDs, pots, and possibly even headers for I2C and SPI.