parent
49a902f457
commit
cf0d500a59
1 changed files with 3 additions and 8 deletions
11
cpu.cpp
11
cpu.cpp
|
@ -796,19 +796,14 @@ bool cpu::additional_double_operand_instructions(const uint16_t instr)
|
||||||
}
|
}
|
||||||
|
|
||||||
case 7: { // SOB
|
case 7: { // SOB
|
||||||
uint16_t v = getRegister(reg);
|
addRegister(reg, rm_cur, -1);
|
||||||
|
|
||||||
if (v == 1)
|
|
||||||
v = 0;
|
|
||||||
else {
|
|
||||||
v--;
|
|
||||||
|
|
||||||
|
if (getRegister(reg)) {
|
||||||
uint16_t newPC = getPC() - dst * 2;
|
uint16_t newPC = getPC() - dst * 2;
|
||||||
|
|
||||||
setPC(newPC);
|
setPC(newPC);
|
||||||
}
|
}
|
||||||
|
|
||||||
setRegister(reg, v);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue