Try to avoid copying around Register16 references, if possible.

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon
2019-03-07 01:21:00 +00:00
parent 56f46a8236
commit e80963260d
5 changed files with 25 additions and 33 deletions
-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);
}
}