From b708b8801418b567e3f1364fa99e8cd78ef779ea Mon Sep 17 00:00:00 2001 From: folkert van heusden Date: Fri, 29 Mar 2024 12:09:12 +0100 Subject: [PATCH] do not re-add upper byte for ASL --- cpu.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/cpu.cpp b/cpu.cpp index 9d51629..ee87c21 100644 --- a/cpu.cpp +++ b/cpu.cpp @@ -1231,10 +1231,7 @@ bool cpu::single_operand_instructions(const uint16_t instr) case 0b00110011: { // ASL/ASLB if (dst_mode == 0) { uint16_t vl = getRegister(dst_reg); - uint16_t add = word_mode == wm_byte ? vl & 0xff00 : 0; - uint16_t v = (vl << 1) & (word_mode == wm_byte ? 0xff : 0xffff); - v |= add; setPSW_n(SIGN(v, word_mode)); setPSW_z(IS_0(v, wm_word));