does ASHC clear carry when shift number is 0?

This commit is contained in:
folkert van heusden 2022-03-20 20:58:32 +01:00
parent ef73495a58
commit ca213298bb

View file

@ -522,6 +522,9 @@ bool cpu::additional_double_operand_instructions(const uint16_t instr)
setPSW_c(R0R1 & 1); setPSW_c(R0R1 & 1);
R0R1 >>= 1; R0R1 >>= 1;
} }
else {
setPSW_c(false);
}
setRegister(reg, R0R1 & 65535); setRegister(reg, R0R1 & 65535);
setRegister(reg + 1, R0R1 >> 16); setRegister(reg + 1, R0R1 >> 16);
@ -558,6 +561,7 @@ bool cpu::additional_double_operand_instructions(const uint16_t instr)
if (getRegister(reg, false)) { if (getRegister(reg, false)) {
uint16_t newPC = oldPC - dst * 2; uint16_t newPC = oldPC - dst * 2;
setPC(newPC); setPC(newPC);
} }