Infineon Technologies C166S V2 User Manual page 262

16-bit microcontroller
Table of Contents

Advertisement

JBC
Group
Syntax
Source Operand(s)
Destination Operand(s)
Operation
IF ((op1) = 1) THEN
ELSE
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.
User Manual
Relative Jump if Bit Set and Clear Bit
Jump Instructions
JBC op1, op2
op1 → BIT
op2 → 8-bit signed displacement
none
(op1) ← 0
(IP) ← (IP) + 2*sign_extend(op2)
Next Instruction
E
Z
0
B
Detailed Instruction Description
V
C
0
0
8-262
User Manual
C166S V2
JBC
N
B
V 1.7, 2001-01

Advertisement

Table of Contents
loading

Table of Contents