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

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

ALGORITHM:

  1. Get the data in A – reg.
  2. Get the value to be divided in B – reg.
  3. Divide the two data
  4. The quotient is in A – reg.
  5. The remainder is in B – reg.
  6. Store the results.

PROGRAM:

        ORG	4100
        CLR	C
        MOV	A,#data1
        MOV	B,#data2
        DIV	AB
        MOV	DPTR,#4500
        MOVX	@DPTR,A
        INC	DPTR
        MOV	A,B
        MOVX	@DPTR,A
HERE:	SJMP	HERE

OBSERVATION:

Input:05

03
Output:01 (4500)

02 (4501)

RESULT:

Thus the program to perform multiplication 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