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

Where you are

04 · Machine track

Spectrum assembly is the concrete Z80 route through the machine.

This is the application layer: instructions, registers, addressing, the Spectrum screen layout, attributes, sound, input, timing, and complete games that run inside the 48K machine's limits.

  • Sinclair BASIC is helpful for understanding the machine, but not required.
  • You should be comfortable with variables, loops, branches, and binary or use Foundations first.
  • Use The Craft when a game pauses on transferable ideas such as movement, collision, state, or feel.

Before you begin

You'll need an assembler and an emulator. Both are free and take five minutes to install.

Set up your tools →

Games

Each game teaches new skills while building something you'll want to play. Start with Game 1 and work through in order — each builds on what came before.

1
Meet the Machine screenshot
Meet the Machine
The assembly on-ramp — meet the Z80 and the Spectrum one idea at a time, before you build a thing.
Registers and memoryThe screen as memoryTest-and-jump control flowPointers, loops and subroutines
16 / 16 units
2
Gloaming screenshot
Gloaming
Light every lamp before the dark wins — the first complete game you finish in assembly.
Attribute graphicsCell-based movementCollision and a goalA moving threat
20 / 20 units
3
The Long Night screenshot
The Long Night
The night fights back — pools of dark, a reaching tendril, grudges, and a five-watch night with a dawn at the end.
Behaviour with rhythm — AI modesTerritory — pools and a ring bufferEscalation as dataA tune that yields the keyboard
10 / 10 units
4
Shadowkeep screenshot
Shadowkeep
Steal the gold from a darkened keep, room by room, past the Wardens that patrol it — the leap from one deep screen to a place of many, and a place you can lose.
A multi-room keep, flick-screenGold, a patrolling Warden, a way to loseAttribute lighting & moodA voice — SFX and a theme
19 / 19 units
5
Soon
Lamplight
Light the lamps and slip past the dark — your first sprite drawn cleanly over the room.
Masked spritesA sprite over a backgroundA single moving threatCollect and survive
Coming soon
6
Soon
Ricochet
Bat, ball and bricks — smooth pre-shifted motion and pixel-perfect bounces.
Pre-shifted spritesSmooth pixel motionBounding-box collisionBat-and-ball physics
Coming soon
7
Soon
Deepdelve
Mine the caverns — tile-map collision and jump physics in the Manic Miner tradition.
Tile-map collisionJump physicsHazard timingLevel data
Coming soon
8
Soon
Nibble Run
Clear the maze before the hunters close in — chase AI and power-up states.
Chase and pathing AITile-grid movementPower-up statesMaze design
Coming soon
9
Soon
Skyhawk
Fly into the swarm — many masked sprites and smooth software scrolling at once.
Sprite multiplexingSmooth scrollingFormation AISprite-vs-sprite collision
Coming soon
10
Soon
Greypeak
Climb the isometric keep — Y-sorted depth rendering in the Knight Lore tradition.
Isometric projectionY-sort depth orderingRooms and statePuzzle navigation
Coming soon
11
Soon
Starfall
Hold the line under falling fire — 128K AY music and bullet patterns.
AY-3-8912 musicBullet patternsVertical action128K modes
Coming soon
12
Soon
Hard Rain
Push through the assault — bosses, state-machine AI and multi-directional action.
Boss state machinesMulti-directional actionEnemy AISet-piece design
Coming soon
13
Soon
Wyrmhold
Explore a sprawling arcade-adventure — a large world with inventory and save.
A large multi-room worldInventorySave and restoreAtmosphere and mood
Coming soon
14
Soon
Spectral Legacy
The capstone — parallax, multiload and polish, every technique integrated into one game.
ParallaxMultiloadIntegration of all techniquesProfessional polish
0 / 512 units

What you'll master

By the time you've built all the games, you'll have deep knowledge of Spectrum hardware and Z80 assembly.

Attribute system

The Spectrum's unique colour system where 8×8 pixel blocks share INK and PAPER colours. Learn why this limitation defined Spectrum aesthetics.

ULA graphics

Understand the Uncommitted Logic Array that generates the display. Master the non-linear screen layout and attribute memory.

Z80 assembly

The instruction set that powered millions of machines. Write code that runs on Spectrum, Amstrad CPC, MSX, and Game Boy.

Software sprites

No hardware sprites means everything is software. Learn masking, shifting, and the techniques that made Spectrum games possible.

Memory map

The Spectrum's 48 KB address space puts the screen right next to the ROM — the layout that shapes every Spectrum program.

$0000–$3FFFROM (16 KB) — BASIC interpreter & system
$4000–$57FFScreen bitmap (6144 bytes)
$5800–$5AFFScreen attributes (768 bytes)
$5B00–$FFFFAvailable RAM (~41 KB on 48K model)

Ready to start?

Start with Meet the Machine — the Z80 and the Spectrum, one idea at a time. By the end of its first unit you've drawn to real Spectrum hardware in hand-written Z80; a few units on, you finish Gloaming, a complete game.

Start: Meet the Machine →