push/popstack now do the MMR1 updating

This commit is contained in:
folkert van heusden 2023-03-23 08:55:52 +01:00
parent b020fea67d
commit 8a3594ec47
Signed by untrusted user who does not match committer: folkert
GPG key ID: 6B6455EDFEED3BD1

View file

@ -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;
}