Skip to main content

Full text of "ibm :: 370 :: asm :: SC26-3759-0 Assembler H Programmers Guide Jun70"

See other formats


Program Product 






IBM System/360 
Operating System 
Assembler H 
Programmer's Guide 

Program Number 5734-AS1 

This book tells how to use Assembler H. It describes 
assembler options, cataloged Job Control Language pro- 
cedures, assembler listing and output, sample programs, 
and programming techniques and considerations. 

Assembler H is an assembler language processor for the 
IBM System/360 Operating System. It performs high- 
speed assemblies on an IBM System/360 Model 40 or 
higher and on an IBM System/370 Model 145, 155, or 
165 with at least 25 6K bytes of main storage. 

This book is intended for all Assembler H programmmers. 
It should be used in conjunction with the Operating 
System Assembler Language manual, Order No. GC28- 
6514; the Assembler H Language Specifications, 
Order No. GC26-3771; and the Assembler H Messages, 
Order No. SC26-3770. 








JL 


3 





Page of SC26 -3759-0 
Revised February 15, 1971 
By TNL SN33-8095 



< 



v_ 



First Edition (June, 1970) 

This edition with Technical Newsletter SN33-8095 applies to 
version 2 of the IBM System/360 Operating System Assembler H 
Program Product 5734-AS1 and to all subsequent versions until 
otherwise indicated in new editions or Technical Newsletter. 
Changes to the text, and small changes to illustrations, are 
indicated by a vertical linte to the left of the change; changed 
or added illustrations are denoted by the symbol • to the left 
of the caption. 

Changes are continually made to the information herein; before 
using this publication in connection with the operation of IBM 
systems, consult the latest IBM System/360 SRL Newsletter, 
Order No. GN20-0360 for the editions that are applicable and 
current. 

Requests for copies of IBM publications should be made to 
your IBM representative or to the IBM branch office serving 
your locality. 

A form for readers comments is provided at the back of ,_^ 

this publication. If the form has been removed, comments may V 

be addressed to IBM Nordic Laboratory, Publications Development, ^L^/ 
Box 962, S-18109 Lidingd 9, Sweden. 

