Flow-control structures: Difference between revisions

Content added Content deleted
m (added a ;Related tasks: (bold) header.)
(Added SSEM)
Line 2,362: Line 2,362:


}</lang>
}</lang>

=={{header|SSEM}}==
=== Indirect absolute jump ===
The <tt>000 n to CI</tt> instruction loads the value stored at address <i>n</i> into the Current Instruction register. For instance,
<lang ssem>00101000000000000000000000000000 20 to CI
...
01010000000000000000000000000000 20. 10</lang>
loads the number 10 into CI. Since CI is incremented <i>after</i> the instruction has been executed, rather than before, this fragment will cause execution to jump to address 11.

=== Indirect relative jump ===
<tt>100 Add n to CI</tt> increases the number in the CI register by the value stored at address <i>n</i>.
<lang ssem>00101000000001000000000000000000 Add 20 to CI
...
01010000000000000000000000000000 20. 10</lang>
adds 10 to CI. Once again, CI is incremented <i>after</i> the instruction has been executed: so the machine actually jumps ahead by 11 instructions.


=={{header|Tcl}}==
=={{header|Tcl}}==