Assembly Language – Data Transfer Techniques in Assembly Language

assembly

Moving data in assembly language:

MOV B, A

If I move content from internal register A to register B, what happens to content of register A? Is it deleted? Stays unchanged?

Best Answer

The MOV command will leave the contents of register A alone. From some x86 documentation (emphasis added):

The mov instruction copies the data item referred to by its second operand (i.e. register contents, memory contents, or a constant value) into the location referred to by its first operand (i.e. a register or memory).

http://www.cs.virginia.edu/~evans/cs216/guides/x86.html

There are many other assembly languages, but you can count on most modern languages working the same way.

Related Topic