From e608f0d1449fe112ff1c0be2aec0ca5f8bab3232 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Tue, 26 Jun 2018 10:40:52 -0400 Subject: fix Z flag for INC/DEC --- ops.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ops.yaml b/ops.yaml index 53f235a..61db5ee 100644 --- a/ops.yaml +++ b/ops.yaml @@ -9214,7 +9214,7 @@ templates: // set flags cpu_wf(ctx, F_Z | F_N | F_H, ( - (n ? F_Z : 0) | + (n ? 0 : F_Z) | (((o & 0x0F) == 0x0F) ? F_H : 0) )); @@ -9248,7 +9248,7 @@ templates: // set flags cpu_wf(ctx, F_Z | F_N | F_H, ( - (n ? F_Z : 0) | + (n ? 0 : F_Z) | F_N | (((o ^ n) & 0x10) ? F_H : 0) )); -- cgit v1.2.3