A89: Re: and now a REAL ASM question!
[Prev][Next][Index][Thread]
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?
>
>> I'm new to 68k asm, and I was looking over the hello world program.
>>There's a part I don't understand: ________________ lea
>>string(PC),A0 move.l A0,-(A7) ________________ anyway, why can't I
>>use this instead? : _______________ movea.l string(PC),A0
>>move.l A0,-(A7) _______________ I don't quite understand what the
>>difference between "lea" and "move" is. Can someone please explain it?
>>btw, when I use the second piece of code, I get garbled letters on the
>>screen... __
>
>The difference is that movea moves what is at string(pc) into A0, which is
>useful for getting memory into data registers directly. LEA (load
>effective address) loads the actual address into A0, so that when put on
>the stack, a subroutine can now use it.
>
>
Follow-Ups: