Switched Branches

There are several ways for programs to change their paths of execution, what would now be done by setting and testing boolean or logical variables.

Word marks as flags

Word marks can be set or cleared with four-character instructions, and tested with an eight-character instruction.
       sw   flag       turn on the branch
       cw   flag       turn off the branch
       bw   xyz,flag   branch to xyz if flag has a word mark
flag   dcw  #1

Characters as flags

Characters can be used as flags, but this is somewhat less efficient than using word marks, since seven-character instructions are needed to change them, and a value to put into them has to be stored somewhere. An advantage is that they can have more than two values.
       mcw  @x@,flag     turn on the branch
       mcw  @y@,flag     turn off the branch, maybe turn a different one on
       mcw  @z@,flag     turn off the branch, maybe turn a different one on
       bce  xyz,flag,x   branch to xyz if flag is x
flag   dcw  #1

Modify the OP code

The op code can be changed between branch and NOP
       mcw  branch,switch  turn on the branch
       mcw  nop,switch     turn off the branch
switch b    xyz            branch if the OP code is not NOP
The values to set into the OP code can be ordinary literal values, or OP codes of instructions that don't change. A program always has branches for other purposes. NOP is less commonly needed.

Switch branch with word marks

This is the most efficient method. Branches can be switched by setting and clearing word marks, either at the OP code of the D-modifier.

Initially on branch

An initially on branch is implemented by a NOP followed by a branch. The branch is switched by setting or clearing the word mark under its OP code.
       nop
switch b    xyz     branch if switch has a word mark, else part of NOP
       cw   switch  turn off the branch
       sw   switch  turn it back on

Initially off branch

An initially off branch is implemented as a branch-on-indicator using an indicator that is never set by the processor, such as a group mark. The branch is switched by setting or clearing the word mark under the D-modifier.
switch  bin  xyz,}     branch if D-modifier has a word mark
        cw   switch&4  turn off the branch
        sw   switch&4  turn on the branch