Add increment/decrement operations to the Register16 class

This commit is contained in:
Adrian Conlon
2025-05-11 19:24:40 +01:00
parent 60d000905f
commit 36e983526e
11 changed files with 65 additions and 60 deletions

View File

@@ -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;
}