summaryrefslogtreecommitdiff
path: root/instruction.h
diff options
context:
space:
mode:
Diffstat (limited to 'instruction.h')
-rw-r--r--instruction.h22
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);
}