Instruction Set Architecture—IP2022 User’s Manual 208 www.ubicom.com SB fr.bit Test Bit in fr then Skip if Set Operation: if fr.bit = 1, skip next instruction Bits affected: None Opcode: 0111 bbbf ffff ffff Description: This  instruction  tests  a  bit  in  the  specified  data
memory location. The data memory location and
the bit number (0 through 7) are the instruction
operands. If the bit is 1, the next instruction in the
program
is skipped. Otherwise,                                                                               program
execution    proceeds    normally    with    the    next
instruction.
Cycles: 1 if tested condition is false, 2 if tested condition
is true
Example: sb              STATUS,0 ;test carry bit
inc    0x099 ;increment if carry=0
nop
This  example  tests  the  carry  bit  (bit  0  of  the
STATUS   register).   If   the   bit   is   1,   the   inc
instruction is skipped and the nop instruction is
executed.
Otherwise, program                                                                             execution
proceeds normally with the inc instruction.