FantASM 1.8.0 is available
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
!testCPU core is now hg80, replacing the vendorediz80fork. It corrects four Z80N behaviours — the block-copy flags,LDWS’s carry,PIXELDN’s bottom-row wrap, andJP (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-moduleGfx.WIDTHis unaffected. -M/max_code_sizelimits 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
@namereaches global scope from inside aMODULE—call @helper,ld a,@WIDTH. It means global, not one scope out.- Module dead-code elimination (
--gc-modules, off by default): a routine inside aMODULEthat 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) —LDIRXunder 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/ENDMODULEdocumentation — a Modules section covering qualified names, nesting, resolution, local labels andGLOBAL.- Reserved-word diagnostics (
E1060–E1065) — a macro, macro parameter orMODULEnamed 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.