Re: A89: Starting out assembly, need help
[Prev][Next][Index][Thread]
Re: A89: Starting out assembly, need help
In a message dated 12/02/1998 5:05:21 PM Pacific Standard Time,
TurboSoft@aol.com writes:
> so lf l push four words onto the stack, then before the end of the program l
> need to
> add #8,a7
> like that?
> Also, what's the difference between
> move.w #3,d0
> and
> move.w \3,d0
> do they do the same thing?
Correct, youneed to change the stack pointer back to where it was before, or
your function/program will return to some weird address. This is because the
rts instruction looks on the stack for the address to go to.
move.w #3,d0 moves the number 3 into d0.
move.w \3,d0 would be used in a macro to move the third parameter to the macro
into d0
Daniel Imfeld