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.

13 thoughts on “TinyBasicLike: A Target-Independent BASIC Interpreter

    1. 64-bit Intel MCS-BASIC-52 VM implemented with software modules no long than one page of using transparent portable gcc c good idea in 2023?

      c/c++ 1 buggy 2 malware vulnerable mainframe-mentality apps requiring frequent UPDATEs as ‘the only’ good technology need a BASIC high-level low-level addition?

  1. “Some may still remember TinyBASIC, which was published in 1976 as Palo Alto Tiny BASIC by [Gordon Brandly].”
    Wasn’t Palo Alto BASIC written by Dr. Li-Chen Wang?

  2. You are correct. I see where the misunderstanding happened. My page reads: “Brandly’s original work started with Palo Alto Tiny BASIC, which was published in the May 1976 issue of DDJ. He ported that code to the Motorola 68000 and released it in the February 1985 issue of DDJ as TBI68K.”

    That is poorly written. I should clarify to say Brandly’s work built on that of Dr. Wang, who had written and published Palo Alto TinyBasic; Brandly started from that and created TBI68K.

    Thanks for the note.

  3. Actually “Palo Alto Tiny Basic” was written by Lee Chin Wang, It was table drive and easy to modify/extend as shown by it’s morph into Radio Shacks 4k Basic for the original TRS-90

  4. Great gobs of goo! I remember taking Differential Equations in early 1990, where one of our assignments was to solve a first-order differential equation using the Euler Method. All of my classmates used Fortran, I had to use GW-Basic on my Laser Compaxt XT. At 0.001 intervals it took over an hour to run, so I added a beep code to let me know it was still running (it also made me smile when they mentioned using the Euler method in Hidden Figures)

    I used to joke that i got lost after they ditched line numbers, but I have learned both Visual Basic and now Python, so we have that.

  5. Line numbers were just a cheesy way to implement an editor for something excruciatingly close to the metal, except insofar as they were also a convenient way to target GOTO and GOSUB statements. They were just a low overhead way to keep an ordered set of text lines in memory.

    Also worth noting that READ & DATA made way more sense if you thought about the habit of using BASIC on punched cards with a mainframe – you could “edit” your program simply by stacking on different sets of cards for the DATA statements. Home computers line-numbet BASICs kind of obfuscated how useful the READ/DATA thing could have been.

    Anyway, concepts that we routinely tease apart and throw megabytes of ‘temporary’ storage at these days, ended up tightly coupled back then owing to there being only 65536 places to put stuff!

  6. In the late 70’s I typed Tiny Basic for the 8080 onto punch cards and extended it to 12K with a Dana 5 1/2 Digit DVM “Measure A” command, Set Range, and other commands via BCD I/O. Used PIO chips for Set 10101010 statements, and lots more for a 16 KB board tester at Mostek. The card deck grew to fill the drawer and was Very Heavy. An engineer saw me early one morning, took pity on me and showed me how the Vax 11-70 cross compiler could be used with something close to edlin. YAY! No more card every again! I believe RSX-11D was the O/S.

    Run time was a 16 K Z80 SBC we made, in a rack mounted Optima cabinet, Burnt Orange panels and Beige trim. Our VP hated it as our standard color was ugly Blue and Black. Ordered us to take it apart and get it painted. Ignored. Demand letter again. Also Ignored as no one is going to disassemble an entire rack after spending all that money.

    We came in one Monday and the entire lab had been painted Burnt Orange and Beige.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.