mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-06-01 09:45:25 +00:00
Adding the STZ
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user