Skip to content

Commit

Permalink
[#5] Refine evaluation of flags for ALU AND instructions.
Browse files Browse the repository at this point in the history
  • Loading branch information
kosarev committed Oct 31, 2020
1 parent c86f38f commit f21281b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions z80.h
Original file line number Diff line number Diff line change
Expand Up @@ -2443,9 +2443,7 @@ class i8080_executor : public internals::executor_base<B> {
// http://demin.ws/blog/english/2012/12/24/my-i8080-collection/
// TODO: AMD chips do not set the flag. Support them
// as a variant of the original Intel chip.
// TODO: Evalution of 'hv' can be rewritten in a
// condition-less manner.
fast_u8 hf = ((a | n) & 0x8) != 0 ? hf_mask : 0;
fast_u8 hf = ((a | n) << (base::hf_bit - 3)) & hf_mask;
a &= n;
f = sf(a) | yf(f) | xf(f) | nf(f) | zf1(a) | pf1(a) | hf;
break; }
Expand Down

0 comments on commit f21281b

Please sign in to comment.