mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2026-04-21 12:16:55 +00:00
Apply all analysis suggestions
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user