HLASM Language Reference
HLASM Language Reference HLASM Language Reference
Examples of Coded Machine Instructions where: 18 is the operation code 1 is register R 2 is register R RS Format The operand fields of RS-format instructions designate two registers, and a virtual storage address (coded as an implicit address or an explicit address). ┌────────┬────┬────┬────┬────────────┐ │Op Code │ R │ R │ B │ D │ └────────┴────┴────┴────┴────────────┘ 8 12 16 2 31 In the Insert Characters under Mask (ICM) and the Store Characters under Mask (STCM) instructions, a 4-bit mask (see X'E' and MASK in the instructions labeled DELTA1 and DELTA2 below), with a value between 0 and 15, replaces the second register specifications. ┌────────┬────┬────┬────┬────────────┐ │Op Code │ R │ M │ B │ D │ └────────┴────┴────┴────┴────────────┘ 8 12 16 2 31 Symbols used to represent registers (see REG4, REG6, and BASE in the instruction labeled ALPHA2 below) are assumed to be equated to absolute values between 0 and 15. Symbols used to represent implicit addresses (see AREA and IMPLICIT in the instructions labeled BETA1 and DELTA2 below) can be either relocatable or absolute. Symbols used to represent displacements (see DISPL in the instruction labeled BETA2 below) in explicit addresses are assumed to be equated to absolute values between 0 and 4095. Examples: ALPHA1 LM 4,6,2(12) ALPHA2 LM REG4,REG6,2(BASE) BETA1 STM 4,6,AREA BETA2 STM 4,6,DISPL(BASE) GAMMA1 SLL 2,15 DELTA1 ICM 3,X'E',124(1) DELTA2 ICM REG3,MASK,IMPLICIT When assembled, the object code for the instruction labeled ALPHA1, in hexadecimal, is: 9846C14 where: 98 is the operation code 4 is register R 6 is register R C is base register B 14 is displacement D from base register B 94 HLASM V1R5 Language Reference
Examples of Coded Machine Instructions When assembled, the object code for the instruction labeled DELTA1, in hexadecimal, is: BF3EA4 where: BF is the operation code 3 is register R E is mask M A is base register B 4 is displacement D from base register B RSI Format The operand fields of RSI-format instructions designate two registers and a 16-bit immediate operand. ┌────────┬────┬────┬─────────────────┐ │Op Code │ R │ R │ I │ └────────┴────┴────┴─────────────────┘ 8 12 16 31 Symbols used to represent registers (See REG1 below) are assumed to be equated to absolute values between 0 and 15. The immediate value is treated as a signed binary integer representing the number of halfwords to branch relative to the current location. The branch target may be specified as a label in which case the assembler calculates the immediate value and performs some checking of the value. The branch target may also be specified as an absolute value in which case the assembler issues a warning before it assembles the instruction. Examples: ALPHA1 BRXH REG1,REG3,BETA1 BETA1 BRXLE 1,2,ALPHA1 When assembled, the object code for the instruction labeled ALPHA1, in hexadecimal, is 84132 where: 84 is the operation code 1 is register REG1 3 is register REG3 2 is the immediate data I2 RX Format The operand fields of RX-format instructions designate one or two registers, including an index register, and a virtual storage address (coded as an implicit address or an explicit address), with the following exception: In BC branching instructions, a 4-bit branching mask (see 7 and TEN in the instructions labeled LAMBDAn below) with a value between 0 and 15, replaces the first register specification. Chapter 4. Machine Instruction Statements 95
- Page 64 and 65: Terms, Literals, and Expressions
- Page 66 and 67: Terms, Literals, and Expressions
- Page 68 and 69: Terms, Literals, and Expressions Th
- Page 70 and 71: | Chapter 3. Program Structures and
- Page 72 and 73: Source Module A source module is co
- Page 74 and 75: The CSECT instruction can be used a
- Page 76 and 77: | in linker control statements for
- Page 78 and 79: This is not only convenient, but it
- Page 80 and 81: | SECT_A CSECT , Define section SEC
- Page 82 and 83: | For executable sections, the loca
- Page 84 and 85: Addressing | The System/390® and z
- Page 86 and 87: Addressing | Parts must always be r
- Page 88 and 89: Addressing Literal Pools ALPHA LR 3
- Page 90 and 91: Addressing If the symbol is the nam
- Page 92 and 93: Addressing External Symbol Dictiona
- Page 94 and 95: Addressing 74 HLASM V1R5 Language R
- Page 96 and 97: Part 2. Machine and Assembler Instr
- Page 98 and 99: General Instructions Chapter 4. Mac
- Page 100 and 101: Input/Output Operations For further
- Page 102 and 103: Branching with Extended Mnemonic Co
- Page 104 and 105: Symbolic Operation Codes variations
- Page 106 and 107: Operand Entries Registers You can s
- Page 108 and 109: Operand Entries “Program Structur
- Page 110 and 111: Operand Entries Format │ Coded or
- Page 112 and 113: Examples of Coded Machine Instructi
- Page 116 and 117: Examples of Coded Machine Instructi
- Page 118 and 119: Examples of Coded Machine Instructi
- Page 120 and 121: Chapter 5. Assembler Instruction St
- Page 122 and 123: *PROCESS Statement *PROCESS Stateme
- Page 124 and 125: ACONTROL Instruction ►►──
- Page 126 and 127: ACONTROL Instruction FLAG(PAGE0) in
- Page 128 and 129: AINSERT Instruction character_strin
- Page 130 and 131: AMODE Instruction alias_string is t
- Page 132 and 133: CATTR Instruction Figure 25. AMODE/
- Page 134 and 135: CATTR Instruction | statements for
- Page 136 and 137: CCW1 Instruction data_count is an a
- Page 138 and 139: CEJECT Instruction If symbol is an
- Page 140 and 141: CNOP Instruction Figure 29 (Page 2
- Page 142 and 143: COPY Instruction In the following e
- Page 144 and 145: CSECT Instruction symbol in the nam
- Page 146 and 147: DC Instruction ROUTINE B GAMMA DXD
- Page 148 and 149: DC Instruction duplication_factor c
- Page 150 and 151: DC Instruction Figure 33 (Page 2 of
- Page 152 and 153: DC Instruction With EBCDIC spaces
- Page 154 and 155: DC Instruction Further information
- Page 156 and 157: DC Instruction | Symbols used in su
- Page 158 and 159: DC Instruction The length attribute
- Page 160 and 161: DC Instruction Notes: 1. Don't conf
- Page 162 and 163: DC Instruction—Character Constant
Examples of Coded Machine Instructions<br />
When assembled, the object code for the instruction labeled DELTA1, in<br />
hexadecimal, is:<br />
BF3EA4<br />
where:<br />
BF is the operation code<br />
3 is register R<br />
E is mask M<br />
A is base register B<br />
4 is displacement D from base register B<br />
RSI Format<br />
The operand fields of RSI-format instructions designate two registers and a 16-bit<br />
immediate operand.<br />
┌────────┬────┬────┬─────────────────┐<br />
│Op Code │ R │ R │ I │<br />
└────────┴────┴────┴─────────────────┘<br />
8 12 16 31<br />
Symbols used to represent registers (See REG1 below) are assumed to be<br />
equated to absolute values between 0 and 15.<br />
The immediate value is treated as a signed binary integer representing the number<br />
of halfwords to branch relative to the current location.<br />
The branch target may be specified as a label in which case the assembler<br />
calculates the immediate value and performs some checking of the value.<br />
The branch target may also be specified as an absolute value in which case the<br />
assembler issues a warning before it assembles the instruction.<br />
Examples:<br />
ALPHA1 BRXH REG1,REG3,BETA1<br />
BETA1 BRXLE 1,2,ALPHA1<br />
When assembled, the object code for the instruction labeled ALPHA1, in<br />
hexadecimal, is<br />
84132<br />
where:<br />
84 is the operation code<br />
1 is register REG1<br />
3 is register REG3<br />
2 is the immediate data I2<br />
RX Format<br />
The operand fields of RX-format instructions designate one or two registers,<br />
including an index register, and a virtual storage address (coded as an implicit<br />
address or an explicit address), with the following exception:<br />
In BC branching instructions, a 4-bit branching mask (see 7 and TEN in the<br />
instructions labeled LAMBDAn below) with a value between 0 and 15,<br />
replaces the first register specification.<br />
Chapter 4. Machine Instruction Statements 95