Searching \ for 'Macro2' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/index.htm?key=macro2
Search entire site for: 'Macro2'.

Truncated match.
PICList Thread
'Macro2'
1998\12\12@110208 by Goovaerts

flavicon
face
When you use a MACRO somewhere in a routine. Does this use a level of the
STACK to save its return address or not ?

Glenn

1998\12\12@111035 by Sean Breheny

face picon face
Hi Glenn,

At 04:58 PM 12/12/98 +0100, you wrote:
>When you use a MACRO somewhere in a routine. Does this use a level of the
>STACK to save its return address or not ?
>
>Glenn
>

No, Macros are simply PREPROCESSOR DIRECTIVES. They are not executed by the
pic at all. When the assembler assembles your code containing macros, it
just replaces every instance of the macro by the actual text of the macro,
it is just TEXTUAL SUBSTITUTION. After it does this, it then assembles the
code. SO, a macro is fundamentally different from a subroutine. It doesn't
save any memory, each time you "call" a macro, it is just the same as if
you cut and paste the full macro text into that spot. MAcros are ONLY to
make source code more readable. You must be careful when using macros since
it can make it more difficult for you to immediately realize how long your
code is.

Sean


+-------------------------------+
| Sean Breheny                  |
| Amateur Radio Callsign: KA3YXM|
| Electrical Engineering Student|
+-------------------------------+
Save lives, please look at http://www.all.org
Personal page: http://www.people.cornell.edu/pages/shb7
spam_OUTshb7TakeThisOuTspamcornell.edu  Phone(USA): (607) 253-0315 ICQ #: 3329174

1998\12\12@112120 by Michael Hagberg

flavicon
face
NO, a macro is not to be confused with a called subroutine.

when you assemble the code the macro will be expanded into the source code
just as if you have typed the macro code into the source code. macro's are
used so you don't have to type the same basic code many times. it also
allows variables to be specified and substituted into the macro.

michael

You may leave the list at any time by writing "SIGNOFF PICLIST" in the
   body of a message to .....LISTSERVKILLspamspam@spam@MITVMA.MIT.EDU.


-----Original Message-----
From: Goovaerts <goofy1spamKILLspamGLO.BE>
To: .....PICLISTKILLspamspam.....MITVMA.MIT.EDU <EraseMEPICLISTspam_OUTspamTakeThisOuTMITVMA.MIT.EDU>
Date: Saturday, December 12, 1998 10:14 AM
Subject: Macro2


>When you use a MACRO somewhere in a routine. Does this use a level of the
>STACK to save its return address or not ?
>
>Glenn
>

1998\12\12@175431 by Stig Brautaset

flavicon
face
> When you use a MACRO somewhere in a routine. Does this use a level of the
> STACK to save its return address or not ?
>

No.

Stig

=======================================================
Stig Brautaset - sbrautasspamspam_OUTc2i.net - ICQ:11052183
Student of electronics  -  http://home.c2i.net/sbrautas
=======================================================

> Glenn
>

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...