In these formats Rl specifies the address of a gen
eral register. InBRANCH ON CONDITION a mask field
( M1) identifies the bit values of the condition code.
The branch address is defined differently for the three
formats.
In the RR format, the R2field specifies the address of
a general register containing the branch address, ex
cept when R2 is zero, which indicates no branching.
The same register may be specified by Rl and R2.
In the RX format, the contents of the general reg
isters specified by the X2 and B2 fields are added to
the content of the D2field to form the branch address.
In theRS format, the content of the general register
specified by the B2field is added to the content of the
D2field to form the branch address. The Rg field in
this format specifies the location of the second operand
and implies the location of the third operand. Thefirst operand is specified by the Rl field. The third operand
location is always odd. If theRg field specifies an even
register, the third operand is obtained from the next
higher addressed register. If theRg field specifies an
odd register, the third operand location coincides with
the second operand location.
A zero in a B2 or X2field indicates the absence of
the corresponding address component.
An instruction can specify the same general register
for both address modification and operand location.
The order in which the contents of the general reg
isters are used for the different parts of an operation
is:
1. Address computation.
2. Arithmetic or link information storage.
3. Replacement of the instruction address by the
branch address obtained under step 1.
Results are placed in the general register specified
by R1. Except for the storing of thefinal results, the
contents of all general registers and storage locations
participating in the addressing or execution part of an
operation remain unchanged.
Programming Note
In several instructions the branch address may be
specified in two ways: in the RX format, the branch
address is the address specified by X2, B2, and D2, in
the RR format, the branch address is the contents of
the register specified by R2. Note that the relation of
the two formats in branch-address specification is not
the same as in operand-address specification. For op
erands, the address specified by X2, B2, and D2 is the
operand address, butthe register specified by R2 con
tains the operand itself.
Branching Instructions
The branching instructions and their mnemonics, for
mats, and operation codes follow. The table also shows
which instructions are notpart of the small binary in
struction set and the exceptions that cause a program
interruption. The subject instruction ofEXECUTE fol
lows its own rules for interruptions. The condition
code is never changed for branching instructions.
NAME
Branch on
Condition
Branch on
Condition
Branch and Link
Branch and Link
Branch onCount Branch on Count Branch on Index
High
Branch on Index
Low or Equal
ExecuteNOTES MNEMONIC TYPE EXCEPTIONS CODE BCR RR 07 BC RX 47
BALR RR05 BAL RX 45 BCTR RR 06 BCT RX 46
BXHRS 86
BXLERS 87
EX RXA,S, EX 44
A Addressing exception
EX Execute exceptionS Specification exception
BranchOn Condition BCR RR I 07 78 1112 15
BC RX
47
7 8 11 12 15 16 1920 31
The updated instruction address is replaced by the
branch address if the state of the condition code is as
specified by M
1
; otherwise, normal instruction se
quencing proceeds with the updated instruction ad
dress.
The Mlfield is used as a four-bit mask. The four bits
of the mask correspond, left to right, with the four
condition codes(0, 1, 2, and 3) as follows: CONDITION CODE o
1
2
3INSTRUCTION BIT
8
910 11
The branch is successful whenever the condition
code has a corresponding mask bit of one.
Condition Code: The code remains unchanged.
Program Interruptions: None.
Branching 63
eral register. In
( M1) identifies the bit values of the condition code.
The branch address is defined differently for the three
formats.
In the RR format, the R2
a general register containing the branch address, ex
cept when R2 is zero, which indicates no branching.
The same register may be specified by Rl and R2.
In the RX format, the contents of the general reg
isters specified by the X2 and B2 fields are added to
the content of the D2
In the
specified by the B2
D2
this format specifies the location of the second operand
and implies the location of the third operand. The
location is always odd. If the
register, the third operand is obtained from the next
higher addressed register. If the
odd register, the third operand location coincides with
the second operand location.
A zero in a B2 or X2
the corresponding address component.
An instruction can specify the same general register
for both address modification and operand location.
The order in which the contents of the general reg
isters are used for the different parts of an operation
is:
1. Address computation.
2. Arithmetic or link information storage.
3. Replacement of the instruction address by the
branch address obtained under step 1.
Results are placed in the general register specified
by R1. Except for the storing of the
contents of all general registers and storage locations
participating in the addressing or execution part of an
operation remain unchanged.
Programming Note
In several instructions the branch address may be
specified in two ways: in the RX format, the branch
address is the address specified by X2, B2, and D2, in
the RR format, the branch address is the contents of
the register specified by R2. Note that the relation of
the two formats in branch-address specification is not
the same as in operand-address specification. For op
erands, the address specified by X2, B2, and D2 is the
operand address, but
tains the operand itself.
Branching Instructions
The branching instructions and their mnemonics, for
mats, and operation codes follow. The table also shows
which instructions are not
struction set and the exceptions that cause a program
interruption. The subject instruction of
lows its own rules for interruptions. The condition
code is never changed for branching instructions.
NAME
Branch on
Condition
Branch on
Condition
Branch and Link
Branch and Link
Branch on
High
Branch on Index
Low or Equal
Execute
BALR RR
BXH
BXLE
EX RX
A Addressing exception
EX Execute exception
Branch
BC RX
47
7 8 11 12 15 16 19
The updated instruction address is replaced by the
branch address if the state of the condition code is as
specified by M
1
; otherwise, normal instruction se
quencing proceeds with the updated instruction ad
dress.
The Ml
of the mask correspond, left to right, with the four
condition codes
1
2
3
8
9
The branch is successful whenever the condition
code has a corresponding mask bit of one.
Condition Code: The code remains unchanged.
Program Interruptions: None.
Branching 63