From 2c26ebb00a0a9573075d29fb6c2a009104145dff Mon Sep 17 00:00:00 2001 From: Sam M W Date: Wed, 24 Apr 2024 12:29:19 +0100 Subject: [PATCH] decode inc a and dec a on CMOS --- src/instruction.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/instruction.rs b/src/instruction.rs index ede53c8..88568ee 100644 --- a/src/instruction.rs +++ b/src/instruction.rs @@ -490,6 +490,8 @@ impl crate::Variant for Cmos6502 { fn decode(opcode: u8) -> Option<(Instruction, AddressingMode)> { // TODO: We obviously need to add the other CMOS instructions here. match opcode { + 0x1a => Some((Instruction::INC, AddressingMode::Accumulator)), + 0x3a => Some((Instruction::DEC, AddressingMode::Accumulator)), 0x6c => Some((Instruction::JMP, AddressingMode::Indirect)), 0x80 => Some((Instruction::BRA, AddressingMode::Relative)), _ => Nmos6502::decode(opcode),