Meet C64 BASIC
The Commodore 64 BASIC on-ramp. Before you build a game, learn to write, run, edit and debug Commodore BASIC for real — and meet the screen, colour, sound and joystick that, on the C64, you reach by writing straight to the chips.
What this is
Not a game — a bridge. You arrive knowing what a variable, a loop, and a decision
are (from General Programming, or any language).
Meet C64 BASIC sits you at the Commodore 64 and teaches you to write and run
Commodore BASIC for real: its keywords, its quirks, and the part that makes the C64
unlike anything else — its BASIC has no words for graphics or sound. You reach the
screen, the colours, the SID chip and the joystick the way the machine itself does:
by POKE-ing numbers into memory and PEEK-ing them back.
Fifteen short beats, each showing its result on screen the moment it runs: a line you typed, a variable that remembers, a character that appears where you put it, a colour, a note from the SID, a shape you steer with a joystick. By the end you can type, run, edit, save and debug a Commodore BASIC program — and you've met every surface the first games assume, so they can open on building a thing, not on "here is what PRINT does."
Who it's for
Anyone who has met variables, loops and decisions somewhere — General Programming, or another language — and now wants to write them on a real Commodore 64. New to programming entirely? Start with General Programming; it teaches the ideas this primer writes in Commodore BASIC.
You don't need a real C64: any C64 emulator runs every example.
The shape
- The machine and the editor — typing a line letter by letter, running it, and editing a program by line number.
- Talking and listening —
PRINTand its punctuation,LETand what the C64 lets you name (and the surprise that it only reads the first two letters),INPUT. - Choosing and repeating —
IF/THEN(the C64 has noELSE),FOR/NEXT, andGOTO/GOSUBbuilding the game loop (withRNDto pick a secret number). - The C64 by POKE and PEEK — the screen as memory, colour kept in a place of its own, the SID chip singing, the joystick read from a memory address, and a shape set moving.
- Keeping it and fixing it — saving your work, and debugging from the error message.
By the end you'll have built a small, moving, coloured shape that beeps as it goes — and you'll understand the deal the C64 offers: the language gives you almost nothing for free, but hands you the keys to every chip in the machine. That trade is the whole story of the C64, and it's why its best programmers reached past BASIC. Next stop: your first C64 BASIC game.
Unit roadmap
The machine and the editor
Typing and running a line, and editing a program by line number
Talking and listening
PRINT and its punctuation, LET and the naming rules, INPUT
Choosing and repeating
IF/THEN, FOR/NEXT, GOTO and GOSUB, the game loop and RND
The C64 by POKE and PEEK
The screen and colour as memory, SID sound, the joystick, and motion
Keeping it and fixing it
Saving your work, and debugging from the error message