Siemens C500 User Manual page 63

Microcontroller family
Table of Contents

Advertisement

JBC
bit,rel
Function:
Jump if bit is set and clear bit
Description:
If the indicated bit is one, branch to the address indicated; otherwise proceed with
the next instruction. In either case, clear the designated bit. The branch destination
is computed by adding the signed relative displacement in the third instruction byte
to the PC, after incrementing the PC to the first byte of the next instruction. No flags
are affected.
Note:
When this instruction is used to test an output pin, the value used as the original
data will be read from the output data latch, not the input pin.
Example:
The accumulator holds 56 H (01010110 B ). The instruction sequence
JBC
JBC
will cause program execution to continue at the instruction identified by the label
LABEL2, with the accumulator modified to 52 H (01010010 B ).
Operation:
JBC
(PC) ¬ (PC) + 3
if (bit) = 1
then (bit) ¬ 0
Encoding:
0 0 0 1
Bytes:
3
Cycles:
2
Semiconductor Group
ACC.3,LABEL1
ACC.2,LABEL2
(PC) ¬ (PC) + rel
0 0 0 0
bit address
4-37
Instruction Set
C500 Family
rel. address
1998-04-01

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents