← all projects

zenas

An assembler that runs what it assembles

A Z80 and Z80N macro assembler written in Go that can also execute and test the code it assembles. Assembles source to raw machine code, packages it into runnable tapes and snapshots, or runs it in a built-in Z80 emulator and asserts on the result.

zenas manual

zenas is a two-pass Z80 / Z80N assembler. This manual is the reference for the command line, the source language, the directives, and the extensions. For the…

Read →

Zenas programming

This guide is for someone who already knows Z80 assembly and another assembler — pasmo, sjasmplus, z80asm — and wants to understand how zenas fits their hands. It is in…

Read →

The logic of zenas

If you read the zenas manual as a catalogue of features, some entries look eccentric. An assembler with a C-flavoured macro syntax that has no if, no loops, and no…

Read →

Z80 instruction-set coverage

zenas covers three classes of instructions, verified by encoding a representative of every instruction family and comparing the bytes against established reference…

Read →

Z80N (ZX Spectrum Next) instruction reference

Z80N (ZX Spectrum Next) instruction reference

Read →

Running and testing code with zenas

zenas can execute the code it assembles, in-process, through a bundled Z80/Z80N emulator core. This is a capability most assemblers do not have: there is no separate…

Read →

Dialect compatibility reference

This document records the measured state of zenas's compatibility with pasmo and sjasmplus source, and explains what each non-zenas construct does. It exists so the…

Read →

Reproducing the seam on other assemblers

The design rationale describes the seam: a typed linkage layer — width-checked signatures, calls, assignment, namespaced packages — built natively into the assembler. A…

Read →

Building and testing a packaged program

This is a hands-on walkthrough. We build a small but real program — a sprite-row compositor that writes graphics bytes into a buffer — using zenas packages to organise…

Read →