diff --git a/cpu.cpp b/cpu.cpp index 768fa04..b0f34b8 100644 --- a/cpu.cpp +++ b/cpu.cpp @@ -832,13 +832,16 @@ bool cpu::additional_double_operand_instructions(const uint16_t instr) setPSW_v(false); } else if (shift < 32) { - setPSW_c((R << (shift - 16)) & 1); + if (shift > 15) + setPSW_c((R << (shift - 16)) & 1); setPSW_v(false); for(int i=0; i