Specifications
mikroElektronika | Free Online Book | PIC Microcontrollers | Chapter 9: Instruction Set
Status affected: -
Number of cycles: 1
EXAMPLE 1:
....
[label] BSF REG,7
Before instruction execution: REG = 0x07 ; 0000 0111 (0x07)
After instruction: REG = 0x87 ; 1000 0111 (0x87)
EXAMPLE 2:
....
[label] BSF INDF,3
Before instruction execution: W = 0x17
FSR = 0xC2
Register at address (FSR)contains the value
0x20
After instruction: W = 0x17
FSR = 0xC2
Register at address (FSR)contains the value
0x28
BTFSC - Bit test f, Skip if Clear
Syntax: [label] BTFSC f, b
Description: If bit b of register f is 0, the next instruction is discarded and a NOP is
executed instead, making this a two-cycle instruction.
Operation: Discard the next instruction if f(b) = 0
Operand: 0 ≤ f ≤ 127, 0 ≤ b ≤ 7
Status affected: -
http://www.mikroe.com/en/books/picmcubook/ch9/ (10 of 35)5/3/2009 11:35:12 AM