-
-
Notifications
You must be signed in to change notification settings - Fork 56
Changelog
Lorenzi edited this page Jul 2, 2023
·
13 revisions
- Fixes certain errors not being caught by the assembler, one related to ruledef-typed parameters, and another one to
asm
blocks.
- 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
#bankdef
arguments.
- 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
%0110
for binary literals, and$12abcd
for 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=off
to disable colored output. -
Breaking change: The usage of some directives has changed.
#bits
and#labelalign
should now only appear inside a#bankdef
definition.#noemit on
should be replaced by something like#const(noemit) x = 0
at each affected constant declaration.
- Breaking change: Whitespace is now respected within rule patterns.
- Adds the
decspace
andhexspace
output formats. - Removed the old sized-literal syntax with a standard quotation mark
'X
. New code should use backquote slices`X
.
- Adds user-declared
#fn
functions. Details here.
- Adds the
#once
directive. 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-mlb
symbol 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, and deferred resolution β assert()
- Available expression operators and functions β incbin(), incbinstr(), inchexstr()
- Functions β #fn
- Conditional Compilation β #if, #elif, #else