0% found this document useful (0 votes)
35 views3 pages

Arithmetic Operations in Embedded

The document outlines a procedure for transferring data between registers and memory using the 8051 microcontroller. It includes an algorithm with specific steps, a flowchart, and a program code that demonstrates the data transfer process. The result confirms that the data transfer was successfully executed and verified.

Uploaded by

ibm.da2024
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views3 pages

Arithmetic Operations in Embedded

The document outlines a procedure for transferring data between registers and memory using the 8051 microcontroller. It includes an algorithm with specific steps, a flowchart, and a program code that demonstrates the data transfer process. The result confirms that the data transfer was successfully executed and verified.

Uploaded by

ibm.da2024
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Ex No: 2 DATA TRANSFER BETWEEN REGISTERS AND

Date: MEMORY

Aim:

To perform data transfer between registers and memory using 8051 micro controller.

Algorithm:

Step 1: Load counter with number of bytes to transfer.

Step 2: Load source start address into R1.

Step 3: Load destination start address into R1.

Step 4: Repeat the following until counter becomes zero.

4.1: Move data from source to A.

4.2:Move data from A to destination.

4.3: Increment both R0 and R1.

4.4: Decrement counter.


Flowchart:

Program:

ADDRESS LABEL MNEMONIC COMMENTS

000H MOV R2, #05H Load count 5 into R2

0002H MOV R0, #40H Load source address into R0

0004H MOV R1, #50H Load destination address into R1

0006H LOOP MOV A, @R0 Move data from source into A

0008H MOV @R1, A Move data from A to destination

000AH INC R0 Increment source pointer

000CH INC R1 Increment destination pointer

Decrement counter, repeat if not


000EH DJNZ R2, LOOP
zero

0010H END End of program

Output:

Result:
Thus, the data transfer between registers and memory using 8051 microcontroller was
written, executed and the output was verified successfully.

You might also like