HLASM Language Reference

HLASM Language Reference HLASM Language Reference

faculty.cs.niu.edu
from faculty.cs.niu.edu More from this publisher
22.02.2015 Views

Input/Output Operations For further details, see “Control Instructions” in the applicable Principles of Operation manual. Input/Output Operations Use the input/output instructions (instead of the IBM-supplied system macro instructions) when you want to control your input and output operations more closely. The input or output instructions let you identify the channel or the device on which the input or output operation is to be done. For information about how and when you can use these instructions, see the applicable system manual. For more information, see “Input/Output Operations” in the applicable Principles of Operation manual and the applicable system manuals. Branching with Extended Mnemonic Codes Branch instructions let you specify an extended mnemonic code for the condition on which a branch is to occur. Thus, you avoid having to specify the mask value, that represents the condition code, required by the BC, BCR, and BRC machine instructions. The assembler translates the extended mnemonic code into the mask value, and then assembles it into the object code of the BC, BCR, or BRC machine instruction. | The extended branch mnemonics for the BC instruction require a base register; the | extended mnemonics for the BCR and BRC instructions do not. The extended | mnemonics for the BRC instruction begin with the letter “J,” and are sometimes | called “Jump” instructions, as indicated in Figure 22. The extended mnemonic codes are given in Figure 22 on page 81. They can be used as operation codes for branching instructions, replacing the BC, BCR, and BRC machine instruction codes (see ▌1▐ in Figure 22). Note that the first operand (see ▌2▐ in Figure 22) of the BC, BCR, and BRC instructions must not be present in the operand field (see ▌3▐ in Figure 22) of the extended mnemonic branching instructions. 80 HLASM V1R5 Language Reference

Branching with Extended Mnemonic Codes Extended Code Meaning Format (Symbolic) Machine Instruction Equivalent ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ▌3▐ ▌4▐ ▌1▐ │ ▼ │ ┌────▌2▐ │ ┌───────┐ ▼ ▼ B └─►D(X,B) ┐ Unconditional Branch RX BC 15,D(X,B) BR R ┘ RR BCR 15,R J label Unconditional Jump RI BRC 15,label NOP D(X,B) ┐ No Operation RX BC ,D(X,B) NOPR R │ RR BCR ,R JNOP label ┘ RI BRC ,label Used After Compare Instructions BH D(X,B) ┐ Branch on High RX BC 2,D(X,B) BHR R ┘ RR BCR 2,R JH label Jump on High RI BRC 2,label BL D(X,B) ┐ Branch on Low RX BC 4,D(X,B) BLR R ┘ RR BCR 4,R JL label Jump on Low RI BRC 4,label BE D(X,B) ┐ Branch on Equal RX BC 8,D(X,B) BER R ┘ RR BCR 8,R JE label Jump on Equal RI BRC 8,label BNH D(X,B) ┐ Branch on Not High RX BC 13,D(X,B) BNHR R ┘ RR BCR 13,R JNH label Jump on Not High RI BRC 13,label BNL D(X,B) ┐ Branch on Not Low RX BC 11,D(X,B) BNLR R ┘ RR BCR 11,R JNL label Jump on Not Low RI BRC 11,label BNE D(X,B) ┐ Branch on Not Equal RX BC 7,D(X,B) BNER R ┘ RR BCR 7,R JNE label Jump on Not Equal RI BRC 7,label Used After Arithmetic Instructions BP D(X,B) ┐ Branch on Plus RX BC 2,D(X,B) BPR R ┘ RR BCR 2,R JP label Jump on Plus RI BRC 2,label BM D(X,B) ┐ Branch on Minus RX BC 4,D(X,B) BMR R ┘ RR BCR 4,R JM label Jump on Minus RI BRC 4,label BZ D(X,B) ┐ Branch on Zero RX BC 8,D(X,B) BZR R ┘ RR BCR 8,R JZ label Jump on Zero RI BRC 8,label BO D(X,B) ┐ Branch on Overflow RX BC 1,D(X,B) BOR R ┘ RR BCR 1,R JO label Jump on Overflow RI BRC 1,label BNP D(X,B) ┐ Branch on Not Plus RX BC 13,D(X,B) BNPR R ┘ RR BCR 13,R JNP label Jump on Not Plus RI BRC 13,label BNM D(X,B) ┐ Branch on Not Minus RX BC 11,D(X,B) BNMR R ┘ RR BCR 11,R JNM label Jump on Not Minus RI BRC 11,label BNZ D(X,B) ┐ Branch on Not Zero RX BC 7,D(X,B) BNZR R ┘ RR BCR 7,R JNZ label Jump on Not Minus RI BRC 7,label BNO D(X,B) ┐ Branch on No Overflow RX BC 14,D(X,B) BNOR R ┘ RR BCR 14,R JNO label Jump on No Overflow RI BRC 14,label Figure 22 (Part 1 of 3). Extended Mnemonic Codes Chapter 4. Machine Instruction Statements 81

