does ASHC clear carry when shift number is 0?
This commit is contained in:
parent
ef73495a58
commit
ca213298bb
1 changed files with 20 additions and 16 deletions
4
cpu.cpp
4
cpu.cpp
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue