by Guest » Sep 5, 2002 @ 6:01pm
lea is load effective address. It's used mostly to add two or more operands to create an effective address. Stack vars, for instance, usually are relative ebp, so lea ebx,[ebp+4] adds 4 to ebp and returns the result in ebx. You can also use a scale (+4 would be index of ebp) such as lea ebx,[ebp+esi*4]. This instruction is also used as a fast multiplier, for a limited set of multipliers (can also add in an index to get x5, etc.). mov ebx, offset * works the same as a simple lea ebx, offset, but mov won't do for stack vars, and it doesn't index, and it doesn't scale, and none of this is in an ARM.