ZX81 emulator and Z80 IDE
A Sinclair ZX81 (1K or 16K) in your browser running the original ROM, with a Z80 assembler that builds REM-statement programs, a debugger with breakpoints and single-stepping, and .P file loading and saving.
Added · updated 13 October 2026
How to use it
The ZX81 switches on by itself the first time you run something (or press Power on). With 16K of RAM the ZX81 takes a couple of seconds to build its display file, then shows the K cursor. Click the screen to give it the keyboard.
Running programs
Drop a .P or .81 file on the screen. The machine resets, LOAD "" runs, and the file is
copied into memory at the ROM’s own LOAD routine — then type RUN (the R key in K mode)
and NEW LINE. Save .P writes the program in memory as a .P file.
Writing Z80 code
Machine code on the ZX81 usually lives in a REM statement in line 1, at address 16514
($4082). The Assembler tab builds exactly that: assemble at ORG 16514 and Assemble &
run loads a two-line program, 1 REM (your code) and 2 RAND USR 16514, and runs it.
Build .P file saves the same program for a real ZX81. DEFM strings are converted to the
ZX81’s character set, so DEFM "HELLO" prints with RST $10. The examples print a
message, fill the display file with block graphics, and read the keyboard.
The assembler syntax is described on the ZX Spectrum page; the debugger works the same way: click a line number beside the editor for a breakpoint (click the ● to remove it), right-click one to run to it, and step, step over or step out with the registers, stack, disassembly and memory in view. Point at the screen to see the display-file address of a character.
Software to load
The Software panel (on the Software tab) has two parts:
-
Library — programs this site can share: open-source and public-domain releases, freeware whose author allows it to be passed on, and this site’s own examples. Each shows its licence, why it may be shared, and where it came from; Copy link gives a link (
?lib=<id>) that opens this page and loads it. -
Open URL / archive.org — paste a link to a file, or an archive.org item (its URL or identifier). For an archive.org item the panel lists the files the ZX81 can open, with the item’s licence as the uploader set it. Sites that allow it load straight into the emulator; archive.org doesn’t let other sites read its files, so for those you get a download link and drop the file onto the emulator.
There are no links to "complete ROM set" archives: most are copies of commercial software that is still under copyright, whatever the upload’s licence field says. Files you own you can always load — drop them onto the emulator or paste a link.
How it works
The ZX81 has no video hardware that reads memory. The CPU "executes" the display file at its address + $8000; the ULA turns each character into a NOP and shifts its pattern out of the ROM font, the ROM counts the blank lines with NMIs from the ULA’s sync generator, and it times every text line with the R register (the interrupt fires when R’s bit 6 goes low). The emulator models those signals — NMI, the R-register interrupt, VSYNC from port $FE, the line counter, and WAIT on HALT — and lets the ROM draw the picture, so SLOW and FAST mode behave like the real machine. The Z80 core matches all of the FUSE emulator’s Z80 test cases.
Limits: no ZX Printer, no tape signal (programs load through the ROM’s LOAD directly), and no hi-res modes that depend on exact WAIT timing.
ROM
The ZX81 ROM (the improved version 2, as on most machines) is © Amstrad, who have kindly given their permission for the redistribution of their copyrighted material but retain that copyright (comp.sys.sinclair FAQ; zxsp). The emulator, assembler and examples are this site’s own code.
Feedback is a gift. Something to improve, a feature to add, or a bug? Tell me.
Runs entirely in your browser; nothing you type leaves this page.