Skip to content

Spectrum · Assembly · Z80

ZX Spectrum assembly

Learn Z80 assembly by building games

CPU
Zilog Z80
Speed
3.5 MHz
RAM
48 KB
Graphics
ULA
Sound
Beeper

Spectrum assembly is the concrete Z80 route through the machine.

Write instructions for the Z80, build them into a program, and observe the result on the Spectrum. Games give a purpose to memory layout, graphics, input, sound and timing.

  • You can enter assembly directly; completing Sinclair BASIC is not required.
  • The current lessons use variables, loops, branches and binary. Foundations offers fuller explanations of those ideas when useful.
  • The Craft explores design choices such as movement, collision, feedback and challenge.

Before you begin

Use an assembler on your host computer to turn source text into a program for the Spectrum target. An emulator lets you run and inspect it. This is cross-development; the setup guide explains the tools and required ROM.

Set up your tools →

Published lessons and games

Meet the Machine is the current introduction. The games below provide guided development sequences; use their descriptions to choose a starting point. Future game choices are still under review.

The machine behind the games

These are some of the connections between a game and the machine that runs it. Individual lessons develop the details as they become useful.

Attribute system

Each 8×8 pixel cell shares INK and PAPER colours. Explore how that affects the shapes, backgrounds and movement you design.

ULA graphics

Explore how the display reads bitmap and attribute memory, and why pixel rows are not stored in ordinary screen order.

Z80 assembly

Work with registers, instructions and memory. Z80 knowledge transfers to other Z80 systems; their display, sound and input interfaces need their own code.

Software sprites

Draw moving objects into screen memory. Explore the work needed to preserve a background, detect collisions and update the display in time.

Memory map

The 48K Spectrum has a 64 KB address space: 16 KB of ROM followed by 48 KB of RAM. The display occupies the first part of RAM; the rest is not automatically free for a program to overwrite.

$0000–$3FFFROM (16 KB) — BASIC interpreter & system
$4000–$57FFScreen bitmap (6144 bytes)
$5800–$5AFFScreen attributes (768 bytes)
$5B00–$FFFFRAM above the display — shared with BASIC system data, buffers and the stack

Ready to start?

Meet the Machine begins with source code, an assembly step and a visible change to the border. Follow the current introduction, then explore a complete game such as Gloaming.

Start: Meet the Machine →