Document revision date: 19 July 1999 | |
Previous | Contents | Index |
Add Compare and Branch
opcode limit.rx, add.rx, index.mx, displ.bw
N|| <--- index LSS 0; | |
Z|| <--- index EQL 0; | |
V|| <--- {integer overflow}; | |
C|| <--- C; |
9D | ACBB | Add Compare and Branch Byte |
3D | ACBW | Add Compare and Branch Word |
F1 | ACBL | Add Compare and Branch Long |
4F | ACBF | Add Compare and Branch F_floating |
4FFD | ACBG | Add Compare and Branch G_floating |
6F | ACBD | Add Compare and Branch D_floating |
6FFD | ACBH | Add Compare and Branch H_floating |
The addend operand is added to the index operand and the index operand is replaced by the result. The index operand is compared with the limit operand. If the addend operand is positive (or zero) and the comparison is less than or equal to zero, or if the addend is negative and the comparison is greater than or equal to zero, the sign-extended branch displacement is added to the program counter (PC), and the PC is replaced by the result.
Add One and Branch Less Than or Equal
opcode limit.rl, index.ml, displ.bb
N|| <--- index LSS 0; | |
Z|| <--- index EQL 0; | |
V|| <--- {integer overflow}; | |
C|| <--- C; |
F3 | AOBLEQ | Add One and Branch Less Than or Equal |
One is added to the index operand, and the index operand is replaced by the result. The index operand is compared with the limit operand. If the comparison is less than or equal to zero, the sign-extended branch displacement is added to the program counter (PC), and the PC is replaced by the result.
Add One and Branch Less Than
opcode limit.rl, index.ml, displ.bb
N|| <--- index LSS 0; | |
Z|| <--- index EQL 0; | |
V|| <--- {integer overflow}; | |
C|| <--- C; |
F2 | AOBLSS | Add One and Branch Less Than |
One is added to the index operand and the index operand is replaced by the result. The index operand is compared with the limit operand. If the comparison result is less than zero, the sign-extended branch displacement is added to the program counter (PC), and the PC is replaced by the result.
Branch on (condition)
opcode displ.bb
N|| <--- N; | |
Z|| <--- Z; | |
V|| <--- V; | |
C|| <--- C; |
14 | {N OR Z} EQL 0 | BGTR | Branch on Greater Than (signed) |
15 | {N OR Z} EQL 1 | BLEQ | Branch on Less Than or Equal (signed) |
12 | Z EQL 0 | BNEQ, | Branch on Not Equal (signed) |
BNEQU | Branch on Not Equal Unsigned | ||
13 | Z EQL 1 | BEQL, | Branch on Equal (signed) |
BEQLU | Branch on Equal Unsigned | ||
18 | N EQL 0 | BGEQ | Branch on Greater Than or Equal (signed) |
19 | N EQL 1 | BLSS | Branch on Less Than (signed) |
1A | {C OR Z} EQL 0 | BGTRU | Branch on Greater Than Unsigned |
1B | {C OR Z} EQL 1 | BLEQU | Branch Less Than or Equal Unsigned |
1C | V EQL 0 | BVC | Branch on Overflow Clear |
1D | V EQL 1 | BVS | Branch on Overflow Set |
1E | C EQL 0 | BGEQU, | Branch on Greater Than or Equal Unsigned |
BCC | Branch on Carry Clear | ||
1F | C EQL 1 | BLSSU, | Branch on Less Than Unsigned |
BCS | Branch on Carry Set |
The condition codes are tested. If the condition indicated by the instruction is met, the sign-extended branch displacement is added to the program counter (PC), and the PC is replaced by the result.
The VAX conditional branch instructions permit considerable flexibility in branching but require care in choosing the correct branch instruction. The conditional branch instructions are best seen as three overlapping groups:
BVS | V EQL 1 |
BVC | V EQL 0 |
BCS | C EQL 1 |
BCC | C EQL 0 |
BLSSU | C EQL 1 |
BLEQU | {C OR Z} EQL 1 |
BEQLU | Z EQL 1 |
BNEQU | Z EQL 0 |
BGEQU | C EQL 0 |
BGTRU | {C OR Z} EQL 0 |
BLSS | N EQL 1 |
BLEQ | {N OR Z} EQL 1 |
BEQL | Z EQL 1 |
BNEQ | Z EQL 0 |
BGEQ | N EQL 0 |
BGTR | {N OR Z} EQL 0 |
Branch on Bit
opcode pos.rl, base.vb, displ.bb
N|| <--- N; | |
Z|| <--- Z; | |
V|| <--- V; | |
C|| <--- C; |
E0 | BBS | Branch on Bit Set |
E1 | BBC | Branch on Bit Clear |
The single bit field specified by the position and base operands is tested. If it is in the test state indicated by the instruction, the sign-extended branch displacement is added to the program counter (PC), and the PC is replaced by the result.
Branch on Bit (and modify without interlock)
opcode pos.rl, base.vb, displ.bb
N|| <--- N; | |
Z|| <--- Z; | |
V|| <--- V; | |
C|| <--- C; |
E2 | BBSS | Branch on Bit Set and Set |
E3 | BBCS | Branch on Bit Clear and Set |
E4 | BBSC | Branch on Bit Set and Clear |
E5 | BBCC | Branch on Bit Clear and Clear |
The single bit field specified by the position and base operands is tested. If it is in the test state indicated by the instruction, the sign-extended branch displacement is added to the program counter (PC), and the PC is replaced by the result. Regardless of whether the branch is taken or not, the tested bit is put in the new state as indicated by the instruction.
Branch on Bit Interlocked
opcode pos.rl, base.vb, displ.bb
N|| <--- N; | |
Z|| <--- Z; | |
V|| <--- V; | |
C|| <--- C; |
E6 | BBSSI | Branch on Bit Set and Set Interlocked |
E7 | BBCCI | Branch on Bit Clear and Clear Interlocked |
The single bit field specified by the position and base operands is tested. If it is in the test state indicated by the instruction, the sign-extended branch displacement is added to the program counter (PC), and the PC is replaced by the result. Regardless of whether the branch is taken, the tested bit is put in the new state as indicated by the instruction. If the bit is contained in memory, the reading of the state of the bit and the setting of the bit to the new state is an interlocked operation. No other processor or I/O device can do an interlocked access on this bit during the interlocked operation.
1$: BBSSI bit,base,1$ |
Branch on Low Bit
opcode src.rl, displ.bb
N|| <--- N; | |
Z|| <--- Z; | |
V|| <--- V; | |
C|| <--- C; |
E8 | BLBS | Branch on Low Bit Set |
E9 | BLBC | Branch on Low Bit Clear |
The low bit (bit 0) of the source operand is tested. If it is equal to the test state indicated by the instruction, the sign-extended branch displacement is added to the program counter (PC), and the PC is replaced by the result.
Branch
opcode displ.bx
N|| <--- N; | |
Z|| <--- Z; | |
V|| <--- V; | |
C|| <--- C; |
11 | BRB | Branch with Byte Displacement |
31 | BRW | Branch with Word Displacement |
The sign-extended branch displacement is added to the program counter (PC), and the PC is replaced by the result.
Branch to Subroutine
opcode displ.bx
N|| <--- N; | |
Z|| <--- Z; | |
V|| <--- V; | |
C|| <--- C; |
10 | BSBB | Branch to Subroutine with Byte Displacement |
30 | BSBW | Branch to Subroutine with Word Displacement |
The program counter (PC) is pushed on the stack as a longword. The sign-extended branch displacement is added to the PC, and the PC is replaced by the result.
Previous | Next | Contents | Index |
privacy and legal statement | ||
4515PRO_019.HTML |