[© Copyright International Business Machines Corporation 1970 




Technical Newsletter 



Re: Order No. SC26-3759-0 
This Newsletter No. SN33-8095 
Date February 15, 1971 

Previous Newsletter Nos. None 



IBM SYSTEM/360 OPERATING SYSTEM ASSEMBLER H 
PROGRAMMER'S GUIDE 

©IBM Corp. 1970 



This Technical Newsletter, a part of version 2 of IBM System/360 
Operating System, Assembler H Program Product provides replace- 
ment pages for IBM System/360 Operating System Assembler H, Pro - 
grammer ' s Guide , Order Number SC26-3759-0. These replacement 
pages remain in effect for subsequent versions and modifications 
unless specifically altered- Pages to be inserted and/or removed 
are listed below: 



^^Kl/^ 



Cover, ii 

iii, iv 

3,4 

7,8 

31,32 

37,38 



A change to the text or a small change to an illustration is 
indicated by a vertical line to the left of the change; a changed 
or added illustration is denoted by the symbol • to the left of 
the caption. 



Summary of Amendments 

Minor errors are corrected throughout the manual, information 
changed on MHELP Control on &SYSNDX, and IBM System/370 
information added. 






Note : File this cover letter at the back of the manual to provide 
a record of changes. 



IBM Nordic Laboratory, Technical Communications, Box 962, S-181 09 Lidingo 9, Sweden 

©IBM Corp. 1971 PRINTED IN U.S.A. 






C 






o 



Page of SC26 -3759-0 
Revised February 15, 1971 
By TNL SN33-8095 

Preface 



This publication tells how to use Assembler H. It describes assembler 
options, cataloged job control language procedures, assembler listing 
and cutput, assembler data sets, error diagnostic facilities, sample 
prcgrairs, and programming techniques and considerations. 

Assembler H is an assembler- language processor for the IBM System/360 
Operatinq System. It performs high-speed assemblies on an IBM 
System/360 Model 40 or higher and on an IBM System/370 Model 145, 
155, or 165 with at least 256K bytes of main storage. 

This manual has the following main sections: 

• Using the Asseirbler 

• Assembler listing Description 

• Assembler Diagnostic Facilities 

• Programming Considerations 

"Using the Assembler" describes the EXEC statement PARM field option, 
the data sets used by the assembler, and the job control language 
cataloged procedures supplied by IBM. The cataloged procedures can 
be used to assemble, link-edit or load, and execute an asseirbler 
program. 

"Assembler Listing Description" describes each field of the assembly 
listing. "Assembler Diagnostic Facilities" describes the purpose and 
format of error messages, MNOTEs, and the KHELF macro trace facility. 
"Programming Considerations" discusses various topics, such as standard 
entry and exit procedures for problem programs. 

Appendix A is a sample program which describes many of the assembler- 
language features, especially those unique to Assembler H. Appendix 
B is a sample MHELP macro trace and dump. Appendix C describes the 
object module output formats. Appendix D tells how to call the 
assembler dynamically from problem programs. 

This publication is intended for all Assembler H programmers. To use 
this publication, ycu shculd be familiar with the assembler language 
and with the basic concepts and facilities of the Operating System, 
especially job control language, data management services, supervisor 
services, and the linkage editor and loader. 



Assembler Publications 

The following publication contains a brief description of Assembler 
H and how it differs from lower level Operating System/360 assemblers: 

IBM System/360 Operating System General Information Manual , Order Number 
GC26-3758 



in 



c 



The following publications describe the assembler language and the 
information required tc rur Assembler H programs: 

IBM System/360 Operating System Assembler Language , Order Number 
GC28-6514 

The Assembler Language manual contains the basic assembler and macro 
assembler specifications, except those unique to Assembler H. 

IBM System/360 Operating System Assembler H Language Specifications , 
Order Number GC26-3771 

The Assembler H Language Specifications describes the language features 
that are available with Assembler H. It is supplemental to the 
Assembler language manual listed above. 

IBM System/360 Operating System Assembler H Messages , Order Number 
SC26-3770 

The Messages manual provides an explanation of each of the diagnostic 
and abnormal termination messages issued by Assembler H and how you 
should respond in each case. 

The following publications contain information used to install and 
maintain Assembler H: 

IBM System/360 Operating System Assembler H System Information, Order 
Number GC26-3768 

The System Information manual consists of three self-contained chapters 
en performance estimates, storage estimates, and system generation 
cf Assembler H. 

IBM System/360 Operating System Assembler H Program Logic Manual, Order L 

Number LY26-3760 ^~ 

The Program Logic Manual describes the design lbgic and functional 
characteristics cf Assembler H. 



Operating System Publications 

The following publications contain information about the Operating 
System: 

IBM System/360 Operating System Concepts and Facilities, Order Number 
GC28-6535 

Concepts and Facilities introduces and interrelates all Operating 
System/360 control program facilities. It shows how these facilities 
work with the language translators and service programs, so you can 
tetter learn hew tc use the system. 

IBM System/360 Operating System Job Control Language, Order Number 
GC28-6539 

The Job Control Language book tells how to code the job control language 
necessary to initiate and control the processing of any program, and 
contains all cataloged procedures. 






IV 



f^l 



IBM System/360 Operating System Linkage Editor and Loader, Order Number 
GC28-6538 

The Linkage Editor and Loader manual provides information on the 
operation and use of the linkage editor and loader, which are two 
programs that prepare the output of language translators for execution. 

IBM System/360 Operating System Supervisor and Data Management Macro 
Instructions, Order Number GC28-6647, and 

IBM System/360 Operating System Supervisor and Data Management Services 
Order Number GC28-6646 

The Supervisor and Data Management publications describe the program 
execution-time services available from the Operating System and the 
macro instructions required to use these services. 

IBM System/360 Operating System Utilities, Order Number GC28-6586 

The Utilities publication describes the utility programs of the 
Operating System. The assembler- language programmer can use utilities 
to do such things as add macro definitions to a library. 

IBM System/360 Operating System Messages and Codes, Order Number GC28- 
GC28-6631 

This publication contains the messages and completion codes issued 
by the Operating Systeir. (It does not contain the messages issued 
by Assembler H.) 

IBM System/360 Operating System Programmer's Guide to Debugging, Order 
Number GC28-6670 

This publication describes dumps and other information issued by the 
Operating System when an assembler-language program executes 
unsuccessfully. 



v 



This page intentionally left blank. 



C 



i 



VI 



Contents 



Using the Assembler 1 

Assembler Options 1 

Default Options 4 

Assembler Data Sets 4 

DDNameSYSUTl 6 

DDNameSYSIN 6 

DDNameSYSLIB 6 

DD Name SYSPRINT 6 

DD Name SYSPUNCH 6 

DDNameSYSLIN 7 

Return Codes 8 

Cataloged Procedures 9 

Cataloged Procedure for Assembly (ASMHC) 9 

Cataloged Procedure for Assembly and Link-Editing (ASMHCL) 10 

Cataloged Procedure for Assembly, Link-Editing, and Execution (ASMHCLG) 12 

Cataloged Procedure for Assembly and Loader-Execution (ASMHCG) 13 

Overriding Statements in Cataloged Procedures 15 

Assembler Listing 19 

External Symbol Dictionary (ESD) 21 

Source and Object Program 22 

Relocation Dictionary .24 

Cross Reference 25 

Diagnostic Cross Reference and Assembler Summary 25 

Assembler Diagnostic Facilities 27 

Assembly Error Diagnostic Messages 27 

MNOTEs 30 

Suppression of Error Messages and MNOTEs 30 

Abnormal Assembly Termination 30 

Macro Trace Facility (MHELP) 30 

Programming Considerations 33 

Saving and Restoring General Register Contents 33 

Program Termination 34 

PARM Field Access 34 

Macro Definition Library Additions 34 

Load Module Modification — Entry Point Restatement 35 

Object Module Linkage 35 

Special CPU Programming Considerations 38 

Controlling Instruction Execution Sequence 38 

Extended-Precision Machine Instructions 38 

Unaligned (Byte-Oriented) Operands 39 

Appendix A. Sample Program 41 

Appendix B. Sample Macro Trace and Dump (MHELP) . . . . 53 

Macro Call Trace (MHELP 1) 53 

Macro Entry Dump (MHELP 16) 53 

Macro AIF Dump (MHELP 4) 54 

Macro Exit Dump (MHELP 8) 54 

Appendix C. Object Deck Output 61 

ESD Card Format 61 

TEXT (TXT) Card Format 61 

RLD Card Format 62 

END Card Format 63 

TESTRAN (SYM) Card Format 63 

Appendix D. Dynamic Invocation of the Assembler 67 



VI 1 



Illustrations 



Figures 



V*> 



Figure 1 . Assembler H Data Sets 5 

Figure 2 . Cataloged Procedure for Assembly (ASMHC) 10 

Figure 3. Cataloged Procedure for Assembling and 

Link-Editing (ASMHCL) 11 

Figure 4. Cataloged Procedure for Assembly, Link-Editing and 

Execution (ASMHCLG) 13 

Figure 5. Cataloged Procedure for Assembly and 

Loader-Execution (ASMHCG) 14 

Figure 6 . Assembler H Listing 20 

Figure 7 . Sample Error Diagnostic Messages 29 

Figure 8 . Sample Assembler Linkage Statements for 

FORTRAN or COBOL Subprograms 37 

Figure 9 . TESTRAN SYM Card Format 65 



Tables 



Table 1 . Assembler Data Set Characteristics 7 

Table 2. Number of Channel Program (NCP) Selection 8 

Table 3 . Types of ESD Entries 20 












Vlll 



Using the Assembler 



D 



O 



O 



This section describes the assembly- time options available to the 
assembler-language programmer, the data sets used by the assembler, 
and the cataloged procedures of job control language supplied by IBM 
to simplify assembling, linkage editing or loading, and execution of 
assembly language programs. The job control language is described 
in detail in the Job Contrcl Language publication, Order Number GC28- 
6539. 



Assembler Options 

Assembler H offers a number of optional facilities. For example, you 
can suppress printing of the assembly listing or parts of the listing, 
and you can specify whether you want an object deck or an object module. 
You select the options by including appropriate keywords in the PARM 
field of the EXEC statement that invokes the assembler. There are 
two types of options: 

• Simple pairs cf keywords: a positive form (such as LOAD) that 
requests a facility, and an alternative negative form (such as 
NCLCAD) that rejects that facility. 

• Keywords that permit you to assign a value to a function (such 
as LINECNT = 50) . 

Each of these options has a standard or default value which is used 
for the assembly if you do not specify an alternative value. The 
default values are explained in the following section, "Default 
Options." 

If you are using a cataloged procedure, you must include the PARM field 
in the EXEC statement that invokes the procedure. You must also qualify 
the keyword (P3RM) with the name of the step within the procedure that 
invokes the compiler. For example: 

// EXEC AS MHC, PARM. C= ' LOAD, NODECK" 

The secticn "Overriding Statements in Cataloged Procedures" contains 
mere examples on how to specify options in a cataloged procedure. 

PARM is a keyword parameter: code PARM= followed by the list cf options, 
separating the options by commas and enclosing the entire list within 
sinqle quotes or parentheses. If there is only one option that does not 
include any special characters, the enclosing quotes or parentheses 
can be omitted. The option list must not be longer than 100 characters, 
including the separating commas. You may specify the options in any 
order. If contradictory options are used (for example, LIST and 
NOLIST), the rightmost option (in this case, NOLIST) is used. 

The assembler options are: 

(DECK, LOAD, LIST, TEST, XREF, ALGN, RENT, ESD, RLD, MULT, 

PARM" or or or or or 'LINECNT=nn', or or or or or SYSPARM=xxx','MSGLEVEL=nnn') 

(NODECK,NOLOAD,NOLIST,NOTEST,NOXREF, ,NOALGN,NORENT,NOESD,NORLD,NOMULT, 



Using The Assembler 1 



DECK — The object module is placed on the device specified in the 
SYSPUNCH DD statement. 

LOAD — The object module is placed on the device specified in the 
SYSLIN DD statement. 

Note: The LOAD and DECK options are independent of each other. Both 
or neither can be specified. The output on SYSLIN and SYSPUNCH is 
identical except that the control program closes SYSLIN with a 
disposition of LEAVE and SYSPUNCH with a disposition of REREAD. 

ESE -- The assembler produces the External Symbol Dictionary as part 
of the listing. 

RLD -- The assembler produces the Relocation Dictionary as part of 
the listing. 

MULT — The assembler will do multiple (batch) assemblies under the 
control of a single set of job control language cards. The 
source decks must be placed together with no intervening /* 
card; a single /* card must follow the final source deck. 

LIST — An assembler listing is produced. Note that the NOLIST 
option overrides the ESD, RLD, and XREJF options. 

TEST — The object module contains the special source symbol table 
reguired by the test translator (TESTRAN) routine. 

XREF — The assembler produces a cross-reference table of symbols 
and literals as part of the listing. 

RENT — The assembler checks for a possible coding violation of 
program reenterablility. 

LINECNT=nn — The number of lines to be printed between headings 
in the listing is nn. The permissible range is 
1 to 99 lines. 

NOALGN — The assembler suppresses the diagnostic message "IEV0 33 

ALIGNMENT ERROR" if fixed point, floating-point, or logical 
data referenced by an instruction operand is not aligned 
on the proper boundary. The message will be produced, 
however, for references to instructions that are not aligned 
on the proper (halfword) boundary or for data boundary 
violations for privileged instructions such as LPSVv. See 
the "Special CPU Programming Considerations" section for 
information on alignment requirements. 

ALGN — The assembler does not suppress the alignment error diagnostic 
message; all alignment errors are diagnosed. 






c 



^^Iti^r 



2 Assembler H Programmer's Guide 



Page of SC26-3759-0 
Revised February 15, 1971 
By TNL SN33-8095 



r\ 






MSGLEVEL=nnn — Error diagnostic messages below severity code nnn will 
not appear in the listing. Diagnostic messages can 
have severity codes of 0, 4, 8, 12, 16, or 20 (0 is 
the least severe) . MNOTEs can have a severity code 
of through 255. 

Fcr example, MSGLEVEL=8 will suppress messages for 
severity codes through 7. 

£YSFAFM=xxx — The character string xxx is the value of the system 

variable syirbol &SYSPARM. The assembler uses &SYSPARM 
as a read-only SETC variable. If no value is specified 
for the SYSFARM option, &SYSPARM will be a null (empty) 
character string. The function of SSYSPARM is explained 
in the Assembler H Language Specifications, Order Number 
GC26-3771. 

A total cf 100 characters is allowed in the PARM field 
of the EXEC statement. Thus, the maximum length of 
the SYSPARM character string is 100 minus the total 
number of other characters in the PARM field. (Commas 
separating options and quotes enclosing individual 
option values must also be counted.) Fcr example: 

FAFM= • S YSFAFM=xxx « 

xxx can be up to 92 characters 

FAFM= (NCCECK, 'SYSPART^xxx* ) 
xxx can be up to 83 characters 

Commas are not allowed unless parentheses or quotes 
surround the entire PARM value. Also, two quotes are 
needed to represent a single quote and two ampersands 
are needed to represent a single ampersand. For example: 

PARM= ' LOAD , S YSPARM= ( & & AB , & &XY ) ' 

PARM= * NODECK, SYSPARM= ( ' ' AB , * • XY) ' 

The SYSPARM character string is 6AB,&XY in the first 
example and ('AB, 'XY) in the second example. 

If you are calling the assembler from a problem program 
at execution time (dynamic invocation) , SYSPARM can 
be up to 2 56 characters long. 



o 



Using The Assembler 3 



Default Options 

If you do not code an option in the PARM field, the assembler assumes 
a default cpticn. The following default options are included when 
Assembler H is shipped by IBM: 

PARM=(DECK,NOLOAD,LIST,NOTEST,XREF, , LINECNT=55',ALGN,NORENT,ESD,RLD,NOMULT;SYSPARIVI=null',*MSGLEVEL=0') 



However, these may not be the default options in effect in your 
installation. The defaults can be respecified when Assembler H is 
installed. For example, NCCECK can be made the default in place of 
DECK. Also, a default option can be specified during installation 
so that you cannot override it. 

The cataloged procedures described in this book assume the default 
entries. The section "Overriding Statements in Cataloged Procedures" 
tells you how to override them. First, however, check whether any 
default options have been changed or whether there are any you cannot 
override at your installation. 



Assembler Data Sets 

Assembler H requires the following data sets, as shown in Figure 1: 

• SYSUT1 — utility data set used as intermediate external storage. 

• SYSIN — an input data set containing the source statements to 
be processed. 

In addition, the following four data sets may be required: 

• SYSIIE -- a data set containing macro definitions (for macro 
definitions net defined in the source program) and/or source code 
to be called for through COPY assembler instructions. 

• SYSPRINT — a data set containing the assembly listing (unless 
the NOIIST option is specified) . 

• SYSPUNCH — a data set containing object module output, usually 
for punching (unless the NODECK option is specified). 

• SYSLIN — a data set containing object module output usually for 
the linkage editor (only if the LOAD option is specified) . 

The above data sets are described in the following text. The DD name 
that normally must be used in the DD statement describing the data 
set appears as the heading for each description. The characteristics 
of these data sets, those set by the assembler and those you can 
override, are shown in Tables 1 and 2. 



^ 



c 



4 Assembler H Programmer's Guide 






SYSLIB 



(MACRO and 
COPY Calls) 



/" 



SYSPRINT 



Listing- 

121 Characters 

Wide 




\. 



SYS IN 



X 




y 



SYSUT1 



Assembler H 



(overflow) 



/ SYSLIN \ 



/- 



SYSPUNCH 




^(Object Modules) * 

(80 Character Card I mage) 



"\ 




o 



Figure 1 . Assembler H Data Sets 



Using The Assembler 5 



DD Name SYSUT 1 

The assembler uses this utility data set as an intermediate external 

storage device when processing the source program. The input/output ,#~~> 

device assigned to this data set must be a direct access device. The 

assembler does not support a mult i- volume utility data set. 



DD Name SYSIN 

This data set contains the input to the assembler — the source 
statements tc be processed. The input/output device assigned to this 
data set may be either the device transmitting the input stream, or 
another seguential input device that you have designated. The ED 
statement describing this data set appears in the input stream. The 
IEM-supplied procedures dc net contain this statement. 



DD Name SYSLIB 

From this data set, the assembler obtains macro definitions and 
ass eirbler- language statements to be called by the COPY assembler 
instruction. It is a partitioned data set; each macro definition or 
sequence of assembler- language statements is a separate member, with 
the member name being the macro instruction mnemonic or COPY code name. 

The data set may be defined as SYS1.MACLIB or your private macro 

definition or COPY library. SYS1 .MACLIB contains macro definitions 

for the system macro instructions provided by IBM. Your private library 

may be concatenated with SYS1 .MACLIB. The two libraries must have / r ~^- 

the same logical record length (80 bytes) , but the blocking factors L 

may be different. The DD statement for the library with the largest v_^ 

blocksize must appear first in the job control language for the assembly 

(that is, before any other library DD statements) . The Job Control 

Language publication, Order Number GC2 8-653 9, explains the concatenation 

of data sets. 



DD Name SYSPRINT 

This data set is used by the assembler to produce a listing. Output 
may be directed to a printer, magnetic tape, or direct-access storage 
device. The assembler uses the machine code carriage-control characters 
for this data set. 



DD Name SYSPUNCH 

The assembler uses this data set to produce the object module. The 
input/output unit assigned to this data set may be either a card punch 
or an intermediate storage device capable of sequential access. 






6 Assembler H Programmer's Guide 






Page of SC26 -3759-0 
Revised February 15, 1971 
By TNL SN33-8095 



DD Name SYSLIN 



This is a direct-access storage device, magnetic tape, or card punch 
data set used by the assembler. It contains the same output text as 
SYSPUNCH. It is used as input for the linkage editor. 

•Table 1. Assembler Data Set Characteristics 



o 



Data Set 



Access Method 



Logical Record 
Length (LRECL) 



Block Size 
(BLKSIZE) 



Record Format 
(RECFM) 



Number of channel 
Programs (NCP) 



SYSUT1 



BSAM 



fixed at 
BLKSIZE 



© 



SYSPUNCH 



BSAM 



fixed at 
80 



© 



©© 



© 



SYSPRINT 



BSAM 



fixed at 
121 



© 



©® 



© 



SYSLIN 



BSAM 



fixed at 
80 



© 



©© 



© 



SYSIN 



BSAM 



fixed at 
80 



© 



©© 



© 



SYSLIB 



BPAM 



fixed at 
80 



© 



©© 



Not 
Applicable 



M J You can specify a blocksize (BLKSIZE) between 2000 and 5100 bytes in the DD statement or in the 

data set label. BLKSIZE should be a multiple of 8; if it is not, it will be rounded to the next lower multiple 
of 8. If you do not specify BLKSIZE, the assembler sets a default blocksize based on the device used for 
SYSUT1 as follows: 

2301 Drum 5016 bytes 

2302 Disk 4984 bytes 

2303 Drum 4888 bytes 
2305 Drum 4280 bytes 

model 1 
2305 Drum 4688 bytes 

model 2 
2311 Disk 3624 bytes 

2314 Disk 3520 bytes 

3330 Disk 4208 bytes 

The Storage Estimates chapter of the System Information manual. Order Number SC26-3768, discusses the 
reasons for changing the default blocksize. 

(T) If specified, BLKSIZE must equal LRECL or a multiple of LRECL. If BLKSIZE is not specified, it is set equal 
^^ to LRECL. 

(T) BLKSIZE be specified in the DD statement or the data set label as a multiple of LRECL. 

Caj Set by the assembler to F. 

f5 J Set by the assembler to FM. 

Cd) You may specify B, S, or T. 

(7) You can specify the number of channel programs (NCP) used by any assembler data set except SYSUT1. 
^ > ^ and SYSLIB. The NCP of SYSUT1 is fixed at 1 . The assembler, however, can change your NCP specification 

under certain conditions. Table 2 shows how NCP is calculated. Note that if the NCP is greater than 2, chained 

I/O request scheduling is set by the assembler. 



Using The Assembler 7 



Table 2. Number of Channel Program (NCP) Selection 






Unit record device 


X 


X 


X 


X 


X 


X 


X 


X 


X 




















SYSPRINT data set 


X 






X 






X 






X 






X 






X 






SYSIN data set 




X 






X 






X 






X 






X 






X 




SYSLIN or SYSPUNCH 
data set 






X 






X 






X 






X 






X 






X 


NCP not specified by user 


X 


X 


X 














X 


X 


X 














NCP specified by user = 1 








X 


X 


X 














X 


X 


X 








= 2-99 














X 


X 


X 














X 


X 


X 


NCP set by assembler is 
larger of 1210/BLKSIZE 
or 2 


X 






X 












X 


















NCP set by assembler is larger 
of 800/BLKSIZE or 2 




X 






X 












X 
















NCP set by assembler is larger 
of 240/BLKSIZE or 2 






X 






X 












X 














NCP is set to number spec- 
ified by the user 














X 


X 


X 








X 


X 


X 


X 


X 


X 


Note: If the NCP is greater than two, chained I/O scheduling is set by the assembler. 



Return Codes 



Assembler H issues return codes for use with the COND parameter of 
the JOE and EXEC jcb control language statements. The COND parameter 
enables you to skip or execute a job step depending on the results 
(indicated by the return cede) of a previous job step. It is explained 
in the Job Control Language publication, Order Number GC28-6539. 

The return code issued by the assembler is the highest severity code 
that is associated with any error detected in the assembly or with 
any MNCTE message produced by the source prograir or macro instructions. 
See the Assembler H Messages book. Order Number SC26-3770, for a listing 
of the assembler errors and their severity codes. 



8 Assembler H Programmer's Guide 



Cataloged Procedures 

Often the same set of job control statements is used over and over 
**\ again (for example, to specify the compilation, link- editing, and 

V execution cf many different programs) . To save programming time and 

"'*""' to reduce the possiblity of error, sets of standard series of EXEC 

and DD statements can be prepared once and 'cataloged' in a system 
library. Such a set of statements is termed a cataloged procedure 
and can be invoked by one of the following statements: 

//stepname EXEC procname 

//stepname EXEC PRO C= procname 

The specified procedure is read from the procedure library 
(SYS1 . PROCIIE) and merged with the job control statements that follow 
this EXEC statement. 

The System Programmer' s Guide, Order Number GC28-6550, tells how to 
place cataloged procedures in the procedure library. 

This section describes four IBM-provided cataloged procedures: a 
procedure for assembling (ASMHC) , a procedure for assembling and link- 
editing (ASMHCL) , a procedure for assembling, link -editing, and 
executing (ASMHCLG) , and a procedure for assembling and loader-executing 
(ASMHCG) . 






Cataloged Procedure for Assembly (ASMHC) 

This procedure consists of one job step: assembly. The name ASMHC 
must be used to call this procedure. The result of execution is an 
obJ€ct module, in punched card form, and an assembler listing. 

In the following example, input enters via the input stream. An example 
of the statements entered in the input stream to use this procedure 
is: 



//jobname JOB 

//stepname EXEC PROC=ASMHC 

//C.SYSIN DD * 



source program statements 
I 
I 
/* (delimiter statement) 



The statements of the ASMHC procedure are read from the procedure 
library and merged into the input stream. 

Figure 2 shows the statements that make up the ASMHC procedure. 



Using The Assembler 9 



1 lie 

2 //SYSLIB 

3 //SYSUT1 

4 //SYSPUNCH 

5 //SYSPRINT 



EXEC PGM=IEV90,REGION=200K 

DD DSN=SYS1.MACLIB,DISP=SHR 

DD UNIT=(SYSDA,SEP=SYSLIB),SPACE=(CYL,(10 / 5)),DSN=&SYSUT1 

DD SYSOUT=B,DCB=(BLKSIZE=800),SPACE=(CYL,(5,5,0)) 

DD SYSOUT=A,DCB=(BLKSIZE=3509),UNIT=(,SEP=(SYSUT1 f SYSPUNCH)) 



PARM= or COND= parameters may be added to this statement by the EXEC statement that calls the procedure 
(see "Overriding Statements in Cataloged Procedures"). The system name IEV90 identifies Assembler H. 

2 

This statement identifies the macro library data set. The data set name SYS1.MACLIB is an IBM designation. 

3 

This statement specifies the assembler utility data set. The device classname used here, SYSDA, represents a 

direct-access unit. The I/O unit assigned to this name is specified by the installation when the operating 

system is generated. A unit name such as 231 1 may be substituted for SYSDA. 

4 

This statement describes the data set that will contain the object module produced by the assembler. 

This statement deffnes the standard system output class, SYSOUT=A, as the destination for the assembler listing. 



c 



Figure 2. Cataloged Procedure for Assembly (ASMHC) 



Cataloged Procedure for Assembly and Link-Editing (ASMHCL) 



This procedure consists of two job steps: assembly and link -editing. 
The name ASMHCI must be used to call this procedure. Execution of 
this procedure results in the production of an assembler listing, a 
linkage editor listing, and a load module. 

The following example illustrates input to the assembler via the input 
job stream. SYSLIN contains the output from the assembly step and 
the input to the linkage edit step. It can be concatenated with 
additional input tc the linkage editor as shown in the example. This 
additional input can be linkage editor control statements or other 
object modules. 

An example of the statements entered in the input stream to use this 
procedure is: 






//jobname 

//stepname 

//C.SYSIN 



JOB 

EXEC PROC=ASMHCL 

DD * 



source program statements 
I 



//L.SYSIN 



DD 



object module or 
linkage editor 
control statements 



necessary only if linkage 
editor is to combine modules 
or read linkage editor control 
information from the job stream 






10 Assembler H Programmer's Guide 



Figure 3 shows the statements that make up the ASMHCL procedure. Only 
those statements not previously discussed are explained. 



) kim u ^ 



lie 

//SYSLIB 
//SYSUT1 
//SYSPUNCH 
//SYSPRINT 

1 //SYSLIN 

II 

2 //L 

3 //SYSLIN 

4 // 

5 //SYSLMOD 

6 //SYSUT1 

7 //SYSPRINT 



EXEC PGM=IEV90,PARM=LOAD,REGION=200K 

DD DSN=SYS1.MACLIB,DISP=SHR 

UNIT=(SYSDA,SEP=SYSLIB),SPACE=(CYL,(10,5)),DSN=&SYSUT1 

SYSOUT=B,DCB=(BLKSIZE=800),SPACE=(CYL,(5,5,0)) 

SYSOUT=A,DCB=(BLKSIZE=3509),UNIT=(,SEP=(SYSUT1,SYSPUNCH)) 



DD 
DD 
DD 
DD 



DISP=(.PASS),UNIT=SYSDA,SPACE=(CYL,(5,5,0)), 
DCB=(BLKSIZE=400),DSN=&&LOADSET 



EXEC PGM=IEWL,PARM=*MAP,LET,LIST,NCAL',REGION=96K,COND=(8,LT,C) 

DD DSN=&&LOADSET,DISP=(OLD,DELETE) 

DD DDNAME=SYSIN 

DD DISP=(,PASS),UNIT=SYSDA,SPACE=(CYL,(2,1,2)),DSN=&GOSET(GO) 

DD UNIT=SYSDA,SPACE=(CYL,(3,2)),DSN=&SYSUT1 

DD SYSOUT=A,DCB=(RECFM=FB,BLKSIZE=3509) 



In this procedure the SYSLIN DD statement describes a temporary data set - - the object module - - which is to be 
passed to the linkage editor. 

o 

This statement initiates linkage editor execution. The linkage editor options in the PARM=field cause the linkage 

editor to produce a cross-reference table, a module map, and a list of all control statements processed by the linkage 
editor. The NCAL option suppresses the automatic library call function of the linkage editor. 

3 

This statement identifies the linkage editor input data set as the same one (SYSLIN) produced as output from the 

assembler. 

This statement is used to concatenate any input to the linkage editor from the input stream (object decks and/or 
linkage editor control statements) with the input from the assembler. 

This statement specifies the linkage-editor output data set (the load module). As specified, the data set will be 
deleted at the end of the job. If it is desired to retain the load module, the DSN parameter must be respecified 
and a DISP parameter added. See "Overriding Statements in Cataloged Procedures. " If the output of the linkage 
editor is to be retained, the DSN parameter must specify a library name and member name where the load 
module is to be placed. The DISP parameter must specify either KEEP or CATLG. 

This statement specifies the utility data set for the linkage editor. 

This statement identifies the standard output class as the destination for the linkage editor listing. 



Figure 3, 



Lataloged Pro cedure^ or Assembling and Link-Editing 
(ASMHCL) 



Using The Assembler 11 



Cataloged Procedure for Assembly, Link-Editing, and Execution (ASMHCLG) 

This procedure consists of three job steps: asseirbly, link-editing, 
and execution. 

Fiqure 4 shows the statements that make up the AStfHCLG procedure. 
Cnly those statements not previously discussed are explained in the 
fiqure. 

The naire ASMHCLG must te used to call this procedure. An assembler 
listing, an object deck, and a linkage editor listing are produced. 

The statements entered in the input stream to use this procedure are: 



//jobname 

//stepname 

//C.SYSIN 



JOB 

EXEC PROC=ASMHCLG 

DD * 

I 

I 

I 



source program statements 



/* 
//L.SYSIN 



DD 



object module or 
linkage editor 
control statements 



/* 

//Cddname 
//G.ddname 
//G.ddname 



necessary only if linkage 
editor is to combine modules 
* or read linkage editor control 
information from the job stream 



" J 

DD (parameters) 
DD (parameters) 
DD * 
I 



problem program input 
I 



► only if necessary 



12 Assembler H Programmer's Guide 



"> 



PGM=IEV90,PARM=LOAD,REGION=200K 

DSN=SYS1 .MACLIB,DISP=SHR 

UN IT=(SYSD A,SEP=SYSLI B),SPACE=(CY L, (1 0,5) ) ,DSN=&SYSUT1 

SYSOUT=B,DCB=(BLKSIZE=800),SPACE=(CYL,(5,5,0)) 

SYSOUT=A,DCB=(BLKSIZE=3509),UNIT=(,SEP=(SYSUT1,SYSPUNCH)) 

DISP=(,PASS),UNIT=SYSDA,SPACE=(CYL,(5,5,0)), 
DCB= (B LKSI ZE=400) ,DSN=&& LO ADSET 

PGMHEWL,PARM= 4 MAP,LET,LIST,NCAL',REGION=96K,COND=(8,LT,C) 

DSN=&&LOADSET,DISP=(OLD,DELETE) 

DDNAME=SYSIN 

DISP=(,PASS),UNIT=SYSDA,SPACE=(CYL,(2,1 ,2) ) , DSN=&GOSET(GO) 

UNIT=SYSDA,SPACE=(CYL,(3,2)),DSN=&SYSUT1 

SYSOUT=A,DCB=(RECFM=FB,BLKSIZE=3509) 

PGM=*.L.SYSLMOD,COND= ( (8,LT,C),(4,LT,L)) 



The LET linkage-editor option specified in this statement causes the linkage editor to mark the load module as 
executable even though errors were encountered during processing. 

The output of the linkage editor is specified as a member of a temporary data set, residing on a direct-access 
device, and is to be passed to a succeeding job step. 

This statement initiates execution of the assembled and linkage edited program. The notation *.L.SYSLMOD 
identifies the program to be executed as being in the data set described in job step L by the DD statement 
named SYSLMOD. 





lie 


EXEC 




//SYSLIB 


DD 




//SYSUT1 


DD 




//SYSPUNCH 


DD 




//SYSPRINT 


DD 




//SYSLIN 

II 


DD 


1 


l/L 


EXEC 




//SYSLIN 


DD 




II 


DD 


2 


//SYSLMOD 


DD 




//SYSUT1 


DD 




//SYSPRINT 


DD 


3 


//G 


EXEC 



Figure 4. (c.ai-^l oqpd Prnrp^nrpVnr Assembly, Link-Editing and 
Execution (A sWXClAl) 



Cataloged Procedure for Assembly and Loader-Execution (ASMHCG) 



This procedure consists of two job steps, asseirbly and loader- execution. 
Loader -execution is a combination of link-editing and loading the 
program for execution. Lead modules for program libraries are not 
produced. 



Using The Assembler 13 





lie 


EXEC 


PGM=IEV90,PARM=LOAD,REGION=200K 




//SYS LIB 


DD 


DSN=SYS1.MACLIB,DISP=SHR 




//SYSUT1 


DD 


UNIT=(SYSDA,SEP=SYSLIB),SPACE=(CYL,(10,5)),DSN=&SYSUT1 




//SYSPUNCH 


DD 


SYSOUT=B,DCB=(BLKSIZE=800),SPACE=(CYL,(5,5,0)) 




//SYSPRINT 


DD 


SYSOUT=A,DCB=(BLKSIZE=3509) / UNIT=(,SEP=(SYSUT1,SYSPUNCH)) 




//SYSLIN 

// 


DD 


DISP=(,PASS),UNIT=SYSDA,SPACE=(CYL,(5,5,0)), 
DCB=(BLKSIZE=400),DSN=&&LOADSET 


1 


//G 


EXEC 


PGM=LOADER,PARM='MAP,LET,PRINT,ISIOCALL' 


2 


//SYSLIN 


DD 


DSN=&&LOADSET,DISP=(OLD,DELETE) 




// 


DD 


DDNAME=SYSIN 


3 


//SYSLOUT 


DD 


SYSOUT=A 


1 


This statement initiates loader-execution. The loader options in the PARM= field cause the loader to produce a 
map and print the map and diagnostics. The NOCALL option is the same as NCAL for the linkage editor and the 
LET option is the same as for the linkage editor. 


2 


This statement defines the loader input data set as the same one produced as output by the assembler. 


3 


This statement identifies the standard output class as the destination for the loader listing. 



Fiqure 5. Calalcged Procedure for Assembly and loader -Execution 
(ASMHCG) 



Fiqure 5 shows the statements that make up the ASMHCG procedure. Only 
those statements net previously discussed are explained in the figure. 

The name ASMHCG must be used to call this procedure. Assembler and 
leader listings are produced. 

The statements entered in the input stream to use this procedure are: 






//jobname 

//stepname 

//C.SYSIN 



JOB 

EXEC PROC=ASMHCG 

DD * 



source program 
I 



I* 

//G.ddname 
//G.ddname 
//G.ddname 



DD (parameters) 
DD (parameters) 
DD * 



I 

I 

problem program input 



► only if necessary 






14 Assembler H Programmer's Guide 



Overriding Statements in Cataloged Procedures 

_ Any parameter in a cataloged procedure can be overridden except the 

?■. PGM= parameter in the EXEC statement. Such overriding of statements 

^ or fields is effective only for the duration of the job step in which 

the statements appear. The statements, as stored in the procedure 

library of the system, remain unchanged. 

Overriding for the purposes of respecif ication, addition, or 
nullification is accomplished by including in the input stream 
statements containing the desired changes and identifying the statements 
to be overridden. 



EXEC Statements 

Any EXEC parameter (except PGM) can be overridden. For example, the 
PARM= and COND= parameters can be added or, if present, respecified 
by including in the EXEC statement calling the procedure the notation 
PARM. stepname= , or CCND. stepname= # followed by the desired parameters. 
"Stepname" identifies the EXEC statement within the procedure to which 
the modification applies. 

If the procedure consists of more than one jot step, a 
PARM.procstepname= cr COND .prccstepname= parameter may be entered for 
each step. The entries must be in order, (PARM. procstep1=, 
PARM.procstep2=, etc.). 






DD Statements 

All parameters in the operand field of DD statements may be overridden 
by including in the input stream (following the EXEC card calling the 
procedure) a DD statement with the notation //procstepname.ddname in 
the name field. "Procstepname" refers to the job step in which the 
statement identified by "ddname" appears. 

Note : if mere than one DD statement in a procedure is to be overridden, 
the overriding statements must be in the same order as the statements 
in the procedure. 



Examples 

In the assembly procedure 3SMHC (Figure 2) , the production of a punched 

object deck could be suppressed and the UNIT- and SPACE= parameters 

of data set SYSUT1 respecified, by including the following statements 
in the input stream: 

X 
X 



//stepname 


EXEC 


PROC=ASMHC. 


// 




PARM.C=NODECK 


//C.SYSUT1 


DD 


UNIT=2311, 


// 




SPACE= (200,(300,40)) 


//C.SYSIN 


DD 


• 



Using the Assembler 15 



1. 



In procedure ASMHCLG (Figure 4) , suppressing production of an assembler 
listing and adding the COND= parameter to the EXEC statement, which 
specifies execution of the linkage editor, may be desired. In this 
case, the EXEC statement in the input stream would appear as follows: 

//stepname EXEC PROC=ASMHCLG, X 

// PARM.O(N0LIST,L0AD), X 

// C0ND.L=(8,LT,stepname.C) 

Note : Overriding the LIST parameter effectively deletes the PARM=LOAD. 
PAFM=LCAD must be repeated in the override statement. 

For current execution cf procedure ASMHCLG, no assembler listing would 
be produced, and execution of the linkage editor job step //L would 
be suppressed if the return code issued by the assembler (step C) were 
greater than 8. The following listing shows how to use the procedure 
ASMHC1 (Figure 3) to: 

1 . Fead input from a non-labeled 9-track tape on unit 282 that has 
a standard blocking factor cf 10. 

2. Put the output listing on a tape labeled VOLIE=TAPE10, with a 
data set name of FFCG1 and a blocking factor cf 5. 

3. Block the SYSLIN output cf the assembler and use it as input to 
the linkage editor with a blocking factor of 10 . 

4. Link -edit the module only if there are no errors in the assembler 
(COND=0) . 

5. Link-edit onto a previously allocated and cataloged data set 
USER.LIERARY with a member name of PROG. /f 



\y 



//jobname 


JOB 


//stepname 


EXEC 


// 




//C.SYSPRINT 


DD 


// 




//C.SYSLIN 


DD 


//C.SYSIN 


DD 


// 




//L.SYSIN 


DD 


//L.SYSLMOD 


DD 


/* 





PROC=ASMHCL, X 

COND.L=(0,NE,stepname.C) 

DSNAME=PROG1,UNIT=TAPE, X 

VOLUME=SER=TAPE10 f DCB=(BLKSIZE=605) 

DCB=(BLKSIZE=800) 

UNIT=282,LABEL=(,NL), X 

DCB=(RECFM=FBS,BLKSIZE=800) 

DCB=stepname.C.SYSLI N 

DSNAME=USER.LIBRARY(PROG),DISP=OLD 



Note : The order cf appearance of overriding DD names for job step 
C corresponds to the order of DD names in the procedure; that is, 
SYEFRINT precedes SYSLIN within step C. The DD name C.SYSIN was placed 
last because SYSIN does n^-t- ^Pi|r.at.aii wifhin fit^P ^ These points 
are covered in the section f"Using Catal oged Procedures Jr Xn the Job 
Control Language manual. Order JNumoer uwa-biJV. - 






16 Assembler H Programmer's Guide 



The following example shows assembly of two programs, link-editing 
of the two assemblies into one load module, and execution of the load 
module. The input stream appears as follows: 



llta**- 



//stepnamel 


EXEC 


//CSYSLIN 


DD 


II 




II 




//C.SYSIN 


DD 



PROC=ASMHC,PARM.C='LOAD' 
DSNAME=8tL0ADSET,UNIT=SYSSQ, 
SPACE=(80,{1 00,50)), 
DISP=(MOD,PASS),DCB=(BLKSIZE=800) 



I 

source program 1 statements 

I 



I* 

//stepname2 
//CSYSLIN 
//C.SYSIN 



EXEC PROC=ASMHCLG 

DD DCB=(BLKSIZE=800),DISP=(MOD,PASS) 

DD 

I 



source program 2 statements 
I 






//L.SYSLIN 


DD 


DCB=BLKSIZE=8< 


//L.SYSIN 


DD 


* 


/* 


ENTRY 


PROG 


/ 
//G.ddname 




dd cards for G step 



The Job Control Language manual, Order Number C28-6539, and System 
Programmer's Guide, Order Number C28-6550, provide additional 
description cf overriding techniques. 



Using The Assembler 17 



This page intentionally left blank 



V„.> ; ' 



^_v 



18 Assembler H Programmer's Guide 



Assembler Listing 



^N 



The assembler H listing consists of up to five sections, ordered as 
follows: 

External symbol dictionary 

Source and object proqram 

Relocation dictionary 

Symbol and literal cross reference 

Diagnostic cress reference and assembler summary 

Figure 6 shows each section of the listing. Each item marked with 
a circled number is explained in the following section. 



f*) 



o 

^uT 



Assembler Listing 19 



PRIME 

O © © © © 

SYMBOL TYPE ID ADDR LENGTH LD ID 

PC OOOl 000000 00020C 

EXSYM ER 0002 

IOLOQP LD 000022 0001 

COMSECT CM 0003 000000 000050 

EXDMY XD 0004 000003 000078 

WRKFLDS SO 0005 000210 000090 



EXTERNAL SYMBOL DICTIONARY 



PAGE 1 
ASM H V 01 11.52 05/19/70 






© 

PRIME SAMPLE LISTING DESCRIPTION 

® © © 



© 



LCC OBJECT CODE ADDR1 ADDR2 STMT SOURCE STATEMENT 



00000005 



PAGE 2 
© © 
ASM H V 01 11.52 05/19/70 



000000 90EC DOOC 
000004 05C0 
00000006 

000006 50D0 C0F6 
OOOOOA 0000 1000 

IEV044 *** ERROR *** 
OOOOOE 5850 C202 



000022 4110 C13E 
000026 4100 C052 
00002A 58F0 1030 
00002E 05EF 





2 




CSECT 






3 




EXTRN 


EXSYM 




4 




ENTRY 


IOLOOP 




5 


R5 


EQU 


5 


OOOOC 


7 




STM 


14,12,12(13) 




a 




BALR 


12,0 




9 




USING 


*,12 


OOOFC 


10 




ST 


13.SAVE+4 


00000 


11 




LA 


10.SAUE 


UNDEFINED 


SYMBOL 






00208 


12 




L 


R5,=A(EXSYMI 




13 




PRINT 


NOGEN 




14 




flPEN 


( I N0CB,,OUTDCB,( OUTPUT) ) 




23 




PRINT 


GEN 




24 


IOL00P 


GET 


INOCB, INBUF 


00144 


25+ 


IOLOOP 


LA 


l.INDCB 


00058 


26 + 




LA 


0, INBUF 


00030 


2 7+ 




L 


15,48(0,11 




28+ 




BALR 


14,15 



© 



LOAD PARAMETER REG 1 
LOAD PARAMETER REG 
LOAO GET ROUTINE ADOR. 
LINK TO GET ROUTINE 



02-IHBIN 
02-IHBIN 
01-GET 
01-GET 



PRIME 

© ® © © 

POS.ID REL.ID FLAGS AOORESS 



RELOCATION DICTIONARY 



PAGE 5 

ASM H V 01 11.52 05/19/70 



0001 
0001 
0001 
0001 



0001 
0001 
0002 
0004 



000019 
000010 
000208 
000140 



SYMBOL 



© © © © 



CROSS REFERENCE 



LEN 



VALUE DEFN REFERENCES 



ASM H V 01 11.52 05/19/70 



COMSECT 00001 00000000 0167 

EXDMY 00001 00000000 0169 

EXSYM 00001 00000000 0003 
EXTNLDUMYSCTN 



INBUF 

INDCB 

IOLOOP 

OUTBUF 

OUTBUF 

OUTDCB 

R5 

SAUE 

SAVE 

WRKFLDS 

=A(EXSYM) 



00004 
00004 
00004 
00004 
00004 



000140 

000058 

000144 

000022 

0OOOA8 
00001 00000000 
00004 0001A4 
00001 00000005 0005 
****UNI)EFINED**** 
00004 00OOF8 0051 
00001 00000210 0170 



0052 

0049 0026 0033 
0058 0018 0025 
0025 0004 0039 

0050 0033 0036 
0172 ****DUPLICATE**** 
0115 0020 0C35 

0012 0C32 

0011 

0010 0041 



00004 000208 0174 0012 



DIAGNOSTIC CROSS REFERENCE AND ASSEMBLER SUMMARY 



ASM H V 01 11.52 05/19/70 



© 
© 
© 
© 



THE FOLLOWING STATEMENTS WERE FLAGGED 
00011 00172 

2 STATEMENTS FLAGGED IN THIS ASSEMBLY 



3 WAS HIGHEST SEVERITY CODE 



OVERRIDING PARAMETERS- NODECK ,MULT , SYSPARM=SAMPLE*PRUGRAM 
OPTIONS FOR THISASSEMBLY 

NUDECK, NOLOAf), LIST, XREF, NOREMT, NOTEST, MULT, ALGN, ESD, RLD, LINECM= 55, MSGLEVEL= 0, SYSPARM=SAMPLE*PROGRAM 
NO OVERRIDING l)D NAMES 



t 



; 



Figure 6. Assembler H Listing 



c 



20 Assembler H Programmer's Guide 



External Symbol Dictionary (ESD) 



0^\ 



This section of the listing contains the external symbol dictionary 
information passed to the linkage editor or loader in the object module. 
The entries describe the control sections, external references, and 
entry points in the assembled program. There are six types of entries, 
shcvn in Table 3 along with their associated fields. The circled 
numbers refer to the corresponding headings in the sample listing 
(Figure 6) . The Xs indicate entries accompanying each type designation. 



Table 3. Types of ESD Entries 



© 

SYMBOL 


© 

TYPE 


© 

ID 


© 

ADDR 


© 

LENGTH 


© 

LDID 


X 


SD 


X 


X 


X 


- 


X 


LD 


- 


X 


- 


X 


X 


ER 


X 


- 


- 


- 


- 


PC 


X 


X 


X 


- 


X 


CM 


X 


X 


X 


- 


X 


XD 


X 


X 


X 


- 



Mj The name of every external dummy section, control section, entry 
point, and external symbol. 

C2) The type designator fcr the entry, as shown in the table. The 
type designators are defined as: 

SE — Control section definition. The symbol appeared in the 
name field of a CSECT or START statement. 

LD — label definition. The symbol appeared as the operand of 
an ENTRY statement. 



ER — External reference. The symbol appeared as the operand of 
an EXTRN statement, or was declared as a V-type address 
constant. 



FC — Unnamed control section definition (private code). A CSECT 
or START statement that commences a control section does 
net have a symbol in the name field, or a control section 
is commenced (by any instruction which affects the location 
counter) before a CSECT or START is encountered. 



CM — Common control section definition, 
the name field of a COM statement. 



The symbol appeared in 



XD -- External dummy section. The symbol appeared in the name 
field of a DXD statement or a Q-type address constant. 
(The external dummy section is called a pseudo register 
in the Linkage Editor and Loader manual, Crder Number 
GC28-6538.) 



Assembler Listing 21 



{3j The external symbol dictionary identification number (ESDID). 

The number is a unique four-digit hexadecimal number identifying 
the entry. It is used in combination with the LD entry of the 
ESD and in the relocation dictionary for referencing the ESD. 

UJ The address of the symbol (in hexadecimal notation) for SB-and 1 , 

LD-type entries, and blanks for ER-type entries. For PC- and ^— ^ 

CM-type entries, it indicates the beginning address of the control 
section. For XC-type entries, it indicates the alignment by 
printing a number one less than the number of bytes in the unit 
of alignment. For example, 7 indicates doubleword alignment. 

The assembled length, in bytes, of the control section (in 
hexadecimal notation) . 

For an LD-type entry, the ESCID of the control section in which 
the symbol was defined. 



© 
© 



Source and Object Program 

This section of the listing documents the source statements and the 
resulting object program. 



© 



The one to eight- character deck identification, if any. It is 
obtained from the name field of the first named TITLE statement. 
The assembler prints the deck identification and date (item 16) 
on every page of the listing. 

The information taken from the operand field of a TITLE statement. 

(V) The listing page number. 






10) The assembled address (in hexadecimal notation) of the object U j 

^ code. ^^ 

• For ORG statements, the location-counter value before the 
CFG is placed in the location column and the location counter 
value after the OPG is placed in the object code field. 

• If the END statement contains an operand, the operand value 
(transfer address) appears in the location field (LCC) . 

• In the case of LCCTR, COM, CSECT, and DSECT statements, the 
lccaticn field contains the current address of these control 
sections. 

• In the case of EXTRN, ENTRY, and DXD instructions, the 
location field and object code field are blank. 

• For a USING statement, the location field contains the value 
of the first operand. It is four bytes long. 

• For LTORG statements , the location field contains the location 
assigned to the literal pool. 

• For an EQU statement, the location field contains the value 
assigned. It is four bytes long. 



V> 



22 Assembler H Programmer's Guide 



1 y The object code produced by the source statement. The entries 

are always left- justified. The notation is hexadecimal. Entries 
are machine instructions or assembled constants. Machine 
instructions are printed in full with a blank inserted after every 
four digits (two bytes) . Only the first eight bytes of a constant 
will appear in the listing if PRINT NODATA is in effect, unless 
the statement has continuation cards. The entire constant appears 
if PRINT LATA is in effect. (See the PRINT assembler instruction 
in the Assembler Language publication, Order Number GC28-6 514.) 

12) Effective addresses (each the result of adding together a base 
register value and a displacement value) : 

The field headed ADER1 contains the effective address for 
the first operand cf an SS instruction. 

The field headed ADDR2 contains the effective address of 
the last operand of any instruction referencing storage. 

Eoth address fields contain six digits; however, if the high-order 
digit is a zero, it is not printed. 

li) The statement number. A plus sign (+) to the right of the number 
indicates that the statement was generated as the result of macro 
call processing. An unnumbered statement with a plus sign (+) 
is the result cf cpen code substitution. 

14) The source program statement. The following items apply to this 
section of the listing: 

• Source statements are listed, including those brought into 
the program by the COPY assembler instruction, and including 
macro definitions submitted with the main program for 
assembly. Listing control instructions are not printed, 
except for PEINT, which is always printed. 

• MACFC definitions obtained from SYSLIB are not listed unless 
the iracrc definition is included in the source program by 
means of a COPY statement. 

• The statements generated as the result of a macro call follow 
the iracrc call in the listing unless PRINT NOGEN is in effect. 

• Assembler and machine instructions in the source program 
that contain variable symbols are listed twice: as they 
appear in the scurce input, and with values substituted for 
the variable symbols. 

• All error diagnostic messages appear in line except those 
suppressed by the MSGLEVEL option. The "Assembler Diagnostics 
Facilities" section describes how error messages and MNOTEs 
are handled. 

• Literals that have not been assigned locations by LTORG 
statements appear in the listing following the END statement. 
Literals are identified by the equals sign (=) preceding 
them. 

• Whenever possible, a generated statement is printed in the 
same format as the corresponding macro-definition (model) 
statement. The starting columns of the operation, operand, 



Assembler Listing 23 



and comments fields are preserved unless they are displaced 
by field subsitution, as shown in the following example: 

Source Statements: &C SETC •ABCDEFGHIJK* 

SC LA 1,4 
Generated Statement: ABCDEFGHIJK LA 1,4 

It is possible for a generated statement to occupy ten or more 
continuation lines on the listing. In this way generated 
statements are unlike source statements, which are restricted 
to nine continuation lines . 

15) The version identifier of Assembler H. 

16) The current date (data run is made). 



1 1) The identification-sequence field from the source statement. 

For a macro- generated statement, this field contains information 
identifying the origin of the statement. The first two columns 
define the level of the macro call. 

For a library macro call, the last five columns contain the first five 
characters of the macro naire. For a macro whose definition is in the 
source program (including one read by a COPY statement) , the last five 
characters ccntain the line number of the model statement in the 
definition from which the generated statement is derived. This 
information can be an important diagnostic aid in analyzing output 
dealing with macro calls within macro calls. 



Relocation Dictionary 

This section of the listing contains the relocation dictionary 4 \^ 

information passed to the linkage editor in the object module. The U j 

entries describe the address constants in the assembled program that ^* 

are affected by relccaticn. 



18) The external symbol dictionary IE number assigned to the ESD entry 
for the ccntrcl section in which the address constant is used 
as an operand. 



19) The external symbol dictionary IB number assigned to the ESD entry 
for the ccntrcl section in which the referenced symbol is defined. 



20J The two-digit hexadecimal number represented by the characters 
in this field is interpreted as follows: 

• First Digit . A zero indicates that the entry describes an 
A-type or Y-type address constant. A one indicates that 
the entry describes a V-type address constant. A two 
indicates that the entry describes a Q-type address constant. 
A three describes a CXD entry. 

• Second Digit . The first three bits of this digit indicate 
the length of the constant and whether the base should be 
added or subtracted: 

Bits and 1 Bit 2 Bit 3 

00 = 1 byte = + Always 

01 = 2 bytes 1 = - 



24 Assembler H Programmer's Guide 



10 = 3 bytes 
11=4 bytes 

21) The asseirbled address of the field where the address constant 
is stored. 



Cross Reference 

This section of the listing information concerns symbols and literals 
which are defined and used in the program. 



22) The symbols or literals. 



23) The length (in decimal notation) , in bytes, cf the field 
represented by the symbol. 



24) Either the address the symbol or literal represents, or a value 
to which the symbol is equated. The value is three bytes long, 
except for the f clicking, which are four bytes long: CSECT, 
DSECT, START, COM, EXE, ECU, LOCTR, EXTRN, and a duplicate symbol. 



(2 5) The number of the statement in which the symbol or literal was 
defined. 



26) The statement numbers of statements in which the symbol or literal 
appears as an operand. In the case of a duplicate symbol/ the 
assembler fills this column with the message: 

**** EXPLICATE**** 

The following notes apply to the cross-reference section: 

• Symbols appearing in V-type address constants do not appear in 
the cress- reference listing. 

• Cross-reference entries for symbols used in a literal refer to 
the assembled literal in the literal pool. Look up the literals 
in the cress reference to find where the symbols are used. 

• A PRINT OFF listing control instruction does not affect the 
production of the cress- reference section of the listing. 

• In the case of an undefined symbol, the assembler fills fields 
23, 2 4, and 25 with the message: 

****UNDEFINED**** . 



Diagnostic Cross Reference and Assembler Summary 



21) The statement number cf each statement flagged with an error 

message or MNCTE appears in this list. The number of statements 
flagged and the highest non-zero severity code encountered is 
also printed. The highest severity code is equal to the assembler 
return code. 



Assembler Listing 25 



If no errors are encountered, the following statement is printed: 

NO STATEMENTS FLAGGED IN THIS ASSEMBLY 

See the section "Error Diagnostics" for a complete discussion 
of how error messages and MNOTEs are handled. 

28) A list of the options in effect for this assembly is printed. 
The options specified by the programmer in the PARM field to 
override the assembler default options are also printed. 



2 9) If the assembler has teen called by a problem program (See Appendix 
D) and any standard (default) DD names have been overriden, both 
the default DD names and the overriding DD names are listed. 
Otherwise, this statement appears: 

NO OVERRIDING DD NAMES 

3 0) The assembler prints the number of records read frcir SYSIN and 
SYSLIB and the nuirber of records written on SYSPUNCH. The 
assembler also prints the number of lines written on SYSPRINT. 
This is a count of the actual number of 121-byte records generated 
by the assembler; it may be less than the total number of printed 
and blank lines appearing on the listing if the SPACE n assembler 
instruction is used. For a SPACE n that does not cause an eject, 
the assembler inserts n blank lines in the listing by generating 
n/3 blank 121-byte records — rounded to the next lower integer 
if a fraction results (for example, for a SPACE 2, no blank records 
are generated) . The assembler does not generate a blank record 
to force a page eject. 






26 Assembler H Programmer's Guide 



Assembler Diagnostic Facilities 



o 



The diagnostic facilities for Assembler H include diagnostic messages 
for assembly errors, diagnostic or explanatory messages issued by the 
source program or by macro definitions (MNOTEs) , a macro trace and 
dump facility (MHELP) , and messages and dumps issued by the assembler 
in case it terminates abnormally. 

This section briefly describes these facilities. The assembly error 
diagnostic iressages and abnormal assembly termination messages are 
described in detail in the Assembler H Messages bock, Order Number 
SC26-3770. 



Assembly Error Diagnostic Messages 

Assembler H prints most error messages in the listing immediately 
following the statement in error. It also prints the total number 
of flagged statements and their line numbers in the Diagnostic Cross 
Reference section at the end of the listing. 

The iressages do net follow the statement in error when: 

• Errors are detected during editing of macro definitions read from 
a library. A message for such an error appears after the first 
call in the source program to that macro definition. You can, 
however, bring the macro definition into the source program with 

a COPY statement. The editing error messages will then be attached 
to the statements in error. 

• Errors are detected by the lookahead function of the assembler. 

(Lookahead scans, fcr attribute references, statements after the 
one being assembled.) Messages for these errors appear after 
the statements in which they occur. The messages may also appear 
at the point where lookahead was called. 

• Errors are detected on conditional assembly statements during 
macro generation or MBELF testing. Such a message follows the 
most recently generated statement or MHELP output statement. 

A typical error diagnostic message is: 

IEV057 ***ERROR*** UNDEFINED OPERATION CODE — xxxxx 

The term ***ERROR**# is part of the message if the severity code is 
8 or greater. The term **WARNING** is part of the message if the 
severity code is or 4. 

A copy of a segment of the statement in error, represented above by 
xxxxx, is appended to the end of many messages. Normally this segment, 
which can be up to 16 bytes leng, begins at the bad character or term. 
Fcr seme errors, however, the segment may begin after the bad character 
or term. The segment may include part of the remarks field. 

If a diagnostic message follows a statement generated by a macro 
definition, the following items may be appended to the error message: 



Assembler Diagnostic Facilities 27 



• The number of the model statement in which the error occurred, or 
the first five characters of the macro name. 

• The SET symbol, parameter number, or value string associated with 
the e rror . 

Note: references to macro parameters are by number (such as PARAM008) \^ 

instead of name. The first seven numbers are always assigned for the 
standard system parameters as follows: 

PARAMO 00 = SSYSNDX 

PARAMO 01 = SSYSECT 

FARAM00 2 = &SYSLCC 

PARAM00 3 = &SYSTIME 

FARAW004 = &SYSEATE 

PARAM00 5 = SSYSPARM 

FARAM006 = Name Field Parameter 

Then the keyword parameters are numbered in the order defined in the 
macro definition, followed by positional parameters. When there are 
no keyword parameters in the macro definition, PARAM00 7 refers to the 
first positional parameter. 

If a diagnostic message follows a conditional assembly statement in 
the source prcgrair, the following items will be appended to the error 
message: 

• The word "OPENC" 

• The SET symbol or value string associated with the error 

Several messages may be issued for a single statement or even for a 
single error within a statement. This happens because each statement 
is usually evaluated on more than one level (for example, term 
level, expression level, and operand level) or by more than one phase 
of the assembler. Each level or phase can diagnose errors; therefore, 
most or all of the errors in the statement are flagged. Occasionally, 
duplicate error messages may occur. This is a normal result of the 
error detection process. 

Figure 7 is an exairple of Assembler H handling of error messages. 



V-. 



28 Assembler H Programmer's Guide 






LOC OBJECT CODE 



AOORl ADDR2 STMT SOURCE STATEMFNT 



ASM H V 01 11.51 05/20/70 



X *********************************************************************** 

2 * SAMPLE ERROR DIAGNOSTIC MESSAGES * 

3 * IN SOURCE PROGRAM (OPEN CODE) AND GENERATED BY MACRO CALLS * 
t, *********************************************************************** 



000000 

000000 0000 0000 

IEV044 *** ERROR *** 
IEV029 *** ERROR *** 
IEV179 *** ERROR *** 

000004 05C0 

00000006 

000006 0000 0000 

IEV044 *** ERROR *** 

IEV088 *** ERROR *** 
OOOOOA 0700 
OOOOOC 4510 COOF 
000010 00000000 
000014 0000 0000 

IEV029 *** ERROR *** 

IEV044 *** ERROR *** 

IEV177 *** ERROR *** 

000018 9280 1000 OOC 

00001C 0A13 



6 A 



CSECT 
STM 



14, U2, 12(131 



00000 7 
UNDEFINED SYMBOL 

INCORRECT REGISTER SPECIFICATION 
DELIMITER ERROR, EXPECT RIGHT PARENTHESIS 

8 BAL" 12,0 

9 USING *,12 
00000 10 ST l3,SAVE+4 

UNDEFINED SYMBOL 

11 OPEN (CRDIN, (INPUT), CRDOUT, (OUTPUT) 

UNBALANCED PARENTHESES IN MACRO CALL OPERAND — OPENC/ 1CRDIN, ( IN 

12+ CNOP 0,4 01-OPEN 

l,* + 8 LOAD REG1 H/LIST ADDR. 01-OPEN 

A(0) OPT BYTE AND DCB ADDR. 01-OPEN 



00014 



13 + 
14+ 



BAL 
DC 



00000 



+ ST CRDIN, ( INPUT) , CRDOUT, (OUTPUT, 0(1,0) 

+ STORE INTO LIST 

INCORRECT REGISTER SPECIFICATION 

UNDEFINED SYMBOL 

DELIMITER ERROR, EXPECT BLANK OR LEFT PARENTHESIS 



16 + 

17 + 



MVI 
SVC 



0(1) ,128 
19 



MOVE IN OPTION BYTE 
ISSUE OPEN SVC 



XOl-OPEN 



01-OPEN 
01-OPEN 



ig ********************************************************************** 

20 * EDITING AND GENERATION ERRORS AND MNOTES FROM A LIBRARY MACRO * 

21 ********************************************************************** 



IEV136 *** ERROR *** 
IEV089 *** ERROR *** 
00001E 58A0 C02A 



23 LOAOR REG1=10,REG2=8, CHEROKEE, CHAMP 

ILLEGAL LOGICAL/RELATIONAL OPERATOR — MACRO - LOAOR 
ARITHMETIC FXPRESSION CONTAINS ILLEGAL DELIMITER OR ENDS PREMATURELY 
00030 24+ L lO.CHtROKEE 



MACRO - LOADR 

01-LOADR 



26 LOADR REG1=25,REG2=8,CHER0KFE, SWIFT 

000022 0000 0000 00000 27+ L 25, CHEROKEE 

IEV029 *** ERROR *** INCORRECT REGISTER SPECIFICATION 



000026 5800 C02E 



LOADR REG2=10, CHAMP, SWIFT 
L 0, CHAMP 



6 ********************************************************************** 

7 * SAMPLE MACRO DEFINITION RERUN WITH EDITING ERRORS CORRECTED * 

R ********************************************************************** 

10 MACRO 

11 CNAME LOADR f.REGl = , £REG2 = , £0P1 , G0P2 

12 KR(1) SETA &REG1.&REG2 

13 AIF (T'CRFGl EQ "O'l.ERR 

14 L £R(1»,£0P1 

15 L £R(2),60P2 

16 MEX1T 

17 .ERR MNOTE 36, 'YOU LEFT OUT THE FIRST REGISTER' 

18 MEND 

20 ********************************************************************** 

21 * SAMPLE MACRO CALLS WITH GENERATION ERRORS AND MNOTES * 

22 ********************************************************************** 



OOOOOC 58A0 C004 
000010 5880 C008 



00004 25+ 
00008 26+ 



LOADR REG1=10,REG2 =8, CHEROKEE, CHAMP 
L 10.CHFR0KEE 
L 8, CHAMP 



01-00014 
01-00015 



IEV003 *** ERROR *** 
000014 0000 0000 

IEV029 *** ERROR *** 
000018 0000 0000 

IEV074 *** ERROR *** 



28 LOADR REG1=25,REG2=8, CHEROKEE, CSWIFT 

UNDECLARED VARIABLE SYMBOL. DEFAULT=0, NULL, OR TYPE=U — 

00000 29+ L 25, CHEROKEE 

INCORRECT REGISTER SPECIFICATION 

00000 30+ L 8, 

ILLEGAL SYNTAX IN EXPRESSION 



OPENC/SWIFT 



01-00014 
01-00015 



IEV254 *** MNOTE *** 



32 
33 + 
34 



LOADR REG2=8, CHAMP, SWIFT 
36, YOU LEFT OUT THE FIRST REGISTER 

END 



^^r 



Figure 7. Sample Error Diagnostic Messages 



Assembler Diagnostic Facilities 29 



MNOTEs 

An MNCTE statement is included in a macro definition cr in the source 
program. It causes the asserrbler to generate an inline error or 
informational message. 

An MNOTE appears in the listing as follows: 

IEV254 ***MNCTE*** severity code, message 

Unless it has a severity code of * or the severity code is omitted, 
the statement number or the MNOTE is listed in the diagnostic cross 
reference. 



Suppression of Error Messages and MNOTEs 

Error messages and MNOTEs below a specified severity level can be 
optionally suppressed by declaring in the EXEC statement: 
PARM= 'MSGLEVEL=n • (where "n" is the selected severity level). If you 
are net concerned with warning and error messages in a specific 
assembly, using this option provides a cleaner listing. 



Abnormal Assembly Termination 

Whenever the asseirfcly cannct be completed, Assembler H provides a 
iressage and, in some cases, a specially formatted dump for diagnostic 
information. This iray indicate an assembler malfunction or it may 
indicate a programmer error. The statement causing the error is 



4' 



identified and, if possible, the assembly listing up to the point of \y 

the error is printed. The Assembler H Messages book, Order Number 
SC26-3 770, describes the abnormal termination messages. The messages 
give enough information to (1) correct the error and reassemble your 
prograir, or (2) determine that the error is an assembler malfunction. 

The Assembler H Program Lcgic Manual, Order Number LY26-3760, gives 
a complete explanation of the format and contents cf the abnormal 
termination dump. 



Macro Trace Facility (MHELP) 

The MHELP instruction controls a set of trace and dump facilities. 
Options are selected by an absolute expression in the MHELP operand 
field. MHELP statements can occur anywhere in open code or in macro 
definitions. MHELP options remain in effect continuously until 
superseded by another MHELP statement. Appendix B is a sample MHELP 
trace and duirp. 



^wX 



30 Assembler H Programmer's Guide 



■ 1 



o 



Macro Call Trace 



(MEELP B'1* or MHELP 1)i This option provides a one-line trace for 
each macro call, giving the name of the called macro, its nested depth, 
and its SSYSNDX (total number of macro calls) value. 

Note: This trace is provided upon entry into the macro. No trace 
is provided if error conditions prevent entry into the macro. 



Macro Branch Trace 

(MF.ELP B'10', or MHELP 2) . This option provides a one-line trace for 
each AGO and true AIF conditional- assembly statement within a macro. 
It gives the model -statement numbers of the "branched from" and 
"branched to" statements, and the name of the macro in which the branch 
occurs. This trace option is suppressed for library macros. 



Macro Entry Dump 

(MHELP B' 10000', or MHELF 16), This option dumps parameter values from 
the macro dictionary when the macro is called. 



Macro Exit Dump (MHELP BM000', or MHELP 8). This option dumps SET 
symbol values from the macro dictionary upon encountering a MEND or 
MEXIT statement. 



Macro AIF Dump 

(MHELP BMOO', or MHELF U) . This option dumps SET symbol values from 
the macro dictionary immediately before each AIF statement that is 
encountered. 



Global Suppression 



(MHELF E'100000', or MHELF 32). This option suppresses global SET 
symbols in the twc preceding options, MHELF 4 and MHELP 8. 



MHELP Suppression 

(MHELF BM0000000', or MEELF 128|. This option suppresses all currently 
active MHELP cpticns. V_,,/ 



Assembler Diagnostic Facilities 31 



Page of SC26 -3759-0 
Revised February 15, 1971 
By TNL SN33-8095 



Combining Options 



C 



Multiple options can be obtained by combining the option codes in one 
MHELP operand. For example, call and branch traces can be invoked 
by MHELP B»11», MHELP 2+1, or MHELP 3. 



MHELP Control on &SYSNDX 



The MHELP operand field is actually mapped into a fullword. 
Previously-defined MHELP codes correspond to the fourth byte of this 
fullword. 

&SYSNDX control is turned on by any bit in the third byte (operand 
values 256-65535 inclusive) . Then, when &SYSNDX (total number of 
macro calls) exceeds the value of the fullword which contains the 
MHELP operand value, control is forced to stay at the open-code 
level, by in effect making every statement in a macro behave like 
a MEXIT. Open code macro calls are honored, but with an immediate 
exit back to open code . 



Examples : 




MHELP 256 


Limit &SYSNDX to 256. 


MHELP 1 


Trace macro calls. 


MHELP 256+1 


Trace calls and limit &SYSNDX to 257. 


MHELP 65536 


No effect. No bits in bytes 3,4. 


MHELP 65792 


Limit &SYSNDX to 65792. 



When the value of &SYSNDX reaches its limit, the diagnostic 
' message "ACTR EXCEEDED — &SYSNDX" is issued. 






32 Assembler H Programmer's Guide 



Programming Considerations 






This section describes of a number of subjects about assembler -language 
programming. 



Saving and Restoring General Register Contents 



A problem program should save the values contained in the general 
registers upon commencing execution and, upon completion, restore to 
the general registers these same values. Thus, as control is passed 
from the operating system to a problem program and, in turn, to a 
subprogram, the status of the registers used by each program is 
preserved. This is dene through use of the SAVE and RETURN system 
macro instructions. 

The SAVE macro instruction should be the first statement in the program. 
It stores the contents of registers 14, 15, and through 12 in an 
area provided by the program that passes control. When a problem 
program is given ccntrcl, register 13 contains the address of an area 
in which the general register contents should te saved. 

If the program calls any subprograms, or uses any operating system 
services other than GETMAIN, FREEMAIN, ATTACH, and XCTI, it must first 
save the contents of register 13 and then load the address of an 18- 
fullword save area into register 13. This save area is in the problem 
program and is used by any subprograms or Operating System services 
called by the problem program. 

At completion, the problem program restores the contents of general 
registers 14, 15, and 0-12 by use of the RETURN system macro instruction 
(which also indicates program completion) . The contents of register 
13 must te restored before execution of the RETURN macro instruction. 

The ceding sequence that fellows illustrates the basic process of 
saving and restoring the contents of the registers. A complete 
discussion of the SAVE and RETURN macro instructions and the saving 
and restoring of registers is contained in the Data Management Services 
publication. Order Number GC28-6646, and the Data Management Macro 
Instructions publication. Order Number GC2 8-6647. 



Name 


Operation 


Operand 


BEGIN 


SAVE 


(14,12) 

set up base register 




ST 
LA 


13,SAVEBLK+4 
13.SAVEBLK 


SAVEBLK 


L 

RETURN 

DC 


13,SAVEBLK+4 

(14,12) 

18F'0' 



C J 



Programming Considerations 33 



Program Termination 



You indicate completion of an assembler- language source program by 
using the RETURN system macro instruction to pass control from the 
terminating program to the program that initiated it. The initiating 
program may be the Operating System or, if a subprogram issued the 
RETURN, the program that called the subprogram. 

In addition to indicating program completion and restoring register 
contents, the RETURN macro instruction may also pass a return code 
-- a condition indicator that may be used by the program receiving 
ccntrol. If the return is to the operating system, the return code 
is compared against the condition stated in the COND= parameter of 
the JOE or EXEC statement. If return is to another problem program, 
the return cede is available in general register 15, and may be used 
as desired. Your program should restore register 13 before issuing 
the RETURN macro instruction. 

The RETURN system macro instruction is discussed in detail in the 
Supervisor and Data Management Macro Instructions publication, Order 
Number GC 2 8- 6 6 47. 



c 



PARM Field Access 



Access to information in the PARM field of and EXEC statement is gained 
through general register 1. When control is given to the problem 
program, general register 1 contains the address of a fullword which, 
in turn, contains the address of the data area containing the 
information. 

The data area consists of a halfword containing the count (in binary) 
of the number of information characters, followed by the information 
field. The information field is aligned to a fullword boundary. The 
following diagram illustrates this process: 

General Register 1 







Address of Fullword 




Points 
to 






Fullword 




Address of Data Area 








Points 
to 








Data Area 




Count in Binary 


Information Field 











Macro Definition Library Additions 



Source statement coding, tc be retrieved by the COPY assembler 
instruction, and macro definitions may be added to the macro library. 
The IEEUPDTE utility program is used for this purpose. Details of 
this program and its control statements are contained in the Utilities 
publication. Order Kumber GC28-6586. The following sequence of job 
control statements can be used to call the utility program and identify 
the needed data sets. It is assumed that the job control statements, 
IEEUPDTE program control statements, and data are to enter the system 
via the input stream. 






34 Assembler H Programmer's Guide 



"""\ 



^k^^ 



//jobname JOB 

//stepname EXEC PGM=IEBUPDTE,PARM=MOD 

//SYSUT1 DD DSNAME=SYS1.MACLIB,DISP=OLD 

//SYSUT2 DD DSNAME=SYS1.MACLIB,DISP=OLD 

//SYSPRINT DD SYSOUT=A 

//SYSIN DD 



IEBUPDTE control statements and source statements or 
macro-definitions to be added to the macro library 
(SYS1.MACLIB) 



/* (delimiter statement) 



Load Module Modification — Entry Point Restatement 

If the editing functions of the linkage editor are to be used to modify 
a load module, the entry point to the load module must be restated 
when the load module is reprocessed by the linkage editor. Otherwise, 
the first byte of the first control section processed by the linkage 
editor will become the entry point. To enable restatement of the 
original entry point, or designation of a new entry point, the entry 
point must have been identified originally as an external symbol; that 
is, it irust have appeared as an entry in the external symbol dictionary. 
External symbol identification is done automatically by the assembler 
if the entry point is the name of a control section or START statement; 
otherwise, an assembler ENTRY statement must be used to identify the 
entry point name as an external symbol. 

When a new object module is added to or replaces part of the load 
module, the entry point is restated in one of three ways: 

• By placing the entry point symbol in the operand field of an EXTRN 
statement and an END statement in the new object module. 

• EV using an END statement in the new object module to designate 
a new entry point in the new object module. 

• By using a linkage editor ENTRY statement to designate either 

the original entry point or a new entry point for the load module. 

Further discussion of load module entry points is contained in the 
Linkage Editor and Loader publication, Order Number GC28-6538. 



Object Module Linkage 

Object modules, whether generated by the assembler or another language 
processor, may be combined by the linkage editor to produce a composite 
load module, provided each object module conforms to the data formats 
and linkage conventions required. This topic discusses the use of 
the CALL system macro instruction to link an assembler language main 
program to subprograms produced by another processor. The Supervisor 
and Data Management Macro Instructions publication, Order Number GC2 8- 
6647, contains additional details concerning linkage conventions and 
the CALL system macro instruction. 



Programming Considerations 35 



Figure 8 is an example of statements used to establish the assembler- 
language prograir linkage to FORTRAN and COBOL subprograms. 

If any input/output operations are performed by called subprograms, 

appropriate DD statements for the data sets used by the subprograms 

must be supplied. See the appropriate language programmer' s guide {C^ 

for an explanation of the ED statements and special data set record '\.J 

formats used for the processor. 






^kmaaar 



36 Assembler H Programmer's Guide 



ENTRPT SAVE 


(14,12) 


LR 


12.15 


USING 


ENTRPT.12 


ST 


13.SVAREA+4 


LA 


15.SVAREA 


ST 


15,8(13) 


LR 


13,15 



CALL name.(V1.V2,V3).VL 







L 


13.SVAREA+4 






RETURN (14.12) 


3 


SVAREA DC 


18F'0' 


4 


VI 


DC 


(data) 


b 


V2 


DC 


(data) 


b 


V3 


DC 
END 


(data) 



This is an example of OS linkage convention. See the Supervisor and Data Management Services publication. 
Order Number GC28-6646, for details. 

2 

The symbol used for "name" in this statement is: 

a. The name of a subroutine or function, when the linkage is to a FORTRAN-written subprogram. 

b. The name defined by the following COBOL statements in the procedure division: 

ENTER LINKAGE. ENTRY'name'. 

c. The name of a CSECT or START statement, or a name used in the operand field of an ENTRY statement in an 
assembler- language subprogram. 

The order in which the parameter list is written must reflect the order in which the called subprogram expects the 
argument. If the called routine is a FORTRAN-written function, the returned argument is not in the parameter list: a 
real or double precision function returns the value in floating point register zero; an integer function returns the value 
in general purpose register zero. 

NOTE: When linking to FORTRAN-written subprograms, consideration must be given to the storage requirements 
of IBCOM (FORTRAN execution-time I/O and interrupt handling routines) which accompanies the compiled FORTRAN 
subprogram. In some instances the call for IBCOM is not automatically generated during the FORTRAN ompilation. 
The FORTRAN IV Library publication. Order Number GC28-6596, provides information about IBCOM requirements and 
assembler statements used to call IBCOM. 

FORTRAN-written subprograms and FORTRAN library subprograms allow variable-length parameter lists in linkages 
which call them; therefore all linkages to FORTRAN subprograms are required to have the high-order bit in the last 
parameter in the linkage set to 1. COBOL-written subprograms have fixed-length calling linkages; therefore, for COBOL 
the high-order bit in the last parameter need not be set to 1. 

3 

This statement reserves the save area needed by the called subprogram. When control is passed to the subprogram, 

register 13 contains the address of this area. 

' ' When linking to a FORTRAN or COBOL subprogram, the data formats declared in these statements are determined 
by the data formats required by the FORTRAN or COBOL subprograms. 



o 



Fiqure 8. Sample Assembler Linkage Statements for FORTRAN 
or CCECL Subprograms 



Programming Considerations 37 



Page of SC26 -3759-0 
Revised February 15, 1971 
By TNL SN33-8095 



Special CPU Programming Considerations ■ J 

You should be aware of operational differences between the Model 85, 
Model 91 , and tfodel 195 and other System/360 models* The primary 
differences are: 

• Non-sequential instruction execution — 91 and 195 

• Extended precision machine instructions — 85 and 195 

• Unaligned operands — 85 and 195 



Controlling Instruction Execution Sequence 

The Model (91/ and Model fl95/maintain a logical consistency with respect 
to their own operations, including the beginning and ending of I/O 
operations, but they do net assume responsibility for such consistency 
in the operations performed by asynchronous units. Consequently, for 
any asynchronous unit that depends upon a strict adherence to sequential 
(or serial) execution, a problem program must set up its cwn procedures 
to ensure the proper instruction sequence. 

For a program section that requires the serial or sequential execution 
cf instructions, the following 'no-operation* instruction: 

BCR N,0 N = 1,15 

causes instruction decoding to halt until the instructions that have 
already been decoded are executed. (This action is called a pipe^line 
drain.) On the Model 91 and Model 195, this instruction ensures that" 
all tne instructions preceding it are executed before the instruction 
succeeding it is decoded. Use cf this instruction should be minimized, 
because it may affect the performance of the CPU. 

Isolating an instruction by preceding it and following it with a ECR 
N,0 instruction eliminates multiple imprecise interruptions frcm more 
than one instruction by virtue of the pipe- line drain effect. However, 
because multiple exceptions may occur in one instruction, this technique 
does not eliminate a multiple imprecise interruption, nor does it 
change an imprecise interruption into a precise interruption. The 
use of the ECR instruction does not assure you that you can fix up 
an error situation. In general, the only information available will 
be the address of the ECB instruction. The length of the instruction 
preceding the ECR instruction is not recorded, and generally there 
is no way to determine what that instruction is. 

Note ; BCR 0,0 does not cause a pipe-line drain. 



Extended-Precision Machine Instructions 



The extended-precision arithmetic instructions and the rounding 
instructions of the Model 85 and the Model 195 are shown below. A 
complete description cf these instructions is in the System/360 
Principles of Operation, Order Number GA22-6821. 



38 Assembler H Programmer's Guide 



im. 



Name 


Mnemonic 


Type 


Op Code 


ADD NORMALIZED (extended operands, extended result) 


AXR 


RR 


36 


SUBTRACT NORMALIZED (extended operands, extended result) 


SXR 


RR 


37 


MULTIPLY (extended operands, extended result) 


MXR 


RR 


26 


MULTIPLY (long operands, extended result) 


MXDR 


RR 


27 


MULTIPLY (long operands, extended result) 


MXD 


RX 


67 


LOAD ROUNDED (extended to long) 


LRDR 


RR 


25 


LOAD ROUNDED (long to short) 


LRER 


RR 


35 



A program containing the extended-precision instructions cannot be 
executed successfully en another System/360 model unless those 
instructions are converted into others that can be executed by the 
non-Model 85 or Model 195 irachine. Ihe OPSYN assembler instruction 
helps provide a facility for doing this. 

OPSYN is described in the Assembler H Language specifications Manual, 
Order Number GC26-3771. 

A type L DC instruction can be used to specify an extended-precision 
(16-byte) ficatinq-pcint constant. The EC instruction is described 
in the Assembler Language manual, Order Number GC28-6514. 



Unaligned (Byte-Oriented) Operands 



The Model (85/and ModelM95xVill execute unprivileged RX and RS format 
instructions with f ixed^Trcint, floating-point, or logical operands 
that are not on integral boundarie s. Assembly of such instructions 
normally produces the diagnostic "message "IEV0 33 ALIGNMENT ERROR". 
A FARM option in the EXEC statement, ALGN or NCALGN, makes it possible 
to suppress the iressage and thereby obtain a clean assembly listing. 
The object cede is not affected. 

Note that an assembled program that requires use of the Model 85 and 
Model 195 byte-criented operand feature cannot be run on another 
machine, nor can it run successfully under the Operating System if 
it violates any alignment restrictions imposed by the Operating System. 



o 



Programming Considerations 39 



This page intentionally left blank. 



C i 



v_y 



€ 



j 



40 Assembler H Programmer's Guide 



Appendix A. Sample Program 



The sample program included with Assembler H when it is received from 
IBM is described in this appendix. This program is a collection of 
basic assembler- language, nacre, and conditional assembly features, 
most of which are unique to Assembler H. The circled letters in the 
description below refer to corresponding letters in the listing that 
fellows the description. 



® 



O 

^■^^d^ 



The job control language for the assembly consists of the IBM- 
supplied cataloged procedure ASMHC and the statements needed to 
use the procedure and supply input to the assembler. (In this 
sample, the procedure statements begin with XX ? ) Note that three 
of the default PABM options are overridden in the EXEC statement 
that calls the procedure. 

By using the MULT (multiple assembly) option, this sample program, 
the sample program in Appendix B, and the listings in Figure 6 
and Figure 7 were assembled with one set of JCI cards. Object 
modules were not punched for any of the assemblies because the 
NODECK option is specified. The character string specified in 
the SYSPAFM option is available to each assembly. The character 
string is displayed in this program by using the system variable 
symbol SSYSPAFM (statement 144) . 

The External Symbol Dictionary shows a named common statement. 
The named common section is defined in statement 158. 



Appendix A. Sample Program 41 



(c) Statement 10: Save the current status of the PRINT statement 

(ON, NOD AT A, GEN). 

Statement 11: Leave ON in effect, modify the other two options 
to DATA,NCGEN. 

Statement 12: Macro call; note that the expansion (statement 
10) is not printed. 

Statement 14: All 28 bytes of data are displayed to the two- 
operand DC. 

Statement 15: Restore prior status of PRINT. 

Statements 17 and 18: The generated output of the iracrc ViTO is 
shewn and only the first 8 bytes of data are displayed. 

(d) Statements 14 and 18: Multiple constants are allowed in 
hexadecimal and binary EC operands, and neither syrrbel in the 
duplication factor has been defined yet. Definition occurs in 
statements 108 and 109. 

Statements 26, 28, 136, and 155 illustrate use of the LOCTR 
assembler instruction. This feature allows one to break control 
sections down into sub-control sections. It may be used in CSECT, 
DSECT, and COM. LOCTR has many of the features of a control 
section for example, all of the first LOCTR in a section is 
assigned space, then the second, and so on. The name of the 
control section automatically names the first LOCTR section. 
Thus LOCTR A is begun, or resumed, at statements 2, 28, and 155. 
Note that the location counter value shown each time is the resumed 
value of the LCCTP. On the other hand, various LOCTR sections 
within a control section have common addressing as far as USING 
statements are concerned, subject to the computed displacement 
falling within through 4 95. In the sample, CONSTANT is in 
LCCTP DEECEES but the instruction referencing it (statement 25) 
has no addressing problems. 

Three-operand EQU. Here, we are assigning: (a) the value of E5 
(not yet defined) to A8, (b) the length attribute of A5 to A8, 
and (c) the type attribute of A7 to A8. If no operand is present 
in an ECC statement, the type attribute is U and the length 
attribute is that cf the first term in the operand expression. 
Symbols present in the label and/or operand field must be 
previously defined. Note that it is not possible to express the 
type attribute of A7 directly in the EOC statement. The EQU 
statement at 32 could have been written 

A8 ECU B5,2,C'L» 

A8 EQU B5,X»2' ,X'C4« 

Set symbols &LA8 and &TA8 have not been declared in a LCL or GEL 
statement prior to their use here f Therefore, they are defaulted 
to local variable symbols, as follows: SIA8 is a LCLA SET symbol 
because it appears in the name field of a SETA; &TA8 is a LCLC 
SET symbol because it is first used in a SETC. 

MNOTE may appear in open code. As such, they have all properties 
of MNOTEs inside macros, including substitution. 



c 






42 Assembler H Programmer's Guide 



(7) A SETC expression may have a duplication factor. The SETA 

expression must be enclosed in parentheses and immediately precede 
the character string, the substring notation, or the type attribute 
f\ reference. 

fcs-^ (j) Statements 57-60 illustrate 4-byte self- defining values and unary 

+ and -. The value cf X will appear later in a literal address 
constant (see statement 162) . Location counter values for EQU 
and USING (statement 3) display 4 bytes. 

The programmer macro DEMO is defined well after the start of the 
assembly. Macros can be defined at any point and, having been 
defined and/cr expanded, can be redefined. Note that the 
parameters on the prototype are a mixture of keywords and 
positional operands. SSYSLIST may be used. The positional 
parameters are identified and numbered 1, 2, 3 from left to right; 
keywords are skipped ever. 

(l) Statement 70 illustrates the extended SET feature (as well as 
implicit declaration of &LOC(1) as a LCLC) . Both &LOC (1) and 
&LOC(2) are assigned values. One SETA, SETB, or SETC statement 
can then do the work of many. 

Statement 72 is a model statement with a symbolic parameter in 
its operation field. This statement will be edited as if it is 
a macro call; at this time, each operand will be denoted as 
positional or keyword. At macro call time, it will not be possible 
to reverse this decision. Even though treated as a macro, it 
is still expanded as a machine or assembler operation. 

Statement 74 illustrates the computed AGO statement. Control 
will pass to .MNOTE1 if &KEY2 is 1, to .MNOTE2 if &KEY2 is 2, 
to .MNOTE3 if &KEY3 or will fall through to the model statement 
at 75 otherwise. 

(o) Statement 77 illustrates the extended AIF facility. This statement 
is written in the alternate format. The logical expressions are 
examined from left tc right. Control passes to the sequence 
symbol corresponding to the first true expression encountered, 
else falls through to the next model statement. 

(p) Statement 87 contains a subscripted created SET symbol in the 

name field. Exclusive of the subscript notation, these SET symbols 
have the form & (e) where e is an expression made up of character 
strings and/or variable symbols. When such a symbol is encountered 
at expansion time, the assembler evaluates e and attempts to use 
S (value) in place of S (e) . Looking ahead, we see that DEMO is 
used as a macro instruction in statement 97 and &KEY1=C. Thus, 
the 'e' in this case is X&KEY1 which has the value XC . Finally, 
the macro- generator will use &XC(2) as the name field of this 
model statement. In statement 108, note that &XC (2) equals 
TRANSYLVANIA (statement 96) . Finally, in the sequence field of 
statement 108, we see that this statement is a level 01 expansion 
of a programmer macro and the corresponding model statement is 
statement number 87. 

Created SET symbols may be used wherever regular SET symbols are 
used in declarations, name fields or operands of SET statements, 
in model statements, etc. Likewise, they are subject to all the 
restrictions of regular SET symbols. In the programmer macro 
DEMO, it would not have been valid to have the statement GBLC 
S(XSKEY1) (1) because, in statement 71, we have ABLC SXA(5), 



Appendix A. Sample Program 4 3 



(SXB920) , SXC(1) and S(XSKEY1)(2) becomes SXC(2) unless, of course, 
SKEY1 was assigned something other than the value A, B, or C in 
the macro instruction DEMO, statement 97. In that case, we would 
need a global declaration statement if we wanted S(XSKEY1) to 
be a global SET syirbcl. 

Because global declarations are processed at generation time and 
then only if the statement is encountered, we would insert the 
following statements between, say, statements 71 and 72. 

AIF(»SKEY1» EQ'A» or «EKEY1« EQ 'B* or 'EKEY1' E£ 'C')- SKIP 
GBIC S(XSKEY1) (1) 
.SKIP ANCF 

As the macro is defined, &(X&KEY1) will be a global SETC if &KEY1 
is A, B, or C; otherwise it will be a LCLC or, possibly, a LCLA. 
In the macro, if &(XSKEY1) becomes a local, it will have a null 
or zero value. Created SET symbols are a powerful tool. However, 
their use requires a careful planning. 

Kn In statements 93 and 94, note that SXA is declared as a subscripted 
global SETC variable with a maximum subscript of 1 and, in the 
next statement (an extended SET statement), we store something 
into SXA (2). There is no contradiction here. The statement GBLC 
SXA(1) marks SXA as a subscripted global SETC symbol any decimal 
self-defined number (1 through 2147483647) can be used. 
Furthermore, only a nominal amount of space is set aside in the 
global dictionary — this space is open-ended and will be increased 
on demand and only en demand. 

Statement 97 is the macro instruction DEMO. Note that &F1 has 
the value WRITE. Therefore, the model statement at statement 
72 becomes an inner macro, WRITE, producing the code at statements 
98-103. The sequence field of these statements contains 03-1HBRD, 
indicating that they are generated by a level 03 macro (DEMO is 
01, WRITE is 02) named 1HEREWRS. It is an inner macro called 
by WRITE. 

(s) Statements 108 and 109 contain some ordinary symbols longer than 

eight characters. The limit for ordinary symbols, operation codes 
(for programmer and library macros and op codes defined through 
OPSYN) , variable symbols, and sequence symbols is sixty-three 
characters (including the & and e in the latter two instances, 
respectively) . Most long symbols will probably be nearer to eight 
than sixty-three characters in length. Extremely long symbols 
are simply tec difficult to write, especially if the symbol is 
used frequently. The requirement that the operation field be 
present in the first statement of ac^mt^x^^A^stat^sryt is__s till 
in effect. Furthermore, names of (^TARtT^SECT^E^^^ 
etc. symbols are stil l restricted t^r^i^htch^rac^EeTs^, 

(t) Library macros may be inserted into the source stream as 
programmer macros by use of a COPY statement. The result 
(statements 118-126) is essentially a programmer macro definition. 
When a library macro is brought in and expanded by use cf a macro 
instruction, the assembler (1) looks the macro up by its member- 
name and (2) verifies that this same name is used in the operation 
field of the prototype statement. Therefore, for example, DCB 
has to catalogued as DCB. However, as COPY code, the member name 
bears no relationship to any of the statements in the member. 



P 



^IkvvvJr 



44 Assembler H Programmer's Guide 



© 



Thus, several variations of a given macro could be stored as a 
library under separate names, then copied in at various places 
in a single assembly as needed. (Assembler H allows you to define 
and redefine a macrc any number of times) . 

J) (u) In statement 129, MARK is made a synonym of NOTE. To identify 

'"-^ NCTE as a macro, it has to be used as a macro instruction or 

programmer macro definition prior to its use in the operand field 
of an OPSYN statement. The COPY code at 118- 126 is a programmer 
macro definition. The macro instruction at statement 130 is MARK. 
We can use MARK and NOTE interchangeably. If desired, we could 
put these two words on separate lines (that is, make NOTE 
synomomous with the null string) . This would remove NOTE as a 
macro definition. Then, we could call the macro only as MARK. 

Statement 144 demonstrates SSYSTIME, &SYSDATE and &SYSFARM. The 
values for the first two are the same as we use on the heading 
line. The value for &SYSPARM is the value passed in the FARM 
field of the EXEC statement on the default value assigned to 
&SYSPARM when Assembler H is installed. 

Wj System variable symbols &SYSLOC and SSYSECT are displayed. The 

sequence field indicates that the model statements are statements 
148 and 149. 

(x) Illustration of named COMMON. Note that establishing 

addressability tc such a section can be obtained with a USING 
PD2 register statement. With blank COMMON, one has to make use 
of some label en a statement after the CCMMON statement. 

(y) If there are literals outstanding when the END statement is 

encountered, they are assigned to the LOCTR currently in effect 
for the first control section in the assembly. This may or may 
not put the literals at the end of the first control section. 
In this sample assembly, the first control section. A, has two 
ICCTRs, A and DEECEES. Eecause A is active (at statement 155), 
the literals are assembled there. You always have the ability 
to control placement of literal pools by means of the LTORG 
statement. Note that X'EFFFFFE8' is used for the contents of 
A(x) , statement 162. The symbol X was assigned the value (4*- 
6) by an ECU in statement 43 . 






o 



Appendix A. Sample Program 45 



c 



® 



//MRTSMP JOB (258753, D81 ), M.R .T ALLEY, MSGl EVEL= 1 

// EXEC ASMHC,PARM.C=(NODECK,MULT, , SYSPARM=SAMPLL*PROGRAM< ) 

XXC EXEC PGM=IEV90,KEGION=200K 

XXSYSLIB DO DSN=SYSl.MACLia,DISP=SHR 

XXSYSUT1 Oi) UNIT=(SYSDA,SEP=SYSLIB),SPACF=<CYL,( 10,5) ) ,0SN=£SYSUT1 

XXSYSPUNCH .01) SYSOUT=B,QCB=<BLKSIZE=B00),SPACt=(CYL, (5,5,0)) 

//SYSPRINT 03 SYS0UT=<A,,21 ) ,DCB= ( BLKS I ZF = 3509 ) , ) 

// UNIT=( ,SFP=<SYSUTl,SYSPUhCH) ) 

X/SYSPRINT 00 SYS0UT=A,DCB=(BLKSIZE=3509),UNIT=(,SEP=<SYSUTl,SYSPUNCH) I 

//SYSIN 00 * 

IEF236I ALLOC. FOR MRTSMP C 

IEF237I 135 ALLOCATED TO SYSLIB 

ALLOCATED TO SYSUT1 

ALLOCATED TO SYSPUNCH 

ALLOCATED TO SYSPRINT 

ALLUCATED TO SYSIN 



IEF?37I 290 
IEF237I 132 
IEF237I 
IEF237I 



131 

130 



BIGNAME 
SYMBOL TYPE 
(b) PD2 



EXTERNAL SYMBOL DICTIONARY 



10 ADDR LENGTH LD 10 



SD 0001 000000 OOOODC 
CM 0002 000000 000702 



PAGE 1 
ASM H V 01 11.52 05/20/70 






46 Assembler H Programmer's Guide 



BIGNAME SAMPLE PROGRAM. 1ST TITLE STATEMENT HAS NO NAME. 2ND ONE DOES 



o 



LOC OBJECT CODE 



ADDR1 AODR2 STMT SOURCE STATEMENT 



ASM H V 01 11.52 05/20/70 



000000 
00000000 



CSECT 
USING *,8 



© 



5 «**#**********************#*****************«***************♦****♦**** 

6 * PUSH ANO POP STATEMENTS * 

7 * PUSH DOWN THE PRINT STATEMENT, REPLACE IT, RETRIEVE ORIGINAL * 
p ********************************************************************** 



000002 01230ABC0102030A 
OOOOOA OBOC0102030A080C 
000012 010203CAOBOC0102 
00001A 030AOBOC 



00001E 0A23 

000020 01230ABC0102030A 



PUSH PRINT SAVE DEFAULT SETTING 
PRINT NOGEN.OATA 



PRINT ON,NODATA,GEN« 
11 

12 WTO MF = IE,(D) EXPANSION NOT SHOWN 

D ) 14 DC X'123, ABC, (REALLYL0NGSYM80L-TRANSYLVANI A ) B • 1 , 10,11,1010,1011,1100' 



© 



© 



15 POP PRINT RESTORE DEFAULT PRINT SETTING 

16 WTO MF=I E, < 1 ) ) EXPANSION SHOWN 
17+ SVC 35 ISSUE SVC 

18 DC X'123,ABC',(REALLYLONGSYMBOL-TRANSYLVANIAIB'1,10,11,1010,1011,1100' 

20 *************♦*******************************************#************ 

21 * LOCTR INSTRUCTION * 

22 * LOCTR ALLOWS 'REMOTE' ASSEMBLY OF CONSTANT * 

23 ********************************************************************** 



00003C 5850 8098 

000098 

000098 00000005 

000040 



25 L 5, CONSTANT 

26 DEECEES LOCTR 

27 CONSTANT DC F'5' 

28 A LOCTR 



CONSTANT CODED HERE, ASSEMBLED BEHIND LOCTR A 
RETURN TO 1ST LOCTR IN CSECT A 



© 



30 ********************************************************************** 

31 * 3 OPERAND EQUATE WITH FORWARD REFERENCE IN 1ST OPERAND * 

32 ********************************************************************** 



000040 1812 

000042 OOOOOOCOOOOO 
000048 413243F6A8885A30 
000050 338D313198A2E037 



34 A5 
35 



LR 1,2 
PRINT DATA 



36 A7 DC L'3. 1415926535897932384626433832795028841972' L'A7 = 16,T'A7 = L 

37 &TYPE SETC T'A7 

38 A8 EQU B5,L'A5,C<&TYPE' 
+A8 EQU B5,L'A5,C'L' 



Appendix A. Sample Program 47 



BIGNAME SAMPLE PROGRAM. 1ST TITLE STATEMENT HAS NO NAME, 2ND ONE DOES 



LOC OBJECT CODE 



ADDRl ADDR2 STMT SOURCE STATEMENT 



ASM H V 01 11.52 05/20/70 



40 ****** ^** ****************************************************** ****** 

41 * IMPLICIT DECLARATION OF LOCALS &A, £C — USE OF SETC OUP FACTOR TO * 

42 * PRODUCE SETC STRING LONGER THAN 8, MNOTE IN OPEN CODE * 

43 ********************************************************************** 



© 
© 

© 



45 &LA8 SETA L • A8 

46 £TA8 SETC T'A8 

47 MNOTE *, 'LENGTH OF A8 = &LA8, TYPE OF A8 = 6TA8' 
+*, LENGTH OF A8 = 2, TYPE OF A8 = L 

49 £A SETA 2 

50 E.C SETC (CA+3) 'STRING,' 

51 MNOTE *,'£&C HAS VALUE = SC 

+*,£C HAS VALUE = STRING, STRING, STRING, STR ING, STRING, 

53 ********************************************************************** 

54 * EXAMPLES OF 4 BYTE SELF-DEFINED TERMS, UNARY + AND - * 

55 ********************************************************************** 



000058 7FFFFFFFC1C2C3C4 
000060 FFFFFFFF 
000064 181D 



57 
58 
60 X 



DC A(2147483647,C'ABCD',X« FFFFFFFF' ) 
LR -1+2.16+-3 
EOU 4*-6 









vy 



48 Assembler H Programmer's Guide 



km**' 



BIGNAME INSERT PROGRAMMER MACRO IN SOURCE STREAM NOW 



LOC OBJECT CODE 



AOOR1 AODR2 STMT SOURCE STATEMENT 



ASM H V 01 11.52 05/20/70 






000066 1816 
000068 9220 1005 
00006C 5081 0008 
000070 58F1 0008 
000074 58F0 F030 
000078 05EF 



00007A 5850 A008 
00007E 1B9A 
000080 98CD 8090 
000084 5073 80A8 



62 ********************************************************************** 

63 * MIXED KEYWORDS AND POSITIONAL PARAMETERS, EXTENDED AGO AND AIF * 

64 * STATEMENTS, DECLARATION AND USE OF SUBSCRIPTED SET SYMBOLS, * 

65 * USE OF CREATfcD SET SYMBOLS, EXTENDED SET STATEMENTS * 

66 ********** ******************************************* ***************** 




© 
© 
© 

© 



© 



68 




MACRO 


69 




DEMU 


70 


tLUC(l) 


SETC 


71 




G8LC 


72 




£P1 


73 


£N 


SETA 


74 




AGO 


75 


£N 


SETA 


76 




MNOTE 


77 




AIF 


78 




MNOTE 


79 




AGO 


80 


.MN0TE1 


MNOTE 


81 




AGO 


82 


.MN0TE2 


MNOTE 


83 




AGO 


84 


.MN0TE3 


MNOTE 


85 


.COMMON 


L 


86 


£XB(2I SR 9,10 


87 


MX&KEY1) (21 LI 


88 


£P2 ST 7 


, £P3 


89 




MEND 



Ci) 


93 




GBLC 




94 


tXA(l) 


SETC 




95 


tXB(l) 


SETC 


© 


96 


£XC(1) 


SETC 


97 




DEMO 



00008 
00008 
00030 



00008 



£P1,&KEY1 = A,CP2,£KEY2=1,£,P3,£KEY3=3,£P4 

•2', '3' £LOC IS DIMENSIONED LCLC BY DEFAULT 

£XA(5) ,6.XB(20),6XC(1) 

SSYSLISTI4) ,tSYSLIST(5) .CSYSLI ST ( 6) ,MF=E 

I 

(&KEY2I .MNJTE1..MN0TE2..MN0TE3 

2 

*,'&&KEY2 NOT 1,2, OR 3 USE &EKEY3 IN PLACE OF IT* 

(GKEY3 EO D.MNOTEl, 

(&KEY3 EQ 2).MNOTE2,(£KEY3 EQ 31.MN0TE3 
*,'BOTH &SKEY2 AND G6KEY3 FAIL TO QUALIFY' 
•COMMON 

*, "CtKEYCLOCieN) = 1" 
•COMMON 
MNOTE *,'&£KEY£LOCUNI = 2' 

COMMON 

,"&£KEY&L0C(5,N) = 3' 

,81,10) NOTE THAT OPCODES, OPFRANDS & COMMENTS 
ON MODEL STATEMENTS 
LM 12,13,-AI A5,X) ARE KEPT IN PLACE UNLESS DISPLACED 
AS A RESULT OF SUBSTITUTION 



DEMO MACRO INSTRUCTION (CALL) 

&XA(1),&XB(2),£XC(3] 
•A', 'MISSISSIPPI' 
•B',' SUSQUEHANNA' 
•C't 'TRANSYLVANIA' 
KEY3=2, WRITE, RE ALLYLONGSYMBOL, 
A8+8* ( B5-CONSTANT-7 ) ( 3 ) ,KEYl=C , ( 6 ) , SF 
(8I,KEY2=7 
1,6 

5(l),X'20' 
8,8(1,0) 
15,8(1,0) 
15,48(0,15) 
14,15 
2, OR 3 USE &KEY3 IN PLACE OF 



N 



98+ LR 

99+ MVI 

100+J ST 

101+ L 

102+ L 

103+ BALR 

104+*,£KEY2 NOT 1, 
105+*,£KEY3 = 2 

106+ L 5,8(,10) NOTE THAT OPCODES, OPERANDS £ COMMENTS 

-^107+SUSQUEHANNA SR 9,10 ON MODEL STATEMENTS 

0009o(V)l08.+ TRANSYLVANI A LM 12, 13, = A( A5, X ) ARE KEPT IN PLACE UNLESS DISPLACEO 



LOAD DECB ADDRESS 03-IHBRD 
SET TYPE FIELD 03-IHBRD 

STORE DCB ADDRESS 03-IHBRD 
LOAD DCB ADDRESS 03-IHBRD 
LOAD RDMR ROUTINE AODR 03-IHBRD 
LINK TO RDWR ROUTINE 03-IHBRD 



IT 



000A8 



109+REALLYLONGSYMBOL ST 7, A8+8*(B5-C0NST ANT-7 I ( 3) 

AS A RESULT OF SUBSTITUTION 



01-00076 
01-00082 
01-00085 
01-00086 
01-00087 
X01-00088 



Appendix A. Sample Program 49 



c 



BIGNAME INSERT PROGRAMMER MACRO IN SOURCE STREAM NOW 



LOG OBJECT CODE 



ADDK1 ADDR2 STMT SUURCE STATEMENT 



ASM H V 01 11.52 OS/20/70 







© 



000088 18)6 
00008A 58F0 1054 
00008E 05EF 



00009C 

00009C OOOOOOOO 

OOOOAO 060000A000000050 



00OOA8 E3C9D4C5407E40F1 



OOOOOC 
OOOOOC 
000090 



000000 
000000 
000700 1867 



000090 00000040FFFFFFE8 








© 



i i ********************************************************************** 

12 * COPY 'NOTE' MACRO IN FROM MACLIBi RENAME IT 'MARK', CALL IT UNDER * 

13 * ITS ALIAS — IN EXPANSION OF MARK, NOTICE REFERENCE BACK TO * 

14 * DEFINITION STATEMENTS IN 'COLUMNS* 76-80 OF EXPANSION * 

15 ********************************************************************** 



00020000 
00040017 
00060000 
00080000 
LOAD NOTE RTN ADDRESS 00100000 
LINK TO NOTE ROUTINE 00120000 
00140000 
00160000 
00180000 



COMMENTS OF GENERATED STATEMENTS OCCUPY SAME 
COLUMNS' AS THOSE IN MODEL STATEMENTS 

LOAD PARAMETER REG 1 02-IHBIN 
LOAD NOTE RTN ADDRESS 01-00122 
LINK TO NOTE ROUTINE 01-00123 

35 ********************************************************************** 

36 DEECEES LOCTR SWITCH TO ALTERNATE LOCATION COUNTER 

37 B5 CCW X'OB',65,0,80 

39 ********************************************************************** 

40 * DISPLAY OF CSYSTIME, CSYSDAT6, 6SYSPARM ANO 6SYSL0C * 

41 ********************************************************************** 



17 


COPY NOTE 


18 


. MACRO 


19 SNAME 


NOTE £UCB,£OUMMY= 


20 


AIF ftlDCR' EO " ) 


21 £NAMF 


IHBINNRA &OCG 


22 


L 15,8410,11 


23 


BALR 14,15 


24 


MEXIT 


25 .ERR 


IHBERMAC 6 


26 


MEND 


29 MARK 


OPSYN NOTE COMM 


30 


MARK (6) 'C 


31 + 


LR 1,6 


32 + 


L 15,84(0,1) 


33 + 


BALR 14,15 



,#~A 



PRINT NUDATA 
C'TIME = 6SYSTIME, DATE = &SYSDATE, PARM = KSYSPARM' 
C'TIME = 11.52, DATE = 05/20/70, PARM = SAMPLE*PROGRAM' 



46 MACRO 

47 LOCATE 

48 ESYSECT CSECT 

49 6SYSL0C LOCTR 

50 MEND 

52 LOCATE 

53+A CSECT 

54+DFECEES LOCTR 

55 A LOCTR 



DISPLAY OF CURRENT CONTROL SECTION 
AND LOCATION COUNTER 



DISPLAY OF CURRENT CONTROL SECTION 
AND LOCATION COUNTER 



01-00148 
01-00149 



57 ******************************************* *************************** 

58 PD2 COM NAMED COMMON THROWN IN FOR GOOD MEASURE 



LR 

END 



500F. 
6,7 



50 Assembler H Programmer ' s Guide 



o 



BIGNAME 








POS.IO 


REL.ID 


FLAGS 


ADDRESS 


OOOl 


OOOl 


OC 


000090 


0001 


0001 


08 


0000A1 



RELOCATION DICTIONARY 



PAGE 6 
ASM H V 01 11.52 05/20/70 



BIGNAME 












SYMBOL 


LEN 


VALUE 


OEFN 


REFERENCES 


A 


00001 


00000000 


0002 


0028 


0153 


A5 


00002 


000040 


0034 


0038 


0162 


A7 


00016 


000048 


0036 






A8 


00002 


OOOOOOAO 


0033 


0109 




B5 


00008 


OOOOAO 


0137 


0038 


0109 


CONSTANT 


00004 


000098 


0027 


002 5 


0109 


DEECEES 


00001 


00000098 


0026 


0136 


0154 


PD2 


00001 


00000000 


0158 






REALLYLONGSYMBOL 










00004 


000084 


0109 


0014 


0013 


SUSQUEHANNA 












00002 


00007E 


0107 






TRANSYLVANIA 












00004 


000080 


0108 


0014 


0018 


X 


00001 


FFFFFFE8 


0060 


0162 




=A(A5,X) 


00004 


000090 


0162 


0108 





CROSS REFERENCE 



PAGE 7 
ASM H V 01 11.52 05/20/70 



DIAGNOSTIC CROSS REFERENCE AND ASSEMBLER SUMMARY 



NO STATEMENTS FLAGGED IN THIS ASSEMBLY 

OVERRIDING PARAMETERS- NODECK , MULT , SYSPARM=SAMPLE*PROGRAM 
OPTIONS FOR THIS ASSEMBLY 

NODECK, NDLOAD, LIST, XREF, NORENT, NOTEST, MULT, ALGN, ESD, RLO, LINECNT= 55, MSGLEVEL= 
NO OVERRIDING DD NAMES 



ASM H V 01 11.52 05/20/70 



0, SYSPARM=SAMPLE*PROGRAM 



136 CARDS FROM SYSIN 
197 LINES OUTPUT 



432 CARDS FROM SYSLIB 
CARDS OUTPUT 



Appendix A. Sample Program 51 



This page intentionally left blank 



52 Assembler H Programmer's Guide 









(f^J 



Appendix B. Sample Macro Trace and Dump (MHELP) 



^^^v 
^J 



The Macro Trace and Dump (WHELP) facility is a useful means of debugging 
macro definitions. MHELP can be used anywhere in the source program 
or in macro definitions. WHELP is processed during macro generation. 
It is completely dynamic; you can branch around the MHELP statements 
by using AIF or AGO statements. Therefore, its use can be controlled 
by symbolic parameters and SET symbols. 

The following sample program illustrates the five primary functions 
of MHELP. Since most of the information produced is unrelated to 
statement numbers, the dumps and traces in the listing are marked with 
circled numbers. Most dumps refer to statement numbers. If you request 
MHELP information about a library macro definition, the first five 
characters of the nacre name will appear in place of the statement 
number. To get the statement numbers, you should use COPY to copy 
the library definition intc the source program prior to the macro call. 



Macro Call Trace (MHELP 1) 

Item \\A) illustrates an outer macro call, (jj$) an inner one. In each 
case, the amount of information given is brief. This trace is given 
after successful entry intc the macro; no dump is given if error 
conditions prevent an entry. 



Macro Entry Dump (MHELP 16) 

This provides values of system variable symbols and symbolic parameters 
at the time the macro is called. The following numbering system is 
used: 



Number 


Item 




000 


SSYSNDX 




001 


&SYSECT 




002 


8SYSICC 




003 


&SYSTIME 




004 


&SYSDATE 




005 


&SYSPARM 




006 


NAME FIELD 


CN MACRO INSTRUCTION 



If there are NKW keyword parameters, they follow in order of appearance 

en the prototype statement. 

007 1st keyword value 

008 2nd keyword value 



006+NKW NKWth keyword value 



Appendix B. Sample Macro Trace and Dump (MHELP) 53 



If there are NPP positional parameters, they follow in order of 
appearence in the macro instruction. 

007+NKW 1st positional parameter values 
008+NKW 2nd positional parameter values 



006+NKW+NPP 



NPPth positional parameter values 



For example, item ^6^) has one keyword parameter (&OFFSET) and one 
positional parameter. The value of the keyword parameter appears 
opposite 110006, the positional parameter, opposite 110007. In both 
the prototype (statement 3) and the macro instruction (statement 54), 
the positional parameter appears in the first operand field, the keyword 
in the second. A length appears between the NUM and VALUE fields. 
A length of NUL indicates the corresponding item is empty. 

Item Q6_§) illustrates an inner call containing zero keywords, and 
two positional parameters. 



Macro AIF Dump (MHELP 4) 



Items <J*A) , ((tj) , (fie) , ... are examples of these dumps. Each such 
dump includes a complete set of unsub scripted SET symbols with values 
This list covers all unsubscripted variable symbols which appear in 
the name field of a SET statement in the macro definition. Values 
of elements cf dimensioned SET symbols are not displayed. 



MACRO ERANCH TRACE (MHELP 2) . 



This provides a one-line trace for each AGO and true AIF branch within 
a programmer macro. In any such branch, the "branched from" statement 
number, the "branched to" statement number and the macro name are 
included. Note, in example (£a) , the "branched to" statement number 
indicated is not that of the ANOP statement tearing the target sequence 
symfcol tut ratter that of the statement following it. The branch trace 
facility is suspended when library macros are expanded and MHELP 2 
is in effect. To obtain a macro branch trace for such a macro, one 
would have to insert a COPY "macro-name" statement in the source deck 
at seme point prior to the MHELP 2 statement of interest. 



c 



Macro Exit Dump (MHELP 8) 



This provides a dump of the same group of SET symbols as are included 
in the Macro AIF dump (see item C above) when a MEXIT or MEND is 
encountered. 

Note, that local and/or global variable symbols are not displayed at 
any point unless they appear in the current macro explicitly as SET 
symtols. 



54 Assembler H Programmer's Guide 



SAMPLE MHELP TRACE AND DUMP 



LQC OBJECT CODt 



ADOK1 ADDR2 STMT 



o 



SOURCE STATEMENT ASM H V 01 11.52 05/19/70 

INCLUDE MACRO DEFINITIONS TO Bfc TRACED IN THE SOURCE PROGRAM 

CSFCT 

COPY LNSRCH 

MACRO 
JAME LNSRCH £ARG, £.OFFSET=STNUMB-STCHAIN 
LCLC tLABEL 



9 


tLABEL 


SETC 


' A&SYSNOX' 




GENERATE SYMBOL 


10 




A1F 


(T'&NAME EQ ■Cl« 1 . 


SKIP 


11 


&LABEL 


SETC 


■&NAME* 




IF MACRO CALL HAS LABEL, USE IT 


12 


.SKIP 


ANCIP 






INSTEAD OF GENERATED SYMBOL 


13 


CLABEL 


LA 


O.tnFFSET 




LOAD REG. 


14 




SCHI 


£ARG,0( 1 I 




SEARCH 


15 




BC 


l.&LABEL 




IF MAX REACHED, CONTINUE 


16 




MEND 








la 




COPY 


SCHI 






19 




MACRO 








20 


f,NM 


SCril 


&COMP,f.LIST 




21 




LCLA 


SCNT 






22 




LCLC 


KCMPADR 






?i 


&CNT 


SETA 


1 






24 


£NM 


STM 


1.15,4(13) 






25 


• TEST 


ANOP 








26 


SCMPADR 


SETC 


■ &CMPAOR'. ' 


'&COMP' 


UCNT.l) 


27 




AIF 


('tlCOMP' (SCNT, 1) 


FO ' ( • l.LPAR 


28 


fXNT 


SETA 


SCNT + 1 






29 




AIF 


(&CNT LT K' 


6C0MP) 


.TEST 


30 


.NOLNTH 


ANOP 








31 




LA 


3,tC0MP 




COMPARAND 


32 




AGO 


.CONTIN 






33 


• LPAR 


AIF 


( 'eCOMPM&CNT + l.l) EQ •,'). FINISH 


34 


£CNT 


SETA 


&CNT + 1 






35 




AIF 


(&CNT LT K' 


&CUMP) 


.LPAR 


36 




AGO 


.NOLNTH 






37 


•FINISH 


ANUP 








38 


&CMPADR 


SETC 


•tCMPADR'.' 


&COMP' 


<<XNT + 2,K'£C0MP-£CNT) 


39 




LA 


3.CCMPA0R 




COMPARAND SANS LENGTH 


40 


.CONTIN 


ANOP 








41 




LA 


l.SLIST 




LIST HEADER 


42 




MVC 


£CUMP,P<0) 




DUMMY MOVE TO GET COMP LENGTH 


43 




ORG 


*-6 




CHANGE MVC TO MVI 


44 




DC 


X'92« 




MVI OPCODE 


45 




ORG 


*+l 




PRESERVE LENGTH AS IMMED OPND 


46 




DC 


X'DOOO' 




RESULT IS MVI 01 13),L 


47 




L 


15,=V(SCHI ) 






48 




BALR 


14,15 






49 




LM 


1,15,4(13) 






50 




MEXIT 








51 




MEND 









^^jr 



Appendix B. Sample Macro Trace and Dump (MHELP) 55 



f 



SAMPLE MHELP TRACE AND DUMP 



LOC OBJECT 


CODE 


A0DR1 


AD0R2 


STMT 


SOU! 


XE STATEMENT 


OOOOOO 








53 


TEST 


CSECT 


000000 05C0 








54 




BALR 12.0 


00000002 








55 

57 
58 




USING *.12 

• ., MHELP B> 11 
LNSRCH LIS 



PAGE 3 
ASM H V 01 11.52 05/19/70 



REQUEST ALL MHELP FUNCTIONS 
LNSRCH LISTL"INE,OFFSET=LISTLINE-LISTNEXT 



© 



++//MHELP. CALL TO MACRO LNSRCH 



OEPTH=00l, SYSNDX=0001, STMT 00058 



//MHELP ENTRY TO LNSRCH . MODEL STMT 00000, 0EPTH=001, SYSNDX=0001, KWCNT=001 
////PARAMETERS ( SYSNOX, SYSECT, SYSLOCSYSTIME , S YSDATE, SYSP ARM, NAME, KWS tPPS ) /// 
//NUM LNTH VALUE 164 CHARS/LINE) 



//oooo 


004 


0001 


//0001 


004 


TEST 


//0002 


004 


TEST 


//0003 


005 


11.52 


//0004 


008 


05/19/70 


//0005 


014 


SAMPLE*PROGRAM 


//0006 


NUL 




//0007 


017 


LISTLINE-LISTNEXT 


//0008 


008 


LISTLINfc 



000002 4100 0002 



® //MHELP AIF IN LNSRCH . MOOEL STMT 00010, DEPTH=001, SYSNOX=0001 , KWCNT=001 

////SET SYMBOLS (SKIPPED NUMBERS MAY BE SEQUENCE SYMBOLS).// 
//OOOO LCLC LABEL LNTH= 005 

// VAL=A0001 



++//MHELP. BRANCH FROM STMT 00010 TO STMT 00013 IN MACRO LNSRCH 
59+A0001 LA 0, LISTLINE-LISTNEXT LOAD REG. 

++//MHELP. CALL TO MACRO SCHI . DEPTH=002, SYSNDX=0002, STMT 00014 






;V 



Q 



(I6B) 



//MHELP ENTRY TO SCHI . MODEL STMT 00000, DEPTH=002, SYSNDX=0002, KWCNT=000 
////PARAMETERS ( SYSNDX, SYSECT, SYSLOC, SYSTIME, SYSO ATE, SYSPARM, NAME , KWS, PPS» /// 
//NUM LNTH VALUE (64 CHARS/LINE) 

0002 

TEST 

TEST 

11.52 

05/19/70 

SAMPLE*PROGRAM 



//OOOO 
//0001 
//0002 
//0003 
//0004 
//0005 
//00Q6 
//0007 
//0008 



004 
004 
004 
005 
008 
014 
NUL 
008 
004 



LI STL INF 
0( 1) 



000006 901F 0004 



60+ STM 1,15,4(13) 

) //MHELP AIF IN SCHI 



02-00024 
MODEL STMT 00027, DEPTH=002, SYSNDX=0002, KHCNT=000 






56 Assembler H Programmer's Guide 









SAMPLE MHELP TRACE AND DUMP PAGE 4 

LOG OBJECT CODE ADDR1 ADDR2 STMT SOURCE STATEMENT ASM H V 01 11.52 05/19/70 

////SET SYMBOLS (SKIPPEO NUMBERS MAY Bt SEQUENCE SYMBOLS).// 

//OOOO LCLA CNT VAL= 0000000001 

//0001 LCLC CMPAOR LNTH= 001 

// VAL=L 

©//MHELP AIF IN SCHI . MODEL STMT 00029, DEPTH=002, SYSNDX=0002, KHCNT=000 

////SET SYMBOLS (SKIPPEO NUMBERS MAY BE SEQUENCE SYMBOLS).// 

//OOOO LCLA CNT VAL= 0000000002 

//0001 LCLC CMPADR LNTH= 001 
// VAL=L 

(eb) ♦♦//MHELP. BRANCH FROM. STMT 00029 TO STMT 00026 IN MACRO SCHI 

® //MHELP AIF IN SCHI . MODEL STMT 00027, DEPTH=002, SYSNDX=0002, KHCNT=000 

////SET SYMBOLS (SKIPPED NUMBERS MAY BE SEQUENCE SYMBOLS).// 

//OOOO LCLA CNT VAL= 0000000002 

//OOOl LCLC CMPADR LNTH= 002 
// VAL=LI 

® //MHELP AIF IN SCHI . MODEL STMT 00029, DEPTH=002, SYSNDX=0002, KHCNT=000 

////SET SYMBOLS (SKIPPED NUMBERS MAY BF SEQUENCE SYMBOLS).// 

//OOOO LCLA CNT VAL= 0000000003 

//OOOl LCLC CMPADR LNTH= 002 
// VAL=LI 

(m) ♦♦//MHELP. BRANCH FROM STMT 00029 TO STMT 00026 IN MACRO SCHI 

//MHELP AIF IN SCHI . MODEL STMT 00027, DEPTH=002, SYSNDX=0002, KHCNT=000 

////SET SYMBOLS (SKIPPED NUMBERS MAY BE SEQUENCE SYMBOLS).// 

//OOOO LCLA CNT VAL= 0000000003 

//OOOl LCLC CMPADR LNTH= 003 

// VAL=LIS 

//MHELP AIF IN SCHI . MODEL STMT 00029, DEPTH=002, SYSN0X=0002, KWCNT=000 

////SET SYMBOLS (SKIPPED NUMBERS MAY BE SEQUENCE SYMBOLS).// 

//OOOO LCLA CNT VAL= 0000000004 

//OOOl LCLC CMPADR LNTH= 003 

// VAL=LIS 

♦♦//MHELP. BRANCH FROM STMT 00029 TO STMT 00026 IN MACRO SCHI 

//MHELP AIF IN SCHI . MODEL STMT 00027, DEPTH=002, SYSN0X=0002, KWCNT=000 

////SET SYMBOLS (SKIPPED NUMBERS MAY BE SEQUENCE SYMBOLS).// 

//OOOO LCLA CNT VAL= 0000000004 

//OOOl LCLC CMPADR LNTH= 004 

// VAL=LIST 



Appendix B. Sample Macro Trace and Dump (MHELP) 57 



SAMPLE MHELP TRACE AND DUMP 
LOC OBJECT CODE AOOR1 AODR2 STMT SOURCE STATEMENT 



PAGE 5 
ASM H V 01 11.52 05/19/70 



//MHELP AIF IN SCH1 . MODEL STMT 00029, DEPTH=002, SYSNDX=0002, 

////SET SYMBOLS (SKIPPED NUMBERS MAY BE SEQUENCE SYMBOLS).// 
//OOOO LCLA CNT VAL = 

//0001 LCLC CMPAOR LNTH= 

// VAL=LIST 



KHCNT=O00 



0000000005 
004 



++//MHELP. BRANCH FROM STMT 00029 TO STMT 00026 IN MACRO SCHI 



//MHELP AIF IN SCHI . MODEL STMT 0002/, DEPTH=002, SYSNDX=0002, 
////SET SYMBOLS (SKIPPED NUMBERS MAY BE SEQUENCE SYMBOLSI.// 
//OOOO LCLA CNT VAL= 

//0001 LCLC CMPADR LNTH= 

// VAL=LISTL 



KWCNT=000 



0000000005 
005 



//MHELP AIF IN SCHI . MODEL STMT 00029, DEPTH=002, SYSNDX=0002, 
////SET SYMBOLS (SKIPPED NUMBERS MAY BE SEQUENCE SYMBOLS).// 
//OOOO LCLA CNT VAL= 

//0001 LCLC CMPADR LNTH= 

// VAL=LISTL 



0000000006 
005 



++//MHELP. BRANCH FROM STMT 00029 TO STMT 00026 IN MACRO SCHI 



//MHELP AIF IN SCHI . MODEL STMT 00027, DEPTH=002, SYSNOX=0002, 
////SET SYMBOLS (SKIPPEO NUMBERS MAY BE SEQUENCE SYMBOLS).// 
//OOOO LCLA CNT VAL= 

//0001 LCLC CMPADR LNTH= 

// VAL=LISTLI 



0000000006 
006 



/f 



//MHELP AIF IN SCHI . MODEL STMT 00029, DEPTH=002, SYSNDX=0002, 
////SET SYMBOLS (SKIPPEO NUMBERS MAY BE SEQUENCE SYMBOLS).// 
//OOOO LCLA CNT VAL= 

//OOOl LCLC CMPADR LNTH= 

// VAL=LISTLI 



0000000007 
006 



++//MHELP. BRANCH FROM STMT 00029 TO STMT 00026 IN MACRO SCHI 



//MHELP AIF IN SCHI . MODEL STMT 00027, OEPTH=002, SYSNDX=0002, 
////SET SYMBOLS (SKIPPED NUMBERS MAY BE SEQUENCE SYMBOLS).// 
//OOOO LCLA CNT VAL= 

//OOOl LCLC CMPADR LNTH= 

// VAL=LISTLIN 



0000000007 
007 



//MHELP AIF IN SCHI . MODEL STMT 00029, DEPTH=002, SYSN0X=O0O2, 

////SET SYMBOLS (SKIPPED NUMBERS MAY BE SEQUENCE SYMBOLS).// 



58 Assembler H Programmer's Guide 



fl^v 



SAMPLE MHELP TRACE AND DUMP 



© 



LOC OBJECT COOE 



ADDR1 ADDR2 STMT SOURCE STATEMENT 



ASM H V 01 11.52 05/19/70 



OOOOOA 4130 C024 



OOOOOE 4111 0000 00000 

000012 0202 C0Z4 0000 00026 00000 
000018 000012 

000012 92 

000013 000014 

000014 DOOO 

000016 58F0 C02E 00030 

00001A 05EF 



//OOOO LCLA CNT 
//0001 LCLC CMPADR 
// VAL=LISTLIN 



VAL = 
LNTH = 



00001C 981F 0004 



00004 



61 + 


LA 3.LISTLINE 


+ + 


//MHELP. BRANCH FROM STMT 


62+ 


LA 1,0(1) 


63+ 


MVC LISTLINE.O(O) 


64 + 


ORG *-6 


65 + 


DC X'92' 


66+ 


ORG *+l 


67 + 


nc x.'dooo' 


68 + 


L 15,=V(SCHl) 


69+ 


BALR 14,15 


70+ 


LM 1,15,4(13) 



COMPARAND 



IN MACRO SCHI 



LIST HEADER 

DUMMY MOVE TO GET COMP LENGTH 

CHANGE MVC TO MV I 

MVI OPCODE 

PRESERVE LENGTH AS IMMEO OPND 

RFSULT IS MVI 0(13),L 



0000000008 
007 



02-00041 
02-00042 
02-00043 
02-00044 
02-00045 
02-00046 
02-00047 
02-00048 
02-00049 



000020 4710 COOO 



000024 

000026 

000030 

000030 OOOOOOOO 

000000 



//MHELP EXIT FROM SCHI . MODEL STMT 00050, DEPTH=002, SYSNDX=0002, 
////SET SYMBOLS (SKIPPED MUMBERS MAY BE SEQUENCE SYMBOLS).// 
//OOOO LCLA CNT VAL= 

//0001 LCLC CMPADR LNTH= 

// VAL=LISTLIN 



BC 



1.A0001 



IF MAX REACHED, CONTINUE 



(8B) //MHELP EXIT FROM LNSRCH . MODEL STMT 00016, DEPTH=001, SYSNDX=0001, 
V -^ ////SET SYMBOLS (SKIPPED NUMBERS MAY BE SEQUENCE SYMBOLS).// 

//OOOO LCLC LABEL LNTH= 

// VAL=A0001 

72 LISTNEXT DS H 

73 L1STLIN6 DS FL3'0' 

74 LTORG 

75 =V(SCHl) 

76 END TEST 



0000000008 
007 



01-00015 
KWCNT=001 
005 



Appendix B. Sample Macro Trace and Dump (MHELP) 59 



This page intentionally left blank 












60 Assembler H Programmer's Guide 



Appendix C. Object Deck Output 



J 



ESD Card Format 



The format of the ESD card is as follows: 



Columns 

1 

2-4 
5-10 
11-12 

13-14 
15-16 

17-64 






65-72 
73-80 



Contents 

12-2-9 punch 

ESD 

Blank 

Variable field count — number of bytes 

of infcriraticn in variable field (columns 17-64) 

Blank 

ESD ID of first SD, XD, CM, PC, or ER 

in variable field 

Variable field. One to three 16-byte 

items of the following format: 



byte - 


-ESD type 


code 




The hex value is 




00 


SD 




01 


LD 




02 


ER 




04 


PC 




05 


CM 




06 


XD(PR) 



3 bytes — Address 

1 byte — Alignment if XD; otherwise blank 

3 bytes — Length, LDID, or blank 

Blank 

Deck ID and/ or sequence number — 
The deck ID is the name from the first TITLE 
statement that has a non- blank name field. 
The name can be 1 to 8 characters long. If the 
name is less than 8 characters long or if 
there is no name, the remaining columns con- 
tain a card sequence number. (Columns 73-80 
of cards produced by PUNCH or REPRO statements 
do not contain a deck ID or a sequence number.) 



TEXT (TXT) Card Format 



The format of the TXT cards is as follows 
Columns Contents 



1 

2-4 
5 



12-2-9 punch 

TXT 

Blank 



o 



Appendix C. Object Deck Output 61 



6-8 

9-10 

11-12 

13-1 a 

15-16 
17-72 
73-80 



Relative address of first instruction on card 
Blank 

Byte ccunt — number of bytes in information 
field (columns 17-72) 
Blank 
ESEIC 

56-byte information field 
Deck IE and/or sequence number — 
The deck ID is the name from the first TITLE 
statement that has a non- blank name field. 
The name can be 1 to 8 characters long. If the 
name is less than 8 characters long or if 
there is no name, the remaining columns con- 
tain a card sequence number. (Columns 73-80 
of cards produced by PUNCH or REPRO statements 
do not contain a deck ID or a sequence number.) 



C 



RLD Card Format 



The format of the FID card is as follows: 



Columns 




1 






2-' 


% 




5- 


10 




11 


-12 




13 


-16 




17- 


-72 






17- 


■18 




19- 


■20 




21 






2 2- 


■24 




2 5- 


■72 


73- 


-80 





Contents 

12-2-9 punch 

BID 

Blank 

Data field count — number of bytes of 

information in data field (columns 17-72) 

Elank 

Data field: 

Relocation ESDID 

Position ESDID 

Flag byte 

Absolute address to be relocated 

Remaining RLD entries 
Deck ID and/or sequence number — 
The deck ID is the name from the first TITLE 
statement that has a non-blank name field. 
The name can be 1 to 8 characters long. If the 
name is less than 8 characters long or if 
there is no name, the remaining columns con- 
tain a card sequence number. (Columns 73-80 
of cards produced by PUNCH or REPRO statements 
do not contain a deck ID or a sequence number.) 






If the rightmost bit of the flag byte is set, the following RLD entry 
has the same relocation ESDID and position ESDID, and this information 
will not be repeated; if the rightmost bit of the flag byte is not 
set, the next FID entry has a different relocation ESDID and/or position 
ESDID, and both ESDID s will be recorded. 

For example, if the RLD Entries 1,2, and 3 of the program listing 
(Appendix C) contain the following information: 



Entry 1 
Entry 2 
Entry 3 



Position Relocation 
ESDID ESDID Flag 



02 
02 
03 



04 
04 
01 



0C 
0C 
0C 



Address 

000100 
000104 
000800 



62 Assembler H Programmer's Guide 



Column: 



Entry 1 
17 18 19 20 21 22 23 24 



00 04 00 02 OD 00 01 00 



ESD IDs 



T 

Flag 
(set) 



Address 



Entry 2 
25 26 27 28 



OC 00 01 04 



T Add 



Flag 
(not 
set) 



Address 



Entry 3 
29 30 31 32 33 34 35 36 



00 01 00 03 OC 00 08 00 



Esd IDs 



^ A > , 

T Add 



Address 



Flag 
(not 
set) 



37- 



->72 



v 
blanks 



END Card Format 



The format of the END card is as follows: 

Columns Contents 



1 




2- 


4 


5 




6- 


8 


9- 


14 


15 


-16 


17 


-39 


40 


-64 



73-80 



12-2-9 punch 

END 
Blank 

Entry address from operand of END card in 
source deck (blank if no operand) 
Blank 

ESEIE of entry point (fclank if no operand) 
B lank 

Version of the assembler (such as ASM H VI) , 
time of the assembly (hh,mm) , and date of 
the assembly (mm/dd/yy) . See the "Assembler 
Listing" section.) 
Deck ID and/or sequence number — 
The deck ID is the name from the first TITLE 
statement that has a non-blank name field. 
The name can be 1 to 8 characters long. If the 
name is less than 8 characters long or if 
there is no name, the remaining columns con- 
tain a card sequence number. (Columns 73-80 
of cards produced by PUNCH or REFRC statements 
do not contain a deck ID or a sequence number.) 



TESTRAN (SYM) Card Format 



If you request it, the assembler punches out syirbclic information for 
TESTRAN concerning the assembled program. This output appears ahead 
cf all loader text. The format of the card images for TESTRAN output 
is as follows: 



Columns 

1 

2-4 
5-10 
11-12 



Contents 

12-2-9 punch 

SYM 

Elank 

Variable field count — number of bytes of 

text in variable field (columns 17-72) 



Appendix C. Object Deck Output 63 



II 



13-16 Elank 

17-72 Variable field (see below) 

73-80 Deck IE and/or sequence number — 

The deck ID is the name from the first TITLE 

statement that has a non- blank name field. 

The naire can be 1 to 8 characters long. If the 

name is less than 8 characters long or if 

there is no name, the remaining columns con- 
tain a card sequence number. (Columns 73-80 

of cards produced by PUNCH or BEFRC statements 

do not contain a deck ID or a sequence number.) 

The variable field (columns 17-72) contains up to 56 bytes of TESTRA.N 
text. The items making the text are packed together; consequently, 
only the last card may contain less than 56 bytes of text in the 
variable field. The fcrirats of a text card and an individual text 
item are shown in Figure 9. The contents of the fields within an 
individual entry are as follows: 

1. Organization (1 byte) 
Eit 0: 

C = non- data type 
1 = data type 

Bits 1-3 (if non-data type): 

00 0= space 

001 = control section 

010 = dummy control section 

011 = common 

100 = instruction 

101 = CCW 

Eit 1 (if data type) : 

= no multiplicity 

1 = multiplicity (indicates presence of M field) /"~ N ^ 

Aw. ** 
Bit 2 (if data type) : 

= independent (not a packed or zoned decimal constant) 

1 = cluster (packed or zoned decimal constant) 

Eit 3 (if data type) : 

= no scaling 



Eit 4: 



Eits 5-7 



1 = scaling (indicates presence of S field) 



= name present 

1 = name not present 



Length of name minus 1 
2- Address (3 bytes) -- displacement from base cf control section 

3. Symbol Name (0-8 bytes) — symbolic name of particular item 
Note : The following fields are present only for data-type items. 

4. Data Type (1 byte) — contents in hexadecimal 

00 = character 
04 = hexadecimal 
08 = binary 



64 Assembler H Programmer's Guide 



\ stu ^ 



10 = fixed point, full 

14 = fixed point, half 

18 = floating point, short 

1C = floating point, long 

20 = A -type or Q-Type data 

24 = Y-type data 

28 = S-type data 

2C = V-type data 

30 = packed decimal 

34 = zoned decimal 

38 = floating point, extended. 



5. Length (2 bytes for character, hexadecimal decimal, or binary 
items; 1 byte for other types) — length of data item minus 1 

6- Multiplicity - M field (3 bytes) — equals 1 if not present 

7. Scale - signed integer - S field (2 bytes) — present only for 
F, H, E, D, P and Z type data, and only if scale is non-zero. 



1 2 



4 5 



1011 12.13 



16 17 



72 73 



80 



blank 




TESTRAN text — packed entries 



Deck „ Sequence 
ID number 



Entry 
(complete or 
end portion) 



Org. 



56 



N complete entries 
N > 1 



Entry 
(complete or 
head portion) 



Variable size entries 



Address 



Symbol name 



Data 
type 



r>8 




Length 






Figure 9. TESTRAN SYM Card Format 



Appendix C. Object Deck Output 65 



This page intentionally left blank, 









66 Assembler H Programmer's Guide 



Appendix D. Dynamic Invocation of the Assembler 



f 



The assembler can te invoked by a problem program at execution time 
through the use of the CALL, LINK, XCTL, or ATTACH macro instruction. 
If the XCTL macro instruction is used to invoke the assembler, then 
no user options may be stated. The assembler will use the standard 
default, as set during system generation, for each option. 

If the assembler is invoked by CALL, LINK or ATTACH, you may supply: 

1) The assembler cpticns 



2) 



The DD names of the data sets to be used during processing 






Name 


Operation 


Operand 


[symbol] 


CALL 

(link ) 
i attach j 


IEV90,(optionlist 
[.ddnamelist] ),VL 
EP=IEV90, 
PARAM=(optionlist 
[.ddnamelist] ),VL=1 






EP -- specifies the symbolic name of the assembler. The entry point 

at which execution is to begin is determined by the control program 
(from the library directory entry) . 

PAFAM — specifies, as a sublist, address parameters to be passed from 
the problem program to the assembler. The first word in the 
address parameter list contains the address of the option list. 
The second word contains the address of the ddname list. 

opticnlist -- specifies the address of a variable length list containing 
the options. This address must be written even if no option list 
is provided. 

The option list must begin on a ha If word boundary. The first two bytes 
contain a count of the number of bytes in the remainder of the list. 
If no options are specified, the count must be zero. The option list 
is free form with each field separated from the next by a comma. No 
blanks or zeros should appear in the list. 

ddnamelist — specifies the address of a variable length list containing 
alternate DD names for the data sets used during compiler processing. 
If standard DD names are used, this operand may be omitted. 

The DD name list must begin on a halfword boundary. The first two 
bytes contain a count of the number of bytes in the remainder of the 
list. Each name of less than 8 bytes must be left- justified and padded 
with blanks. If an alternate DD name is omitted, the standard name 
will be assumed. If the name is omitted within the list, the 8-byte 
entry must contain binary zeros. Names can be omitted from the end 



Appendix D. Dynamic Invocation of the Assembler 67 



merely by shortening the list. The sequence of the 8-byte entries 
in the DD name list is as follows: 

Entry Alternate Name 

1 SYSLIN 

2 not applicable 

3 not applicable 

4 SYSLIB 

5 SYS IK 

6 SYSPRINT 

7 SYS PUNCH 

8 SYSUT1 

Note : An overriding DD name specified when Assembler H was added to 
the Operating System occupies the same place in the above list as the 
IBM-supplied DD name it overrides. The overriding ddname can itself 
be overridden during invocation. For example, if SYSWORK1 replaced 
SYSUT1 , it occupies position 8 in the above list. SYSW0RK1 can be 
overridden by another name during invocation. 

VL — specifies that the sign bit is to be set to 1 in the last word 
of the address parameter list. 












68 Assembler H Programmer's Guide 



1 



Index 



S SYSPARM 3,50 



Adding macro definitions to libraries 34 
ALGN (NOALGN) assembler option 2 
Alignment, Removal of 

restriction 39,2 
Assembler cataloged procedures 9-17 
Assembler data sets 4-8 
Characteristics 5,7-8 
List of 4 
Assembler diagnostic facilities 27-32,25 
Abnormal assembly termination 30 
Cross-reference 25 
Error Messages 27 
Macro trace facility (MHELP) 30 
MNOTEs 30 

Suppression of MNOTEs and error 
messages 30 
Assembler listing 19-26 

External symbol dictionary 21 
Source and object program 22 
Relocation dictionary 24 
Symbol and literal cross-reference 25 
Diagnostic cross-reference and 
assembler summary 25 
Assembler options 1-4 
Option list 1 
Default options 4 
Overrriding defaults 4,15 
Sample of use 4 6 
Assembler statistics 25,20 
Assembler summary 25,20 
ASMHC, cataloged procedure for 

assembly 9 
ASMHCG, cataloged procedure for 

assembly and loader-execution 13 
ASMHCL, cataloged procedure for 

assembly and linkage editing 10 
ASMHCLG, cataloged procedure for 
assembly, linkage editing, and 
execution 12 






Calling the assembler from a problem 

program 67 
Cataloged procedures 9-17 
For assembling (ASMHC) 9 
For assembling and linkage editing 
(ASMHCL) 10 



For assembling, linkage editing, and 
execution (ASMHCLG) 12 

For assembling and loader-execution 
(ASMHCG) 13 

overriding 15 
Characteristics of assembler data 

sets 7-8 
Codes 

See Return codes; Severity codes. 
Cross-reference 

See also Diagnostic cross-reference. 

Examples 20,51 

Listing format 25 
Concatenation of SYSLIB data sets 6 
COND parameter 8,15 



Data sets, assembler 

Characteristics 5,7-8 
List of 4 
DD statements, overriding in cataloged 

procedures 15 
DECK assembler option 2 
Default options 4 
Diagnostic cross-reference and assembler 

summary 25,20 
Diagnostic facilities 

See Assembler diagnostic facilities, 
Dynamic invocation of the assembler 67 



END card format 63 

Entry point restatement 35 

Error messages 27-29 

Cross-reference 25,20 
ESD 

See External symbol dictionary. 
ESD (NOESD) assembler option 2 
EXEC statement 

Overriding in cataloged procedures 15 

PARM field 1,34 

COND parameter 8,15 
Extended precision machine instructions 38 
External symbol dictionary (ESD) 

Entry types 21 

Examples 20,46 

Listing format 21 

Output card format 61 



Index 69 



Format 

See error messages; macro-generated 
statements . 



Number of Channel Programs (NCP) 
selection for assembler data sets 



Identification-sequence field 24 
Invoking the assembler from a problem 

program 67 
Invoking cataloged procedures 9 
Instruction execution sequence, control 

of 38 



Job control language cataloged 
procedures 

See Cataloged procedures. 



Object deck output format 61-65 
Output format 

Listing 19-26 

Object deck 61-65 
Object module linkage 35-37 
Options, assembler 1-4 

Option list 1 

Default options 4 

Overriding defaults 4,15 

Sample of use 46 
Overriding statements in cataloged 

procedures 15-17 
Overriding default assembler 
options 4,15 



Linkage, object module 35-37 
LINECNT assembler option 2 
LIST (NOLIST) assembler option 
Listing control instructions, 

printing of 23 
LOAD (NOLOAD) assembler option 
Load module modification 35 



Machine instructions, extended 

precision 38 
Macros, error messages in 27 
Macro-generated statements, format of 23-24 
Macro definition libraries, additions 

to 34 
Macro Trace Facility (MHELP) 

Description 30-32 

Sample 53-59 
Messages 

See Assembler diagnostic facilities. 
MHELP 

See Macro Trace Facility. 
Model 85, 91, and 195 programming 

considerations 38 
MNOTEs 30,42 

MSGLEVEL assembler option 3 
MULT(NOMULT) assembler option 2 



PARM field 1,34 
Procedure 

See Cataloged procedures. 
Program termination 34 
Programming considerations 33-39 



Registers, saving and restoring 33 
Relocation dictionary 

Listing format 24 

Output text format 62 

Examples 20,51 
RENT (NORENT) assembler option 2 
Restoring general registers 33 
Return codes 8 

See also MSGLEVEL assembler option. 
RLD 

See Relocation dictionary. 
RLD (NORLD) assembler option 2 



//~ X ' 



70 Assembler H Programmer's Guide 



J 



Sample programs and listings 

Assembler language features 41-51 
Assembler listing description 20 
Diagnostic error messages 29 
MHELP 53-59 

Saving general registers 33 

Sequence number 24 

Severity codes 8,27 

See also MSGLEVEL assembler option. 

Source and object program assembler listing 
format 22,20 

Special CPU programming considerations 38 

Statistics, assembler 25,20 

Suppression of error messages 30 

SYSIN data set 6 

SYSLIB data set 6 

SYSLIN data set 6 

SYM card (TESTRAN) format 63 

SYSPARM assembler option 3,46 

SYSPRINT data set 6 

SYSPUNCH data set 6 

SYSUT1 data set 6 



30 



Termination 

Abnormal assembly 

Program 34 
TEST (NOTEST) assembler option 
TESTRAN (SYM) card format 63 
TEXT (TXT) card format 61 



Unaligned operands 39,2 
Using the assembler 1-17 
Utility data set 6 



XREF (NOXREF) assembler option 2 



o 



Index 71 



SC26-3759-0 



YOUR COMMENTS, PLEASE . . . 

This publication is one of a series which serves as a reference source for systems analysts, 
programmers, and operators of IBM systems. Your answers to the questions on the back of 
this form, together with your comments, will help us produce better publications for your 
use. Each reply will be carefully reviewed by the persons responsible for writing and 
publishing this material. All comments and suggestions become the property of IBM. 






Please note: Requests for copies of publications and for assistance in utilizing your IBM 
system should be directed to your IBM representative or to the IBM sales office serving 
your locality. 



fold 



fold 



FIRST CLASS 

PERMIT NO. 1359 

WHITE PLAINS, N.Y. 



BUSINESS REPLY MAIL 

NO POSTAGE STAMP NECESSARY IF MAILED IN U. S. A. 



POSTAGE WILL BE PAID BY 

IBM Corporation 
Department 813 
112 East Post Road 
White Plains, New York 
10601 



fold 



fold 



E 



International Business Machines Corporation 
Data Processing Division 
112 East Post Road, White Plains, N.Y. 10601 
[USA Only] 

IBM World Trade Corporation 

821 United Nations Plaza, New York, New York 10017 

[International] 



^^mujr 



READER'S COMMENT FORM 



IBM SYSTEM/360 OPERATING SYSTEM 
ASSEMBLER H PROGRAMMER'S GUIDE 



SC26-3759-0 



Please comment on the usefulness and readability of this book, suggest additions and deletions, 
and list specific errors and omissions (give page numbers). All comments and suggestions become 
the property of IBM. If you want a reply, be sure to give your name and address. 



Name 



Occupation . 



o 



Address 



Thank you for your cooperation. No postage necessary if mailed in the U.S.A. 



SC26-3759-0 



YOUR COMMENTS, PLEASE . . . 

This publication is one of a series which serves as a reference source for systems analysts, 
programmers, and operators of IBM systems. Your answers to the questions on the back of 
this form, together with your comments, will help us produce better publications for your 
use. Each reply will be carefully reviewed by the persons responsible for writing and 
publishing this material. All comments and suggestions become the property of IBM. 



I 



Please note: Requests for copies of publications and for assistance in utilizing your IBM 
system should be directed to your IBM representative or to the IBM sales office serving 
your locality. 



fold 



fold 



FIRST CLASS 

PERMIT NO. 1359 

WHITE PLAINS, NY. 



BUSINESS REPLY MAIL 

NO POSTAGE STAMP NECESSARY IF MAILED IN U. S. A. 



POSTAGE WILL BE PAID BY 

IBM Corporation 
Department 813 
112 East Post Road 
White Plains, New York 
10601 



c 



< 



fold 



fold 



EJ 



International Business Machines Corporation 
Data Processing Division 
112 East Post Road, White Plains, NY. 10601 
[USA Only] 

IBM World Trade Corporation 

821 United Nations Plaza, New York, New York 10017 

[International]