mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-05-06 13:18:18 +00:00
Implementing missing addressings modes inside the debugger
This commit is contained in:
@@ -126,22 +126,6 @@ namespace ComSquare::CPU
|
||||
return lng + this->_registers.x;
|
||||
}
|
||||
|
||||
uint24_t CPU::_getProgramCounterRelativeAddr()
|
||||
{
|
||||
uint24_t pc = this->_registers.pac;
|
||||
int8_t mod = this->readPC();
|
||||
return pc + mod;
|
||||
}
|
||||
|
||||
uint24_t CPU::_getProgramCounterRelativeLongAddr()
|
||||
{
|
||||
uint24_t pc = this->_registers.pac;
|
||||
uint8_t val1 = this->readPC();
|
||||
uint8_t val2 = this->readPC();
|
||||
int16_t mod = val2 > 0x7F ? (static_cast<char>(val2) * 256 - val1) : (val1 | val2 << 8u);
|
||||
return pc + mod;
|
||||
}
|
||||
|
||||
uint24_t CPU::_getAbsoluteIndirectAddr()
|
||||
{
|
||||
uint16_t abs = this->readPC();
|
||||
|
||||
Reference in New Issue
Block a user