On 12/11/2005 at 1:41 AM Jim Leonard wrote:
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 ;-)
Mind you, I'm not even a fan of XLAT, as a simple indexed load is probably
faster on the Pentium-class machines. I prefer something a bit more
orthogonal in its use of registers.
I'm going to make a leap here and suppose that the original intention of
the DAA was to enable addition in packed BCD arithmetic. That it can be
used in a hoary old "neat trick" to convert a nibble to an ASCII
representation is a red herring.
That being the case, does it really have a place in an architecture where
it's faster to do 32-bit BCD addition in, say, XS3? (Assuming that is, that
anyone really has a need for it on a Pentium-class machine). Or is DAA
simply the feed bag that's been left for "compatibility" purposes on a
turbocharged V12 road machine just in case someone wants to hook old Dobbin
up?
Cheers,
Chuck