12-1
Section 12. Program Control Instructions
Table 12-1 Flag Description
Flag 0
Output Flag
Flags 1 to 8
User Flags
Flag 9
Intermediate Processing Disable Flag
Table 12-2 Command Codes
0
Go to end of program table
3
1-9, 79-99
Call Subroutine 1-9, 79-99
1
10-19
Set Flag 0-9 high
20-29
Set Flag 0-9 low
30
Then Do
31
Exit loop if true
32
Exit loop if false
41-48
Set Port 1-8 high
2
51-58
Set Port 1-8 low
2
61-68
Toggle Port 1-8
2
71-78
Pulse Port 1-8
2
1
96, 97 and 98 are special subroutines which can be called by control ports 6, 7
and 8 going high; see Instruction 85 for details.
2
The ports can be indexed to the loop counter.
3
If this command is executed while in a subroutine, execution jumps directly
to the end of the table that called the subroutine.
Instruction 83: If Case X < F
If the value in the location specified in the Begin Case instruction (Instruction 93)
is less than the fixed value entered as parameter 1 of Instruction 83 then the
CR10X executes the command in parameter 2 and goes to the end of the case
statement when the next Instruction 83 occurs. Otherwise, it continues to the next
instruction. See Instruction 93 for an example.
PARAM.
DATA
NUMBER
TYPE
DESCRIPTION
01:
FP
Fixed value
02:
2
Command
Instruction 85: Label Subroutine
This instruction marks the start of a subroutine. A subroutine is a series of
instructions beginning with Instruction 85 and terminated with Instruction 95,
End. All subroutines must be placed in Table 3 (Subroutine Table). When a sub-
routine is called by a command in a Program Control Instruction, the subroutine is
executed, then program flow continues with the instruction following that which
called the subroutine.