Swap out execution status for instructions returning an InstructionResult
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user