mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-06-08 12:10:34 +00:00
Implementing MVP
This commit is contained in:
@@ -168,4 +168,21 @@ namespace ComSquare::CPU
|
||||
}
|
||||
return 7 * length;
|
||||
}
|
||||
|
||||
int CPU::MVP(uint24_t params, AddressingMode)
|
||||
{
|
||||
uint8_t srcBank = params;
|
||||
uint8_t destBank = params >> 8u;
|
||||
int length = this->_registers.a + 1;
|
||||
|
||||
this->_registers.dbr = destBank;
|
||||
while (this->_registers.a != 0xFFFF) {
|
||||
uint8_t data = this->_bus->read(srcBank << 24u | this->_registers.x);
|
||||
this->_bus->write(destBank << 24u | this->_registers.y, data);
|
||||
this->_registers.x--;
|
||||
this->_registers.y--;
|
||||
this->_registers.a--;
|
||||
}
|
||||
return 7 * length;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user