In the following link,
http://www.z80.info/z80syntx.htm#DAA
I got confused over the condition for setting H flag. The description says to look at the table but unlike C where there is the column C after DAA, for H there is only H before DAA...
So, how should H be updated after DAA? Thanks for the help!! Appreciate it! :)
Sean Young's document (PDF; Page 18) provides the exact circumstances. In short, if you added then H is set exactly when you end up with a result greater than 9 in the low nibble. If you subtracted then H is set exactly when it was set prior to the operation and the result in the low nibble is less than 6.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With