BTFSC

Bit Test F, Skip if Clear

If bit ‘b’ in register ‘f’ is ‘1’, the next instruction is executed. If bit ‘b’ is ‘0’, then the next instruction is discarded and a NOP is executed instead, making this a 2 TCY (instruction cycle) instruction.

[the_ad id="3059"]

Syntax:

[ label ] BTFSC f,b

Operation:

skip if (f<b>) = 0

Operands:

  • 0 ≤ f ≤ 127
  • 0 ≤ b ≤ 7

Status Affected: None

Example:

BTFSC REG,0
GOTO SUB1
GOTO SUB2

If bit 0 of REG is clear, the program jumps to GOTO SUB2. Otherwise, the line GOTO SUB1 is read.

[the_ad id="3059"]