SEx fix
This commit is contained in:
parent
ebb7874812
commit
40ce1425da
1 changed files with 8 additions and 4 deletions
12
cpu.cpp
12
cpu.cpp
|
@ -961,10 +961,14 @@ bool cpu::condition_code_operations(const uint16_t instr)
|
||||||
|
|
||||||
if ((instr & ~31) == 0b10100000) { // set condition bits
|
if ((instr & ~31) == 0b10100000) { // set condition bits
|
||||||
if (instr & 0b10000) {
|
if (instr & 0b10000) {
|
||||||
setPSW_n(instr & 0b1000);
|
if (instr & 0b1000)
|
||||||
setPSW_z(instr & 0b0100);
|
setPSW_n(true);
|
||||||
setPSW_v(instr & 0b0010);
|
if (instr & 0b0100)
|
||||||
setPSW_c(instr & 0b0001);
|
setPSW_z(true);
|
||||||
|
if (instr & 0b0010)
|
||||||
|
setPSW_v(true);
|
||||||
|
if (instr & 0b0001)
|
||||||
|
setPSW_c(true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (instr & 0b1000)
|
if (instr & 0b1000)
|
||||||
|
|
Loading…
Add table
Reference in a new issue