FantASM 2.1.0 is available
FantASM 2.1.0 is available to download. !virtual places code at an address it does not yet occupy, ALIGN pads to a boundary, and an expression takes every comparison !assert already spelt. Underneath, the whole diagnostic register — messages, hints, the -v/-vv log — is reworded to one house style.
The documentation has been rewritten to match, with new pages on virtual origins, building in pieces and pass structure.
Breaking
_hl_is no longer a register spelling.ld a,_hl_assembled asld a,(hl), a workaround from a time when the expression parser could not read the bracketed form. Write(hl).- A
hexbuild is refused where it would have written the wrong addresses. A gap, a backwardORG, or a banked program produced a file whose bytes were adjacent whatever their addresses, with exit 0 and nothing said. Those builds now fail withE1085orE1149. A banked program has nohexform at all — usenexorsna. - For a program embedding the crate —
SymbolProvidernow requiresSymbolView. The seven methods an output writer reads moved to a trait of their own. An embedder implementingSymbolProviderimplementsSymbolViewas well; no assembled output differs.
Added
!virtual <address>…!endvirtualassembles a block for an address it is not placed at: labels and$resolve at that address, its bytes staying inline in the image., <page>names the 8K page its labels are recorded in;, ?says the page is not knowable at build time.page ?, <slot>marks a slot as holding a page the OS allocates, so every record for code in that window carries page-1and a debugger arms on the address alone.ALIGN <boundary> [, <fill>]pads to the next multiple of a boundary, settled where the line lands, not where it was written.!watch <register> <comparison> <value>records a register and a bound into the SLD, for a debugger to break wherever in execution it first holds.- A
STRUCTmember may reserve bytes —name DS 8, orBLOCK. - Every comparison and logical operator
!assertalready spelt —==,!=,<=,>=,&&,||and unary!— is now legal in any expression,IFincluded. fantasm --surfaceprints what the language contains as JSON, for an editor, highlighter or linter to read instead of restating it.
Object output and the linker, experimental. -f obj writes a relocatable object, fantasm ar collects objects into an archive, fantasm link joins them into a bin, hex, sna or nex, and fantasm dump prints what an object or archive holds. SECTION names a piece and where it may go; EXTERN is the other half of GLOBAL.
Fixed
9 fixes, and the worst of each group:
- 3 wrong output, silently — bytes written out of address order landed at the wrong addresses in a
binorhexfile; a gap was dropped from ahexfile entirely; aSTRUCTfield initialiser naming a label held the address from before itsMODULEor!librarybody was placed. - 4 sources that should have assembled, or should not have —
IF here != $9000assembled its block on a warning instead of failing outright; aSTRUCTmember the assembler refused was reported a second time against an unrelated line;--gc-modules/--gc-librariescould discard a live body sharing an address with a discarded one; aSTRUCTfield initialiser could not name a label defined below the instance. - 1 diagnostic —
W1068/W1069reported<none>:0for the line that emitted. - 1 in the documentation —
_linewas documented nowhere.
36 new diagnostic codes, 1143 to 1179, none withdrawn. Test coverage expanded from 1,432 to 1,762 tests.
Every change is in the full changelog under [2.1.0].
Get it from the Downloads page.