Siemens C500 User Manual page 98

Microcontroller family
Table of Contents

Advertisement

SJMP
rel
Function:
Short jump
Description:
Program control branches unconditionally to the address indicated. The branch
destination is computed by adding the signed displacement in the second
instruction byte to the PC, after incrementing the PC twice. Therefore, the range of
destinations allowed is from 128 bytes preceding this instruction to 127 bytes
following it.
Example:
The label ÓRELADRÓ is assigned to an instruction at program memory location
0123 H . The instruction
SJMP
will assemble into location 0100 H . After the instruction is executed, the PC will
contain the value 0123 H .
Note:
Under the above conditions the instruction following SJMP will be at 102 H .
Therefore, the displacement byte of the instruction will be the relative offset (0123 H -
0102 H ) = 21 H . In other words, an SJMP with a displacement of 0FE H would be a
one-instruction infinite loop.
Operation:
SJMP
(PC) ¬ (PC) + 2
(PC) ¬ (PC) + rel
Encoding:
1 0 0 0
Bytes:
2
Cycles:
2
Semiconductor Group
RELADR
0 0 0 0
rel. address
4-72
Instruction Set
C500 Family
1998-04-01

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents