
PROGRAMMING CONCEPTS–III 4-25
ADC AH, 0 ;add carry, AH and 0;sum in AH
MOV [DI], AH ;store AH in memory
.EXIT
END
On adding 4 BCD bytes, there is a possibility of a carry, which corresponds to the 5th
BCD byte of the sum. To preserve this final carry, AH register is used as shown. The sum
of the given two numbers is 0139559823.
ii) Subtraction
DAS – Decimal adjust AL after subtraction.
Usage: DAS
For BCD subtraction, there is an instruction DAS which operates on the data in AL.
Refer Section 0.7.5 for the intricacies of BCD subtraction. DAS is used (like DAA) to
make the necessary corrections. The use of this instruction is left to you. ...