From 42ebea54e35062a1a998f25e8fe019a5e0205fd9 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 19 Dec 2024 09:59:34 +0100 Subject: Implement the .incbin control statement MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This also forced us to add the current working directory to the `Assembler::assemble` public function, as otherwise this control statement and others wouldn't know how to resolve relative paths. Signed-off-by: Miquel Sabaté Solà --- lib/xixanta/src/opcodes.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/xixanta/src/opcodes.rs') diff --git a/lib/xixanta/src/opcodes.rs b/lib/xixanta/src/opcodes.rs index 1a2b318..24cbade 100644 --- a/lib/xixanta/src/opcodes.rs +++ b/lib/xixanta/src/opcodes.rs @@ -730,6 +730,7 @@ lazy_static! { functions.insert(String::from(".word"), Control { control_type: ControlType::Word, has_identifier: false, required_args: None, touches_context: false }); functions.insert(String::from(".dw"), Control { control_type: ControlType::Word, has_identifier: false, required_args: None, touches_context: false }); functions.insert(String::from(".addr"), Control { control_type: ControlType::Addr, has_identifier: false, required_args: None, touches_context: false }); + functions.insert(String::from(".incbin"), Control { control_type: ControlType::IncBin, has_identifier: false, required_args: Some(1), touches_context: false }); functions }; -- cgit v1.2.3