summaryrefslogtreecommitdiff
path: root/z80_decode.c
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2022-12-25 08:50:46 +0000
committerIan C <ianc@noddybox.co.uk>2022-12-25 08:50:46 +0000
commit6220948f30b0abe230ed9f93491bd7b83fba5246 (patch)
tree9b89e27b092242fb0cb85b7b436162abbb467f64 /z80_decode.c
parent68dd69366900dfda159c9d2fde19f409f9756395 (diff)
Fixed BIT documented. Still not passing undocumented.
Diffstat (limited to 'z80_decode.c')
-rw-r--r--z80_decode.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/z80_decode.c b/z80_decode.c
index 0a9ba00..f675fc5 100644
--- a/z80_decode.c
+++ b/z80_decode.c
@@ -443,14 +443,14 @@ do { \
cpu->AF.b.lo&=C_Z80; \
if ((REG)&(1<<B)) \
{ \
- if (B==7) cpu->AF.b.lo|=S_Z80; \
- cpu->AF.b.lo|=(REG & (B3_Z80|B5_Z80)); \
+ cpu->AF.b.lo|=S_Z80&REG; \
} \
else \
{ \
- cpu->AF.b.lo|=Z_Z80; \
- cpu->AF.b.lo|=P_Z80; \
+ cpu->AF.b.lo|=Z_Z80|P_Z80; \
} \
+ cpu->AF.b.lo|=H_Z80; \
+ SETHIDDEN(REG); \
} while(0)
#define BIT_MEMPTR(REG,B) \
@@ -458,14 +458,14 @@ do { \
cpu->AF.b.lo&=C_Z80; \
if ((REG)&(1<<B)) \
{ \
- if (B==7) cpu->AF.b.lo|=S_Z80; \
- cpu->AF.b.lo|=(PRIV->memptr.b.hi & (B3_Z80|B5_Z80)); \
+ cpu->AF.b.lo|=S_Z80&REG; \
} \
else \
{ \
- cpu->AF.b.lo|=Z_Z80; \
- cpu->AF.b.lo|=P_Z80; \
+ cpu->AF.b.lo|=Z_Z80|P_Z80; \
} \
+ cpu->AF.b.lo|=H_Z80; \
+ SETHIDDEN(PRIV->memptr.b.hi); \
} while(0)
#define BIT_SET(REG,B) (REG)|=(1<<B)