
A Minimal BASIC Inspired by Brainfuck 
https://coe.psu.ac.th/ad/minBASIC/

Andrew Davison, ad@coe.psu.ac.th
April 2026

Python code:
* mbx.py  -- the Minimal BASIC interpreter
* tbc.py    -- the tb compiler to bas
* mbStr.py   -- convert a ".bas" program to a string
* mbFormat.py  -- formats a ".bas" string to look more like a program

* Screen.py  -- a Screen class that manages a window consisting of a 2D grid of square cells
* mbxS.py  -- a variant of mbx.py that adds the Screen commands
                  'S' int '-' int [ '-' int ]  | 'S' '-'


Batch file:
* tbx.bat    -- calls tbc.py and then mbx.py

Minimal Basic Examples:
* count.bas    -- countdown from n
* digitSum.bas -- sums the digits in n
* fact.bas     -- factorial of n
* factors.bas  -- returns the prime factors of n
* fib.bas      -- prints the first n Fibonacci numbers
* fizzBuzz.bas -- fizz-buzz up to 100
* gcd.bas      -- calculates the GCD of two inputs
* hailstones.bas -- check the Collatz conjecture for 1 - 30
* logic.bas    -- generate a table of values using & and |
* modulo.bas   -- calculates a mod b
* mtests.bas   -- simple tests
* power.bas    -- calculates a^b
* prime.bas    -- tests if n is prime

tb Examples:
* countHigh.tb  -- countdown from n
* fibHigh.tb    -- prints the first n Fibonacci numbers
* itests.tb, itests2.tb, itests3.tb  -- simple tests
* primesHigh.tb -- tests if n is prime

All of these have corresponding ".bas" file, generated by interp.py