summaryrefslogtreecommitdiff
path: root/src/instructions.rs
diff options
context:
space:
mode:
authortaitep <taitep@taitep.se>2025-10-03 13:28:02 +0200
committertaitep <taitep@taitep.se>2025-10-03 13:28:02 +0200
commitbb0007707c7f67f368eb1e0c644d33f986be113f (patch)
treee2c5a65ee67e6d44cca704883f35a3a281ad4a05 /src/instructions.rs
parent4632fe29ceec9aaacdaa8bb7ff1f1a4091c52622 (diff)
Swap out execution status for instructions returning an InstructionResult
Diffstat (limited to 'src/instructions.rs')
-rw-r--r--src/instructions.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/instructions.rs b/src/instructions.rs
index 9f3a544..e16894e 100644
--- a/src/instructions.rs
+++ b/src/instructions.rs
@@ -6,9 +6,13 @@ static INSTRUCTIONS: Lazy<[Option<OpcodeHandler>; 32]> = Lazy::new(|| {
instructions
});
-use crate::{consts::Word, core::Core, decode::Instruction};
+use crate::{
+ consts::Word,
+ core::{Core, InstructionResult},
+ decode::Instruction,
+};
-type Runner = fn(&mut Core, Instruction) -> Result<(), ()>;
+type Runner = fn(&mut Core, Instruction) -> Result<(), InstructionResult>;
#[derive(Clone, Copy)]
struct InstructionHandler {