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
|
||||
uint16_t v = getRegister(reg);
|
||||
|
||||
if (v == 1)
|
||||
v = 0;
|
||||
else {
|
||||
v--;
|
||||
addRegister(reg, rm_cur, -1);
|
||||
|
||||
if (getRegister(reg)) {
|
||||
uint16_t newPC = getPC() - dst * 2;
|
||||
|
||||
setPC(newPC);
|
||||
}
|
||||
|
||||
setRegister(reg, v);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue