A real BASIC interpreter. Write and run programs in the language that started the home computer revolution.
Write and run BASIC programs on a classic green-screen terminal
The Environment
When you open Senzall's BASIC, you see a classic green-on-black terminal — the same look that greeted millions of home computer users in the late 1970s and early 1980s. A blinking cursor waits at the bottom for you to type.
Everything happens through text. You type commands and programs. The computer responds with text. There are no buttons to click, no menus to navigate — just you and the machine, communicating through a language called BASIC.
Below the terminal screen you'll find a custom keyboard designed for BASIC programming:
In the top corner of the screen you'll find the Learn button. Tap it to open a quick-reference card with all the BASIC commands, their syntax, and short examples. It's your cheat sheet while you're learning.
Some things you type are executed immediately, without a line number:
In BASIC, every line of your program starts with a line number. The computer stores lines in numerical order and executes them that way. This is how you build a program:
The numbers don't have to be consecutive. By convention, you number lines by 10s (10, 20, 30...) so you can insert new lines between existing ones later:
To delete a line, type just its number and press Return. To replace a line, type the same number with new content — it overwrites the old version.
Reference
Display text, numbers, and the values of variables on the screen. The most fundamental command in BASIC.
Normally each PRINT goes to a new line. A semicolon at the end keeps the cursor on the same line:
Output: HELLO WORLD (on one line)
Ask the user to type a value. The program pauses and waits for input.
Use a regular variable name (like X, N, AGE) for numbers. Use a variable ending in $ (like N$, A$, NAME$) for text strings.
Assign a value to a variable. The word LET is optional — both forms work identically.
Variables can hold numbers or strings. String variable names always end with a dollar sign ($). You can use any math expression on the right side: addition (+), subtraction (-), multiplication (*), division (/), and parentheses for grouping.
Jump to a specific line number. Execution continues from that line. This is how you create loops in BASIC.
This creates an infinite loop — the program prints the message, jumps back to line 10, prints it again, and so on. To stop a running program, tap the Stop button.
Make decisions. If the condition is true, the command after THEN executes. If false, the program skips to the next line.
Use = (equal), <> (not equal), < (less than), > (greater than), <= (less or equal), >= (greater or equal).
Repeat a block of code a specific number of times. The loop variable counts up (or down) automatically.
Output: 1, 2, 3, 4, 5 (each on its own line)
Output: 0, 5, 10, 15, 20. The STEP value controls how much the counter increases each time. Use a negative STEP to count down:
This prints a 3-by-4 grid of stars. The inner loop (COL) runs completely for each pass of the outer loop (ROW).
Call a subroutine. GOSUB jumps to a line number (like GOTO), but RETURN jumps back to where you left off. This lets you reuse code.
Line 20 jumps to line 100. Lines 100-120 execute. RETURN on line 120 jumps back to line 30. The END on line 40 prevents the program from accidentally falling into the subroutine again.
Add a comment. Everything after REM on that line is ignored by the interpreter. Use comments to explain your code.
END stops the program. Use it to prevent execution from falling through into subroutines or data sections at the bottom of your code.
CLS clears the screen. Useful at the beginning of a program or when you want a fresh display.
Functions take a value and return a result. Use them inside expressions.
String variables hold text and always end with a $ sign. You can join strings together using the + operator.
Output:
Tutorials
Let's write the classic first program every programmer writes, then build on it.
Type this line and press Return:
Nothing visible happens yet — you've just stored line 10 in memory. Now type:
The screen shows HELLO WORLD. You've just written and executed your first program.
Don't type NEW. Your program is still in memory. Add to it:
Type RUN again. Now it prints all three lines in order.
Let's make it personal. Add these lines:
Line 5 runs before line 10 (because 5 < 10). Line 20 replaces the old line 20. Type LIST to see your updated program, then RUN it. It asks your name, then greets you.
PRINT displays text. INPUT asks for a response. Lines execute in numerical order. You can insert and replace lines anytime.
Let's build a game step by step. Type NEW first to clear any old program.
Line 20 picks a random number from 1 to 100 and stores it in the variable SECRET.
If the guess matches, jump to the win message (line 100). Otherwise, give a hint and loop back to ask again.
Type RUN. The game picks a secret number, asks you to guess, gives you hints (too high / too low), and congratulates you when you get it right. Type RUN again for a new number.
IF...THEN makes decisions. GOTO creates loops. RND generates random numbers. Variables store data that changes as the program runs.
Let's use FOR...NEXT loops to draw patterns on screen. Type NEW first.
RUN it. You see: * * * * * * * * * *. The semicolon keeps each star on the same line. Line 40's empty PRINT moves to a new line at the end.
Type NEW, then enter this program:
RUN it. Output:
The outer loop counts rows (1 to 5). The inner loop prints that many stars. Row 1 gets 1 star. Row 2 gets 2 stars. And so on.
Let the user choose the size. Change line 10:
Now RUN it and try different sizes. Try 3. Try 10. Try 20.
Try changing line 30 to print different characters. Try PRINT "# "; or PRINT ROW; " "; to print numbers instead of stars.
FOR...NEXT loops repeat code a set number of times. Nested loops (a loop inside a loop) create 2D patterns. The loop variable changes each time through.
Editor
15 and pressing Return deletes line 15.Samples
Type SAMPLES to open the sample browser. Each program demonstrates a different concept. Load one, RUN it, then LIST it to see how it works.
History
Strategy