Adding an error message on invalid instructions

This commit is contained in:
Zoe Roux
2021-02-04 12:07:26 +01:00
parent 04f9b9a8fc
commit 845a8c26f0
11 changed files with 78 additions and 17 deletions
+2 -2
View File
@@ -251,7 +251,7 @@ namespace ComSquare::Debugger
std::string CPUDebug::_getAbsoluteIndirectValue(uint24_t pc)
{
uint24_t value = this->_bus->read(pc) + (this->_bus->read(pc + 1, true) << 8u);
uint24_t value = this->_bus->read(pc, true) + (this->_bus->read(pc + 1, true) << 8u);
return "(" + Utility::to_hex(value, Utility::HexString::AsmPrefix) + ")";
}
@@ -266,7 +266,7 @@ namespace ComSquare::Debugger
std::string CPUDebug::_getAbsoluteIndirectIndexedByXValue(uint24_t pc)
{
uint24_t value = this->_bus->read(pc) + (this->_bus->read(pc + 1, true) << 8u);
uint24_t value = this->_bus->read(pc, true) + (this->_bus->read(pc + 1, true) << 8u);
return "(" + Utility::to_hex(value, Utility::HexString::AsmPrefix) + ", x)";
}
}