- Understanding the x86’s Decimal Adjust after Addition (DAA) instruction (righto.com)
I’ve been looking at the DAA machine instruction on x86 processors, a special instruction for binary-coded decimal arithmetic. Intel’s manuals document each instruction in detail, but the DAA description doesn’t make much sense. I ran an extensive assembly-language test of DAA on a real machine to determine exactly how the instruction behaves. In this blog post, I explain how the instruction works, in case anyone wants a better understanding.
- Whether or not I have succeeded in this it is not for me to say; and I do not wish to forestall the judgments of others by speaking myself of my writings; but it will gratify me if they be examined, and, to afford the greater inducement to this, I request all who may have any objections to make to them, to take the trouble of forwarding these to my publisher, who will give me notice of them, that I may endeavour to subjoin at the same time my reply; and in this way readers seeing both at once will more easily determine where the truth lies; for I do not engage in any case to make prolix replies, but only with perfect frankness to avow my errors if I am convinced of them, or if I cannot perceive them, simply to state what I think is required for defence of the matters I have written, adding thereto no explication of any new matter that it may not be necessary to pass without end from one thing to another.