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 3 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.

Figure 3 shows an example of the Source and Object section in 121-character format, and in mixed-case.

Figure 3. Source and object listing section--121 format
 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  2008/07/11 17.48
000000                00000 000E0     2 Samp01   Csect
                                     22 Entry1   SAMPMAC Parm1=YES                                              00002300
000000 18CF                          23+Entry1   LR 12,15                                                       01-SAMPM
                                     24+         ENTRY Entry1                                                   01-SAMPM
                      12 
                 R:C  00000          25+         USING Entry1,12                Ordinary Using                  01-SAMPM
000002 0000 0000            00000    26+         LA Savearea,10                                                 01-SAMPM
 10  ** ASMA044E Undefined symbol - Savearea
 10  ** ASMA029E Incorrect register specification - Savearea
 11  ** ASMA435I Record 6 in SAMP01   MACLIB   A1(SAMPMAC) on volume: EAR191
000006 50D0 A004            00004    27+         ST 13,4(,10)                                                   01-SAMPM
00000A 50A0 D008            00008    28+         ST 10,8(,13)                                                   01-SAMPM
00000E 18DA                          29+         LR 13,10                                                       01-SAMPM
               R:A35  00010          30+         USING *,10,3,5                 Ordinary Using,Multiple Base    01-SAMPM
** ASMA303W Multiple address resolutions may result from this USING and the USING on statement number 25
 13  ** ASMA435I Record 10 in SAMP01   MACLIB   A1(SAMPMAC) on volume: EAR191
                                                                                                                  14 
                                     31+         DROP 10,3,5                    Drop Multiple Registers         01-SAMPM
                                     32          COPY  SAMPLE                                                   00002400
                                     33=*        Line from member SAMPLE
               C 02A  00000 0002A    34          Using IHADCB,INDCB       Establish DCB addressability          00002500
               C 07A  00000 0007A    35 ODCB     Using IHADCB,OUTDCB                                            00002600
                                     36          push  using                                                    00002700
                   15 
           R:2  00000          37 PlistIn  Using Plist,2            Establish Plist addressability        00002800
           R:3  00000          38 PlistOut Using Plist,3                                                  00002900
SAMP01   Sample Listing Description                                                                            Page    4
 16    Active Usings (1):Entry1,R12  IHADCB(X'FD6'),R12+X'2A'  PlistIn.plist,R2  PlistOut.plist,R3
  ODCB.IHADCB(X'F86'),R12+X'7A'
  Loc  Object Code    Addr1 Addr2  Stmt   Source Statement                                  HLASM R6.0  2008/07/11 17.48
000010 1851                          40 ?Branch  LR    R5,R1              Save Plist pointer                    00003100
** ASMA147E Symbol too long, or first character not a letter - ?Branch
** ASMA435I Record 30 in SAMP01   ASSEMBLE A1 on volume: EAR191
000012 5820 5000            00000    41          L     R2,0(,R5)          R2 = address of request list          00003200
000016 47F0 C022            00022    42          B     Open                                                     00003300
                                    697          End                                                            00055100
0000D0 00000001                     698                =f'1'
0000D4 00000000                     699                =V(RCNVDATE)
0000D8 00000000                     700                =V(RCNVTIME)
0000DC 00000002                     701                =f'2'

 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 is the value of the location counter that represents the assembled address (in hexadecimal notation) of the object code.

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-justified and in hexadecimal notation, are machine instructions or assembled constants. Machine instructions are printed in full with a space inserted after every 4 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):

If the assembler option LIST(121) is in effect, both address fields contain 6 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 8 digits. For USING and EQU instructions, the Addr2 field may contain up to 8 digits.

 6 
The statement number. The column following the statement number may contain the following values:
 7 
The source program statement. The following items apply to this section of the listing:

Figure 4. Source and object listing section
  Loc  Object Code    Addr1 Addr2  Stmt   Source Statement                                  HLASM R6.0  2008/07/11 17.48
                                      1 &A SETC 'abcdefghijklmnop'                                              00001000
                                      2 &A       LA   4,1      Comment                                          00002000
000000 4140 0001            00001      +abcdefghijklmnop LA 4,1                                                X00002000
                                       +                       Comment
                                      3 &b SETC 'abc'                                                           00003000
                                      4 &b       LA   4,1      Comment                                          00004000
000004 4140 0001            00001      +abc      LA   4,1      Comment                                          00004000

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.

 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 USS file, message ASMA435I may 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.

Figure 5. Example showing truncation of long ASMA435I message
  Loc  Object Code    Addr1 Addr2  Stmt   Source Statement                                  HLASM R6.0  2008/07/11 17.48
