aboutsummaryrefslogtreecommitdiff
path: root/lib/xixanta/src/opcodes.rs
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2024-12-19 09:59:34 +0100
committerMiquel Sabaté Solà <mikisabate@gmail.com>2024-12-19 11:00:54 +0100
commit42ebea54e35062a1a998f25e8fe019a5e0205fd9 (patch)
treee947d2c86083da913595354d42e98fc74c831865 /lib/xixanta/src/opcodes.rs
parent9d9f10295059df278ed558142ce6c58c4f6a634e (diff)
downloadtools.nes-42ebea54e35062a1a998f25e8fe019a5e0205fd9.tar.gz
tools.nes-42ebea54e35062a1a998f25e8fe019a5e0205fd9.zip
Implement the .incbin control statement
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à <mikisabate@gmail.com>
Diffstat (limited to 'lib/xixanta/src/opcodes.rs')
-rw-r--r--lib/xixanta/src/opcodes.rs1
1 files changed, 1 insertions, 0 deletions
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
};