Z80/
LABUSER GUIDE · v1.0.0
Back to emulatorRuns locally in your browser

Getting started with Z80/LAB

Z80/LAB is a browser-based Zilog Z80 development environment. Assemble a program, execute it in a WebAssembly emulator, examine CPU and RAM state and save your session to a file. No account or installation is required.

1. Assemble and run a program

  1. In Assembly workspace, choose Print a message from the Example menu and click Insert example.
  2. Click Assemble & load. The listing shows generated addresses, bytes and source statements. The program counter is set to the assembled entry address.
  3. Click Run. The serial terminal should display Hello from Z80/LAB!.
  4. Try the Alphabet loop example; it prints the first 16 letters of the alphabet.

You can edit the Z80 assembly source directly, open a local .asm file, save the editor contents or download the assembled program as Intel HEX.

2. Debug execution

Source-level debugging requires a current source map. Editing source or executable bytes, or loading a different program, invalidates the map: reassemble to restore source stepping and source breakpoints. Not every data-only source line has an executable breakpoint location.

3. Load programs and use serial I/O

Load program offers prebuilt examples and local Intel HEX, text-hex and raw binary files. For raw .bin files, specify the hexadecimal Binary origin. The Serial terminal displays output from the emulator's virtual ports 00, 01 and 02; its input box lets you send characters to programs expecting terminal input.

The virtual clock can be set to 2, 4, 6 or 8 MHz, or Unlimited. These settings control emulated execution pacing, not the physical speed of a historical Z80 computer.

4. Save and restore a session

  1. Click Save session to pause the CPU and download a timestamped .z80session file.
  2. Click Open session and select that file to restore CPU and RAM, assembly source, source map, breakpoints, terminal text and debugger controls.
  3. The CPU is always paused after restore. Click Run to continue.

Some browsers append a suffix such as .z80session-2 when files share a name. Those files can be selected too; Z80/LAB validates the session contents rather than trusting the filename.

Sessions and source files stay on your device unless you choose to share them. There is no Z80/LAB account, server-side save feature or automatic cloud synchronisation.

5. Shortcuts and assembler syntax

The integrated assembler is ASM80, not Pasmo. It supports normal Z80 mnemonics, labels, ORG, DB and hexadecimal $ constants; single-file assembly only. INCLUDE and INCBIN are intentionally unsupported. Errors with a known line show a marked source line and a clickable diagnostic.

Compatibility, privacy and limitations

The public release targets Safari 16+ with JavaScript ES modules and WebAssembly. Other modern browsers supporting these features should work, but have not all been independently verified. Z80/LAB runs CPU emulation and assembly locally in the browser: it does not upload your programs or session files.

Source stepping is not subroutine step-over. The browser has not yet completed every external Z80 conformance suite; earlier native-core tests are not a guarantee of full browser conformance. This is an educational/development emulator, not a production hardware replacement.

Original project licence and third-party notices are available in third-party licences. Z80/LAB v1.0.0.

Return to Z80/LAB