User Manual
C166S V2
Detailed Instruction Description
User Manual
8-262
V 1.7, 2001-01
JBC
Relative Jump if Bit Set and Clear Bit
JBC
Group
Jump Instructions
Syntax
JBC op1, op2
Source Operand(s)
op1
→
BIT
op2
→
8-bit signed displacement
Destination Operand(s)
none
Operation
IF ((op1) = 1) THEN
(op1)
←
0
(IP)
←
(IP) + 2*sign_extend(op2)
ELSE
Next Instruction
END IF
Description
If the bit specified by op1 is set, program execution continues at the location of the
instruction pointer IP, plus the specified displacement op2. The bit specified by op1 is
cleared, allowing implementation of semaphore operations. The displacement is a 2s
complement number which is sign extended and counts the relative distance in
words
.
The value of the IP used in the target address calculation is the address of the
instruction following the JBC instruction. If the specified bit was clear, program
execution continues normally with the instruction following the JBC instruction.
Note: Flags are updated by this instruction even if the branch is not executed. An explicit
write operation to the PSW register supersedes the condition flag values which are
implicitly generated by the CPU.
CPU Flags
E
Always cleared.
Z
Contains the logical negation of the previous state of the specified bit.
V
Always cleared.
C
Always cleared.
N
Contains the previous state of the specified bit.
E
Z
V
C
N
0
B
0
0
B
Summary of Contents for C166S V2
Page 102: ...User Manual C166S V2 C166S V2 Memory Organization User Manual 3 102 V 1 7 2001 01...
Page 116: ...User Manual C166S V2 Instruction Pipeline User Manual 4 116 V 1 7 2001 01...
Page 152: ...User Manual C166S V2 Interrupt and Exception Handling User Manual 5 152 V 1 7 2001 01...
Page 204: ...User Manual C166S V2 Instruction Set User Manual 7 204 V 1 7 2001 01...
Page 420: ...User Manual C166S V2 Detailed Instruction Description User Manual 8 420 V 1 7 2001 01...
Page 432: ...User Manual C166S V2 Summary of CPU Subsystem Registers User Manual 9 432 V 1 7 2001 01...
Page 437: ...437...