S5-115U Manual
8.2.10 Jump Operations
Table 8-20 provides an overview of the jump operations. An example follows the table.
Operation
Operand
JU =
JC =
JZ =
JN =
JP =
JM =
JO =
ID
Jump label (up
to 4 characters)
Processing the Jump Operations
A symbolic jump destination (jump label) must always be entered next to a jump operation. This
jump label can have up to four characters, the first of which must be a letter of the alphabet.
When programming, please be aware of the following:
•
The absolute jump displacement cannot exceed +127 or –128 words in the program memory.
Some statements take up two words (e.g., "Load a constant"). For long jumps, insert an
intermediate destination.
•
Jumps can be executed only within a block.
•
Jumping over segment boundaries ("BLD 255") is not permitted.
EWA 4NEB 811 6130-02b
Table 8-20. Overview of Jump Operations
Jump unconditionally
The unconditional jump is executed independently of conditions.
Jump conditionally
The conditional jump is executed if the RLO is "1". If the RLO is "0",
the statement is not executed and the RLO is set to "1".
Jump if the result is "zero"
The jump is executed only if CC 1=0 and CC 0=0
The RLO is not changed.
Jump if the result is "not zero"
The jump is executed only if CC 1 CC 0
The RLO is not changed.
Jump if the result is positive
The jump is executed only if CC 1=1 and CC 0=0
The RLO is not changed.
Jump if the result is negative
The jump is executed only if CC 1=0 and CC 0=1
The RLO is not changed
Jump on overflow
The jump is executed if an overflow occurs. Otherwise the jump is
not executed. The RLO is not changed.
STEP 5 Operations
Meaning
8-57