John Considine wrote: > > I am trying to have a variable be decremented and that result be used as > the BTFSC test bit > > For example > > movlw H'07' > movwf TestBit > decf TestBit, 1 > btfsc PORTB, TestBit > > Is this possible, I tried using indirect referencing like > > movlw TestBit > movwf FSR > btfsc PORTB, INDF > > but that will not work. Any suggestions. > Thanks You cannot use BTFSC like that. (?) You may need to try something like... movlw b'10000000' movwf TestBit - - - - bcf status,carry ; shift bit one position to right rrf TestBit btfsc status,carry ; if carry = 1 then reset bit 7 = 1 rrf TextBit - - - - movf PORTB,w ; do bit comparison on port andwf TestBit,w btfsc status,Z goto BitIsOne -- Best regards Tony http://www.picnpoke.com Email sales@picnpoke.com