> John Orhan <
.....PICLISTKILLspam
.....MITVMA.MIT.EDU> wrote:
>
> > How many times can a macro be called.
>
> As many times as you like.
>
> > Can a macro be called from inside another macro?
>
> Yes.
>
> > What is the difference between a macro and a subroutine?
>
> A subroutine exists at just one place in your PIC's memory; each
> time you want to use it, you CALL the subroutine from somewhere
> else in your program.
>
> When you define a macro, NOTHING gets stored in your PIC's
> memory. When you USE the macro, though, a full copy of it is
> inserted in your program at the point where you used it.
>
> An analogy might help... If you're composing a document with
> text and pictures, you can refer to the pictures two ways:
>
> The first way is to have just one copy of the picture, with "See
> Figure 1" in your text wherever you want the reader to look at
> the picture. That's a subroutine.
>
> The other way is to paste a copy of the picture at each point in
> the document where you want the reader to see it. That's a
> macro.
>
> Make sense?
>
> > If I happen to call a macro from outside the page limits, what will
> > happen?
>
> I'm not sure what you're asking. You don't "call" macros; when
> you use them, you're just asking the assembler to insert the
> body of your macro there in your program... So they don't behave
> any differently than if you simply cut-and-pasted code into your
> program at that point.
>
> -Andy
>
> === Andrew Warren -
EraseMEfastfwdspam_OUT
TakeThisOuTix.netcom.com
> === Fast Forward Engineering - San Diego, California
> ===
http://www.geocities.com/SiliconValley/2499