i want to copy nibble from source to destination A B 0101 1001 ; first data C D 0011 0110 ; second data i want to copy A to B, OR copy A to C, OR copy A to D OR copy B to A, OR copy B to C, OR copy B to D OR copy C to A, OR copy C to B, OR copy C to D OR copy D to A, OR copy D to B, OR copy D to C how can i copy it is it possible?????
Someone didn't understand "nibble".
And the OP talked about copying - not swapping - data, so overwrites are allowed.
That's what he said - but did he really mean that...?
Also, it's not clear whether the original nibble has to remain intact...
Anyhow, the 8051 SWAP instruction may well still be useful in achieving whatever the real goal actually is...
Of course the SWAP instruction may be useful.
But the code that did swap the contents of two int does try to solve a completely different problem.
Plus does not meet the requirement of being in assembly language.
That is less of a problem. In many situations, it's meaningful to use a proxy language to describe a concept.