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
+4
View File
@@ -236,6 +236,10 @@ namespace ComSquare::CPU
case Instructions::STA_SR: this->STA(this->_getStackRelativeAddr()); return 4 + !this->_registers.p.m;
case Instructions::STA_SRYi: this->STA(this->_getStackRelativeIndirectIndexedYAddr()); return 7 + !this->_registers.p.m;
case Instructions::STX_ABS: this->STX(this->_getAbsoluteAddr()); return 4 + !this->_registers.p.m;
case Instructions::STX_DP: this->STX(this->_getAbsoluteAddr()); return 3 + !this->_registers.p.m + this->_registers.dl != 0;
case Instructions::STX_DPY: this->STX(this->_getAbsoluteAddr()); return 4 + !this->_registers.p.m + this->_registers.dl != 0;
default:
throw InvalidOpcode("CPU", opcode);
}