SPRUI03E June 2015 – January 2023
Start/Stop Source Listing
.list
.nolist
Two directives enable you to control the printing of the source listing:
The .list directive allows the printing of the source listing.
The .nolist directive suppresses the source listing output until a .list directive is encountered. The .nolist directive can be used to reduce assembly time and the source listing size. It can be used in macro definitions to suppress the listing of the macro expansion.
The assembler does not print the .list or .nolist directives or the source statements that appear after a .nolist directive. However, it continues to increment the line counter. You can nest the .list/.nolist directives; each .nolist needs a matching .list to restore the listing.
By default, the source listing is printed to the listing file; the assembler acts as if the .list directive had been used. However, if you do not request a listing file when you invoke the assembler by including the --asm_listing option on the command line (see Section 5.4), the assembler ignores the .list directive.
This example shows how the .list and .nolist directives turn the output listing on and off. The .nolist, the table: .data through .byte lines, and the .list directives do not appear in the listing file. Also, the line counter is incremented even when source statements are not listed.
Source file:
.data
.space 0CCh
.text
ABS A0,A1
.nolist
table: .data
.word -1
.byte 0FFh
.list
.text
MV A0,A1
.data
coeff .word 00h,0ah,0bh
Listing file:
1 00000000 .data
2 00000000 .space 0CCh
3 00000000 .text
4 00000000 00800358 ABS A0,A1
5
13
14 00000004 .text
15 00000004 008001A0 MV A0,A1
16 000000d1 .data
17 000000d4 00000000 coeff .word 00h,0ah,0bh
000000d8 0000000A
000000dc 0000000B