T3STY
Full Member level 4
- Joined
- Apr 17, 2012
- Messages
- 239
- Helped
- 24
- Reputation
- 48
- Reaction score
- 24
- Trophy points
- 1,308
- Activity points
- 3,715
I tried but I actually didn't really understand how BTFSC and BTFSS instructions work. The manual syntax and description are:
BTFSC f,b
What I didn't understand is what the heck should the b value do. As from the name (Bit Test File Skip Clear/Set) the instruction should check if the specified file f is set or clear and if it's set (BTFSS) or clear (BTFSC) skip next instruction.
So, what does this b bit do exactly?
BTFSC f,b
BTFSS f,bIf bit ’b’ in register ’f’ is ’1’, the next instruction is executed. If bit ’b’ in register ’f’ is ’0’, the next instruction is discarded, and a NOP is executed instead, making this a 2TCY instruction.
If bit 'b' in register 'f' is '0', the next instruction is executed. If bit 'b' is '1', then the next instruction is discarded and a NOP is executed instead, making this a 2TCY instruction
What I didn't understand is what the heck should the b value do. As from the name (Bit Test File Skip Clear/Set) the instruction should check if the specified file f is set or clear and if it's set (BTFSS) or clear (BTFSC) skip next instruction.
So, what does this b bit do exactly?