Dwayne Reid wrote 2012-04-25 20:12: > Hi there, Byron. > > I just tried your technique and it works well. I did have to create > a separate macro for setting BSR for manipulating a bit in isolation > (I have NO idea of which registers some of the newer bits belong) as > shown below: > > setbsr MACRO target ;register > movlb (target>>7) ;get bank bits > CURRBANK set ((target>>7)<<7) ; > endm > > setbsrbit MACRO target, bnum ;bit > movlb (target>>7) ;get bank bits > CURRBANK set ((target>>7)<<7) ; > endm > OK. I'm lost... :-) What does the bnum parameter do ? Jan-Erik. > #define BB(reg,bit) (reg^CURRBANK),(bit) ;bit in bank 1 > #define RB(reg) (reg^CURRBANK) ;reg in bank 1 > ;usage is: bcf BB(_SOMEBIT) > ;usage is: movwf RB(SOMEREG) > > I'll try to get some time later today to try out the conditional > assembly thing that we were talking about. > > Many thanks! > > dwayne > --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .