← News

FantASM 1.8.0 is available

August 19, 2026FantASM

FantASM 1.8.0 is available to download. It’s a big one: modules grow up, the !test simulator changes CPU, and there are four breaking changes — read those first.

Breaking changes

  • The !test CPU core is now hg80, replacing the vendored iz80 fork. It corrects four Z80N behaviours — the block-copy flags, LDWS’s carry, PIXELDN’s bottom-row wrap, and JP (C) executing at all — so a test asserting any of the old behaviours will now fail. No cycle assertion in the suite moved.
  • Constants no longer fall back to global scope from inside a MODULE. Use @NAME. Cross-module Gfx.WIDTH is unaffected.
  • -M / max_code_size limits how much code there is, not the address it reaches. A source relying on the old behaviour will build where it used to fail.
  • A stray backslash in a literal is now an error rather than being silently stripped.

What’s new

  • @name reaches global scope from inside a MODULEcall @helper, ld a,@WIDTH. It means global, not one scope out.
  • Module dead-code elimination (--gc-modules, off by default): a routine inside a MODULE that nothing reaches is left out of the output, so a project can include a shared library and pay only for what it calls. KEEP <label> pins one reached by a computed address.
  • LDIRSCALE (ED B6) — LDIRX under another opcode; the scaling the name promises is not in the Next’s design.
  • A generated Z80N conformance table, run through the simulator, pinning flags, registers, timing and memory for every Z80N instruction across nine register seeds.
  • MODULE / ENDMODULE documentation — a Modules section covering qualified names, nesting, resolution, local labels and GLOBAL.
  • Reserved-word diagnostics (E1060E1065) — a macro, macro parameter or MODULE named after a word the tokeniser claims is now named and refused, rather than failing later at the call site.

Fixed

Too many to list here — the ones most likely to have cost you a debugging session were wrong output, silently: a STRUCT instance emitting no bytes at all, a forward reference in a byte-wide operand (out (PORT),a) overwriting the following instruction, nextreg’s second operand overwriting its register number, and an unclosed MACRO, STRUCT, ENUM, !test or !rhai swallowing the rest of the source and exiting 0 (E1074).

Also fixed: db "it's" was refused, backslash escapes now work, db (5) assembles, and !test blocks can call the routines in your program rather than only instructions retyped inside them.

The full changelog has all of it, grouped by consequence. Test coverage expanded from 341 to 575 tests.

Get it from the Downloads page.