Many thanks, Byron. Its been a while since I last did any serious /=20 difficult macro writing and you've given me much to think about. I=20 think that I can automate the whole process even more than my=20 previous stuff - I had to manually set / clear the rp0 & rp1 bits=20 with my previous (current) setup. However, I'm confused by something: At 08:51 PM 4/24/2012, Byron Jeff wrote: >Works fine, but I had simply disabled the 302 directives. Poking around th= e >manual I found the SET directive, which facilitates assembler variables >that can be changed. I figured that we can keep track of the current bank >in the macro. Since we only need the bank, I decided the shift the target >down, then shift it back up: > >SETBSR macro target > movlb (target >> 7) ; gpasm assember's BANKSEL=20 > doesn't work for exhanced 16F parts. >CURBANK set ((target >> 7) << 7) > endm I'm assuming that you are shifting the target down, then back up so=20 as to strip off the low-order address bits? A simple 'AND' would=20 have worked just as well - correct? Or is there a good reason to do=20 it your way instead of using a simple 'AND' to mask off the low-order=20 address bits? dwayne --=20 Dwayne Reid Trinity Electronics Systems Ltd Edmonton, AB, CANADA (780) 489-3199 voice (780) 487-6397 fax www.trinity-electronics.com Custom Electronics Design and Manufacturing --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .