Section 3. Instruction Set Basics
3-7
A logical OR construction is also possible. Figure 3-3 illustrates an instruction
sequence that results in subroutine X being executed if either A or B is true.
IF A (88-92 with command 30)
Call subroutine X (86, command=X)
ELSE (94)
IF B (88-92 with command 30)
Call subroutine X (86, command=X)
END B (95)
END A (95)
Figure 3-3 Logical OR Construction
A logical OR can also be constructed by setting a flag if a comparison is true.
(The flag is cleared before making the comparisons.) After all the comparisons
have been made, the desired instructions are executed if the flag is set.
The Begin Case instruction, 93, and If Case instruction, 83, allow a series of tests
on the value in an input location. The case test is started with Instruction 93,
which specifies the location to test. Instruction 83 is then used several times to
compare the value in the location with fixed values. When the value in the input
location is less than the fixed value specified in Instruction 83 the command in
that Instruction 83 is executed and execution branches to the End instruction, 95,
which closes the case test (see description of Instruction 93 in Section 12).
3.8.2 Nesting
A branching or loop instruction which occurs before a previous branch or loop has
been closed is nested. The maximum nesting level is nine deep. Loop (Instruction
87) and Begin Case (Instruction 93) both count as one level. Instructions 83, 86,
88, 89, 91 and 92 each count as one level when used with command 30 (‘Then
Do’). Use of Else (Instruction 94) also counts as one nesting level each time it is
used. For example, the AND construction above is nested two deep while the OR
construction is nested three deep.
Subroutine calls do not count as nesting with the above instructions although they
have their own nesting limit (six; see description of Instruction 85 in Section 12).
Branching and loop nesting starts at zero within each subroutine.
Any number of groups of nested instructions can be used in any of the three
Program Tables. The number of groups is only restricted by the program memory
available.
3.9 Instruction Memory and Execution Time
Each instruction requires program memory and makes use of varying numbers of
Input, Intermediate and Final Storage locations. The following tables list the
memory used by each instruction and the approximate time required to execute
the instruction.