fix infinite loop

This commit is contained in:
2023-12-30 16:29:16 -05:00
parent 385dffe11b
commit 9727a753d1
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -16,8 +16,8 @@ pub struct LDX {
impl LDX {
fn determine_instruction(&self, registers: &Registers) -> Box<dyn CPUInstruction> {
match registers.is_16bit_index() {
true => Box::new(LDX{addressing_mode: self.addressing_mode}),
false => Box::new(LDX{addressing_mode: self.addressing_mode}),
true => Box::new(LDX16{addressing_mode: self.addressing_mode}),
false => Box::new(LDX8{addressing_mode: self.addressing_mode}),
}
}
}
+2 -2
View File
@@ -16,8 +16,8 @@ pub struct LDY {
impl LDY {
fn determine_instruction(&self, registers: &Registers) -> Box<dyn CPUInstruction> {
match registers.is_16bit_index() {
true => Box::new(LDY{addressing_mode: self.addressing_mode}),
false => Box::new(LDY{addressing_mode: self.addressing_mode}),
true => Box::new(LDY16{addressing_mode: self.addressing_mode}),
false => Box::new(LDY8{addressing_mode: self.addressing_mode}),
}
}
}
+2 -2
View File
@@ -13,8 +13,8 @@ pub struct LSR {
impl LSR {
fn determine_instruction(&self, registers: &Registers) -> Box<dyn CPUInstruction> {
match registers.is_16bit_mode() {
true => Box::new(LSR{addressing_mode: self.addressing_mode}),
false => Box::new(LSR{addressing_mode: self.addressing_mode}),
true => Box::new(LSR16{addressing_mode: self.addressing_mode}),
false => Box::new(LSR8{addressing_mode: self.addressing_mode}),
}
}
}