Adding internal registers for the CPU

This commit is contained in:
AnonymusRaccoon
2020-01-28 11:48:13 +01:00
parent ab71231fd8
commit 208d1b14d6
12 changed files with 215 additions and 61 deletions

View File

@@ -7,6 +7,8 @@
#include <exception>
#include <string>
#include <ios>
#include <sstream>
namespace ComSquare
{
@@ -15,7 +17,12 @@ namespace ComSquare
private:
std::string _msg;
public:
explicit InvalidAddress(const std::string &msg) : _msg(msg) {}
explicit InvalidAddress(int32_t addr)
{
std::stringstream stream;
stream << "Could not read/write data at address: 0x" << std::hex << addr;
this->_msg = stream.str();
}
const char *what() const noexcept override { return this->_msg.c_str(); }
};
}