Re: A89: Re: and now a REAL ASM question!
[Prev][Next][Index][Thread]
Re: A89: Re: and now a REAL ASM question!
>ok, so do you mean that after the "lea" instruction, AO will POINT to the
>beginning of the string? And therefore if I use "move" it will actually
>load the first byte of the STRING into A0 rather than the address of the
>string? I kind of understand, but I just wanted to make sure... so if I
>did:
>
>lea (A0),A1
>
>and A0 was "1000", then A1 would be "1000" rather than the actual WORD at
>memory adress 1000? Or am I completely screwed up?
>
>
lea (A0),A1 would be pointless, since it would be the same as movea A0,A1
The point of lea is to load _effective address_ of the operand into the
second operand. The reason you need to do lea string(pc), A1 is because
you want to load the address of string(pc) -- the # of bytes to the string
plus the program counter -- into A1, instead of moving the contents of it
by using the move instruction.
Hope this helps!
-Mark
References: