HLASM Language Reference
HLASM Language Reference HLASM Language Reference
Operand Entries Format │ Coded or Symbolic │ Object Code │ Representation of │ Representation │ Explicit Address │ of Addresses ───────┼───────────────────┼────────────────────────────────────────────────────────────────────────────── │ │ │ │ │8 bits │4 │4 │4 │12 bits │4 │12 bits │ │ │ │Operation │bits │bits │bits │Displacement │bits │Displacement │ │ │ │Code │ │ │Base │ │ │ │ │ │ │ │ │ │Reg. │ │ │ │ │ │ ├───────────┼─────┼─────┼─────┼─────────────────┼─────┼─────────────────┤ │ │ │ │ │ │ ▌2▐ │ ▌1▐ │ │ │ │ │ │ │ │ │ ▼ │ ▼ │ │ │ │ │ ├ ─ ─ ─ ─ ─ ┼ ─ ─ ┼ ─ ─ ┼─────┼─────────────────┤ │ │ RS │ D(B) │ │OP CODE │ R │ R │ B │ D │ │ │ │ │ ├ ─ ─ ─ ─ ─ ┴ ─ ─ ┴ ─ ─ ┴─────┴─────────────────┤ │ │ │ │ │ ┌──▌3▐ (Index Register) │ │ │ │ │ │ ▼ │ │ │ │ │ ├ ─ ─ ─ ─ ─ ┬ ─ ─ ┬ ─ ─ ┬─────┬─────────────────┤ │ │ RX │ D(X,B) │ │OP CODE │ R │ X │ B │ D │ │ │ │ │ ├ ─ ─ ─ ─ ─ ┴ ─ ─ ┴ ─ ─ ┴─────┴─────────────────┤ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├ ─ ─ ─ ─ ─ ┬ ─ ─ ─ ─ ─ ┬─────┬─────────────────┤ │ │ SI │ D(B) │ │OP CODE │ I │ B │ D │ │ │ │ │ ├ ─ ─ ─ ─ ─ ┴ ─ ─ ─ ─ ─ ┴─────┴─────────────────┤ │ │ │ │ │ │ ▌2▐ │ ▌1▐ │ │ │ │ │ ▼ │ ▼ │ │ │ ├ ─ ─ ─ ─ ─ ┬ ─ ─ ─ ─ ─ ┬─────┬─────────────────┼─────┼─────────────────┤ SS │ D(,B),D(B) │ │OP CODE │ L │ B │ D │ B │ D │ │ │ ├ ─ ─ ─ ─ ─ ┴ ─ ─ ─ ─ ─ ┴─────┴─────────────────┴─────┴─────────────────┤ I represents an immediate value L represents a length B, R and R represent registers Figure 23. Format of Addresses in Object Code Lengths You can specify the length field in an SS-format instruction. This lets you indicate explicitly the number of bytes of data at a virtual storage location that is to be used by the instruction. However, you can omit the length specification, because the assembler computes the number of bytes of data to be used from the expression that represents the address of the data. See page 97 for more information about SS-format instructions. Implicit Length: When a length subfield is omitted from an SS-format machine instruction, an implicit length is assembled into the object code of the instruction. The implicit length is either of the following: For an implicit address, it is the length attribute of the first or only term in the expression representing the implicit address. For an explicit address, it is the length attribute of the first or only term in the expression representing the displacement. Explicit Length: When a length subfield is specified in an SS-format machine instruction, the explicit length always overrides the implicit length. An implicit or explicit length is the effective length. The length value assembled is 90 HLASM V1R5 Language Reference
Examples of Coded Machine Instructions always one less than the effective length. If you want an assembled length value of 0, an explicit length of 0 or 1 can be specified. In the SS-format instructions requiring one length value, the allowable range for explicit lengths is 0 through 256. In the SS-format instructions requiring two length values, the allowable range for explicit lengths is 0 through 16. Immediate Data In addition to registers, numeric values, relative addresses, and lengths, some machine instruction operands require immediate data. Such data is assembled directly into the object code of the machine instructions. Use immediate data to specify the bit patterns for masks or other absolute values you need. Specify immediate data only where it is required. Do not confuse it with address references to constants and areas, or with any literals you specify as the operands of machine instructions. Immediate data must be specified as absolute expressions whose range of values depends on the machine instruction for which the data is required. The immediate data is assembled into its binary representation. Examples of Coded Machine Instructions The examples that follow are grouped according to machine instruction format, and the groups are shown in order of the instruction length. They show the various ways in which you can code the operands of machine instructions. Both symbolic and numeric representation of fields and subfields are shown in the examples. Therefore, assume that all symbols used are defined elsewhere in the same source module. The object code assembled from at least one coded statement per group is also included. A complete summary of machine instruction formats with the coded assembler language variants can be found in the applicable Principles of Operation manual. The examples that follow show the various instruction formats, and are not meant to show how the machine instructions should be used. RI Format The operand fields of RI-format instructions designate a register and an immediate operand, with the following exception: In BRC branching instructions, a 4-bit branching mask with a value between 0 and 15 inclusive replaces the register designation. Symbols used to represent registers (such as REG1 in the example) are assumed to be equated to absolute values between 0 and 15. The 16-bit immediate operand has two different interpretations, depending on whether the instruction is a branching instruction or not. There are two types of non-branching RI-format instructions. Chapter 4. Machine Instruction Statements 91
- Page 60 and 61: Terms, Literals, and Expressions Th
- Page 62 and 63: Terms, Literals, and Expressions 1.
- 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 112 and 113: Examples of Coded Machine Instructi
- Page 114 and 115: 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
Examples of Coded Machine Instructions<br />
always one less than the effective length. If you want an assembled length value<br />
of 0, an explicit length of 0 or 1 can be specified.<br />
In the SS-format instructions requiring one length value, the allowable range for<br />
explicit lengths is 0 through 256. In the SS-format instructions requiring two length<br />
values, the allowable range for explicit lengths is 0 through 16.<br />
Immediate Data<br />
In addition to registers, numeric values, relative addresses, and lengths, some<br />
machine instruction operands require immediate data. Such data is assembled<br />
directly into the object code of the machine instructions. Use immediate data to<br />
specify the bit patterns for masks or other absolute values you need.<br />
Specify immediate data only where it is required. Do not confuse it with address<br />
references to constants and areas, or with any literals you specify as the operands<br />
of machine instructions.<br />
Immediate data must be specified as absolute expressions whose range of values<br />
depends on the machine instruction for which the data is required. The immediate<br />
data is assembled into its binary representation.<br />
Examples of Coded Machine Instructions<br />
The examples that follow are grouped according to machine instruction format, and<br />
the groups are shown in order of the instruction length. They show the various<br />
ways in which you can code the operands of machine instructions. Both symbolic<br />
and numeric representation of fields and subfields are shown in the examples.<br />
Therefore, assume that all symbols used are defined elsewhere in the same source<br />
module.<br />
The object code assembled from at least one coded statement per group is also<br />
included. A complete summary of machine instruction formats with the coded<br />
assembler language variants can be found in the applicable Principles of Operation<br />
manual.<br />
The examples that follow show the various instruction formats, and are not meant<br />
to show how the machine instructions should be used.<br />
RI Format<br />
The operand fields of RI-format instructions designate a register and an immediate<br />
operand, with the following exception:<br />
In BRC branching instructions, a 4-bit branching mask with a value between 0<br />
and 15 inclusive replaces the register designation.<br />
Symbols used to represent registers (such as REG1 in the example) are assumed<br />
to be equated to absolute values between 0 and 15. The 16-bit immediate operand<br />
has two different interpretations, depending on whether the instruction is a<br />
branching instruction or not.<br />
There are two types of non-branching RI-format instructions.<br />
Chapter 4. Machine Instruction Statements 91