mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2025-07-26 04:24:15 +00:00
Isolate program counter increment/decrement (to be used for HALT processing)
This commit is contained in:
@@ -220,10 +220,14 @@ namespace EightBit
|
||||
|
||||
protected virtual byte BusRead() => this.Bus.Read(); // N.B. Should be the only real call into the "Bus.Read" code.
|
||||
|
||||
protected virtual void IncrementPC() => ++this.PC.Word;
|
||||
|
||||
protected virtual void DecrementPC() => --this.PC.Word;
|
||||
|
||||
protected virtual byte FetchByte()
|
||||
{
|
||||
this.Bus.Address.Assign(this.PC);
|
||||
this.PC.Word++;
|
||||
IncrementPC();
|
||||
return this.MemoryRead();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user