000004 5810 0001            00001     6         l     1,1
** ASMA309W Operand 1 resolved to a displacement with no base register
** ASMA033I Storage alignment for 1 unfavorable
** ASMA435I Record 6 in /u/carland/assembler/source/dataset.which/has/a.very/longname/thus/causing/this/message/tobe/prin
ted/OVER/more/than/one/line/ on volume:
 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 justified in the object code columns, preceded by the characters "R:".
 13 
A second instance of the informational message ASMA435I (also mentioned in  11 ). 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:

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),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)
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.
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.

In Figure 6, the USINGs at statements 25 and 30 are ordinary USINGs. The USING at statement 34 is a dependent USING, and that at statement 35 is a labeled dependent USING. The USINGs at statements 37 and 38 are labeled USINGs.

Figure 6 also shows an example of the Source and Object section when the same assembly is run with assembler option LIST(133), and is followed by a description of differences with respect to Figure 3:

Figure 6. Source and object listing section--133 format
SAMP01   Sample Listing Description                                                                            Page    3
  Active Usings: None
     1 
  Loc    Object Code      Addr1    Addr2    Stmt  Source Statement                          HLASM R6.0  2008/07/11 17.48
00000000                00000000 000000E0      2 Samp01   Csect
                                              22 Entry1   SAMPMAC Parm1=YES                                              00002300
00000000 18CF                                 23+Entry1   LR 12,15                                                       01-SAMPMAC
                                              24+         ENTRY Entry1                                                   01-SAMPMAC
                               2 
                    R:C 00000000              25+         USING Entry1,12                Ordinary Using                  01-SAMPMAC

00000002 0000 0000               00000000     26+         LA Savearea,10                                                 01-SAMPMAC
** ASMA044E Undefined symbol - Savearea
** ASMA029E Incorrect register specification - Savearea
** ASMA435I Record 6 in SAMP01   MACLIB   A1(SAMPMAC) on volume: EAR191
00000006 50D0 A004               00000004     27+         ST 13,4(,10)                                                   01-SAMPMAC
0000000A 50A0 D008               00000008     28+         ST 10,8(,13)                                                   01-SAMPMAC
0000000E 18DA                                 29+         LR 13,10                                                       01-SAMPMAC
                                                                                                                            3 

                  R:A35 00000010              30+         USING *,10,3,5                 Ordinary Using,Multiple Base    01-SAMPMAC

** ASMA303W Multiple address resolutions may result from this USING and the USING on statement number 25
** ASMA435I Record 10 in SAMP01   MACLIB   A1(SAMPMAC) on volume: EAR191
                                              31+         DROP 10,3,5                    Drop Multiple Registers         01-SAMPMAC
                                              32          COPY  SAMPLE                                                   00002400
                                              33=*        Line from member SAMPLE
                  C 02A 00000000 0000002A     34          Using IHADCB,INDCB       Establish DCB addressability          00002500
                  C 07A 00000000 0000007A     35 ODCB     Using IHADCB,OUTDCB                                            00002600
                                              36          push  using                                                    00002700
                    R:2 00000000              37 PlistIn  Using Plist,2            Establish Plist addressability        00002800
                    R:3 00000000              38 PlistOut Using Plist,3                                                  00002900

SAMP01   Sample Listing Description                                                                            Page    4
  Active Usings (1):Entry1,R12  IHADCB(X'FD6'),R12+X'2A'  PlistIn.plist,R2  PlistOut.plist,R3
  ODCB.IHADCB(X'F86'),R12+X'7A'
  Loc    Object Code      Addr1    Addr2    Stmt  Source Statement                          HLASM R6.0  2008/07/11 17.48
00000010 1851                                 40 ?Branch  LR    R5,R1              Save Plist pointer                    00003100
** ASMA147E Symbol too long, or first character not a letter - ?Branch
** ASMA435I Record 30 in SAMP01   ASSEMBLE A1 on volume: EAR191
00000012 5820 5000               00000000     41          L     R2,0(,R5)          R2 = address of request list          00003200
00000016 47F0 C022               00000022     42          B     Open                                                     00003300
                                             697          End                                                            00055100
000000D0 00000001                            698                =f'1'
000000D4 00000000                            699                =V(RCNVDATE)
000000D8 00000000                            700                =V(RCNVTIME)
000000DC 00000002                            701                =f'2'

 1 
The Addr1 and Addr2 columns show 8-character operand addresses.
 2 
The assembled address of the object code occupies 8 characters.
 3 
The first 8 characters of the macro name are shown in the identification-sequence field.

[ Top of Page | Previous Page | Next Page | Contents | Index ]