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

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

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

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

Saved successfully!

Ooh no, something went wrong!