From 4b5ed8fb063f08ce399371e48c59665e59ceea47 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 15 Feb 2025 00:19:03 +0200 Subject: feat(assembler): Add support for two pass collapse instructions and implement subroutine instructions --- assembler/src/parser/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'assembler/src/parser/mod.rs') 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, constants: Vec, instructions: Vec, + + 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, } -- cgit v1.3.1-23-gd82d