Skip to content

Releases

v0.6.0

Choose a tag to compare

@waitingforvsync waitingforvsync released this 21 Oct 09:45

Breaking changes

  • A virtual section opened inside a real section now needs its own org. It used to take the enclosing addresses, overlapping whatever came after it.
  • ZA_CANCALL, ZA_CANJUMP and ZA_RETURNTO must name your own code by its label: a plain address that lands on assembled code is now an error. In return, labels resolve to the right section, in lists and with offsets (label + 3) too.
  • A ZA_AUTO variable whose address is used (LDA #var, EQUB var, PRINT var) but which no instruction touches is now an error.
  • A local in a FUNCTION body can only be read once something has assigned it (a forward reference used to read the previous pass's value). FUNCTION parameters and locals no longer appear in the --symbols dump.
  • FOR, NEXT, REPLACE and WHERE are new keywords (see New features below), so locals or FUNCTIONs with those names will need renaming.
  • An IF in a FUNCTION body given a list or a string is now an error. It used to run neither branch, silently.

New features

  • Section transforms: transform = "name" on a SECTION passes its bytes through a FUNCTION of yours as it closes - to compress, encrypt or checksum them - and everything after it settles to the new size. With BITLEN, BITPACK and LZ_PARSE (the cheapest LZ parse under cost tables you describe, with repeat matches and offset reuse), a compressor is a page of Baron. examples/compress has four, each with its 6502 decompressor: a simple LZ, Exolite, ZX02, and Exomizer's own format.
  • FUNCTION bodies can reassign locals and loop with FOR ... NEXT. Loops have no depth limit, and free each step's working memory as they go. (#28, thanks @tornewuff)
  • REPLACE(x, old, new) replaces text in strings and runs of elements in lists. WHERE(mask, a, b) is the element-wise IF. FIND takes an optional third argument, returned instead of an error when nothing is found.
  • SUM joins a list of strings, and MIN, MAX and SORT work on strings. (#25, thanks @tornewuff)
  • The guide now explains how strings, lists and broadcasting fit together.
  • Sections now own their bytes (#17). Any top-level section can be reopened (a reopening takes no attributes), a top-level section takes no room in the code outside sections, and a real section inside a virtual one keeps its bytes and can be saved.
  • FUNCTION calls are much cheaper in time and memory, and recursion can go 128 calls deep (was 64).
  • --warn 3 reports branches that cross a page boundary (an extra cycle when taken).
  • Faster list handling: arithmetic over lists of numbers, FIND with many needles, and CONCAT.

Bug fixes

  • ZA_ annotations in one section no longer apply to an instruction in another section at the same address (#29).
  • A list of annotation targets resolves its labels across sections again (#30, thanks @mattgodbolt).
  • A list referring forward to a label now settles (#31, thanks @mattgodbolt).
  • ZA_INDEXEDBY accepts an access whose base sits below the variable, as in LDA v-4,X with X from 4 to 7 (#32, thanks @mattgodbolt).
  • A branch into labelled inline data no longer runs on into the code after it, which gave a false recursion error (#34).
  • A forward reference to a ZA_AUTO alias no longer emits the wrong address.
  • ZA_POOL given a ZA_AUTO variable is now an error (it used to reserve &00).
  • Very large numbers, infinity and NaN are refused with an error rather than causing undefined behaviour, and ranges with huge endpoints no longer overflow or hang. Found by fuzzing.

v0.5.3

Choose a tag to compare

@waitingforvsync waitingforvsync released this 11 Oct 18:50

Added TO_STRING() and TO_NUMBER() functions.

v0.5.2

Choose a tag to compare

@waitingforvsync waitingforvsync released this 11 Oct 16:53
  • Splice Baron assembly into a BASIC line with a trailing open brace, and a close brace immediately followed by the rest of the line. See the Guide for more details.
  • Bug fixes caught by fuzzer.

Baron 0.5.2 builds against a slightly updated version of richc so you will have to update submodules when building.

v0.5.1

Choose a tag to compare

@waitingforvsync waitingforvsync released this 10 Oct 18:37

What's Changed

  • Name code, not a data label, in the unreachable ZA_AUTO warning by @mattgodbolt in #20
  • Resolve ZA_CANJUMP/ZA_CANCALL/ZA_RETURNTO targets by label across sections by @mattgodbolt in #21

v0.5.0

Choose a tag to compare

@waitingforvsync waitingforvsync released this 10 Oct 14:47

Breaking changes

  • Changed the symbol dump format (--symbols) to categorise by symbol type (label, assignment, za auto), and arranged into section-major format.

New features

  • Added concept of virtual sections which emit no bytes, and can be reopened. Good for defining labels sequentially from a pool, for example, in parallel with the code.

Bug fixes

  • Fixed FUNCTION symbol scope clashes across files (thanks @mattgodbolt)
  • Handle non-converging passes better to avoid long run times
  • Fixed range parsing so that 0..2..2 is valid

v0.4.2

Choose a tag to compare

@waitingforvsync waitingforvsync released this 03 Oct 15:30

Fixed some zp allocator bugs that were pessimising allocations and issuing errors on certain recursive code shapes.

v0.4.1

Choose a tag to compare

@waitingforvsync waitingforvsync released this 30 Sep 09:01
  • Added ASSERT keyword (both as a statement and a function expression)
  • Improved error emission inside FUNCTIONs
  • Various crash bugfixes found by fuzzing

v0.4.0

Choose a tag to compare

@waitingforvsync waitingforvsync released this 23 Sep 11:27
  • ZA_INDEXEDBY values: declare the index values the register can hold at the indexed ZA_AUTO access just before it (var,X / var,Y / (var,X)). The access is then bounds-checked against the variable's width and assembles in silence; ranges and lists flatten like EQUB data.
  • The unchecked-indexed-access warning is now shown by default (it was opt-in): silent assembly requires the ZA_INDEXEDBY declaration.
  • ZA_WIPE: Placed directly after a zero-page wipe loop, it promises every pool byte has been freshly written: values may rely on the wipe for their zeroes, every earlier live range ends there, and the sweep's own stores are not warned about.
  • New opt-in warning: a store whose literal address or indexed base lies inside the ZA_POOL without naming a ZA_AUTO (the one stray pointer that is statically visible).
  • --warn <n>: choose the warning level (default 1; 2 adds the opt-in checks; 0 errors only).
  • --symbols <file>: dump every source file's resolved symbols to a JSON file - full dotted paths, sorted keys, one symbol per line, diffable.
  • -vv, and a reshaped -v listing: labels list with their address ( 1900 .install_irq), assignments show the value they became with the source expression bracketed (base = 18 [&12]), the byte field is wider, and -vv dumps every emitted byte and whole list values.
  • --pad: pad a .ssd image out to a full 80-track disc (200K).
  • Relaxed reserved names: labels, FOR variables, macro and FUNCTION parameters, ZA_AUTO names and -D defines may share a spelling with any keyword, mnemonic or macro. Assignments can use reserved names with the @ prefix: @next = 5 binds next. Only TRUE, FALSE and PI stay reserved outright.
  • ZA_DISCARD / ZA_WIPE placement is now path-accurate: a marker belongs to the path it is written on, with a label as the pivot - above the label it stays on the arm that falls in, below it it covers every arriving path.
  • A missing INCLUDE file is reported immediately as a fatal error, instead of surfacing as misleading parse errors downstream.
  • Fixed: ZA_AUTO variables reached with ,Y indexing (which has no zero-page encoding, so the access widens to absolute) were invisible to the allocator's analysis - a table read only that way could be classified unused or have its bytes reused while still live.
  • Fixed: FOR over a list literal could bind garbage to later iterations when the loop body's expressions were allocation-heavy.
  • Fixed: a string value with an embedded NUL byte cut the -v listing short. Unprintable bytes in a string now render as . in listings and diagnostics; the assembled bytes are untouched.
  • Numbers up to 32 bits now print exactly in listings and PRINT (&FFFF1900 no longer renders as 4.29484e+09).
  • Both zero-page allocation documents substantially reworked and expanded.

v0.3.0

Choose a tag to compare

@waitingforvsync waitingforvsync released this 06 Sep 16:24

Breaking changes

Redesigned sections.

  • Nested sections now propagate emitted bytes from child to parent. That means you can create a section containing changes of org by defining child sections inside it. The parent section gets all of the child sections' data.
  • Attributes are no longer inherited from parent to child.
  • Removed INCSECTION; the relocation workflow can now be done by nesting (see The Baron Guide)

v0.2.2

Choose a tag to compare

@waitingforvsync waitingforvsync released this 01 Sep 12:52

Fixed a bogus "Assembly does not settle" error caused by PRINTs in dead IF blocks.