summaryrefslogtreecommitdiff
path: root/z80.cpu
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2019-02-04 22:02:59 -0800
committerMichael Pavone <pavone@retrodev.com>2019-02-04 22:02:59 -0800
commite8c201a05d2ce6a8ca693b1b1d1cefe5737c7688 (patch)
tree7a6a006199f484a7de1f8a8c31c6434a9ee58545 /z80.cpu
parent5caf8851feae58b447cbef8e21ed21e211b5da98 (diff)
Fixed flag calculation in dec (hl) in new Z80 core
Diffstat (limited to 'z80.cpu')
-rw-r--r--z80.cpu8
1 files changed, 6 insertions, 2 deletions
diff --git a/z80.cpu b/z80.cpu
index ba3b214..eed8cdc 100644
--- a/z80.cpu
+++ b/z80.cpu
@@ -1367,10 +1367,14 @@ fd 00101101 dec_iyl
or tmp iy iy
00110101 dec_hl
+ local tmp 8
z80_fetch_hl
- #TODO: fix size
- sub 1 scratch1 scratch1
+ #TODO: Either make DSL compiler smart enough to optimize these unnecessary moves out
+ #or add some syntax to force a certain size on an operation so they are unnecessary
+ mov scratch1 tmp
+ sub 1 tmp tmp
update_flags SZYHVXN1
+ mov tmp scratch1
z80_store_hl
dd 00110101 dec_ixd