5
(1)

[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

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

As you found this post useful...

Share this post on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?