SB 8bitOffset,COND
6-316
SB 8bitOffset,COND
SYNTAX OPTIONS OPCODE OBJMODE RPT CYC
SB 8bitOffset,COND 0110 COND CCCC CCCC X − 7/4
Operands 8bitOffset
8-bit signed immediate constant offset value (−128 to
+127 range)
COND
Conditional codes:
COND Syntax Description Flags Tested
0000 NEQ Not Equal To Z = 0
0001 EQ Equal To Z = 1
0010 GT Greater Then Z = 0 AND N = 0
0011 GEQ Greater Then Or Equal To N = 0
0100 LT Less Then N = 1
0101 LEQ Less Then Or Equal To Z = 1 OR N = 1
0110 HI Higher C = 1 AND Z = 0
0111 HIS, C Higher Or Same, Carry
Set
C = 1
1000 LO, NC Lower, Carry Clear C = 0
1001 LOS Lower Or Same C = 0 OR Z = 1
1010 NOV No Overflow V = 0
1011 OV Overflow V = 1
1100 NTC Test Bit Not Set TC = 0
1101 TC Test Bit Set TC = 1
1110 NBIO BIO Input Equal To Zero BIO = 0
1111 UNC Unconditional −
Description Short conditional branch. If the specified condition is true, then branch
by adding the signed 8-bit constant value to the current PC value;
otherwise continue execution without branching:
If (COND = true) PC = PC + signed 8-bit offset;
If (COND = false) PC = PC + 1;
Note: If (COND = true) then the instruction takes 7 cycles.
If (COND = false) then the instruction takes 4 cycles.
If (COND = UNC) then the instruction takes 4 cycles.
Flags and
V
If the V flag is tested by the condition, then V is cleared.
Modes
Repeat This instruction is not repeatable. If this instruction follows the RPT
instruction, it resets the repeat counter (RPTC) and executes only once.