Adding the RTI

This commit is contained in:
AnonymusRaccoon
2020-02-12 16:51:13 +01:00
parent 17c0cb8660
commit b1a2222b55
3 changed files with 17 additions and 0 deletions

View File

@@ -35,4 +35,16 @@ namespace ComSquare::CPU
this->_registers.p.d = false;
return !this->_isEmulationMode;
}
unsigned CPU::RTI()
{
this->_registers.p.flags = this->pop();
this->_registers.pc = this->pop16();
if (!this->_isEmulationMode) {
this->_registers.pbr = this->pop16();
return 1;
}
return 0;
}
}