mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2026-04-19 15:16:41 +00:00
simplification and unification of build stuff
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user