Make "Pop" more like "Read". i.e. don't return a result, just use the value placed on the "bus"

This commit is contained in:
Adrian Conlon committed 2026-05-18 18:24:32 +01:00
1 parent 741feb4342
commit dfd4d1928f
9 files changed
+40 -27

No files matched your search

+4 -2
View File
@@ -51,8 +51,10 @@ namespace EightBit
protected override void PopInto(Register16 into)
{
//ArgumentNullException.ThrowIfNull(into);
into.High = this.Pop();
into.Low = this.Pop();
this.Pop();
into.High = this.Bus.Data;
this.Pop();
into.Low = this.Bus.Data;
}
protected override void PushShort(Register16 value)
+1 -2
View File
@@ -148,11 +148,10 @@ namespace EightBit
this.MemoryWrite(this.SP, value);
}
protected sealed override byte Pop()
protected sealed override void Pop()
{
this.MemoryRead(this.SP);
this.SP.Increment();
return this.Bus.Data;
}
protected sealed override void GetShort()
+4 -2
View File
@@ -52,8 +52,10 @@ namespace EightBit
protected override void PopInto(Register16 into)
{
//ArgumentNullException.ThrowIfNull(into);
into.Low = this.Pop();
into.High = this.Pop();
this.Pop();
into.Low = this.Bus.Data;
this.Pop();
into.High = this.Bus.Data;
}
protected override void PushShort(Register16 value)
+1 -1
View File
@@ -267,7 +267,7 @@ namespace EightBit
protected abstract void Push(byte value);
protected abstract byte Pop();
protected abstract void Pop();
protected abstract void PushShort(Register16 value);