From faa35fe9fc6b08ff9231b47b3dbadd3a226be209 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Fri, 15 Apr 2022 15:40:31 -0400 Subject: [PATCH] Decode MOVE and the fixed 0x4xxx set. --- InstructionSets/68k/Decoder.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/InstructionSets/68k/Decoder.cpp b/InstructionSets/68k/Decoder.cpp index 3ee069e70..cbe28ac0d 100644 --- a/InstructionSets/68k/Decoder.cpp +++ b/InstructionSets/68k/Decoder.cpp @@ -229,9 +229,19 @@ template Preinstruction Predecoder::decode(ui AddressingMode::AddressRegisterIndirectWithDisplacement, ea_register); // - // MARK: STOP + // MARK: MOVE // - case Op(Operation::STOP): + case Op(Operation::MOVEb): case Op(Operation::MOVEl): case Op(Operation::MOVEw): + return Preinstruction(operation, + ea_combined_mode, ea_register, + combined_mode(opmode, data_register), data_register); + + // + // MARK: STOP, RESET, NOP RTE, RTS, TRAPV, RTR + // + case Op(Operation::STOP): case Op(Operation::RESET): case Op(Operation::NOP): + case Op(Operation::RTE): case Op(Operation::RTS): case Op(Operation::TRAPV): + case Op(Operation::RTR): return Preinstruction(operation); // @@ -336,17 +346,20 @@ Preinstruction Predecoder::decode0(uint16_t instruction) { template Preinstruction Predecoder::decode1(uint16_t instruction) { + // 4-116 (p220) DecodeOp(MOVEb); } template Preinstruction Predecoder::decode2(uint16_t instruction) { + // 4-116 (p220) DecodeOp(MOVEl); } template Preinstruction Predecoder::decode3(uint16_t instruction) { + // 4-116 (p220) DecodeOp(MOVEw); } @@ -354,7 +367,7 @@ template Preinstruction Predecoder::decode4(uint16_t instruction) { switch(instruction & 0xfff) { case 0xe70: DecodeOp(RESET); // 6-83 (p537) - case 0xe71: DecodeOp(NOP); // 8-13 (p469) + case 0xe71: DecodeOp(NOP); // 4-147 (p251) case 0xe73: DecodeOp(RTE); // 6-84 (p538) case 0xe75: DecodeOp(RTS); // 4-169 (p273) case 0xe76: DecodeOp(TRAPV); // 4-191 (p295)