332
Manual – IPOSplus®
23
Program commands
Assembler – Commands
23.7.4 Loop commands LOOP
LOOPB/LOOP
BEGIN
This command in combination with a LOOP command creates a program loop. The
number of loop cycles (> 0) is specified as a constant. The loop ends at the associated
LOOP command. Program loops can be nested.
If the number of loop cycles is to be variable, a JMP command must be used instead of
a LOOP command and the variable condition must be checked at each cycle.
Structure
LOOPE/LOOP
END
This command specifies the end of a program loop that was started using the LOOPB
command.
515235723
INFORMATION
Do not exit program loops with a jump command. Jump commands and subroutines
are allowed within a program loop.
Command structure
Mxxx LOOPB X1
Mxxx: Label (optional)
X1: Number of loop cycles (maximum 256)