
162 THE x86 MICROPROCESSORS
4.5 | ASCII Operations
e processor has a number of instructions relating to the processing of ASCII numbers.
4.5.1 | ASCII Addition
AAA – ASCII Adjust AL after addition
is instruction is used after addition of two ASCII numbers. It checks the lower nibble of AL
for one of the two conditions:
whether it is within A and F.i)
whether the auxiliary carry fl ag (AF) is set. ii)
Depending on this, it performs the required corrections. See the three cases shown.
Add ‘5’ and ‘4’, get the sum in AL.
Case 1
35H
34H
69H
In this case the lower nibble is not within A and F, and the AC fl ag is not set i.e., AF = 0. en
the instruction ...