Apply all analysis suggestions

This commit is contained in:
Adrian Conlon
2024-10-12 09:14:29 +01:00
parent 3d9b0aac56
commit 9aa25fed7e
17 changed files with 304 additions and 323 deletions
+27 -27
View File
@@ -7,69 +7,69 @@ namespace EightBit
{
public override Register16 PeekWord(ushort address)
{
Intermediate.High = Bus.Peek(address);
Intermediate.Low = Bus.Peek(++address);
return Intermediate;
this.Intermediate.High = this.Bus.Peek(address);
this.Intermediate.Low = this.Bus.Peek(++address);
return this.Intermediate;
}
public override void PokeWord(ushort address, Register16 value)
{
ArgumentNullException.ThrowIfNull(value);
Bus.Poke(address, value.High);
Bus.Poke(++address, value.Low);
this.Bus.Poke(address, value.High);
this.Bus.Poke(++address, value.Low);
}
protected override Register16 FetchWord()
{
Intermediate.High = FetchByte();
Intermediate.Low = FetchByte();
return Intermediate;
this.Intermediate.High = this.FetchByte();
this.Intermediate.Low = this.FetchByte();
return this.Intermediate;
}
protected override Register16 GetWord()
{
Intermediate.High = MemoryRead();
++Bus.Address.Word;
Intermediate.Low = MemoryRead();
return Intermediate;
this.Intermediate.High = this.MemoryRead();
++this.Bus.Address.Word;
this.Intermediate.Low = this.MemoryRead();
return this.Intermediate;
}
protected override Register16 GetWordPaged()
{
Intermediate.High = MemoryRead();
++Bus.Address.Low;
Intermediate.Low = MemoryRead();
return Intermediate;
this.Intermediate.High = this.MemoryRead();
++this.Bus.Address.Low;
this.Intermediate.Low = this.MemoryRead();
return this.Intermediate;
}
protected override Register16 PopWord()
{
Intermediate.High = Pop();
Intermediate.Low = Pop();
return Intermediate;
this.Intermediate.High = this.Pop();
this.Intermediate.Low = this.Pop();
return this.Intermediate;
}
protected override void PushWord(Register16 value)
{
ArgumentNullException.ThrowIfNull(value);
Push(value.Low);
Push(value.High);
this.Push(value.Low);
this.Push(value.High);
}
protected override void SetWord(Register16 value)
{
ArgumentNullException.ThrowIfNull(value);
MemoryWrite(value.High);
++Bus.Address.Word;
MemoryWrite(value.Low);
this.MemoryWrite(value.High);
++this.Bus.Address.Word;
this.MemoryWrite(value.Low);
}
protected override void SetWordPaged(Register16 value)
{
ArgumentNullException.ThrowIfNull(value);
MemoryWrite(value.High);
++Bus.Address.Low;
MemoryWrite(value.Low);
this.MemoryWrite(value.High);
++this.Bus.Address.Low;
this.MemoryWrite(value.Low);
}
}
}