Branching with Extended Mnemonic Codes<br />

Extended Code Meaning Format (Symbolic) Machine<br />

Instruction Equivalent<br />

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────<br />

▌3▐ ▌4▐ ▌1▐<br />

│ ▼ │ ┌────▌2▐<br />

│ ┌───────┐ ▼ ▼<br />

B └─►D(X,B) ┐ Unconditional Branch RX BC 15,D(X,B)<br />

BR R ┘ RR BCR 15,R<br />

J label Unconditional Jump RI BRC 15,label<br />

NOP D(X,B) ┐ No Operation RX BC ,D(X,B)<br />

NOPR R │ RR BCR ,R<br />

JNOP label ┘ RI BRC ,label<br />

Used After Compare Instructions<br />

BH D(X,B) ┐ Branch on High RX BC 2,D(X,B)<br />

BHR R ┘ RR BCR 2,R<br />

JH label Jump on High RI BRC 2,label<br />

BL D(X,B) ┐ Branch on Low RX BC 4,D(X,B)<br />

BLR R ┘ RR BCR 4,R<br />

JL label Jump on Low RI BRC 4,label<br />

BE D(X,B) ┐ Branch on Equal RX BC 8,D(X,B)<br />

BER R ┘ RR BCR 8,R<br />

JE label Jump on Equal RI BRC 8,label<br />

BNH D(X,B) ┐ Branch on Not High RX BC 13,D(X,B)<br />

BNHR R ┘ RR BCR 13,R<br />

JNH label Jump on Not High RI BRC 13,label<br />

BNL D(X,B) ┐ Branch on Not Low RX BC 11,D(X,B)<br />

BNLR R ┘ RR BCR 11,R<br />

JNL label Jump on Not Low RI BRC 11,label<br />

BNE D(X,B) ┐ Branch on Not Equal RX BC 7,D(X,B)<br />

BNER R ┘ RR BCR 7,R<br />

JNE label Jump on Not Equal RI BRC 7,label<br />

Used After Arithmetic Instructions<br />

BP D(X,B) ┐ Branch on Plus RX BC 2,D(X,B)<br />

BPR R ┘ RR BCR 2,R<br />

JP label Jump on Plus RI BRC 2,label<br />

BM D(X,B) ┐ Branch on Minus RX BC 4,D(X,B)<br />

BMR R ┘ RR BCR 4,R<br />

JM label Jump on Minus RI BRC 4,label<br />

BZ D(X,B) ┐ Branch on Zero RX BC 8,D(X,B)<br />

BZR R ┘ RR BCR 8,R<br />

JZ label Jump on Zero RI BRC 8,label<br />

BO D(X,B) ┐ Branch on Overflow RX BC 1,D(X,B)<br />

BOR R ┘ RR BCR 1,R<br />

JO label Jump on Overflow RI BRC 1,label<br />

BNP D(X,B) ┐ Branch on Not Plus RX BC 13,D(X,B)<br />

BNPR R ┘ RR BCR 13,R<br />

JNP label Jump on Not Plus RI BRC 13,label<br />

BNM D(X,B) ┐ Branch on Not Minus RX BC 11,D(X,B)<br />

BNMR R ┘ RR BCR 11,R<br />

JNM label Jump on Not Minus RI BRC 11,label<br />

BNZ D(X,B) ┐ Branch on Not Zero RX BC 7,D(X,B)<br />

BNZR R ┘ RR BCR 7,R<br />

JNZ label Jump on Not Minus RI BRC 7,label<br />

BNO D(X,B) ┐ Branch on No Overflow RX BC 14,D(X,B)<br />

BNOR R ┘ RR BCR 14,R<br />

JNO label Jump on No Overflow RI BRC 14,label<br />

Figure 22 (Part 1 of 3). Extended Mnemonic Codes<br />

Chapter 4. Machine Instruction Statements 81

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!