simplification and unification of build stuff

This commit is contained in:
Adrian Conlon
2026-02-16 11:15:58 +00:00
parent e1bf58afbc
commit a8ef9aa7db
28 changed files with 88 additions and 44 deletions
+7
View File
@@ -14,18 +14,21 @@ namespace EightBit
public override void PokeWord(ushort address, Register16 value)
{
ArgumentNullException.ThrowIfNull(value);
this.Bus.Poke(address, value.High);
this.Bus.Poke(++address, value.Low);
}
protected override void FetchInto(Register16 into)
{
ArgumentNullException.ThrowIfNull(into);
into.High = this.FetchByte();
into.Low = this.FetchByte();
}
protected override void GetInto(Register16 into)
{
ArgumentNullException.ThrowIfNull(into);
into.High = this.MemoryRead();
_ = this.Bus.Address.Increment();
into.Low = this.MemoryRead();
@@ -41,18 +44,21 @@ namespace EightBit
protected override void PopInto(Register16 into)
{
ArgumentNullException.ThrowIfNull(into);
into.High = this.Pop();
into.Low = this.Pop();
}
protected override void PushWord(Register16 value)
{
ArgumentNullException.ThrowIfNull(value);
this.Push(value.Low);
this.Push(value.High);
}
protected override void SetWord(Register16 value)
{
ArgumentNullException.ThrowIfNull(value);
this.MemoryWrite(value.High);
_ = this.Bus.Address.Increment();
this.MemoryWrite(value.Low);
@@ -60,6 +66,7 @@ namespace EightBit
protected override void SetWordPaged(Register16 value)
{
ArgumentNullException.ThrowIfNull(value);
this.MemoryWrite(value.High);
++this.Bus.Address.Low;
this.MemoryWrite(value.Low);