gnusim8085-devel team mailing list archive
-
gnusim8085-devel team
-
Mailing list archive
-
Message #00205
Re: [Bug 584093] Re: 78+88 in BCD addition missed carry
On Sat, Sep 25, 2010 at 12:37 AM, Debjit Biswas
<584093@xxxxxxxxxxxxxxxxxx> wrote:
> if (low > 9 || sys.flag.ac) { sys.reg.a += 6;....
> */
[snip]
> increment the four bits by six:
> sys.reg.a += (6 << 4);
> */
Very important is the fact that direct modification of accumulator
value is *harmful*. Always use the "add" or appropriate function so
that the flags are also appropriately modified.
This needs to be checked throughout the 8085-instructions
implementation. May be we uncover more bugs.
Regards,
Aanjhan
References