mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2025-11-24 15:17:31 +00:00
Add increment/decrement operations to the Register16 class
This commit is contained in:
@@ -137,14 +137,14 @@ namespace EightBit
|
||||
|
||||
protected sealed override void Push(byte value)
|
||||
{
|
||||
--this.SP.Word;
|
||||
this.SP.Decrement();
|
||||
this.MemoryWrite(this.SP, value);
|
||||
}
|
||||
|
||||
protected sealed override byte Pop()
|
||||
{
|
||||
var returned = this.MemoryRead(this.SP);
|
||||
this.SP.Word++;
|
||||
this.SP.Increment();
|
||||
return returned;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user