Keep DAA! (was Re: 8086 bugs)

Fred Cisin cisin at xenosoft.com
Sun Dec 11 16:59:23 CST 2005


On Sun, 11 Dec 2005, Jim Leonard wrote:
>          and   al,15
>          add   al,90h
>          daa
>          adc   al,40h
>          daa
>
> ...is only 8 bytes.
> If DAA were slow, I'd say ditch it.  But DAA is only 4 cycles and according to
> my real-world 8088 timings (slow night tonight), the DAA approach is only just
> a hair slower than the XLAT method.
> So I guess there *is* a need for DAA ;-)

Howzbout:
AND AL, 0Fh
DAA
ADD AL, 0F0h
ADC AL, 40h

or:

AND AL, 0Fh
ADD AL, 0
ADC AL,28h
DAA



More information about the cctalk mailing list