From a57d89a0459197a89a820717f8fcb12edc377542 Mon Sep 17 00:00:00 2001 From: folkert van heusden Date: Mon, 20 Mar 2023 10:33:45 +0100 Subject: [PATCH] Fix for XOR R7/PC,... --- cpu.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpu.cpp b/cpu.cpp index 9b49df5..ea14a9b 100644 --- a/cpu.cpp +++ b/cpu.cpp @@ -716,8 +716,9 @@ bool cpu::additional_double_operand_instructions(const uint16_t instr) } case 4: { // XOR (word only) + uint16_t reg_v = getRegister(reg); // in case it is R7 auto g_dst = getGAM(dst_mode, dst_reg, false, false); - uint16_t vl = g_dst.value.value() ^ getRegister(reg); + uint16_t vl = g_dst.value.value() ^ reg_v; bool set_flags = putGAM(g_dst, vl);