Add increment/decrement operations to the Register16 class

This commit is contained in:
Adrian Conlon
2025-05-11 19:24:40 +01:00
parent 60d000905f
commit 36e983526e
11 changed files with 65 additions and 60 deletions

View File

@@ -225,9 +225,9 @@ namespace EightBit
protected virtual byte BusRead() => this.Bus.Read(); // N.B. Should be the only real call into the "Bus.Read" code.
protected virtual void IncrementPC() => ++this.PC.Word;
protected virtual void IncrementPC() => this.PC.Increment();
protected virtual void DecrementPC() => --this.PC.Word;
protected virtual void DecrementPC() => this.PC.Decrement();
protected virtual void ImmediateAddress()
{
@@ -311,12 +311,9 @@ namespace EightBit
this.SetWord(value);
}
protected void Jump(ushort destination) => this.PC.Word = destination;
protected void Jump(ushort destination) => this.PC.Assign(destination);
protected void Jump(Register16 destination)
{
this.PC.Assign(destination);
}
protected void Jump(Register16 destination) => this.PC.Assign(destination);
protected void Call(ushort destination)
{