BTFSS

Bit Test F, Skip if Set

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 2 TCY (instruction cycle) instruction.

[the_ad id=”3059″]

Syntax:

[ label ] BTFSS f,b

Operation:

skip if (f<b>) = 1

Operands:

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

Status Affected: None

Example:

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

[the_ad id=”3059″]