Re: A89: I have an ASM sytax question...


[Prev][Next][Index][Thread]

Re: A89: I have an ASM sytax question...




>     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.



References: