HLASM Language Reference
HLASM Language Reference HLASM Language Reference
Language Compatibility Language Compatibility The assembler language supported by High Level Assembler has functional extensions to the languages supported by Assembler H Version 2 and DOS/VSE Assembler. High Level Assembler uses the same language syntax, function, operation, and structure as Assembler H Version 2. Similarly, the functions provided by the Assembler H Version 2 macro facility are all provided by High Level Assembler. Migration from Assembler H Version 2 or DOS/VSE Assembler to High Level Assembler requires an analysis of existing assembler language programs to ensure that they do not contain: Macro instructions with names that conflict with High Level Assembler symbolic operation codes SET symbols with names that conflict with the names of High Level Assembler system variable symbols Dependencies on the type attribute values of certain variable symbols or macro instruction operands With the exception of these possible conflicts, and with the appropriate High Level Assembler option values, source language source programs written for Assembler H Version 2 or DOS/VSE Assembler, that assemble without warning or error diagnostic messages, should assemble correctly using High Level Assembler. An E-Deck refers to a macro source book of type E that can be used as the name of a macro definition to process in a macro instruction. E-Decks are stored in edited format, and High Level Assembler requires that library macros be stored in source statement format. A library input exit can be used to analyze a macro definition, and, in the case of an E-Deck, call the VSE/ESA ESERV program to change, the E-Deck definition, line by line, back into source format required by the assembler, without modifying the original library file. See the section titled Using the High Level Assembler Library Exit for Processing E-Decks in the IBM VSE/ESA Guide to System Functions manual. This section describes how to set up the exit and how to use it. Assembler Language The assembler language is the symbolic programming language that lies closest to the machine language in form and content. You will, therefore, find the assembler language useful when: You need to control your program closely, down to the byte and even the bit level. You must write subroutines for functions that are not provided by other symbolic programming languages, such as COBOL, FORTRAN, or PL/I. The assembler language is made up of statements that represent either instructions or comments. The instruction statements are the working part of the language and are divided into the following three groups: Machine instructions Assembler instructions 4 HLASM V1R5 Language Reference
Assembler Language Macro instructions Machine Instructions A machine instruction is the symbolic representation of a machine language instruction of the following instruction sets: IBM System/370 IBM System/370 Extended Architecture (370-XA) Enterprise Systems Architecture/370 (ESA/370) Enterprise Systems Architecture/390® (ESA/390) | z/Architecture It is called a machine instruction because the assembler translates it into the machine language code that the computer can run. Machine instructions are described in Chapter 4, “Machine Instruction Statements.” Assembler Instructions An assembler instruction is a request to the assembler to do certain operations during the assembly of a source module; for example, defining data constants, reserving storage areas, and defining the end of the source module. Except for the instructions that define constants, and the instruction used to generate no-operation instructions for alignment, the assembler does not translate assembler instructions into object code. The assembler instructions are described in Chapter 3, “Program Structures and Addressing,” Chapter 5, “Assembler Instruction Statements,” and Chapter 9, “How to Write Conditional Assembly Instructions.” Macro Instructions A macro instruction is a request to the assembler program to process a predefined sequence of instructions called a macro definition. From this definition, the assembler generates machine and assembler instructions, which it then processes as if they were part of the original input in the source module. IBM supplies macro definitions for input/output, data management, and supervisor operations that you can call for processing by coding the required macro instruction. (These IBM-supplied macro instructions are described in the applicable Macro Instructions manual.) You can also prepare your own macro definitions, and call them by coding the corresponding macro instructions. Rather than code all of this sequence each time it is needed, you can create a macro instruction to represent the sequence and then, each time the sequence is needed, simply code the macro instruction statement. During assembly, the sequence of instructions represented by the macro instruction is inserted into the source program. A complete description of the macro facility, including the macro definition, the macro instruction, and the conditional assembly language, is given in Part 3, “Macro Language.” Chapter 1. Introduction 5
- Page 1: High Level Assembler for MVS & VM &
- Page 4 and 5: Note! Before using this information
- 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 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 56 and 57: Terms, Literals, and Expressions Fo
- 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
Assembler <strong>Language</strong><br />
Macro instructions<br />
Machine Instructions<br />
A machine instruction is the symbolic representation of a machine language<br />
instruction of the following instruction sets:<br />
IBM System/370<br />
IBM System/370 Extended Architecture (370-XA)<br />
Enterprise Systems Architecture/370 (ESA/370)<br />
Enterprise Systems Architecture/390® (ESA/390)<br />
| z/Architecture<br />
It is called a machine instruction because the assembler translates it into the<br />
machine language code that the computer can run. Machine instructions are<br />
described in Chapter 4, “Machine Instruction Statements.”<br />
Assembler Instructions<br />
An assembler instruction is a request to the assembler to do certain operations<br />
during the assembly of a source module; for example, defining data constants,<br />
reserving storage areas, and defining the end of the source module. Except for the<br />
instructions that define constants, and the instruction used to generate no-operation<br />
instructions for alignment, the assembler does not translate assembler instructions<br />
into object code. The assembler instructions are described in Chapter 3, “Program<br />
Structures and Addressing,” Chapter 5, “Assembler Instruction Statements,” and<br />
Chapter 9, “How to Write Conditional Assembly Instructions.”<br />
Macro Instructions<br />
A macro instruction is a request to the assembler program to process a predefined<br />
sequence of instructions called a macro definition. From this definition, the<br />
assembler generates machine and assembler instructions, which it then processes<br />
as if they were part of the original input in the source module.<br />
IBM supplies macro definitions for input/output, data management, and supervisor<br />
operations that you can call for processing by coding the required macro<br />
instruction. (These IBM-supplied macro instructions are described in the applicable<br />
Macro Instructions manual.)<br />
You can also prepare your own macro definitions, and call them by coding the<br />
corresponding macro instructions. Rather than code all of this sequence each time<br />
it is needed, you can create a macro instruction to represent the sequence and<br />
then, each time the sequence is needed, simply code the macro instruction<br />
statement. During assembly, the sequence of instructions represented by the<br />
macro instruction is inserted into the source program.<br />
A complete description of the macro facility, including the macro definition, the<br />
macro instruction, and the conditional assembly language, is given in Part 3,<br />
“Macro <strong>Language</strong>.”<br />
Chapter 1. Introduction 5