Skip to content

v0.7.5

Latest

Choose a tag to compare

@ha1tch ha1tch released this 05 Jul 23:25

zenas v0.7.5 — first public release

zenas is a Z80 and Z80N macro assembler written in Go that can also execute
and test the code it assembles
. One static binary covers the whole loop:

zenas assemble game.asm game.bin          # assemble to raw machine code
zenas build game.asm --z80 --start main   # package into a runnable snapshot
zenas run game.asm --call=main --trace    # execute in the built-in emulator
zenas assert math_test.asm                # run a test suite, exit non-zero on failure

This is the first public release. The 0.7.x version number reflects the
project's internal history, not its maturity: the release ships with a
verified instruction encoder, CI across seventeen targets, and a complete
documentation set.

Highlights

Assemble, run, and assert without leaving the assembler. zenas run
executes assembled code in-process on the bundled zen80 Z80/Z80N core;
zenas assert checks the final machine state — registers, flags, memory —
against declared expectations, with exit codes that drop straight into CI.
Test suites work go-test style: *_test.asm files hold test_* routines
with .EXPECT contracts, and test directives are legal only in test files,
so test metadata can never leak into a shipped binary.

Verified encodings. All 545 instruction forms — 468 documented Z80, 48
undocumented IX/IY half-register forms, 29 Z80N extensions — assemble
byte-for-byte identically to pasmo and sjasmplus, with reproducible
verification scripts in tools/. Real operating-system source assembles to
a binary identical to pasmo's, every symbol address matching.

A deliberate design. Beyond the conventional core, zenas carries a small
set of connected ideas: a typed macro linkage layer with width-checked
signatures, package namespacing with qualified calls, Go-style build tags
that compose as a bitmask, and scoped dialect modes for ingesting pasmo
source mid-stream. The reasoning is written down in
docs/ZENAS_DESIGN.md, and
docs/SEAM_COMPARISON.md surveys how far other
assemblers' facilities reach towards the same design.

Packaging built in. zenas build produces ZX Spectrum tapes
(.tap/.tzx, optionally with a BASIC auto-run loader) and snapshots
(.sna/.z80) directly, across the 48K/128K/+2/+2A/+3 models.

In this release

Relative to the internal 0.7.3:

  • Added docs/ZENAS_DESIGN.md — the design rationale: the single idea behind
    the unusual features, what the C-style layer is (and is not) for, and the
    practical guidelines for structuring programs against it.
  • Added docs/SEAM_COMPARISON.md — a scored assessment of reproducing the
    design on other assemblers, from the conventional Z80 tools to the
    macro-engine class (fasmg, customasm).
  • Reworked the README: the introduction now leads with the run-and-test
    capability, the documentation list is complete (adding previously unlinked
    references), the pasmo compatibility claim carries an explicit scope note,
    and CI status badges are displayed.

No changes to the assembler, emulator, or generated output.

Install

Pre-built binaries for Linux (x86-64, 386, ARMv6/v7, arm64), macOS (Intel and
Apple Silicon), Windows (x86-64, 386), FreeBSD, OpenBSD, NetBSD, and DragonFly
BSD are attached below. zenas is pure Go with no cgo; every binary is static.

Or install from source (requires Go 1.25 or later):

go install github.com/ha1tch/zenas@latest

Documentation

Start with the programming guide if you are
coming from another assembler. The manual is the full
reference; the packaged-program tutorial
is a hands-on walkthrough; the measured state of pasmo and sjasmplus source
compatibility is in
docs/DIALECT_COMPATIBILITY.md.

Licence

Apache-2.0. See LICENSE and NOTICE.

Full Changelog: v0.7.3...v0.7.5