mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2024-12-23 17:31:33 +00:00
Fix Z80 LDIR
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
parent
46a12a2b7a
commit
f0d5751949
@ -1874,7 +1874,7 @@ namespace EightBit
|
||||
return ((this.F() & (byte)StatusBits.PF) != 0) && ((this.F() & (byte)StatusBits.ZF) == 0); // See CPD
|
||||
}
|
||||
|
||||
private void BlockLoad(Register16 source, Register16 destination, Register16 counter)
|
||||
private void BlockLoad(Register16 source, Register16 destination, ref Register16 counter)
|
||||
{
|
||||
var value = this.Bus.Read(source);
|
||||
this.Bus.Write(destination, value);
|
||||
@ -1887,7 +1887,7 @@ namespace EightBit
|
||||
|
||||
private void LDI()
|
||||
{
|
||||
this.BlockLoad(this.HL()++, this.DE()++, this.BC());
|
||||
this.BlockLoad(this.HL()++, this.DE()++, ref this.BC());
|
||||
}
|
||||
|
||||
private bool LDIR()
|
||||
@ -1898,7 +1898,7 @@ namespace EightBit
|
||||
|
||||
private void LDD()
|
||||
{
|
||||
this.BlockLoad(this.HL()--, this.DE()--, this.BC());
|
||||
this.BlockLoad(this.HL()--, this.DE()--, ref this.BC());
|
||||
}
|
||||
|
||||
private bool LDDR()
|
||||
|
Loading…
Reference in New Issue
Block a user