mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-05-25 23:48:29 +00:00
Adding the program counter relative addressing mode
This commit is contained in:
@@ -318,4 +318,11 @@ namespace ComSquare::CPU
|
||||
lng += this->_bus->read(this->_registers.pac++) << 16u;
|
||||
return lng + this->_registers.x;
|
||||
}
|
||||
|
||||
uint24_t CPU::_getProgramCounterRelativeAddr()
|
||||
{
|
||||
uint24_t pc = this->_registers.pac;
|
||||
int8_t mod = this->_bus->read(this->_registers.pac++);
|
||||
return pc + mod;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user