mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2024-12-23 02:29:59 +00:00
MC6809: Correct a branching problem due to the use of reference PC object.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
parent
f8757b3014
commit
430ecd8a7a
@ -49,7 +49,6 @@
|
||||
this.cpu.CC = 0;
|
||||
this.cpu.Step();
|
||||
this.cpu.Step();
|
||||
this.cpu.Step();
|
||||
Assert.AreEqual(2, this.cpu.A);
|
||||
}
|
||||
|
||||
@ -70,7 +69,6 @@
|
||||
this.cpu.CC = (byte)(StatusBits.NF | StatusBits.VF);
|
||||
this.cpu.Step();
|
||||
this.cpu.Step();
|
||||
this.cpu.Step();
|
||||
Assert.AreEqual(2, this.cpu.A);
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,6 @@
|
||||
this.cpu.CC = (byte)StatusBits.NF;
|
||||
this.cpu.Step();
|
||||
this.cpu.Step();
|
||||
this.cpu.Step();
|
||||
Assert.AreEqual(2, this.cpu.A);
|
||||
}
|
||||
|
||||
@ -79,7 +78,6 @@
|
||||
this.cpu.CC = (byte)(StatusBits.ZF | StatusBits.NF);
|
||||
this.cpu.Step();
|
||||
this.cpu.Step();
|
||||
this.cpu.Step();
|
||||
Assert.AreEqual(2, this.cpu.A);
|
||||
}
|
||||
}
|
||||
|
@ -447,9 +447,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
private Register16 Address_relative_byte() => new Register16(this.PC.Word + (sbyte)this.FetchByte());
|
||||
private Register16 Address_relative_byte()
|
||||
{
|
||||
var offset = (sbyte)this.FetchByte();
|
||||
return new Register16(this.PC.Word + offset);
|
||||
}
|
||||
|
||||
private Register16 Address_relative_word() => new Register16(this.PC.Word + (short)this.FetchWord().Word);
|
||||
private Register16 Address_relative_word()
|
||||
{
|
||||
var offset = (short)this.FetchWord().Word;
|
||||
return new Register16(this.PC.Word + offset);
|
||||
}
|
||||
|
||||
private Register16 Address_direct() => new Register16(this.FetchByte(), this.DP);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user