Adding the STZ

This commit is contained in:
AnonymusRaccoon
2020-02-13 14:47:55 +01:00
parent 997bb4fa7c
commit 8cc87d0be2
4 changed files with 84 additions and 4 deletions
@@ -25,4 +25,21 @@ namespace ComSquare::CPU
this->_bus->write(addr + 1, this->_registers.xh);
}
}
void CPU::STY(uint24_t addr)
{
if (this->_registers.p.x_b)
this->_bus->write(addr, this->_registers.yl);
else {
this->_bus->write(addr, this->_registers.yl);
this->_bus->write(addr + 1, this->_registers.yh);
}
}
void CPU::STZ(uint24_t addr)
{
this->_bus->write(addr, 0x00);
if (!this->_registers.p.m)
this->_bus->write(addr + 1, 0x00);
}
}