source= http://www.piclist.com/postbot.asp?id=piclist\2002\02\15\115958a Nick has hit on the real power of Macros... they allow one to extend the language of the assembler. You can define new assembly language instructions, or fill in for instructions that you like to use but that aren't available on your current target. There are macro sets that allow you to program using PIC instructions in assemblers designed for the SX and for the SX in MPASM. I even started on a macro set for 6800 instructions for the SX... not finished, but I can be done. They can be set up to make complex decision and generate code for you. On the PIClist.com site there are macros to calculate SPBRG? SBRGP? (What the heck ever that bit rate register is) settings for PICs, generate comparison and branching code and even help with banks and paging. In my work with the SX, whenever I find myself doing the same damn thing over and over, I stop and write a macro for it. I have quite a library and most of my code looks pretty high level even though it is written for the little assembler in the SXKey. I don't even think about pages because my macros automatically build a jump table in low memory for the subroutines that happen to fall into the second half of each page. A truly great macro pre-processor is what makes C into C++. And the holy grail of macro languages is a meta language that allows you to build new languages. All power is in the macros! --- James Newton: PICList.com webmaster, former Admin #3 mailto:jamesnewton@piclist.com 1-619-652-0593 phone http://www.piclist.com/member/JMN-EFP-786 PIC/PICList FAQ: http://www.piclist.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu