So who needs
DAA?
Anyone who wants to implement the nybble-to-hex functionality in a lot shorter
space, maybe? :-) This:
I think the original point is that there are plenty of suitable ways to convert a
nibble into printable hex without DAA, so if DAA is no longer being used for
it's intended purpoase, it has become an unnecessary wart on the instruction
set.
If there truly is a requirement for a smaller nibble-to-asci function, then this
is not justification for keeping DAA, instead it should be replaced by a CNA
(Convert Nibble to Ascii) instruction should be added, and you would have
the ultimate 1-byte solution.
Of course, practically there will always be "clever" people who have found
uses for DAA and used it and removing it would break some % of existing
code, so we are stuck with it for as long as we continue to maintain
backward compatibility with the x86 architecture.
Regards,
Dave
Btw, in response to the guy who posted a "shorter" solution (who's message
seems to have gotten accidently killed in the "purge the flood" step of reading
this group, unless I am mistaken, R1 and R2 refer to two different registers -
this violates the original specification of the problem.
--
dave04a (at) Dave Dunfield
dunfield (dot) Firmware development services & tools:
www.dunfield.com
com Collector of vintage computing equipment:
http://www.parse.com/~ddunfield/museum/index.html