Byron Jeff wrote: > bnz macro target > btfsc STATUS,Z ; Skip if Z set. > goto bnz_#v(fail) ; temp label. fail need to be incremented. Not > shown > pagesel target > goto target > bnz#v(fail) Look up the LOCAL directive. You can use it instead of manually making unique labels. You are also overthinking this regarding PAGESEL. The 18F branch instructions are relative, and only allow for a small range. You wouldn't use them accross code sections anyway. I don't know if the linker/assembler has support for fixing up offsets for those instruction accross sections, but even if they did most of the time the target would be too far away. So here is all you need: bnz macro target ;like 18F BNZ instruction btfss status, z ;is zero ? goto target ;no, do the branch endm One gotcha with this is that the BNZ macro can't be used immediately after a SKIP, unlike the real BNZ instruction. ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist