Use new meta port
TinyBASIC is a graphical BASIC interpreter, written in Uxntal.
You must have an Uxn assembler and emulator.
uxnasm src/basic.tal bin/basic.rom uxnemu bin/basic.rom
If do not wish to assemble it yourself, you can download basic.rom.
RUN Used to begin program execution at the lowest line number.
REM Permits to add remarks to a program source.
REM This is a comment.
LIST Causes part or all of the user program to be listed. If no parameters are given, the whole program is listed. A single expression parameter in evaluated to a line number which, if it exists, is listed.
CLEAR Formats the user program space, deleting any previous programs. If included in a program the program becomes suicidal when the statement is executed.
INPUT Halts evaluation, and assigns the result of expressions to each of the variables listed in the argument. Expressions are entered sequencially and separated by a line break, a list of two arguments, will expect two input lines.
INPUT X Y
LET Assigns the value of an expression to a variable.
IF If the result of the expression is not zero, the statement is executed; if False, the associated statement is skipped.
IF A>B-2 PRINT "A is greater."
PRINT Prints the values of the expressions and/or the contents of the strings in the console.
PRINT "The result is: " A+B
GOTO Changes the sequence of program execution.
GOSUB Changes the sequence of program execution, and remembers the line number of the GOSUB statement, so that the next occurrence of a RETURN statement will result in execution proceeding from the statement following the GOSUB.
RETURN Transfers execution control to the line following the most recent unRETURNed GOSUB. If there is no matching GOSUB an error stop occurs.
END Must be the last executable statement in a program. Failure to include an END statement will result in an error stop after the last line of the program is executed.
COLOR Sets the interface RGB colors, see theme.
COLOR $50f2, $b0f9, $a0f8
CLS Clears the screen.
DRAW Sets position of drawing.
DRAW 100, 320
MODE Sets drawing mode, see varvara.
SPRITE Draws a sprite, uses MODE.
SPRITE $1c1c, $087f, $0814, $2241
PICT Draws a picture from a file, uses MODE.
SAVE Exports your program to example.bas.
LOAD Imports the example.bas program, replaces your current program.
MAKE Exports your program as a Varvara rom.
POKE Writes the value of expression B at address A in memory.
POKE A, B