From d15c43faad028c46c2d03197c7c8cc1a7a96d0e3 Mon Sep 17 00:00:00 2001 From: folkert van heusden Date: Fri, 29 Mar 2024 15:33:43 +0100 Subject: [PATCH] ASR: Z-flag is for full word --- cpu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu.cpp b/cpu.cpp index b0a292c..56c86ee 100644 --- a/cpu.cpp +++ b/cpu.cpp @@ -1198,7 +1198,7 @@ bool cpu::single_operand_instructions(const uint16_t instr) setRegister(dst_reg, v); setPSW_n(SIGN(v, word_mode)); - setPSW_z(IS_0(v, word_mode)); + setPSW_z(IS_0(v, wm_word)); setPSW_v(getPSW_n() ^ getPSW_c()); } else { @@ -1221,7 +1221,7 @@ bool cpu::single_operand_instructions(const uint16_t instr) if (set_flags) { setPSW_n(SIGN(v, word_mode)); - setPSW_z(IS_0(v, word_mode)); + setPSW_z(IS_0(v, wm_word)); setPSW_v(getPSW_n() ^ getPSW_c()); } }