SX Users Manual Rev. 3.1
© 2000 Scenix Semiconductor, Inc. All rights reserved.
Chapter 3 Instruction Set
3.6.48 SB fr.bit
Test Bit in fr and Skip if Set
Test a specified bit in fr; if 1, skip next instruction
0111 bbbf ffff
This instruction tests a bit in the specified file register. The file register address (00h
through 1Fh) 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 execu-
tion proceeds normally with the next instruction.
1 if tested condition is false, 2 if tested condition is true
;test bit 7 of file register
;increment if bit=0
;move file register to W
This example tests the most significant bit of file register 1Fh. If that bit is 1, the
inc instruction is skipped. Otherwise, program execution proceeds normally with
the inc instruction.