Re: Is it catachrestial as 'Effective Addresses' in NASM documentation?
- From: Frank Kotler <fbkotler@xxxxxxxxxxx>
- Date: Sun, 30 Apr 2006 11:27:05 -0400
Julienne Walker wrote:
....
one can easily see why lea exists:
mov ebx,mem
mov esi,2
; Simulate "lea edx[ebx+esi*4]"
mov edx,ebx
imul esi,4
add edx,esi
Stop right there! That's "lea".
mov eax,[edx] ; eax = 3
This is *not* part of what "lea" does. The confusing thing about "lea" is that it *looks* like a memory instruction, but it's an arithmetic instruction - just does the calculation, doesn't touch memory at all.
Hope that clears things up.
Best,
Frank
.
- Follow-Ups:
- Re: Is it catachrestial as 'Effective Addresses' in NASM documentation?
- From: Julienne Walker
- Re: Is it catachrestial as 'Effective Addresses' in NASM documentation?
- References:
- Is it catachrestial as 'Effective Addresses' in NASM documentation?
- From: pzgyuanf
- Re: Is it catachrestial as 'Effective Addresses' in NASM documentation?
- From: Julienne Walker
- Is it catachrestial as 'Effective Addresses' in NASM documentation?
- Prev by Date: Re: Is it catachrestial as 'Effective Addresses' in NASM documentation?
- Next by Date: Re: Is it catachrestial as 'Effective Addresses' in NASM documentation?
- Previous by thread: Re: Is it catachrestial as 'Effective Addresses' in NASM documentation?
- Next by thread: Re: Is it catachrestial as 'Effective Addresses' in NASM documentation?
- Index(es):