Skip to content

Spectrum · BASIC

Meet BASIC

Make a story, a guessing game, a playful oracle and a keyboard-controlled marker.

Start with Make the Spectrum answer Browse lessons

A greeting becomes a story

Start with one instruction. Store a small program, change it, ask someone for words, then turn their answers into a story. Each lesson grows from the last, with complete listings and clear instructions for the lines to add or replace.

These four lessons form a complete first project. No previous programming is needed, and Foundations is optional: its pseudocode explanations provide another way to explore the ideas we use here.

A Spectrum story titled AN UNEXPECTED PICNIC: Sam meets a sleepy dragon in a moon cave, and the dragon asks for a biscuit.
Four lessons take us from a greeting to a story someone else can run.

Get the Spectrum ready

The lessons use a 48K ZX Spectrum in Emu198x v0.22.1 or later. Download the Spectrum archive for your host computer:

Host computer Download
Mac with Apple silicon macOS Apple silicon
Mac with an Intel processor macOS Intel
Windows, Intel or AMD 64-bit Windows
Linux, Intel or AMD 64-bit Linux

Extract the archive into a folder you can find again. These are ready-built programs; you do not need Rust or an assembler. The release notes include checksums for checking the downloads.

You also need a lawfully obtained 48K Spectrum ROM; it is not part of our lesson files. The ROM guide explains what firmware is and how to obtain it. Open a terminal in the extracted folder containing the emulator. A terminal accepts commands for your host computer; this command starts the Spectrum:

On macOS or Linux:

./emu198x-spectrum --rom "path/to/48.rom"

In Windows PowerShell:

.\emu198x-spectrum.exe --rom "C:\path\to\48.rom"

Replace the quoted path with your ROM file’s location. Keep the quotes if the path contains spaces. The Sinclair copyright message is our starting screen; from then on, we type BASIC in the emulator window. When a later lesson asks you to restart Emu198x, use the same launch command.

We enter BASIC using Host Keyboard mode: normal host punctuation and capitals, with the Spectrum’s single-key keywords. The first lesson explains the keys. The menu instructions describe macOS and Windows; Linux uses the keyboard and launch-command alternatives given alongside them.

Build Lucky Number

Give a useful clue begins a new program with a known secret. Compare a numeric guess and choose a response. Keep guessing adds repetition, an attempt count and checks for the promised range. Complete listings let you begin there if you are already comfortable entering BASIC.

Choose a new secret adds chance; Feedback and another round completes the game with short sounds and replay.

Make Oracle Stone

Choose an answer starts a writing toy whose replies are selected, not reasoned out. Give the answer a rhythm explores pauses and counted repetition. Write the repeated job once gives a shared heading one routine and finishes the toy.

Move a marker

Put it somewhere turns position into a row and column. Make it move compares drawing a trail with erasing the old position. Let the player steer reads the keyboard and checks the edges. One press, one step compares held input with fresh presses and gives the experiment a clear ending.

Beyond Meet BASIC

The wider route leads towards Bright Spark and Touchdown. You can also browse the BASIC reference lessons for individual commands and machine features. They remain available independently of this sequence.