Truncated match.
PICList
Thread
'Macro2'
1998\12\12@110208
by
Goovaerts
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
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_OUTshb7TakeThisOuT
cornell.edu Phone(USA): (607) 253-0315 ICQ #: 3329174
1998\12\12@112120
by
Michael Hagberg
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 .....LISTSERVKILLspam
@spam@MITVMA.MIT.EDU.
-----Original Message-----
From: Goovaerts <goofy1
KILLspamGLO.BE>
To: .....PICLISTKILLspam
.....MITVMA.MIT.EDU <EraseMEPICLISTspam_OUT
TakeThisOuTMITVMA.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
> 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 - sbrautas
spam_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...