Hi Andy, And many thanks for your help. If I tried to invoke a macro on a PIC from say ram_bank0 to a place in ram_bank1 memory, ( ram_bank0 and ram_bank1 being memory pages) would the macro work?? Or would I have to switch memory pages first? I may very well be using the wrong terminology and am new to ram/ memory paging systems like on the 16c505 or 16c63. Regards John -----Original Message----- From: Andrew Warren [mailto:fastfwd@IX.NETCOM.COM] Sent: Wednesday, 29 March 2000 3:31 To: PICLIST@MITVMA.MIT.EDU Subject: Re: MACROS John Orhan 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 - fastfwd@ix.netcom.com === Fast Forward Engineering - San Diego, California === http://www.geocities.com/SiliconValley/2499