In the microcode, looping and branching is accomplished with the J, K, U and D commands, along with the P and N commands. At the outermost level in a given block of microcode, the current secondary bit in the left-hand section is in column 4. The U command is used for looping, and the D command is used for branching. The destination row of a jump (caused by the Escape command followed by U or D) is flagged with a one bit in the current column in the left-hand section. In the case of nested loops/if statements, the current column of innermost code blocks is greater than 4.
Simple If Statement
Col 0-3 Col 4-7
1101 - J 0000
0110 - E 0000
0001 - D 0000
… …
XXXX 1000
Loop Statement
XXXX 1000
… …
1100 - X 0000
1101 - J 0000
0110 - E 0000
0000 - U 0000
If-Elseif-Else Statement
1101 - J 0000
0110 - E 0000
0001 - D 0000
… … if block
0011 - N
0110 - E 0000
0001 - D 0000
XXXX 1000
… …
1101 - J 0000
0110 - E 0000
0001 - D 0000
… … elseif block
0011 - N
0110 - E 0000
0001 - D 0000
XXXX 1000
… … else block
1110 - K 0000
0010 - P 0100