Re: A89: Starting out assembly, need help


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

Re: A89: Starting out assembly, need help




So how are parameters passes to macros?

-Miles Raymond

-----Original Message-----
From: Daniel7073@aol.com <Daniel7073@aol.com>
To: assembly-89@lists.ticalc.org <assembly-89@lists.ticalc.org>
Date: Wednesday, December 02, 1998 8:22 PM
Subject: Re: A89: Starting out assembly, need help


>In a message dated 12/02/1998 6:02:19 PM Pacific Standard Time,
>TurboSoft@aol.com writes:
>
>> what is a macro, how do l use it, what are they for?
>A macro is similar to a function, except when it is called, the code in the
>macro is put in the spot of the macro instruction.
>
>Example:  (the macro definition is almost certainly incorrect)
>
> MACRO CallSomeFunc
> move.l #5,-(a7)
> jsr lib::somefunc
> add.l #4, a7
> ENDM
>
>main:
> jsr util::zap_screen
> CallSomeFunc
> rts
>
>At compile time, this code would be replaced with:
>
>main:
> jsr util::zap_screen
> move.l #5,-(a7)  
>  jsr lib::somefunc   
>  add.l #4, a7  
> rts
>
>I hope this helps.
>
>Daniel Imfeld