AIM: To perform multiplication of two 8 – bit numbers using 8051 instruction set.
ALGORITHM:
- Get the data in A – reg.
- Get the value to be multiplied in B – reg.
- Multiply the two data
- The higher order of the result is in B – reg.
- The lower order of the result is in A – reg.
- Store the results.
PROGRAM:
ORG 4100
CLR C
MOV A,#data1
MOV B,#data2
MUL AB
MOV DPTR,#4500
MOVX @DPTR,A
INC DPTR
MOV A,B
MOVX @DPTR,A
HERE: SJMP HERE
OBSERVATION:
Input: | 80 |
80 | |
Output: | 00 (4500) |
19 (4501) |
RESULT:
Thus the program to perform multiplication of two 8 – bit numbers using 8051 instruction set was executed.