![background image](http://html1.mh-extra.com/html/omron/sysmac-cs1d-cpu/sysmac-cs1d-cpu_reference-manual_742268856.webp)
817
Subroutines
Section 3-19
Example 3: Nested Subroutines
When CIO 000000 is ON in the following example, subroutine 1 is executed.
If CIO 000001 is ON, subroutine 2 is executed from within subroutine 1 and
program execution returns to the next instruction after SBS(091) 2 when sub-
routine 2 is completed. Execution of subroutine 1 continues and program exe-
cution returns to the next instruction after SBS(091) 1 when subroutine 1 is
completed.
1
3
5
2
4
A
→
S1
→
B
→
S2
→
C
A
→
S1
→
B
→
C
A
→
B
→
S2
→
C
A
→
B
→
C
CIO 000000 ON
CIO 000001 ON
Subroutines
Program end
Main program
Order of execution
Summary of Contents for SYSMAC CS1D-CPU**
Page 3: ...iv...
Page 29: ...xxx...
Page 185: ...146 List of Instructions by Function Code Section 2 4...
Page 1389: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2...
Page 1390: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits...
Page 1391: ...1352 ASCII Code Table Appendix A...