aboutsummaryrefslogtreecommitdiff
path: root/lib/xixanta/src/opcodes.rs
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2025-01-16 16:13:58 +0100
committerMiquel Sabaté Solà <mikisabate@gmail.com>2025-01-16 16:13:58 +0100
commit161d7b406b7fba75a2057b8d9e780f521b9bc6bf (patch)
treeecc58d0fe36d8a187e40e71fb2eeb1bce13eff3e /lib/xixanta/src/opcodes.rs
parent9261588dcaa10aac0a9b8b7a81ff70a621cf1551 (diff)
downloadtools.nes-161d7b406b7fba75a2057b8d9e780f521b9bc6bf.tar.gz
tools.nes-161d7b406b7fba75a2057b8d9e780f521b9bc6bf.zip
Implement .if/.elsif/.else statements
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'lib/xixanta/src/opcodes.rs')
-rw-r--r--lib/xixanta/src/opcodes.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/xixanta/src/opcodes.rs b/lib/xixanta/src/opcodes.rs
index 0e23594..8488b77 100644
--- a/lib/xixanta/src/opcodes.rs
+++ b/lib/xixanta/src/opcodes.rs
@@ -757,6 +757,10 @@ lazy_static! {
functions.insert(String::from(".include"), Control { control_type: ControlType::IncludeSource, has_identifier: None, required_args: Some((1, 1)), touches_context: false, only_string: true });
functions.insert(String::from(".res"), Control { control_type: ControlType::ReserveMemory, has_identifier: None, required_args: Some((1, 2)), touches_context: false, only_string: false });
functions.insert(String::from(".asciiz"), Control { control_type: ControlType::Asciiz, has_identifier: None, required_args: Some((1, 1)), touches_context: false, only_string: true });
+ functions.insert(String::from(".if"), Control { control_type: ControlType::If, has_identifier: None, required_args: Some((1, 1)), touches_context: false, only_string: false });
+ functions.insert(String::from(".elsif"), Control { control_type: ControlType::Elsif, has_identifier: None, required_args: Some((1, 1)), touches_context: false, only_string: false });
+ functions.insert(String::from(".else"), Control { control_type: ControlType::Else, has_identifier: None, required_args: Some((0, 0)), touches_context: false, only_string: false });
+ functions.insert(String::from(".endif"), Control { control_type: ControlType::EndIf, has_identifier: None, required_args: Some((0, 0)), touches_context: false, only_string: false });
functions
};