mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2026-04-19 15:16:41 +00:00
Try to avoid copying around Register16 references, if possible.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
@@ -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