Re: Is it catachrestial as 'Effective Addresses' in NASM documentation?
- From: "Julienne Walker" <happyfrosty@xxxxxxxxxxx>
- Date: 30 Apr 2006 07:41:16 -0700
pzgyuanf@xxxxxxxxxxxx wrote:
But, it is right to say '[ebx+esi*4]'(see below) is an effective
address:
mov ebx,mem
mov esi,2
lea edx [ebx+esi*4]
however, it is wrong to say '[mem]'(see below) is an effective address,
just the mem is:
mem dd 1,2,3,4,5
mov eax,[mem]
Is this right?
This is a case where the syntax of lea causes problems. In both cases,
whatever is between the square brackets is an effective address. The
difference is how the instruction uses the effective address. mov
evaluates the expression and then reads the contents from the resulting
address. lea evaluates the expression and then assigns the resulting
address to edx without touching the contents. But [mem] is no less an
effective address than [ebx+esi*4].
.
- Follow-Ups:
- 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
- Re: Is it catachrestial as 'Effective Addresses' in NASM documentation?
- From: pzgyuanf
- 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):
Relevant Pages
|