Implementing the REP instruction

This commit is contained in:
AnonymusRaccoon
2020-02-14 11:22:38 +01:00
parent fbd10e8f48
commit 31aa3c843e
4 changed files with 61 additions and 4 deletions
@@ -6,8 +6,17 @@
namespace ComSquare::CPU
{
void CPU::SEP(uint24_t addr)
void CPU::SEP(uint24_t valueAddr)
{
this->_registers.p.flags |= this->_bus->read(addr);
this->_registers.p.flags |= this->_bus->read(valueAddr);
}
void CPU::REP(uint24_t valueAddr)
{
this->_registers.p.flags &= ~this->_bus->read(valueAddr);
if (this->_isEmulationMode) {
this->_registers.p.x_b = true;
this->_registers.p.m = true;
}
}
}