HLASM Language Reference
HLASM Language Reference HLASM Language Reference
Terms, Literals, and Expressions For C-type character self-defining terms, each character in the character sequence is assembled as its 8-bit code equivalent (see Appendix D, “Standard Character Set Code Table” on page 421). The two single quotation marks or ampersands that must be used to represent a single quotation mark or ampersand within the character sequence are assembled as a single quotation mark or ampersand. Double-byte data may appear in a character self-defining term, if the DBCS assembler option is specified. The assembled value includes the SO and SI delimiters. Hence a character self-defining term containing double-byte data is limited to one double-byte character delimited by SO and SI. For example, C''. Since the SO and SI are stored, the null double-byte character string, C'', is also a valid character self-defining term. Note: The assembler will not support character self-defining terms of the form CU'x' because self-defining terms are required by definition of the Assembler Language to have fixed values. Graphic Self-Defining Term: If the DBCS assembler option is specified, a graphic self-defining term can be specified. A graphic self-defining term consists of 1 or 2 double-byte characters delimited by SO and SI, enclosed in single quotation marks and preceded by the letter G. Any valid double-byte characters may be used. Examples of graphic self-defining terms are: G'' G'' G'' G'' The SO and SI are not represented in the assembled value of the self-defining term, hence the assembled value is pure double-byte data. A redundant SI/SO pair can be present between two double-byte characters, as shown in the last of the above examples. However, if SO and SI are used without an intervening double-byte character, this error is issued: ASMA148E Self-defining term lacks ending quote or has bad character Location Counter The assembler maintains a location counter to assign storage addresses to your | program statements. It is the assembler's equivalent of the execution-time instruction counter in the computer. You can refer to the current value of the | location counter at any place in a source module by specifying an asterisk () as a term in an operand. As the instructions and constants of a source module are being assembled, the location counter has a value that indicates a location in the program. The assembler increments the location counter according to the following: 1. After an instruction or constant has been assembled, the location counter indicates the next available location. 2. Before assembling the current instruction or constant, the assembler checks the boundary alignment required for it and adjusts the location counter, if necessary, to the correct boundary. 3. While the instruction or constant is being assembled, the location counter value does not change. It indicates the location of the current data after boundary 36 HLASM V1R5 Language Reference
Terms, Literals, and Expressions alignment and is the value assigned to the symbol, if present, in the name field of the statement. 4. After assembling the instruction or constant, the assembler increments the location counter by the length of the assembled data to indicate the next available location. These rules are shown below: Location in Source Hexadecimal Statements 4 DONE DC CL3'ABC' 7 BEFORE EQU 8 DURING DC F'2' C AFTER EQU 1 NEXT DS D You can specify multiple location counters for each control section in a source module; for more details about the location counter setting in control sections, see “Location Counter Setting” on page 61. Maximum Location Counter Value: The assembler carries internal location | counter values as 4-byte (31-bit unsigned) values. When you specify the NOGOFF assembler option, the assembler uses only the low-order 3 bytes for the location | counter, and prints only the low-order 3 bytes in the assembly source and object | code listing if the LIST(121) option is active. All four bytes are displayed if the | LIST(133) option is active. In this case the maximum valid location counter value is 2 24 −1. | When you specify the GOFF assembler option, the assembler requires | the LIST(133) option, and uses the entire 4-byte value for the location counter and prints the 4-byte value in the assembly listings. In this case the maximum valid location counter value is 2 31 −1. If the location counter exceeds its valid maximum value the assembler issues error message ASMA39S Location counter error Controlling the Location Counter Value: You can control the setting of the location counter in a particular control section by using the START or ORG instruction, described in Chapter 3, “Program Structures and Addressing” and Chapter 5, “Assembler Instruction Statements,” respectively. The counter affected by either of these assembler instructions is the counter for the control section in which they appear. Location Counter Reference: You can refer to the current value of the location counter at any place in a program by using an asterisk as a term in an operand. The asterisk is a relocatable term, specified according to the following rules: The asterisk can be specified only in the operands of: – Machine instructions – DC and DS instructions – EQU, ORG, and USING instructions Chapter 2. Coding and Structure 37
- Page 6 and 7: Contents Source Module . . . . . .
- Page 8 and 9: Contents Ordinary USING Instruction
- Page 10 and 11: Contents Sublists in Operands . . .
- Page 12 and 13: About this Manual This manual descr
- Page 14 and 15: IBM High Level Assembler for MVS &
- Page 16 and 17: | The Internet. You can access IBM
- Page 18 and 19: ▌C▐ The item referred to by ▌
- Page 20 and 21: Miscellany The ASCII translation t
- Page 22 and 23: Part 1. Assembler Language—Struct
- Page 24 and 25: Language Compatibility Language Com
- Page 26 and 27: Assembler Program Assembler Program
- Page 28 and 29: Relationship of Assembler to Operat
- Page 30 and 31: Coding Made Easier Linkage between
- Page 32 and 33: Character Set Compatibility with Ea
- Page 34 and 35: Assembler Language Coding Conventio
- Page 36 and 37: Assembler Language Coding Conventio
- Page 38 and 39: Assembler Language Coding Conventio
- Page 40 and 41: Assembler Language Coding Conventio
- Page 42 and 43: Assembler Language Structure Condit
- Page 44 and 45: Assembler Language Structure Machin
- Page 46 and 47: Assembler Language Structure Condit
- Page 48 and 49: Terms, Literals, and Expressions Te
- Page 50 and 51: Terms, Literals, and Expressions -
- Page 52 and 53: Terms, Literals, and Expressions As
- Page 54 and 55: Terms, Literals, and Expressions Se
- Page 58 and 59: Terms, Literals, and Expressions I
- 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
Terms, Literals, and Expressions<br />
For C-type character self-defining terms, each character in the character sequence<br />
is assembled as its 8-bit code equivalent (see Appendix D, “Standard Character<br />
Set Code Table” on page 421). The two single quotation marks or ampersands<br />
that must be used to represent a single quotation mark or ampersand within the<br />
character sequence are assembled as a single quotation mark or ampersand.<br />
Double-byte data may appear in a character self-defining term, if the DBCS<br />
assembler option is specified. The assembled value includes the SO and SI<br />
delimiters. Hence a character self-defining term containing double-byte data is<br />
limited to one double-byte character delimited by SO and SI. For example,<br />
C''.<br />
Since the SO and SI are stored, the null double-byte character string, C'', is also<br />
a valid character self-defining term.<br />
Note: The assembler will not support character self-defining terms of the form<br />
CU'x' because self-defining terms are required by definition of the Assembler<br />
<strong>Language</strong> to have fixed values.<br />
Graphic Self-Defining Term: If the DBCS assembler option is specified, a<br />
graphic self-defining term can be specified. A graphic self-defining term consists of<br />
1 or 2 double-byte characters delimited by SO and SI, enclosed in single quotation<br />
marks and preceded by the letter G. Any valid double-byte characters may be<br />
used. Examples of graphic self-defining terms are:<br />
G''<br />
G''<br />
G''<br />
G''<br />
The SO and SI are not represented in the assembled value of the self-defining<br />
term, hence the assembled value is pure double-byte data. A redundant SI/SO pair<br />
can be present between two double-byte characters, as shown in the last of the<br />
above examples. However, if SO and SI are used without an intervening<br />
double-byte character, this error is issued:<br />
ASMA148E Self-defining term lacks ending quote or has bad character<br />
Location Counter<br />
The assembler maintains a location counter to assign storage addresses to your<br />
| program statements. It is the assembler's equivalent of the execution-time<br />
instruction counter in the computer. You can refer to the current value of the<br />
| location counter at any place in a source module by specifying an asterisk () as a<br />
term in an operand.<br />
As the instructions and constants of a source module are being assembled, the<br />
location counter has a value that indicates a location in the program. The<br />
assembler increments the location counter according to the following:<br />
1. After an instruction or constant has been assembled, the location counter<br />
indicates the next available location.<br />
2. Before assembling the current instruction or constant, the assembler checks the<br />
boundary alignment required for it and adjusts the location counter, if<br />
necessary, to the correct boundary.<br />
3. While the instruction or constant is being assembled, the location counter value<br />
does not change. It indicates the location of the current data after boundary<br />
36 <strong>HLASM</strong> V1R5 <strong>Language</strong> <strong>Reference</strong>