diff options
| Commit | 4b5ed8fb063f08ce399371e48c59665e59ceea47 (patch) | |
|---|---|---|
| Author | 2025-02-15 00:19:03 +0200 | |
| Committer | 2025-02-15 00:19:03 +0200 | |
| Files | eddf26834aeb1549fbe468f2d0f95484c544073c /assembler/src/parser/mod.rs | |
| tonkobali-4b5ed8fb063f08ce399371e48c59665e59ceea47.tar tonkobali-4b5ed8fb063f08ce399371e48c59665e59ceea47.tar.gz tonkobali-4b5ed8fb063f08ce399371e48c59665e59ceea47.zip | ||
| Parent | e683120089bd669019a240c7eb5d615fa92df075 (diff) | |
feat(assembler): Add support for two pass collapse instructions and implement subroutine instructions
1 files changed, 5 insertions, 0 deletions
| -rw-r--r-- | assembler/src/parser/mod.rs | 5 |
diff --git a/assembler/src/parser/mod.rs b/assembler/src/parser/mod.rs index f93875b..f22fc36 100644 --- a/assembler/src/parser/mod.rs +++ b/assembler/src/parser/mod.rs @@ -14,6 +14,8 @@ pub(crate) struct Program { definitions: HashMap<String, Address>, constants: Vec<Word>, instructions: Vec<Instruction>, + + absolute_start: usize, } impl Program { @@ -43,6 +45,9 @@ pub(crate) enum Address { Constants(usize), Instruction(usize), Definitions(String), + + InstructionOffset(usize, usize), // Internal + InstructionConstant(usize), // Internal #[default] None, } |
