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?
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.
The answer depends heavily on the CPU and assembly language you're targeting:
MOV target, sourcemov source, targetMOV target, source The source is left unchanged for a move.
Out of curiosity, and nostalgy, a couple of older CPUs used other covnetions as well:
MOV source, target MOVE source, targetMOV, but uses several variants of loads and stores, the first using targe, source, and the second source, target. It also had several variants of move but called differently keepng from the naming convention only the first letter.
eaxregister, so what's it supposed to do when when you tell it toadd eax, 5?add eax, 5to a MIPS assembler, and are lucky, it will reject it. If you're unlucky, it will turn it into... something. If you run it through an x86 assembler that uses Intel syntax, you might get the bytes0x6683C005. Or you might get0x0505000000, or something other equivalent instruction. The first seems to be abltz(branch if less than zero) instruction in MIPS. The second would be 1.25 MIPS instructions. Halting execution would only happen if you're very, very lucky. More likely you'll just end up running a bunch of random instructions.