Infineon Technologies C166S V2 User Manual page 270

16-bit microcontroller
Table of Contents

Advertisement

JNBS
Group
Syntax
Source Operand(s)
Destination Operand(s)
Operation
IF ((op1) = 0) THEN
ELSE
END IF
Description
If the bit specified by op1 is clear, program execution continues at the location of the
instruction pointer IP, plus the specified displacement op2. The bit specified by op1 is
set, 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 JNBS instruction. If the specified bit was set, program
execution continues normally with the instruction following the JNBS 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 Clear and Set Bit
Jump Instructions
JNBS op1, op2
op1 → BIT
op2 → 8-bit signed displacement
none
(op1) ← 1
(IP) ← (IP) + 2*sign_extend(op2)
Next Instruction
E
Z
0
B
Detailed Instruction Description
V
C
0
0
8-270
User Manual
C166S V2
JNBS
N
B
V 1.7, 2001-01

Advertisement

Table of Contents
loading

Table of Contents