aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Allow for .byte/.address statementsMiquel Sabaté Solà2024-12-122-30/+143
| | | | Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Implement the hibyte/lobyte functionsMiquel Sabaté Solà2024-12-121-2/+60
| | | | Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* ci: Pick the proper stable versionMiquel Sabaté Solà2024-12-121-0/+5
| | | | Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Adapt the assembler to the changes on the parserMiquel Sabaté Solà2024-12-1215-2911/+2252
| | | | | | | | | | | 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à <mikisabate@gmail.com>
* ci: Add fuzzy testing to the parserMiquel Sabaté Solà2024-12-126-3/+121
| | | | Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* ci: Enable Github Actions for the projectMiquel Sabaté Solà2024-12-121-0/+22
| | | | Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Re-work the parser from scratchMiquel Sabaté Solà2024-12-128-1638/+3284
| | | | | | | | | | | | | 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à <mikisabate@gmail.com>
* Add macros which can take argumentsMiquel Sabaté Solà2024-12-121-1/+46
| | | | | | | Adds to 5b1f387d451b ("Add basic support for macros") the possibility to add parameters to macros. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Add basic support for macrosMiquel Sabaté Solà2024-12-123-194/+254
| | | | | | | 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à <mikisabate@gmail.com>
* Add support for proceduresMiquel Sabaté Solà2024-12-125-24/+221
| | | | | | | 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à <mikisabate@gmail.com>
* Add support for branchingMiquel Sabaté Solà2024-12-126-77/+297
| | | | | | | | This is a bare bones implementation of it, and there's a lot of nuance that it's being missed, but at least the fundamentals have been implemented already. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Add the notion of mappingMiquel Sabaté Solà2024-12-1214-27/+236
| | | | | | | Mappings and segments are fundamental blocks on how code is distributed both on the actual ROM File and in the memory layout. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
* Initial commitMiquel Sabaté Solà2024-12-1218-0/+3790
A lot is missing and there is a long road ahead to make the assembler even work. Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>