Both the BTFSC and BTFSS instructions are supposed from the midrange Microchip's PIC familly.
Anyway, when it is said "many lines of code" don't necessarily means as being not a fast implementation.
You could think about put all the 4 possible results in a lookup table by using the RETLW instruction.
The fastest if the source byte is disposable and the two bits are adjacent:
Code:
rlf source , w ; put bit1 in the same position in w
xorwf source , f ;compare bits
btfss source,bit2 ; branch
goto option1
option2; different
option1 ; equal
source byte not disposable
Code:
rlf source , w
xorwf source , w
andlw 2^bit2 ; keep the result in w
btfss status,z
goto option1
option2; different
option1 ; equal
two bytes in random position , source byte not disposable
Code:
movf source,w
btfsc source bit1
comf source, w ; complement if bit1 is 1
andlw 2^bit2
btfss status,z
goto option1
option2 ; different
option1 ; equal
two bytes in random position , source byte disposable
Code:
btfsc source bit1
comf source, f ; complement if bit1 is 1
btfss source, bit2
goto option2
option1 ; different
option2 ; equal