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
0
743views
           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
Please log in to add an answer.