decode inc a and dec a on CMOS

This commit is contained in:
Sam M W 2024-04-24 12:29:19 +01:00
parent df51b077e7
commit 2c26ebb00a
1 changed files with 2 additions and 0 deletions

View File

@ -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),