Write an 8085 ALP to add two decimal 8-bit number using DAA instruction. Store the result in Decimal number system.
1. LXI H 2001; load HL register with 16-bit address
2. MOV A M; move data memory to accumulator
3. INX H; increment 16-bit value of register HL
4. MVI C 00; set register C with 00H
5. ADD M; add accumulator with memory
6. JNC L2; jump if carry flag is not 0
7. INX H; increment 16-bit value of register HL
8. INR C; increment 8-bit value of register C
9. MOV M C; move data from register C to memory
10. L2: DAA; decimal adjust accumulator
11. HLT; holt program
0 Comments