diff options
author | alekseiplusplus <alekseijeaves@protonmail.com> | 2023-04-10 20:46:43 +1000 |
---|---|---|
committer | alekseiplusplus <alekseijeaves@protonmail.com> | 2023-04-10 20:46:43 +1000 |
commit | a4a9590148fdae2f656b25dd1d7b442969726c28 (patch) | |
tree | fe90cef94de50e38a667eb41b0c8bb98a4465c9b /instruction.h | |
parent | fbca225d25db812fe7823a8528dff17320cf1c53 (diff) |
Changed pointer switch case to if else for now
Diffstat (limited to 'instruction.h')
-rw-r--r-- | instruction.h | 22 |
1 files changed, 11 insertions, 11 deletions
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); } |