← Back to team overview

gnusim8085-devel team mailing list archive

[Bug 745461] Re: Flags not set properly after DAA

 

In fact, I had reached the same conclusion and added the call to the
code and recompiled gnusim8085. This solved the problem.

However, it is my impression that sufficient attention has not been paid
to flag setting. I think the dcr instruction should set all flags except
carry. I find that it is not setting the auxiliary carry flag. On the
other hand, inr does set ac, as required. Since updates to gnusim8085
are so infrequent, we should start releasing versions with bugfixes with
a minor version number changed. I shall be happy to test the programme
and offer bug fixes when I can.

-- 
You received this bug notification because you are a member of
GNUSim8085 developers, which is subscribed to gnusim8085.
https://bugs.launchpad.net/bugs/745461

Title:
  Flags not set properly after DAA

Status in gnusim8085:
  New

Bug description:
  Flags are not being set properly after DAA. Consider the following code:
  MVI A, 099H
  ADI 01H
  DAA
  after this, the result should be 00 with carry set, which it is. However, the sign flag is set and Zero flag is cleared. It should be the other way round. The bug is perhaps caused by setting these flag before doing the final DAA adjustments, when the result was 9A, which would set the sign flag and clear the Z flag. After correction, the result is 00, so sign flag should be cleared, while the Z flag should be set.



References