Write an 8085 program to evaluate an expression y=a+b+c, where a, b and c are 8-bit decimal numbers
In the last program, we did an evaluation of an expression consisting of three 8-bit hexadecimal numbers.
However, for this program, we are going to evaluate another expression but for this particular expression, we are going to add three 8-bit decimal numbers.
And quite similar to the earlier program, in this program also we are going to use immediate addressing mode. The only difference would be that in this program we are going to adjust the decimal number using DAA instruction.
Let a = 41D, which we will be storing at the 2000H memory location, b = 24D stored at 2001H memory location, c = 12D stored at 2002H memory location.
And, we will use 2003H to store the final result.
LXI H, 2000H
MOV A, M
|Memory Location||OPCODE||Operand||Label||Hex Code|