gnusim8085-devel team mailing list archive
-
gnusim8085-devel team
-
Mailing list archive
-
Message #00380
[Bug 745461] [NEW] Flags not set properly after DAA
Public bug reported:
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.
** Affects: gnusim8085
Importance: Undecided
Status: New
--
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.
Follow ups
References