I've been struggling with understanding the ASCII adjust instructions from x86 assembly language.
I see all over the internet information telling me different things, but I guess it's just the same thing explained in a different form that I still don't get.
Can anyone explain why in the pseudo-code of AAA
, AAS
we have to add, subtract 6 from the low-order nibble in AL?
And can someone explain AAM
, AAD
and the Decimal adjust instructions pseudo-code in the Intel instruction set manuals too, why are they like that, what's the logic behind them?
And at last, can someone give examples when these instructions can be useful, or at least in what applications they have been useful in the past.
I know that nowadays these instructions aren't used, but I still want to know how these instructions work, it's good to know.