Skip to content
Stefan Lenz edited this page May 11, 2022 · 62 revisions

IoT BASIC in a Nutshell

1976 was the year of BASIC interpreters. The legendary Dr. Dobb's magazine published many articles on designs and implementations of Tinybasic interpreters [Dobbs1976]. The articles are really fun reading.

In the rainy summer weekends of 2021 I decided to write a BASIC interpreter from scratch. Palo Alto and Apple 1 BASIC were the starting points. After that the project has grown quite a bit. It is now an (almost) Dartmouth standard type BASIC with (optional) floating points numbers, strings, arrays and IoT capabilities for various micro controllers. It has display drivers, hardware access and a few other unusual features for BASIC.

The core BASIC language was based the specifications of the Dr. Wang Palo Alto BASIC using the December article published by Roger Rauskolb [Palo Alto BASIC]. No code from any source was used, just the language specification.

The second source I used is Steve Wozniak's preliminary manual on Apple 1 basic. The interpreter is compatible to the 1976 Apple Integer BASIC. See [here for differences and language features]. It uses the string logic of Apple Integer BASIC which is not compatible with MS or Dartmouth BASIC.

It is worth mentioning the legendary book 101 BASIC Computer Games as well. A copy of the 1975 edition can be found [here]. It is said that this was one main source of inspiration for Apple Integer BASIC. I ported some of the games as test programs for the interpreter.

The implementation here grew beyond the Apple Integer BASIC language set and now offers floating point, printing, terminal support, Arduino I/O and file I/O as optional language set. Networking and some IoT features are also added. Storing in and running programs from EEPROM is possible on the AVR platforms. Building standalone computers is possible. See the project page for more info on what one can do with this piece of software.

The interpreter runs on Arduino AVR 8bit and 32 bit platform. FreeRTOS based systems like ESP8266 and ESP32 are supported as well as the SAMD and MbedOS microcontrollers. Raspbian is also supported including some basic I/O through the wiringPI library.

An Arduino based standalone computer using this BASIC interpreter:

DUE based standalone system

Introduction articles in this Wiki