<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools.nes/lib/xixanta/src/node.rs, branch main</title>
<subtitle>Tools for NES/Famicom development.
</subtitle>
<id>https://git.mssola.com/nes/tools.nes/atom?h=main</id>
<link rel='self' href='https://git.mssola.com/nes/tools.nes/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/'/>
<updated>2026-08-18T14:44:27Z</updated>
<entry>
<title>Do not mark some valid identifiers as invalid</title>
<updated>2026-08-18T14:44:27Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-08-18T14:44:27Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=34339ecae6c4d3284a099d34f09674b4c8bdfd62'/>
<id>urn:sha1:34339ecae6c4d3284a099d34f09674b4c8bdfd62</id>
<content type='text'>
Some identifiers like "@aa" were marked as invalid as "aa" is a
potentially hexadecimal value, but the "@" symbol actually disambiguates
this situation. Hence, if a non-alphanumeric character (that the parser
liked) is actually found, ensure it cannot be considered as an
hexadecimal value.

Provide also a test of is_valid_identifier(). The list is certainly not
exhaustive, but it should be good enough coupled with end-to-end tests.

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Add global labels</title>
<updated>2026-08-18T14:39:37Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-08-18T14:39:37Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=fcd4c9a267b407e653ed6b21ae87f219f3e4c4af'/>
<id>urn:sha1:fcd4c9a267b407e653ed6b21ae87f219f3e4c4af</id>
<content type='text'>
These are labels that are declared by prefixing a '#' symbol to the
name, and it allows the label to be declared at the global scope instead
of the current one.

This is a feature which is not to be abused so to not make scopes
pointless, but it can be quite handy with some optimizations while not
abandoning scopes completely.

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Add support for the asan:fixed-segments comment</title>
<updated>2026-07-09T20:14:22Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-07-09T20:07:47Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=6f58e4ab8d90166cac4e4da269a77c5134f12f1e'/>
<id>urn:sha1:6f58e4ab8d90166cac4e4da269a77c5134f12f1e</id>
<content type='text'>
This magic comment allows for the definition of segments that are fixed
and for which references are always safe. This goes in tandem with the
asan:safe comment, which can then be used more sporadically.

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Add a warning for unknown cross-mapping references</title>
<updated>2026-07-08T19:27:49Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-07-08T19:13:00Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=0664f0bad653ca750d320e513f685ab0c852f359'/>
<id>urn:sha1:0664f0bad653ca750d320e513f685ab0c852f359</id>
<content type='text'>
Some segments, like the 'vectors' one, will reference code that is
outside of its mapping. But in some other configurations, segments
cannot make these cross-mapping references so happily. Imagine:

    .segment "SWAPPABLE"

    .proc foo
        rts
    .endproc

    .segment "FIXED"

    jsr foo

Here the assembler will properly detect the address of 'foo' in the
context of the 'SWAPPABLE' segment. But what this assembler doesn't know
is that this segment is swappable (e.g. UNROM chip). Hence, if the bank
being mapped right now is not the one containing the 'SWAPPABLE'
segment, then the address computed for 'foo' and used in that 'jsr'
instruction will point to something else entirely. This would be similar
to a use-after-free bug.

This is something that can only be inspected at runtime, and so the
assembler cannot be of much help here. Hence, this commit adds a warning
so the programmer can understand the potentially dangerous operation.

All of that being said, this commit also adds support for "asan:safe" or
"check:safe", which is a magic comment that the programmer can write to
re-assure the assembler that this operation is fine (e.g. there is a
guarantee that the mapped bank is that one we are expecting). Hence, the
code above could now be written like so:

    jsr foo      ; check:safe

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Add the .min and the .max control expressions</title>
<updated>2026-04-24T21:12:51Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-04-24T21:12:51Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=ee9d61f078b04406c5b264d4e0e5bd1ea287e6e2'/>
<id>urn:sha1:ee9d61f078b04406c5b264d4e0e5bd1ea287e6e2</id>
<content type='text'>
Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Add a big endian control statement</title>
<updated>2026-04-24T20:29:47Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-04-24T20:29:47Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=1410c98545d00c8508a715a566cf8e3e4e424773'/>
<id>urn:sha1:1410c98545d00c8508a715a566cf8e3e4e424773</id>
<content type='text'>
By default everything is little endian, and that should always be the
case. That being said, if a literal is better expressed in big endian
format for whatever reason, you can now use the .be or the .bigendian
control statements. The terribly named .dbyt control statement can also
be used for this purpose, but that's just to be compatible with the
implementation from ca65.

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Add the .version pseudo-variable</title>
<updated>2026-04-24T14:26:08Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-04-24T14:26:08Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=c8138a0fc5353dc9017fc32fb5ef12a6fe780415'/>
<id>urn:sha1:c8138a0fc5353dc9017fc32fb5ef12a6fe780415</id>
<content type='text'>
Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Implement the asan:stack statement</title>
<updated>2026-04-08T14:04:12Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-04-08T14:04:12Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=a2cb050ca18fd7c5533d69e9aa093e4f0a40d0fa'/>
<id>urn:sha1:a2cb050ca18fd7c5533d69e9aa093e4f0a40d0fa</id>
<content type='text'>
This statement allows programmers to reserve a memory range for the
stack. This is useful to reserve a memory region which is not attached
to any variable, and:

1. It is a way to safely reserve space on the $0100 page.
2. The --stats/--write-info flags will be able to add up the memory
   space reserved for the stack.
3. Future tooling might be able to use this value as a way to detect
   stack overflows.

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Ensure __fallthrough__ is not considered a valid identifier</title>
<updated>2026-02-03T09:49:10Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-02-03T09:49:10Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=948ad7f2bda3495faebf39d1bb903f863e9ad596'/>
<id>urn:sha1:948ad7f2bda3495faebf39d1bb903f863e9ad596</id>
<content type='text'>
Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
<entry>
<title>Change .fallthrough to __fallthrough__</title>
<updated>2026-02-02T22:22:47Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mssola@mssola.com</email>
</author>
<published>2026-02-02T22:13:57Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=31dd071e927ab4375db6c408c08ab776e4a5c655'/>
<id>urn:sha1:31dd071e927ab4375db6c408c08ab776e4a5c655</id>
<content type='text'>
Implementing it as a control statement has the bad thing that it's
impossible to be compatible with other assemblers such as ca65, as you
cannot create dummy control statements or something like that in
there. Instead of that, we define it with the special underscores which
are still valid for identifiers, and give a "compiler-specific thingie"
flair to it.

This also has the benefit that the parser can be a bit more strict.

Signed-off-by: Miquel Sabaté Solà &lt;mssola@mssola.com&gt;
</content>
</entry>
</feed>
