From 9ca6c8404330e28431621dc8b39a0409913f0ffb Mon Sep 17 00:00:00 2001 From: MadMaurice Date: Sat, 2 Sep 2023 00:38:47 +0200 Subject: [PATCH] cpu/decoder - Fix output reg for LD HL, SP + e8 --- cpu/decoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpu/decoder.cpp b/cpu/decoder.cpp index 4830dc4..73587f2 100644 --- a/cpu/decoder.cpp +++ b/cpu/decoder.cpp @@ -432,7 +432,7 @@ void Cpu::executeInstruction() mcycles = 4; break; case 0xF8: // LD HL, SP + e8 - add16_8(state.SP, state.SP, readPC8()); + add16_8(state.HL, state.SP, readPC8()); state.zero = false; mcycles = 3; break;