Source and object
This section of the listing documents the source statements of the module and the resulting object code.
This section is the most useful part of the listing because it gives you a copy of all the statements in your source program (except listing control statements) exactly as they are entered into the machine. You can use it to find simple coding errors, and to locate and correct errors detected by the assembler. By using this section with the Ordinary Symbol and Literal Cross Reference section, you can check that your branches and data references are in order. The location counter values and the object code listed for each statement help you locate any errors in a storage dump. Finally, you can use this part of the listing to check that your macro instructions have been expanded properly.
On z/OS® and CMS, the assembler can produce two formats of the Source and Object section: a 121-character format and a 133-character format. To select one, you must specify either the LIST(121) assembler option or the LIST(133) assembler option. Both sections show the source statements of the module, and the object code of the assembled statements.
The 133-character format shows the location counter, and the first and second operand addresses (ADDR1 and ADDR2) as 8-byte fields in support of 31-bit addresses. This format is required when producing the generalized object format data set (see GOFF (z/OS and CMS)). The 133-character format also contains the first eight characters of the macro name in the identification-sequence field for statements generated by macros. Figure 1 shows an example of the Source and Object section of the listing. This section shows the source statements of the module, and the object code of the assembled statements.
High Level Assembler lets you write your program, and print the assembler listing headings, in mixed-case. Diagnostic messages are printed in the language you specify in the LANGUAGE assembler option described in LANGUAGE.
Listings include at the beginning a copyright statement similar to the following:
11 ***********************************************************************
12 * *
13 * Licensed Materials - Property of IBM *
14 * *
15 * 5696-234 *
16 * *
17 * Copyright IBM Corporation 2008, 2015 All Rights Reserved. *
18 * *
19 * US Government Users Restricted Rights - Use, duplication *
20 * or disclosure restricted by GSA ADP Schedule Contract *
21 * with IBM Corp. *
22 * *
23 ***********************************************************************
1 2
SAMP01 Sample Listing Description Page 3
Active Usings: None
3 4 5 6 7 8 9
Loc Object Code Addr1 Addr2 Stmt Source Statement HLASM R6.0 2015/02/20 18.42
00000000 00000000 0000006C 24 Samp01 Csect
25 ASMDREG include standard registers
26+ PUSH PRINT 01-ASMDREG
126+ POP PRINT 01-ASMDREG
127 Entry1 MACSAMP Parm1=YES
00000000 18CF 128+Entry1 LR 12,15 01-MACSAMP
129+ ENTRY Entry1 01-MACSAMP
12
R:C 00000000 130+ USING Entry1,12 Ordinary Using 01-MACSAMP
00000002 0000 0000 00000000 131+ LA Savearea,10 01-MACSAMP
10 ** ASMA044E Undefined symbol - Savearea
10 ** ASMA029E Incorrect register specification - Savearea
11 ** ASMA435I Record 10 in SMORSA.BOOK.SAMPLE.MACS(MACSAMP) on volume: 37P004
00000006 50D0 A004 00000004 132+ ST 13,4(,10) 01-MACSAMP
0000000A 50A0 D008 00000008 133+ ST 10,8(,13) 01-MACSAMP
0000000E 18DA 134+ LR 13,10 01-MACSAMP
R:A35 00000010 135+ USING *,10,3,5 Ordinary Using,Multiple Base 01-MACSAMP
** ASMA303W Multiple address resolutions may result from this USING and the USING on statement number 130 13
** ASMA435I Record 14 in SMORSA.BOOK.SAMPLE.MACS(MACSAMP) on volume: 37P004
14
136+ DROP 10,3,5 Drop Multiple Registers 01-MACSAMP
00000010 D4C1C3E2C1D4D7C4 137+Entry1Date DC CL16'MACSAMPDATE' 01-MACSAMP
138 COPY memsamp
139=* Start of copybook - MEMSAMP
140=* 5696-234
141=* Copyright IBM Corporation 2008, 2015 All Rights Reserved.
142=* This copybook member is incled by sample HLASM programs
00000020 C481A385D6958540 143=DateOne DC CL16'DateOne Field'
144=* End of copybook - MEMSAMP
145 push using
15
R:2 00000000 146 PlistIn Using Plist,2 Establish Plist addressability
R:3 00000000 147 PlistOut Using Plist,3
00000030 1851 148 ?LoadMe LR R5,R1 Save Plist pointer
** ASMA147E Symbol too long, or first character not a letter - ?LoadMe
** ASMA435I Record 31 in SMORSA.BOOK.SAMPLE.ASM(SAMP01) on volume: 37P003
R:9 00000000 149 using WorkingStorage,R9
00000032 5820 5000 00000000 150 L R2,0(,R5) R2 = address of request list
C 050 00000000 00000050 151 STAT Using STATDS,StaticData
00000036 152 Label1 dc 0h Label1
00000036 5810 C060 00000060 153 L R1,=f'1' load
0000003A 5010 9008 00000008 154 st r1,WSNumber and save
0000003E 5870 C064 00000064 155 l R7,=V(RCNVDATE)
00000042 5880 C068 00000068 156 l r8,=V(RCNVTIME)
157 RETURN
Sample Program - HLASM Page 6
16 Active Usings (1):WorkingStorage,R9 Entry1,R12 PlistIn.Plist,R2 PlistOut.Plist,R3 STAT.STATDS(X'FB0'),R12+X'50'
Loc Object Code Addr1 Addr2 Stmt Source Statement HLASM R6.0 2015/02/20 18.42
00000046 07FE 159+ BR 14 RETURN 01-RETURN
00000048 00000036 160 pLabel1 dc a(Label1) address of Label1
161 RCNVDATE ALIAS c'DateRcvd'
00000050 162 StaticData ds 0D'0'
00000050 E2E3C1E3C9C3C440 163 StatDate dc CL16'STATICD'
00000000 00000000 00000018 164 STATDS dsect
00000000 165 SDATA ds CL16' '
00000010 00000014 166 pNumDays DC A(NumDays)
00000014 00000064 167 NumDays DC A(100)
00000000 00000000 00000014 168 Plist DSECT SAMP01 input parameter list
00000000 169 inputN ds F'0' input identifier
00000004 170 inputD ds cl16' ' input description
00000000 00000000 0000001C 171 WorkingStorage DSECT program w/s
00000000 172 WSID ds cl8'WORKAREA' identifier
00000008 173 WSNumber ds f
0000000C 174 WSDate ds cl16' ' WS Date
175 End
** ASMA138W Non-empty PUSH USING stack
** ASMA435I Record 56 in SMORSA.BOOK.SAMPLE.ASM(SAMP01) on volume: 37P003
00000060 00000001 176 =f'1'
00000064 00000000 177 =V(RCNVDATE)
00000068 00000000 178 =V(RCNVTIME)
- 1
- The deck identification, if any, consisting of 1–8 characters. It is obtained from the name field of the first named TITLE statement. The assembler prints the deck identification and date on every page of the listing except the Options Summary.
- 2
- The information taken from the operand field of a TITLE statement.
- 3
- Location field. This field is the value of the location counter that represents the assembled
address (in hexadecimal notation) of the object code.
- For ORG statements, the value of the location counter before the ORG is placed in the location column, and the value of the location counter after the ORG is placed in the Addr2 field.
- If the END statement contains an operand, the operand value (requested entry point) appears in the location field.
- In the case of LOCTR, COM, CSECT, RSECT, and DSECT statements, the location field contains the current address of these control sections.
- In the case of EXTRN, WXTRN, ENTRY, and DXD instructions, the location field and object code field are blank.
- For LTORG statements, the location field contains the location assigned to the literal pool.
If, at the time of the page eject, the current control section being assembled is a COM section, the heading line starts with C-LOC. If, at the time of the page eject, the current control section being assembled is a DSECT, the heading line starts with D-LOC. If, at the time of the page eject, the current control section being assembled is an RSECT, the heading line starts with R-LOC.
- 4
- The object code produced by the source statement. The entries, which are shown left-aligned and
in hexadecimal notation, are machine instructions or assembled constants. Machine instructions are
printed in full with a space inserted after every four digits (2 bytes). Only the first 8 bytes of a
constant appears in the listing if PRINT NODATA is in effect, unless the statement has continuation
records. The whole constant appears if PRINT DATA is in effect. (See
PRINT instruction
in the HLASM Language Reference.)This field also shows the base registers for ordinary USING instructions, and the base register and displacement for dependent USING instructions. See 12 and 15 for more details.
- 5
- Effective addresses (each the result of adding a base register value and a displacement value):
- The field headed Addr1 contains the effective address for the first operand of an instruction
(if applicable). It also contains:
- For a USING instruction, the value of the first operand.
- For a CSECT, START, LOCTR, or RSECT instruction, the start address of the control section.
- For an ORG instruction, the value of the location counter before the ORG.
- For an EQU instruction, the value assigned.
- The field headed Addr2 contains the effective address of the last operand of any instruction
referencing storage.
- For a USING instruction, the Addr2 field contains the value of the second operand.
- For a CSECT, START, LOCTR, or RSECT instruction, the Addr2 field contains the end address of the control section.
- For an ORG instruction, the Addr2 field contains the next address as specified by the operand field.
- For an EQU instruction, the Addr2 field contains the length assigned.
If the assembler option LIST(121) is in effect, both address fields contain six digits; however, if the high-order digit is 0, it is not printed. If the assembler option LIST (133) is in effect, both address fields contain eight digits. For USING and EQU instructions, the Addr2 field can contain up to eight digits.
- The field headed Addr1 contains the effective address for the first operand of an instruction
(if applicable). It also contains:
- 6
- The statement number. The column following the statement number contains one of these values:
- A plus sign (+) indicates that the statement was generated as the result of macro call processing.
- An unnumbered statement with a plus sign (+) is the result of open code substitution.
- A minus sign (-) indicates that the statement was read by a preceding AREAD instruction.
- An equals sign (=) indicates that the statement was included by a COPY instruction.
- A greater-than sign (>) indicates that the statement was generated as the result of a preceding AINSERT instruction. If the statement is read by an AREAD instruction, this takes precedence and a minus sign is printed.
- 7
- 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 PRINT, which is printed unless the NOPRINT operand is specified.
- Macro definitions obtained from a library are not listed, unless the macro definition is included in the source program with a COPY statement, or the LIBMAC assembler option was specified.
- The statements generated as the result of a macro instruction follow the macro instruction in
the listing, unless PRINT NOGEN is in effect. If PRINT GEN is in effect and PRINT NOMSOURCE is
specified, the printing of the source statements generated during macro processing and conditional
assembly substitution is suppressed, without suppressing the printing of the generated object code
of the statements. If PRINT MCALL is in effect, nested macro instructions including all parameters
are printed. When the PRINT NOGEN instruction is in effect, the assembler prints one of the
following on the same line as the macro call or model statement:
- The object code for the first instruction generated
- The first 8 bytes of generated data from a DC instruction
When the assembler forces alignment of an instruction or data constant, it generates zeros in the object code and prints only the generated object code in the listing. When you use the PRINT NOGEN instruction the generated zeros are not printed.
Diagnostic Messages and Generated Data: If the next line to print after a macro call or model statement is a diagnostic message, the generated data is not shown.
- Assembler and machine instruction statements in the source program that contain variable symbols are listed twice: first, as they appear in the source input, and second, with values substituted for the variable symbols.
- All error diagnostic messages appear in line except those suppressed by the FLAG option. Assembly error diagnostics 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 equal 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, and comments fields are preserved, unless they are displaced by field substitution.
- 8
- The release level of High Level Assembler.
- 9
- The date and time at the start of the assembly.
- 10
- The error diagnostic messages immediately follow the source statement in error. Many error diagnostic messages include the segment of the statement that is in error. You can use the FLAG assembler option to control the level of diagnostic messages displayed in your listing.
- 11
- The informational message, ASMA435I, that describes the origin
of the source statement in error. This message is only printed when
you specify the FLAG(RECORD) assembler option.
If the input data set containing the source in error is a z/OS UNIX System Services file, message ASMA435I can continue over more than one print line. If the inclusion of the path name in the message causes the message to be more than 255 bytes in length, the message is truncated.
- 12
- The Addr1 and Addr2 columns show the first and second operand addresses in the USING instructions. The base registers on an ordinary USING instruction are printed, right-aligned in the object code columns, preceded by the characters “R:”.
- 11
- A second instance of the informational message ASMA435I (also mentioned in 1 ). Conditional assembly statements and comment statements contribute to the record count of macro definitions, as suggested by the record number which is greater than the number of generated statements.
- 14
- 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, where a level of
01
indicates statements generated by the macro specified within the source code, and higher level numbers indicate statements generated from macros invoked from within a macro.For a library macro call, the last five columns contain the first five characters of the macro name. For a macro whose definition is in the source program (including one read by a COPY statement or by the LIBMAC assembler option), the last five characters contain 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 resulting from macro calls within macro calls.
- 15
- The Addr1 and Addr2 columns show the first and second operand addresses in the USING instructions. The resolved base displacement for a dependent USING instruction is printed in the object code columns, as register displacement, where register is shown as a hexadecimal value.
- 16
- The current USING PUSH level is printed after the heading and before
the first active USING. If the USING PUSH level is zero, it is not shown. If PRINT UHEAD or PCONTROL(UHEAD) has been specified, a summary of current active USINGs is printed on up to four heading lines, following the TITLE line on each page of the source and object section. The USINGs listed are those current at the end of the assembly of the last statement on the previous page of the listing, with the following exceptions:
- The USINGs summary shows the effect of the USING instruction when:
- It is the first statement in the source input data set, or
- It is the first statement on the new page
- The USINGs summary shows the effect of the DROP instruction when:
- It is the first statement in the source input data set, or
- It is the first statement on the new page
Current active USINGs include USINGs that are temporarily overridden. In the following example, the USING for base register 12 temporarily overrides the USING for base register 10. After the DROP instruction, the base register for BASE1 reverts to register 10.USING BASE1,10 USING BASE1,12 Temporarily overrides register 10 LA 1,BASE1 Uses base register 12 DROP 12 LA 1,BASE1 Uses base register 10
The summary of active USINGs heading lines have the format:Active Usings (n): label.sectname+offset(range, lower, upper),registers
where:- n
- Is the current PUSH level. If the PUSH level is zero, it is not shown. If no USING statements
are active, the heading appears as
Active Usings: None
. - label
- Is the label name specified for a Labeled USING. If the USING is not labeled, this field is omitted.
- sectname
- Is the section name used to resolve the USING. The section name is listed as
(PC)
if the section is an unnamed CSECT,(COM)
if the section is unnamed COMMON, and(DSECT)
if the section is an unnamed DSECT. - offset
- Is the offset from the specified section that is used to resolve the USING. This field is omitted if it is zero.
- (range, lower, upper)
- Is the number of bytes addressed by this base register for instructions with 12-bit displacement fields. It is only shown if the default value (any multiple of X'1000') is not used. If a lower or upper limit is present, the lower and upper limits are shown as hexadecimal offsets from the location addressed by the first base register.
- registers
- Is the register or registers specified on the USING statement.
For dependent USINGs, the register is printed as register+offset where register is the register used to resolve the address from the corresponding ordinary USING, and offset is the offset from the register to the address specified in the dependent USING.
If there are more active USINGs than can fit into four lines, the summary is truncated, and the character string 'MORE ...' is appended to the last line.
- The USINGs summary shows the effect of the USING instruction when: