Fixing the PHA

This commit is contained in:
Anonymus Raccoon
2020-05-28 03:45:37 +02:00
parent 5ef1ba8d4f
commit 627fac8f2d
4 changed files with 19 additions and 4 deletions
@@ -82,7 +82,10 @@ namespace ComSquare::CPU
int CPU::PHA(uint24_t, AddressingMode)
{
this->_push(this->_registers.a);
if (this->_registers.p.m)
this->_push(this->_registers.al);
else
this->_push(this->_registers.a);
return !this->_registers.p.m;
}