PC increment fixes

This commit is contained in:
edmccard 2012-04-04 15:50:11 -04:00
parent 1b9312ac97
commit a4fd247e5c
2 changed files with 4 additions and 4 deletions

View File

@ -225,7 +225,7 @@ class Cmos(bool strict, bool cumulative) : Cpu!(strict, cumulative)
void opcode5C()
{
readByteOperand();
peek(programCounter);
peek(programCounter++);
peek(0xFF00 | operand1);
peek(0xFFFF);
peek(0xFFFF);

View File

@ -263,7 +263,7 @@ class NmosUndoc(bool strict, bool cumulative) : NmosBase!(strict, cumulative)
override void opcode8B()
{
// unstable
readVal = operand1 = readFinal(programCounter);
readVal = operand1 = readFinal(programCounter++);
version(Atari8Bit)
{
@ -350,7 +350,7 @@ class NmosUndoc(bool strict, bool cumulative) : NmosBase!(strict, cumulative)
/* SBX #$$ */
override void opcodeCB()
{
readVal = operand1 = readFinal(programCounter);
readVal = operand1 = readFinal(programCounter++);
xIndex &= accumulator;
flag.zero_ = flag.negative_ = compare(xIndex, readVal);
}
@ -358,7 +358,7 @@ class NmosUndoc(bool strict, bool cumulative) : NmosBase!(strict, cumulative)
/* SBC #$$ */
override void opcodeEB()
{
readVal = operand1 = readFinal(programCounter);
readVal = operand1 = readFinal(programCounter++);
if (flag.decimal) dec_subWithCarry(readVal);
else hex_subWithCarry(readVal);
}