Help out callers using Register16 arguments a little: Don't always require the ".Word" property to be passed.

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon
2019-02-15 00:26:01 +00:00
parent cf4e633034
commit c6a7003b8d
3 changed files with 28 additions and 20 deletions
+5 -5
View File
@@ -97,7 +97,7 @@ namespace EightBit
protected override void HandleRESET()
{
base.HandleRESET();
this.PC().Word = 0;
this.Jump(0);
}
protected sealed override void Push(byte value) => this.Bus.Write(--this.SP(), value);
@@ -123,7 +123,7 @@ namespace EightBit
{
this.MEMPTR().Low = address;
this.MEMPTR().High = 0;
this.Call(this.MEMPTR().Word);
this.Call(this.MEMPTR());
}
protected bool CallConditional(bool condition)
@@ -131,7 +131,7 @@ namespace EightBit
this.MEMPTR().Word = this.FetchWord().Word;
if (condition)
{
this.Call(this.MEMPTR().Word);
this.Call(this.MEMPTR());
}
return condition;
@@ -142,7 +142,7 @@ namespace EightBit
this.MEMPTR().Word = this.FetchWord().Word;
if (condition)
{
this.Jump(this.MEMPTR().Word);
this.Jump(this.MEMPTR());
}
return condition;
@@ -161,7 +161,7 @@ namespace EightBit
protected void JumpRelative(sbyte offset)
{
this.MEMPTR().Word = (ushort)(this.PC().Word + offset);
this.Jump(this.MEMPTR().Word);
this.Jump(this.MEMPTR());
}
protected bool JumpRelativeConditional(bool condition)