mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2026-04-20 21:16:29 +00:00
Merge branch 'master' of https://github.com/MoleskiCoder/EightBitNet
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user