mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2026-04-20 06:16:43 +00:00
Rationalise use of "intermediate" Register16
This commit is contained in:
@@ -33,7 +33,9 @@ namespace EightBit
|
||||
|
||||
public Bus Bus { get; } = memory;
|
||||
|
||||
public Register16 PC { get; } = new Register16();
|
||||
public Register16 PC { get; } = new();
|
||||
|
||||
public Register16 Intermediate { get; } = new();
|
||||
|
||||
protected byte OpCode { get; set; }
|
||||
|
||||
@@ -194,7 +196,8 @@ namespace EightBit
|
||||
|
||||
protected Register16 GetWordPaged(byte page, byte offset)
|
||||
{
|
||||
this.Bus.Address.Word = new Register16(offset, page).Word;
|
||||
this.Bus.Address.Low = offset;
|
||||
this.Bus.Address.High = page;
|
||||
return this.GetWordPaged();
|
||||
}
|
||||
|
||||
@@ -208,7 +211,8 @@ namespace EightBit
|
||||
|
||||
protected void SetWordPaged(byte page, byte offset, Register16 value)
|
||||
{
|
||||
this.Bus.Address.Word = new Register16(offset, page).Word;
|
||||
this.Bus.Address.Low = offset;
|
||||
this.Bus.Address.High = page;
|
||||
this.SetWordPaged(value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user