SPLat Logo

BranchR

NOTICE: SPLat Controls has moved. We are now at 1/85 Brunel Rd, Seaford, 3198. map

BranchR

PC = [PC + 1 + R]

The BranchR instruction allows an "n-way" branch on the contents of the R register. A BranchR instruction must always be followed by a list of one or more program labels used as arguments in Target instructions.

The BranchR instruction may have up to 127 Targets following it. SPLat/PC will report an error if a BranchR is executed with an R value too large for the number of Target labels provided. (The condition can only be detected by running or stepping the program within SPLat/PC, and not during translation).

BranchR allows for easy testing of the outcomes of several floating point instructions and the CompareR instruction.

Dialect restriction: This instruction is implemented only in dialects 6 or later.

See also Branch BranchM Target CompareR

When using BranchR and Target take extra care. If the offset in R points to a line past the end of the Target list, there is no guarantee of what will happen during standalone operation in a SPLat board. This could lead to mysterious problems at run-time.The simulated stepping and running within SPLat/PC will pick up such problems