A typical listing is shown in Fig. 3-70. The first column in the program portion of the listing gives the value of the location counter immediately before the corresponding statement is assembled.

The second column shows the machine code that the statement is assembled into.

the third column is simply the line number in the source code, and the remainder of each line is the source code just as it is presented to the assembler. If an error is found, an error identifying number and message are output on the line following the line containing the error.

Figure 3-70 Sample assembler listing.

LOC  OBJ                 LINE     SOURCE

----                        1     DATA_SEG      SEGMENT
0000 0C00                   2         OPER1           DW      12
0002 E600                   3         OPER2           DW      230
0004 ????                   4         RESULT          DW      ?
----                        5     DATA_SEG      ENDS
----                        6     CODE_SEG      SEGMENT
                            7       ASSUME  CS:CODE_SEG,DS:DATA_SEG
0000 B8----         R       8         START:          MOV     AX,DATA_SEG
0003 8ED8                   9                         MOV     DS,AX
0005 A10000                10                         MOV     AX,OPER1
0008 03060200              11                         ADD     AX,OPER2
000C 7D02                  12                         JGE     STORE
000E F7D8                  13                         NEG     AX
0010 A30400                14         STORE:          MOV     RESULT,AX
0013 F4                    15                         HLT
----                       16     CODE_SEG      ENDS
  0000                     17                         END     START



XREF SYMBOL TABLE LISTING
---- ------ ----- -------

NAME      TYPE     VALUE  ATTRIBUTES, XREFS

??SEG . . SEGMENT         SIZE=0000H PARA PUBLIC
CODE_SEG. SEGMENT         SIZE=0014H PARA    6  7 16
DATA_SEG. SEGMENT         SIZE=0006H PARA    1  5 7 8
OPER1 . . V WORD   0000H  DATA_SEG  2  10
OPER2 . . V WORD   0002H  DATA_SEG  3  11
RESULT. . V WORD   0004H  DATA_SEG  4  14
START . . L NEAR   0000H  CODE_SEG  8  17
STORE . . L NEAR   0010H  CODE_SEG  12 14

Table of Contents | Next page | Previous page

This is page 54.