TB-40 is a Tiny BASIC-programmable calculator with 40 keys (hence the name), each of them having a single purpose. That limits the number of features, but also makes operation very simple.
For that to work, TB-40 gives up comments and character strings, but in return each keyword has a dedicated key.
PRINT 2 + 2 ENTER is literally just five keystrokes! Moreover, TB-40 supports floating point numbers, unlike the original version of the language.
Most of the time you're probably going to use TB-40 like in the above example, to compute immediate expressions, with the added ability to store intermediate values in variables. But you also have a fully working Basic interpreter, capable of running programs such as:
10 INPUT A , X 20 IF A > X THEN LET A = A - X 30 IF X > A THEN LET X = X - A 40 IF A <> X THEN GOTO 20 50 PRINT A
that gives you the greatest common divisor of two numbers by Euclid's algorithm.
A few tips:
That's about it. Enjoy!
(Last updated: 7 August 2016)