Re: A85: BCD?
[Prev][Next][Index][Thread]
Re: A85: BCD?
Terry Peng wrote:
> Well, I just want to know how to do arithmatic functions > like add,inc,sub,dec to BCD numbers. I can make my own routine to > display them.
> Terry Peng
There are instructions in the Z80 to do just that... Simply add the
registers holding BCD numbers together (using add or sub) (the acc must
be one of the registers..), and use the DAA command (decimal adjust
accumulator), which will automatically change the accumulator according
to what function occured. I believe that the same is true for INC and
DEC...
~Michael
References: