mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2026-10-24 14:05:42 +00:00
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:
1 parent
741feb4342
commit
dfd4d1928f
9 files changed
+40
-27
No files matched your search
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user