From a4a9590148fdae2f656b25dd1d7b442969726c28 Mon Sep 17 00:00:00 2001 From: alekseiplusplus Date: Mon, 10 Apr 2023 20:46:43 +1000 Subject: Changed pointer switch case to if else for now --- instruction.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'instruction.h') diff --git a/instruction.h b/instruction.h index e8e9bbc..96f5719 100644 --- a/instruction.h +++ b/instruction.h @@ -7,7 +7,7 @@ //Instruction Data -AddData idata; +AddData idata; // Load and Store Instructions @@ -81,25 +81,25 @@ void fINX(Addressing addr, address val){ idata = fAddress(addr, val); void fINY(Addressing addr, address val){ idata = fAddress(addr, val); Y++; - setFlagD(Y); + setFlagN(Y); setFlagZ(Y); } void fDEC(Addressing addr, address val){ idata = fAddress(addr, val); Memory[idata.add]--; - setFlagD(Memory[idata.add]); + setFlagN(Memory[idata.add]); setFlagZ(Memory[idata.add]); } void fDEX(Addressing addr, address val){ idata = fAddress(addr, val); X--; - setFlagD(X); + setFlagN(X); setFlagZ(X); } void fDEY(Addressing addr, address val){ idata = fAddress(addr, val); Y--; - setFlagD(Y); + setFlagN(Y); setFlagZ(Y); } @@ -272,7 +272,7 @@ void fTXS(Addressing addr, address val){ idata = fAddress(addr, val); } void fPHA(Addressing addr, address val){ idata = fAddress(addr, val); - Memory[0x01FF-S] = A; + Memory[0x01FF-S] = acc; S++; } @@ -283,7 +283,7 @@ void fPHP(Addressing addr, address val){ idata = fAddress(addr, val); void fPLA(Addressing addr, address val){ idata = fAddress(addr, val); S--; - A = Memory[0x01FF-S]; + acc = Memory[0x01FF-S]; } void fPLP(Addressing addr, address val){ idata = fAddress(addr, val); @@ -293,17 +293,17 @@ void fPLP(Addressing addr, address val){ idata = fAddress(addr, val); // Subroutine Instructions -void fJSR(Addressing addr, address val){ idata = fAddress(addr, val) +void fJSR(Addressing addr, address val){ idata = fAddress(addr, val); Memory[0x01FF-S] = (idata.add-1); S++; - PC = idata.add + PC = idata.add; } -void fRTS(Addressing addr, address val){ idata = fAddress(addr, val) +void fRTS(Addressing addr, address val){ idata = fAddress(addr, val); } -void fRTI(Addressing addr, address val){ idata = fAddress(addr, val) +void fRTI(Addressing addr, address val){ idata = fAddress(addr, val); } -- cgit v1.2.3