AIM: To perform addition of two 8 – bit numbers using 8051 instruction set.
ALGORITHM:
- Clear C – register for Carry
- Get the data immediately .
- Add the two data
- Store the result in memory pointed by DPTR
PROGRAM:
ORG 4100
CLR C
MOV A,#data1
ADD A,#data2
MOV DPTR,#4500
MOVX @DPTR,A
HERE: SJMP HERE
OBSERVATION:
Input: | 66 |
23 | |
Output: | 89 (4500) |
RESULT:
Thus the program to perform the addition of two 8 – bit numbers using 8051 instruction set was executed.