Implementing the RTS/RTL

This commit is contained in:
Anonymus Raccoon
2020-04-03 22:32:39 +02:00
parent 1feab12fec
commit 84f964111c
2 changed files with 19 additions and 2 deletions
@@ -352,4 +352,17 @@ namespace ComSquare::CPU
{
return 0;
}
int CPU::RTS(uint24_t, AddressingMode)
{
this->_registers.pc = this->_pop16() + 1;
return 0;
}
int CPU::RTL(uint24_t, AddressingMode)
{
this->_registers.pc = this->_pop16() + 1;
this->_registers.dbr = this->_pop();
return 0;
}
}