<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools.nes/lib/xixanta/src/context.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>2024-12-16T15:10:15Z</updated>
<entry>
<title>Fix the mapping of addresses on labels</title>
<updated>2024-12-16T15:10:15Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-12-16T14:46:21Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=1d0bb4d384d391b5603622d813a63cb192e0defb'/>
<id>urn:sha1:1d0bb4d384d391b5603622d813a63cb192e0defb</id>
<content type='text'>
There was a big missunderstanding on how things were to be laid out in
the end file, and so it was needed to create a proper understanding on
what's a Mapping and what's a Segment. These turned out to be
fundamental concepts that I failed to grok up until this commit.

Hence, this commit re-arranges completely how variables and labels are
stored in the Context, and how these objects can then be translated into
bundles that can be spit out to the caller.

This commit, besides introducing the new Mapping struct, also introduced
a more general Object, which abstracts things from the Bundle struct,
and allows us to pass certain metadata about the bundle at hand.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Re-work the handling of segments in the assembler</title>
<updated>2024-12-12T06:55:55Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-11-05T12:39:16Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=f0624b8929e6ead3f2d8b1939dc7f094c539bee1'/>
<id>urn:sha1:f0624b8929e6ead3f2d8b1939dc7f094c539bee1</id>
<content type='text'>
There were a lot of assumptions on the assembler that stemmed from a
fundamental missunderstanding from my side on how segments are laid out
on the final file. This commit is the first step to address this.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Add support for anonymous labels</title>
<updated>2024-12-12T06:54:58Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-10-31T15:10:48Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=b768b2c6749986b0efe8610c023b42eb0d9e2ce6'/>
<id>urn:sha1:b768b2c6749986b0efe8610c023b42eb0d9e2ce6</id>
<content type='text'>
Allow for anonymous labels to be defined and referenced by using the
same syntax as cc65.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Don't rely on the identifier for control identity</title>
<updated>2024-12-12T06:54:51Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-10-29T13:49:44Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=d2d6d90acf2e9a8ccb4cbcec619d2a0d49cd462a'/>
<id>urn:sha1:d2d6d90acf2e9a8ccb4cbcec619d2a0d49cd462a</id>
<content type='text'>
Instead, use a new enum type to identify the control statements that we
actually support. This way the assembler is more easily aware on the
control that it's dealing with, and can be more sure on certain aspects
of the implementation on control support.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Re-work the support on labels, variables and jumps</title>
<updated>2024-12-12T06:49:33Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-10-23T10:54:14Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=d492aa8271f9fb02351b1144733508194df67746'/>
<id>urn:sha1:d492aa8271f9fb02351b1144733508194df67746</id>
<content type='text'>
As a way to firstly adapt on the latest changes from the parser since
184c39579227 ("Re-work the parser from scratch"), the assembler had to
leave out some features on 16114b2ca358 ("Adapt the assembler to the
changes on the parser"). This commit reintroduces support for settings
labels, variables and referencing them, while also providing a more
robust implementation at that.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Allow for .byte/.address statements</title>
<updated>2024-12-12T06:48:30Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-10-21T12:24:59Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=7d219a98bd89dcade347c4b1adf4a1f6d5415ef6'/>
<id>urn:sha1:7d219a98bd89dcade347c4b1adf4a1f6d5415ef6</id>
<content type='text'>
Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Adapt the assembler to the changes on the parser</title>
<updated>2024-12-12T06:46:17Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-10-09T13:41:30Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=16114b2ca358dbbef09cb5a8d3a843a0e11a3b88'/>
<id>urn:sha1:16114b2ca358dbbef09cb5a8d3a843a0e11a3b88</id>
<content type='text'>
As of 184c39579227 ("Re-work the parser from scratch") the parser has a
proper AST, and the assembler has to traverse it accordingly.

Moreover, the assembler has been stripped from a lot of unneeded memory
allocations and it's overall more keen on using mere references when
possible.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Re-work the parser from scratch</title>
<updated>2024-12-12T06:41:30Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-09-26T13:53:57Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=184c39579227c0add80a61d489c242120001d6b6'/>
<id>urn:sha1:184c39579227c0add80a61d489c242120001d6b6</id>
<content type='text'>
The initial implementation was incredibly naive on how complex an
assembler can actually be. Because of this, it never bothered to define
and produce a proper AST, and hence it was overall extremely fragile on
(not so) corner cases.

This commit re-writes everything from scratch for the parser, and it
should really be the last fundamental change to the parser other than
minor additions/features here and there.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Add basic support for macros</title>
<updated>2024-12-12T06:40:53Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-07-17T14:06:34Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=5b1f387d451b3ff136464dcbc71f0c2310a57d01'/>
<id>urn:sha1:5b1f387d451b3ff136464dcbc71f0c2310a57d01</id>
<content type='text'>
Macros can now be described with the '.macro' control statement, but no
parameters can be given and it's overall pretty brittle.

Signed-off-by: Miquel Sabaté Solà &lt;mikisabate@gmail.com&gt;
</content>
</entry>
<entry>
<title>Add support for procedures</title>
<updated>2024-12-12T06:33:40Z</updated>
<author>
<name>Miquel Sabaté Solà</name>
<email>mikisabate@gmail.com</email>
</author>
<published>2024-07-17T13:09:36Z</published>
<link rel='alternate' type='text/html' href='https://git.mssola.com/nes/tools.nes/commit/?id=376dcb684ce779a7051bbc9a95359114e94cae5e'/>
<id>urn:sha1:376dcb684ce779a7051bbc9a95359114e94cae5e</id>
<content type='text'>
Procedures are marked with the '.proc' control statement and work both
as a scoping mechanism and as a label that can be referenced.

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