Tiny BASIC

By Ogion

LRC Tiny BASIC is an implementation that meets most of the original Tiny BASIC specification: http://www.ittybittycomputers.com/IttyBitty/TinyBasic/DDJ1/Design.html (error messages are different and print zones aren’t supported). It adds RND(), ASC(), and a single array A().

LINE FORMAT AND EDITING
* Lines without numbers executed immediately
* Lines with numbers appended to program
* Line numbers must be 1 to 255
* Line number alone (empty line) deletes line
* Blanks are not significant, but key words must contain no unneeded blanks

EXECUTION CONTROL
CLEAR delete all lines and data
RUN run program
LIST list program

EXPRESSIONS
Operators
Arithmetic
+ –
* /
Relational
> >=
< <=
= <>, ><
Precedence
()

Variables
A…Z (26 only)
Single array A(0) to A(230)
All arithmetic is modulo 215
(+/- 32767)

INPUT / OUTPUT
PRINT X,Y,Z
PRINT “A STRING”
PRINT “THE ANSWER IS “, X
INPUT X
INPUT X,Y,Z

ASSIGNMENT STATEMENTS
LET X=3
LET X= -3+5*Y
LET N = RND(10)
LET A(X) = A(X-1)*2

CONTROL STATEMENTS
GOTO 35
GOTO X+10
GOSUB X+35
GOSUB 50
RETURN
IF X > Y THEN GOTO 30
IF A = ASC(“N”) THEN END

Enjoy!

Get LowRes Coder to use this program.

Play homegrown retro games and program your own!