diff --git a/Core/Cpu/Z80.cs b/Core/Cpu/Z80.cs index 389339d..dcc5bc1 100644 --- a/Core/Cpu/Z80.cs +++ b/Core/Cpu/Z80.cs @@ -490,6 +490,8 @@ namespace Core.Cpu return 7; case 0x14: DE.High = Inc8(DE.High); return 4; // INC D case 0x1C: DE.Low = Inc8(DE.Low); return 4; // INC E + case 0x1E: DE.Low = FetchByte(); // LD E, n + return 7; case 0x24: HL.High = Inc8(HL.High); return 4; // INC H case 0x2C: HL.Low = Inc8(HL.Low); return 4; // INC L case 0x34: diff --git a/Desktop/DebuggerForm.cs b/Desktop/DebuggerForm.cs index f12d861..e8726b9 100644 --- a/Desktop/DebuggerForm.cs +++ b/Desktop/DebuggerForm.cs @@ -341,6 +341,11 @@ namespace Desktop case 0x1B: mnemonic = "DEC DE"; break; + case 0x1E: + byte val1E = _memoryBus.Read((ushort)(currentPc + 1)); + mnemonic = $"LD E, 0x{val1E:X2}"; + instructionLength = 2; + break; case 0x20: sbyte jrOffset = (sbyte)_memoryBus.Read((ushort)(currentPc + 1)); ushort destination = (ushort)(currentPc + 2 + jrOffset);