# HG changeset patch # User Michael Pavone # Date 1549346579 28800 # Node ID 435877da58377966e8d9ce164c70d2b43c29c562 # Parent d6157b7eb20c25de1265990cdd940f4ca091200f Fixed flag calculation in dec (hl) in new Z80 core diff -r d6157b7eb20c -r 435877da5837 z80.cpu --- a/z80.cpu Mon Feb 04 21:43:59 2019 -0800 +++ b/z80.cpu Mon Feb 04 22:02:59 2019 -0800 @@ -1367,10 +1367,14 @@ 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