![](/images/new-backgrounds/1210176/210176245x1.webp)
7.7 Program Execution Sequence
The instructions execution sequence is shown below.
(1)They are executed in the sequence from block 1 through the final block which contains the END instruction (or IRET in an interrupt program).
(2)They are executed in the sequence from rung 1 through the final rung in a block (or the END instruction).
(3)They are executed according to the following rules in any one rung.
1When there is no vertical connection, they are executed from left to right.
2When there is an OR connection, the OR logic portion is executed first.
3When there is a branch, they are executed in the order from the upper line to the lower line.
4A combination of 2 and 3 above.
| 1 |
| 2 | 3 |
|
|
| 4 | ||||||||
|
|
|
|
| ||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
| 2 | 4 |
| 6 | 7 | |||||||||
|
|
| ||||||||||||||
|
|
| ||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
|
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
| 2 | 3 |
|
|
| 4 | ||||||||
|
|
|
|
| ||||||||||||
|
|
|
|
| ||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||
|
|
|
|
|
|
|
|
|
|
| 5 |
|
|
| 6 | |
|
|
|
|
|
|
|
|
|
|
|
| |||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
| 3 | 4 |
|
|
| 5 | ||||||||
|
|
|
|
| ||||||||||||
|
|
|
|
| ||||||||||||
|
|
|
|
| ||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ||
| 2 |
|
|
|
|
|
|
|
|
| 6 |
|
|
| 8 | |
|
|
|
|
|
|
|
|
|
|
| ||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The instructions execution sequence in which function instructions are included also follows the above rules. How- ever, for program execution control instructions, such as jumps (JCS), loops
Page 115