HLASM Language Reference
Previous topic |
Next topic
|
Contents
|
Contact z/OS
|
Library
|
PDF
Contents (exploded view)
HLASM Language Reference
SC26-4940-06
Language Reference
Abstract for Language Reference
Introduction
Language compatibility
Assembler language
Machine instructions
Assembler instructions
Macro instructions
Assembler program
Basic functions
Associated data
Controlling the assembly
Processing sequence
Relationship of assembler to operating system
Coding made easier
Symbolic representation of program elements
Variety in data representation
Controlling address assignment
Relocatability
Sectioning a program
Linkage between source modules
Program listings
Multiple source modules
Double-byte character set notation
Coding and structure
Character set
Standard character set
Double-byte character set
Translation table
Assembler language coding conventions
Field boundaries
Statement field
Continuation-indicator field
Identification-sequence field
Continuation lines
Alternative statement format
Continuation of double-byte data
Source input considerations
Examples
Source listing considerations
Blank lines
Comment statement format
Instruction statement format
Statement coding rules
Statement example
Name entry
Operation entry
Operand entries
Remarks entries
Assembler language structure
Overview of assembler language structure
Machine instructions
Assembler instructions
Conditional assembly instructions
Macro instructions
Mnemonic tags
Terms, literals, and expressions
Terms
Terms in parentheses
Symbols
Symbol table
Ordinary symbols
Variable symbols
System variable symbol prefix
Sequence symbols
Symbol definition
Restrictions on symbols
Previously defined symbols
Self-defining terms
Using self-defining terms
Decimal self-defining term
Hexadecimal self-defining term
Binary self-defining term
Character self-defining term
Graphic self-defining term
Location counter
Maximum location counter value
Controlling the location counter value
Location counter reference
Symbol length attribute reference
Other attribute references
Literals
Literals, constants, and self-defining terms
General rules for using literals
Summary of literal rules
Contrast with immediate data
Literal pool
Expressions
Rules for coding expressions
Evaluation of expressions
Absolute and relocatable expressions
Absolute expression
Relocatability attribute
Paired relocatable terms
Relocatable expression
Complex relocatable expressions
Program structures and addressing
Object program structures
Source program structures
Source module
Beginning of a source module
End of a source module
Sections, elements, and parts
Sections
First section
What must appear before the first section
What can optionally appear before the first executable control section
Instructions that establish the first section
Unnamed section
Reference control sections
Dummy control sections
How to use a dummy control section
Common control sections
How to use a common control section
Communicating with modules in other languages
External dummy sections
Generating an external dummy section
Using external dummy sections
Classes (z/OS and CMS)
Class binding and loading attributes
Default class assignments
Parts (z/OS and CMS)
Location counter setting
Location counter and length limits
Use of multiple location counters
Addressing
Addressing within source modules: establishing addressability
How to establish addressability
Base register instructions
Qualified addressing
Dependent addressing
Relative addressing
Literal pools
Establishing residence and addressing mode
Symbolic linkages
Establishing symbolic linkage
Referring to external data
Branching to an external address
Establishing an external symbol alias
External symbol dictionary entries
Summary of source and object program structures
Machine instruction statements
General instructions
Decimal instructions
Floating-point instructions
Control instructions
Input/output operations
Branching with extended mnemonic codes
Alternative mnemonics for some branch relative instructions
Statement formats
Symbolic operation codes
Operand entries
Registers
Register usage by machine instructions
Register usage by system
Addresses
Implicit address
Explicit address
Relative address
Relocatability of addresses
Machine or object code format
Index register
Lengths
Immediate data
Examples of coded machine instructions
RI format
RR format
RS format
RSI format
RX format
SI format
SS format
Assembler instruction statements
64 bit addressing mode
*PROCESS statement
ACONTROL instruction
ADATA instruction
AINSERT instruction
ALIAS instruction
AMODE instruction
CATTR instruction (z/OS and CMS)
CCW and CCW0 instructions
CCW1 instruction
CEJECT instruction
CNOP instruction
COM instruction
COPY instruction
CSECT instruction
CXD instruction
DC instruction
Rules for DC operands
General information about constants
Length attribute value of symbols naming constants
Alignment of constants
Padding and truncation of values
Padding
Truncation
Subfield 1: Duplication Factor
Subfield 2: Type
Subfield 3: Type Extension
Subfield 4: Program type
Subfield 5: Modifier
Length modifier
Bit-length modifier
For double-byte data in C-type constants
Storage requirement for constants
Scale modifier
Scale modifier for fixed-point constants
Scale modifier for hexadecimal floating-point constants
Exponent modifier
Subfield 6: Nominal Value
Binary constant—B
Character constant—C
ASCII data in character constants
Unicode UTF-16 data from character constants
Double-byte data in character constants
Graphic constant—G
Type attribute of G-type constant
Hexadecimal constant—X
Fixed-point constants—F and H
Decimal constants—P and Z
Packed decimal constants
Zoned decimal constants
Address constants
Complex relocatable expressions
Address constants—A and Y
PSECT reference—R
Address constant—S
Address constant—V
Offset and length constants
Offset constant—Q
Length constant—J
Hexadecimal floating-point constants—E, EH, D, DH, L, LH, LQ
Representation of hexadecimal floating point
Binary floating-point constants—EB, DB, LB
Decimal floating-point constants—ED, DD, LD
Syntax of binary, decimal, and hexadecimal floating-point constants
Floating-point special values
Literal constants
DROP instruction
Labeled USING
Dependent USING
DS instruction
Bytes skipped for alignment
How to use the DS instruction
To reserve storage
To force alignment
To name fields within an area
DSECT instruction
DXD instruction
EJECT instruction
END instruction
ENTRY instruction
EQU instruction
Using conditional assembly values
EXITCTL instruction
EXTRN instruction
ICTL instruction
ISEQ instruction
LOCTR instruction
LTORG instruction
Literal pool
Addressing considerations
Duplicate literals
MNOTE instruction
Remarks
OPSYN instruction
Redefining conditional assembly instructions
ORG instruction
POP instruction
PRINT instruction
Process statement
PUNCH instruction
PUSH instruction
REPRO instruction
RMODE instruction
RSECT instruction
SPACE instruction
START instruction
TITLE instruction
Deck ID in object records
Printing the heading
Printing the TITLE statement
Sample program using the TITLE instruction
Page ejects
Valid characters
USING instruction
Base address
How to use the USING instruction
Base registers for absolute addresses
Ordinary USING instruction
Computing displacement
Using General Register Zero
Range of an ordinary USING instruction
Domain of an ordinary USING instruction
Labeled USING instruction
Range of a labeled USING instruction
Domain of a labeled USING instruction
Dependent USING instruction
Range of a dependent USING instruction
Domain of a dependent USING instruction
WXTRN instruction
XATTR instruction (z/OS and CMS)
Association of code and data areas (z/OS and CMS)
Introduction to macro language
Using macros
Macro definition
Model statements
Processing statements
Comment statements
Macro instruction
Source and library macro definitions
Macro library
System macro instructions
Conditional assembly language
How to specify macro definitions
Where to define a macro in a source module
Format of a macro definition
Macro definition header and trailer
MACRO statement
MEND statement
Macro instruction prototype
Alternative formats for the prototype statement
Body of a macro definition
Model statements
Variable symbols as points of substitution
Listing of generated fields
Listing of generated fields containing double-byte data
Rules for concatenation
Concatenation of fields containing double-byte data
Rules for model statement fields
Name field
Operation field
Operand field
Variable symbols
Remarks field
Using spaces
Symbolic parameters
Positional parameters
Keyword parameters
Combining positional and keyword parameters
Subscripted symbolic parameters
Processing statements
Conditional assembly instructions
Inner macro instructions
Other conditional assembly instructions
AEJECT instruction
AINSERT instruction
AREAD instruction
Assign character string value
Assign local time of day
ASPACE instruction
COPY instruction
MEXIT instruction
Comment statements
Ordinary comment statements
Internal macro comment statements
System variable symbols
Scope and variability of system variable symbols
&SYSADATA_DSN System Variable Symbol
&SYSADATA_MEMBER System Variable Symbol
&SYSADATA_VOLUME System Variable Symbol
&SYSASM System Variable Symbol
&SYSCLOCK System Variable Symbol
&SYSDATC System Variable Symbol
&SYSDATE System Variable Symbol
&SYSECT System Variable Symbol
&SYSIN_DSN System Variable Symbol
&SYSIN_MEMBER System Variable Symbol
&SYSIN_VOLUME System Variable Symbol
&SYSJOB System Variable Symbol
&SYSLIB_DSN System Variable Symbol
&SYSLIB_MEMBER System Variable Symbol
&SYSLIB_VOLUME System Variable Symbol
&SYSLIN_DSN System Variable Symbol
&SYSLIN_MEMBER System Variable Symbol
&SYSLIN_VOLUME System Variable Symbol
&SYSLIST System Variable Symbol
&SYSLOC System Variable Symbol
&SYSMAC System Variable Symbol
&SYSM_HSEV System Variable Symbol
&SYSM_SEV System Variable Symbol
&SYSNDX System Variable Symbol
&SYSNEST System Variable Symbol
&SYSOPT_DBCS System Variable Symbol
&SYSOPT_OPTABLE System Variable Symbol
&SYSOPT_RENT System Variable Symbol
&SYSOPT_XOBJECT System Variable Symbol
&SYSPARM System Variable Symbol
&SYSPRINT_DSN System Variable Symbol
&SYSPRINT_MEMBER System Variable Symbol
&SYSPRINT_VOLUME System Variable Symbol
&SYSPUNCH_DSN System Variable Symbol
&SYSPUNCH_MEMBER System Variable Symbol
&SYSPUNCH_VOLUME System Variable Symbol
&SYSSEQF System Variable Symbol
&SYSSTEP System Variable Symbol
&SYSSTMT System Variable Symbol
&SYSSTYP System Variable Symbol
&SYSTEM_ID System Variable Symbol
&SYSTERM_DSN System Variable Symbol
&SYSTERM_MEMBER System Variable Symbol
&SYSTERM_VOLUME System Variable Symbol
&SYSTIME System Variable Symbol
&SYSVER System Variable Symbol
How to write macro instructions
Macro instruction format
Alternative formats for a macro instruction
Name entry
Operation entry
Operand entry
Positional operands
Keyword operands
Combining positional and keyword operands
Sublists in operands
Multilevel sublists
Passing sublists to inner macro instructions
Values in operands
Omitted operands
Unquoted operands
Special characters
Ampersands
Apostrophes
Shift-out (SO) and shift-in (SI)
Quoted strings and character strings
Attribute reference notation
Parentheses
Spaces
Commas
Equal signs
Periods
Nesting macro instruction definitions
Inner and outer macro instructions
Levels of macro call nesting
Recursion
General rules and restrictions
Passing values through nesting levels
System variable symbols in nested macros
How to write conditional assembly instructions
Elements and functions
SET symbols
Subscripted SET symbols
Scope of SET symbols
Scope of symbolic parameters
SET symbol specifications
Subscripted SET symbol specification
Created SET symbols
Data attributes
Attributes of symbols and expressions
Type attribute (T')
Length attribute (L')
Scale attribute (S')
Integer attribute (I')
Count attribute (K')
Number attribute (N')
Defined attribute (D')
Operation code attribute (O')
Sequence symbols
Lookahead
Generating END statements
Lookahead restrictions
Sequence symbols
Open code
Conditional assembly instructions
Declaring SET symbols
GBLA, GBLB, and GBLC instructions
Subscripted global SET symbols
Alternative format for GBLx statements
LCLA, LCLB, and LCLC instructions
Subscripted local SET symbols
Subscripted local SET symbol
Alternative format for LCLx statements
Assigning values to SET symbols
Introducing Built-In Functions
SETA instruction
Subscripted SETA symbols
Arithmetic (SETA) expressions
Rules for coding arithmetic expressions
Evaluation of arithmetic expressions
SETC variables in arithmetic expressions
DBCS assembler option
Using SETA symbols
SETB instruction
Subscripted SETB symbols
Logical (SETB) expressions
Relational operators
Evaluation of logical expressions
Using SETB symbols
SETC instruction
Subscripted SETC symbols
Character (SETC) expressions
Substring notation
Evaluation of substrings
Character-valued built-in functions
Evaluation of character expressions
Concatenation of character string values
Concatenation of strings containing double-byte data
Using SETC symbols
Concatenating substring notations and character expressions
Extended SET statements
Alternative statement format
SETAF instruction
SETCF instruction
Branching
AIF instruction
Extended AIF instruction
Alternative format for AIF instruction
AIFB—synonym of the AIF instruction
AGO instruction
Computed AGO instruction
Alternative format for AGO instruction
AGOB - synonym of the AGO instruction
ACTR instruction
Branch counter operations
ANOP instruction
MHELP instruction
MHELP options
MHELP operand mapping
Combining options
Assembler instructions
Summary of constants
Macro and conditional assembly language summary
Standard character set code table
Bibliography
Index
Copyright IBM Corporation 1990, 2014