0
4.7kviews
Assume 5 BCD numbers are stored in RAM locations starting at 40H. Write a program to find their sum. The result must be in BCD.
1 Answer
written 6.2 years ago by | • modified 6.2 years ago |
MOV R0, #5D;
MOV R1, #40H;
CLR A;
MOV R7, A;
AGAIN: ADD A, @R0;
DAA
JNC NEXT
INC R7;
NEXT: INC R0;
DJNZ R2, AGAIN