The calculations are done by the processor as far as I know...
Masm interpret's
lea esi, [esp + 4]
to be "8D7424 04" - I imagine the 4 on the end is the offset
and
Type: Posts; User: Fordy
The calculations are done by the processor as far as I know...
Masm interpret's
lea esi, [esp + 4]
to be "8D7424 04" - I imagine the 4 on the end is the offset
and
Actually, looking again, if you want to use an offset to a register and get an address loaded, LEA is the way to go.
mov eax, ebp - 8 ;doesnt even assemble......you can;
mov eax, [ebp -...
On assemblers such as MASM you can use both, but many use the mov method as it's believed to be faster (it may have been at some time....but I dont know about now)