From a965b9ce7e6d2191e988d91fc21325844d64de3e Mon Sep 17 00:00:00 2001 From: Folkert van Heusden Date: Fri, 4 Apr 2025 22:29:53 +0200 Subject: [PATCH] ASH carry flag --- cpu.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cpu.cpp b/cpu.cpp index 768fa04..b0f34b8 100644 --- a/cpu.cpp +++ b/cpu.cpp @@ -832,13 +832,16 @@ bool cpu::additional_double_operand_instructions(const uint16_t instr) setPSW_v(false); } else if (shift < 32) { - setPSW_c((R << (shift - 16)) & 1); + if (shift > 15) + setPSW_c((R << (shift - 16)) & 1); setPSW_v(false); for(int i=0; i