From 28bc3896446d1bb964b0ffd715cdf66995b83073 Mon Sep 17 00:00:00 2001 From: MadMaurice Date: Tue, 29 Aug 2023 23:06:28 +0200 Subject: [PATCH] cpu/decoder - Reset carry flag for PREFIX SWAP instruction --- cpu/decoder.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/cpu/decoder.cpp b/cpu/decoder.cpp index 0a599e0..fa318f4 100644 --- a/cpu/decoder.cpp +++ b/cpu/decoder.cpp @@ -263,6 +263,7 @@ void Cpu::executeInstruction() break; case 0x30: // SWAP data = ((data >> 4) & 0x0F) | ((data << 4) & 0xF0); + state.carry = false; break; case 0x38: // SRL state.carry = (data & 0x01);