I have an array of ObjectData defined as a global called DotArray and a local called Size defined as a POINT. using ebx as an index. getint returns a random in eax.
For some reason the code below would work if I left the address in the register but as soon as it is moved to the local it no longer works. I think this may have something to do with a segment change from what I can see in OllyDebug(which I am still learning how to use). is there any way I can get around this. I would like to be able to free up the register for use in other places.
lea eax,[DotArray+ObjectData.x]
mov [Size.x],eax
lea eax,[DotArray+ObjectData.y]
mov [Size.y],eax
stdcall getint,230
mov [Size.x+ebx*8],eax
stdcall getint,230
mov [Size.y+ebx*8],eax