push/popstack now do the MMR1 updating
This commit is contained in:
parent
b020fea67d
commit
8a3594ec47
1 changed files with 6 additions and 6 deletions
8
cpu.cpp
8
cpu.cpp
|
@ -1203,8 +1203,6 @@ bool cpu::single_operand_instructions(const uint16_t instr)
|
|||
case 0b00110101: { // MFPD/MFPI
|
||||
// always words: word_mode-bit is to select between MFPI and MFPD
|
||||
|
||||
b->addToMMR1(-2, 6);
|
||||
|
||||
bool set_flags = true;
|
||||
uint16_t v = 0xffff;
|
||||
|
||||
|
@ -1244,8 +1242,6 @@ bool cpu::single_operand_instructions(const uint16_t instr)
|
|||
case 0b00110110: { // MTPI/MTPD
|
||||
// always words: word_mode-bit is to select between MTPI and MTPD
|
||||
|
||||
b->addToMMR1(2, 6);
|
||||
|
||||
// retrieve word from '15/14'-stack
|
||||
uint16_t v = popStack();
|
||||
|
||||
|
@ -1472,6 +1468,8 @@ void cpu::pushStack(const uint16_t v)
|
|||
uint16_t a = addRegister(6, false, -2);
|
||||
|
||||
b->writeWord(a, v);
|
||||
|
||||
b->addToMMR1(-2, 6);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1482,6 +1480,8 @@ uint16_t cpu::popStack()
|
|||
|
||||
addRegister(6, false, 2);
|
||||
|
||||
b->addToMMR1(2, 6);
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue