I am trying to figure out how to copy a value I am holding in a register for use immediately, and for use later in the program. I will be looping through code, and this value will need to be copied to another register for pushing it onto the stack, and then removal, copying, and repeating.
I know that the mov instruction moves a value into another register, but does the register from which the value is moved from able to retain the value?
For example:
mov eax, ebx
This would move ebx's value into eax, but would ebx still hold a value?
Any instruction that could help me do this is greatly appreciated.
would ebx still hold a value?
Yes -- mov
is really a copy, so the source retains its original value.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With