Implementing the STX

This commit is contained in:
AnonymusRaccoon
2020-02-13 14:05:47 +01:00
parent 4d30a35620
commit 997bb4fa7c
4 changed files with 41 additions and 1 deletions
@@ -15,4 +15,14 @@ namespace ComSquare::CPU
this->_bus->write(addr + 1, this->_registers.ah);
}
}
void CPU::STX(uint24_t addr)
{
if (this->_registers.p.x_b)
this->_bus->write(addr, this->_registers.xl);
else {
this->_bus->write(addr, this->_registers.xl);
this->_bus->write(addr + 1, this->_registers.xh);
}
}
}