Running 2 Youtube Channel : The Masti Adda (Fun based ) : The Knowledge Adda (Knowledge based) : Subscribe for Knowledge with Fun....
Written by @
Aim: Write a program to move contents of one location to another location using micro-controller.
Apparatus Used: Micro-controller kit.
Assumption: Suppose one content is stored at 4000 H and we have to move that content on the 4100 H.
1. Store the first number at first location (4000H)
2. Copy that number into accumulator.
3. Store the content of accumulator at second location (4100H).

Description of used instruction:
MOV: Used for Load and Copy the Data. This copies a byte from the source location to destination.
MOVX: This instruction transfer data between external memory and register A.
DPTR: This is Data Pointer. It is used for containing 16 bit data or memory address.
SJMP: Short Jump loop is used for indefinite loop within program basically used to end the program.

Input:  4000-05
Output: 4100-05

Procedure to look output:

·         After ending (SJMP) the program, press Enter two times.
·         You will get message “Welcome to ------KIT”.
·         Press G and Provide initial address of program as in this program, starting address is 3000 H.
·         Press Enter.
·         After pressing Enter, You will get Message “Execution Completed”.
·         Press Reset on micro-controller KIT.
·         Press M and You will get Message “Enter Address”.
·         Provide Location of Input as in this program 4000H. Press Space and write a number to move to other location.
·         Press Enter two times again.
·         Press G and provide starting address and Press Enter.
·         You will Get Message “Execution Completed”.
·         Press M and You will Get Message “Enter Address”.
·         Provide Address for Output as in this Program 4100H and Press Space and you get Output.

No comments:

Post a Comment