Download Print this page

Siemens SAB 80515 Series User Manual page 199

8-bit single-chip microcontroller family

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
199
Instruction Set

Advertisement

loading

This manual is also suitable for:

Sab 80c515Sab 80c535Sab 80535Sab 80515k