Steve Hardy wrote: > How about the following untested macro for general calls. No doubt > Andrew Warren et al. have something similar in their web pages, but > this is my 5 cents worth > .... > ; Expands to 1 or 3 instructions, depending on whether cross-block > ; call. > > [ .... "BSF/BCF PCLATH,3" macro deleted .... ] Steve: As a matter of fact, I DO have something similar, but I was surprised to discover that it's not on my web page. It IS, however, included in Tom Kellett's excellent PIC FAQ, at: http://digiserve.com/takdesign/pic-faq/routines/pic_5102.html That routine is for the 16C57 specifically, since it was the only PIC with multiple code-pages in 1992. If you take a look at it, you'll see the sort of hoops one had to jump through back then... The only available assembler (PICALC) had terrible problems with unresolved forward references, so a simple "IF/ENDIF" macro like yours wouldn't work. Instead, you had to build the BSF/BCF instructions "by hand". Take a look; it'll make you REALLY appreciate the work Kim Cooper did on MPASM. -Andy === Andrew Warren - fastfwd@ix.netcom.com === === Fast Forward Engineering - Vista, California === === === === Custodian of the PICLIST Fund -- For more info, see: === === http://www.geocities.com/SiliconValley/2499/fund.html ===