summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
diff options
context:
space:
mode:
author Sandro Ronco <sronco@users.noreply.github.com>2012-09-12 17:09:48 +0000
committer Sandro Ronco <sronco@users.noreply.github.com>2012-09-12 17:09:48 +0000
commit103dcf66aee2d7bcceab6c90ffa34b24d886a40c (patch)
tree03360cc693ca0703238955b651d5434e3d9f915d /src/emu
parente634c5b4e564ab197e698e10919afa0161ab1516 (diff)
HC11 core: fixed N flag in 16-bit operations. (nw)
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/cpu/mc68hc11/hc11ops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/emu/cpu/mc68hc11/hc11ops.c b/src/emu/cpu/mc68hc11/hc11ops.c
index 4ae017e7533..5a5dc0ca73f 100644
--- a/src/emu/cpu/mc68hc11/hc11ops.c
+++ b/src/emu/cpu/mc68hc11/hc11ops.c
@@ -1,7 +1,7 @@
#define SET_Z8(r) (cpustate->ccr |= ((UINT8)r == 0) ? CC_Z : 0)
#define SET_Z16(r) (cpustate->ccr |= ((UINT16)r == 0) ? CC_Z : 0)
#define SET_N8(r) (cpustate->ccr |= (r & 0x80) ? CC_N : 0)
-#define SET_N16(r) (cpustate->ccr |= (r & 0x80) ? CC_N : 0)
+#define SET_N16(r) (cpustate->ccr |= (r & 0x8000) ? CC_N : 0)
#define SET_V_ADD8(r,s,d) (cpustate->ccr |= (((r) ^ (s)) & ((r) ^ (d)) & 0x80) ? CC_V : 0)
#define SET_V_SUB8(r,s,d) (cpustate->ccr |= (((d) ^ (s)) & ((d) ^ (r)) & 0x80) ? CC_V : 0)
#define SET_V_ADD16(r,s,d) (cpustate->ccr |= (((r) ^ (s)) & ((r) ^ (d)) & 0x8000) ? CC_V : 0)