lmpb17
December 4th, 2008, 04:07 PM
Im a little confused. What happens to a register after a value has been moved out? Also what happens to an array after a value has been switched out?
for example:
.data
arrD DWORD 1,2,3
.code
mov eax, arrD ; eax=1
xchg eax, [arrD+4] ; eax=2
mov arrD,eax ; arrD=2,1,3
What is the value of eax at the end of this? Is it dereferenced and therefore null or is it still equal to 2.
After the xchg step, is the array = 0,1,3?
for example:
.data
arrD DWORD 1,2,3
.code
mov eax, arrD ; eax=1
xchg eax, [arrD+4] ; eax=2
mov arrD,eax ; arrD=2,1,3
What is the value of eax at the end of this? Is it dereferenced and therefore null or is it still equal to 2.
After the xchg step, is the array = 0,1,3?