You are currently viewing [PRACTICAL] Implement a program to exchange the content of two memory locations
Microprocessor 8085 programming

[PRACTICAL] Implement a program to exchange the content of two memory locations

[PRACTICAL] IMPLEMENT A PROGRAM TO EXCHANGE THE CONTENT OF TWO MEMORY LOCATIONS

Are you looking for a step-by-step guide to Implement a program to exchange the content of two memory locations? here are the steps to implement a program to exchange the content of two memory locations.

Program:

//Content of memory location C050H store in C051H
//and Content of memory location C051H store in C050H

LXI H,C050h
MOV A,M
MOV B,A
LXI H,C051h
MOV A,M
STA C050h
MOV A,B
STA C051h
HLT

Input:

Content C050: 45h

Content C051: 52h

Output:

Content C050: 52h

Content C051: 45h

Result: Content of C050H and C051H are exchange

For more practical related to 885 Programming please visit the 8085 Programming link