This commit is contained in:
Adrian Conlon
2019-03-10 11:34:40 +00:00
8 changed files with 38 additions and 52 deletions
+4 -4
View File
@@ -138,7 +138,7 @@ namespace EightBit
{
this.MEMPTR.Low = address;
this.MEMPTR.High = 0;
this.Call(this.MEMPTR);
this.Call(this.MEMPTR.Word);
}
protected bool CallConditional(bool condition)
@@ -146,7 +146,7 @@ namespace EightBit
this.MEMPTR.Word = this.FetchWord().Word;
if (condition)
{
this.Call(this.MEMPTR);
this.Call(this.MEMPTR.Word);
}
return condition;
@@ -157,7 +157,7 @@ namespace EightBit
this.MEMPTR.Word = this.FetchWord().Word;
if (condition)
{
this.Jump(this.MEMPTR);
this.Jump(this.MEMPTR.Word);
}
return condition;
@@ -176,7 +176,7 @@ namespace EightBit
protected void JumpRelative(sbyte offset)
{
this.MEMPTR.Word = (ushort)(this.PC.Word + offset);
this.Jump(this.MEMPTR);
this.Jump(this.MEMPTR.Word);
}
protected bool JumpRelativeConditional(bool condition)
-4
View File
@@ -186,16 +186,12 @@ namespace EightBit
protected void Jump(ushort destination) => this.PC.Word = destination;
protected void Jump(Register16 destination) => this.Jump(destination.Word);
protected void Call(ushort destination)
{
this.PushWord(this.PC);
this.Jump(destination);
}
protected void Call(Register16 destination) => this.Call(destination.Word);
protected virtual void Return() => this.Jump(this.PopWord().Word);
}
}