-
-
Notifications
You must be signed in to change notification settings - Fork 70
Changelog
Lorenzi edited this page Apr 13, 2026
·
24 revisions
- Fixes a regression introduced with the previous version's new optimizations (#246).
- Makes
--legacy=offthe default option, which makes all built-in names require a$prefix (such as$le,$assert,$incbin, and so on).--legacy=oncan still be passed as an option if desired. - Optimizes the assembly process's iterations, which speeds up many use-cases, especially regarding recursive
asmblocks. - Removes the type distinction for string literals, which are now interpreted as integers directly, enabling more ergonomic usage in expressions and comparisons.
- Adds the
--legacy=offcommand-line option, which makes all built-in names require a$prefix (such as$le,$assert,$incbin, and so on) to prepare for a possible future breaking-change. The default is--legacy=onfor now, which keeps current behavior, and setting itofflets you opt in to the new behavior early (#230). - Errors out if you try to declare new symbols with reserved built-in names.
- Optimizes variadic instruction matching (#229).
- Adds special parsing for literal integers in glued parameter positions in instructions (#235).
- Indicates if a binary or annotated output will be padded with zeroes (#236).
- Allows
:in instruction patterns (#234).
- Adds support for
struct{}in expression contexts that make it possible to pass around compound values (see the Wiki). - Adds the
bankof()built-in function (#225). - Makes double-quote usage optional in format options expecting strings, for convenience in shell environments. Useful for the
listoutput format. - Adds more options to the
annotatedoutput format. (#227).
- Adds the
listoutput format, which allows for greater customization options (see usage help). - Removes the
vergenbuild dependency. - Adds standard files and an example for Game Boy support (#222).
- Fixes
asmblocks erroring out if using deferred constants/labels.
- Adds the
sizeof()built-in function.
- Allows labels inside
asmblocks (#115). - Adds the
#assertdirective outside of expression contexts. - Fixes the
intelhexoutput format to not ignore output zeroes (#210). - Fixes the
#aligndirective to take into account the current bank's start address (#213). - Improves the
#includedirective's relative file navigation algorithm (#215). - Fixes empty subrule patterns not being recognized at the end of an instruction (#216).
- Fixes a regression in the instruction matcher (#204).
- Improves the
intelhexoutput format to ignore blank space. (#206).
- Makes it so instruction arguments are parsed both with and without the "lookahead character" to increase flexibility and enable more instructions to parse without conflict. (See for example #203)
- Reimplements the token-walker lexical analyzer to allow tokens to be split and reinterpreted, mostly useful in
asmblocks, when an argument is passed down "verbatim" to a sub-rule. - Adds the
strlen()function to get the UTF-8 byte count of a string. - Adds optional range arguments to the
incbin(),inchexstr(), andincbinstr()functions. - Adds the
tcgameoutput format, compatible with the "Turing Complete" game. - Adds the
addr_unitparameter to theintelhexoutput format.
- Fixes the optimized instruction matcher algorithm, used by default, which was incorrectly rejecting short instructions with "glued" parameters.
- Fixes a bad interaction between
#includeand#once, where the resulting AST would be incorrect.
- Fixes certain errors not being caught by the assembler, one related to ruledef-typed parameters, and another one to
asmblocks.
- Adds the conditional compilation directives
#if,#elif, and#else. - Adds constant overwriting via the command-line with
-d. - Makes it possible again to reference constants in
#bankdefarguments.
- A complete internal overhaul, this version enables speed-ups of up to 7x for big projects.
- You can now use alternative-style number literals anywhere, such as
%0110for binary literals, and$12abcdfor hexadecimal literals. - You can specify multiple output formats for a single execution of the assembler, separated by
--, such ascustomasm main.asm -f binary -o main.bin -- -f symbols -o symbols.txt. - Some format options have been extended with parameters, such as
-f annotated,base:8,group:3. - You can now specify
--color=offto disable colored output. -
Breaking change: The usage of some directives has changed.
#bitsand#labelalignshould now only appear inside a#bankdefdefinition.#noemit onshould be replaced by something like#const(noemit) x = 0at each affected constant declaration.
- Breaking change: Whitespace is now respected within rule patterns.
- Adds the
decspaceandhexspaceoutput formats. - Removed the old sized-literal syntax with a standard quotation mark
'X. New code should use backquote slices`X.
- Adds user-declared
#fnfunctions. Details here.
- Adds the
#oncedirective. Details here. - Adds string encoding conversion functions:
utf8(),ascii(),utf16be(),utf16le(),utf32be(), andutf32le(). Details here.
- Makes it so the assembler will select the rule with the fewest amount of output bits in the case of multiple matches.
- Adds the
mesen-mlbsymbol output format, for use with the Mesen NES emulator.
- Adds the built-in function
le(), which reverses the bytes of an integer, essentially performing little-endian encoding. It's important that the argument be sized with a multiple of 8 bits. For example:le(0x1234)orle(65000`16). Details here. - Makes it so assembly won't stop at the first resolve error, which allows more errors to be caught in a single execution.
- Getting started
- Defining mnemonics — #ruledef, #subruledef
- Declaring labels and constants
- Setting the minimum addressable unit — #bits
- Outputting data blocks — #d
- Working with banks — #bankdef, #bank
- Address manipulation directives — #addr, #align, #res
- Splitting your code into multiple files — #include, #once
- Advanced mnemonics, cascading, deferred resolution, asm blocks — assert(), #assert
- Available expression operators and functions — incbin(), incbinstr(), inchexstr()
- Functions — #fn
- Conditional Compilation — #if, #elif, #else