ASM program to add two 8 bit numbers using 8051 instruction set

AIM: To perform addition of two 8 – bit numbers using 8051 instruction set.

ALGORITHM:

  1. Clear C – register for Carry
  2. Get the data immediately .
  3. Add the two data
  4. 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.

Editorial Team
Editorial Team

We are a group of young techies trying to provide the best study material for all Electronic and Computer science students. We are publishing Microcontroller projects, Basic Electronics, Digital Electronics, Computer projects and also c/c++, java programs.

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the latest updates on your inbox

Be the first to receive the latest updates from Codesdoc by signing up to our email subscription.

    StudentProjects.in