815
Subroutines Section 3-19
Example 2: Sequential (Non-nested) Subroutines
When CIO 000000 is ON in the following example, subroutine 1 is executed
and program execution returns to the next instruction after SBS(091) 1. When
CIO 000001 is ON, subroutine 2 is executed and program execution returns
to the next instruction after SBS(091) 2.
1
3
AS→B
A→B
CIO 000000 ON
2
→
Subroutine 1
Main program
Subroutine program:
S
Order of execution