There are several list control directives to specify the contents
of the output listing (.LST) file. These directives can appear
anywhere in the language source code. Each directive will be
in effect until replaced by another directive.
The following two directives control the source lines
in the .LST file:
| .LIST
The .LIST directive allows listing of subsequent source lines in the .LST file.: Allows listing of subsequent source
lines (This is the default mode).
|
| .XLIST
The .XLIST directive suppresses listing of subsequent source lines in the .LST file.: Suppresses listing of subsequent
source lines.
|
Example: We can suppress the contents of an
include file as shown below. |
.XLIST ; suppress listing
INCLUDE part0.inc
.LIST ; restore listing
| | |
Macro list control directives
The assembler always lists the macro definistions in the .LST
file.
The following three list control directives affect only macro
invocation calls:
| .LALL
The .LALL is a macro list control directive that Enables listing of macro expansions. All source lines are listed, except those beginning with a double semicolon.: Enables listing of macro expansions.
All source lines are listed, except those beginning with
a double semicolon.
|
| .SALL
The .SALL is a macro list control directive that Suppresses listing of all statements in macro expansions.: Suppresses listing of all statements in
macro expansions.
|
| .XALL
The .XALL is a macro list control directive that Lists only the source statements in a macro expansion that generate code or data.: Lists only the source statements in a macro expansion that generate code or data. Statements that do not generate code or data such as comments (EQU and =) are not listed. It also suppresses repeat block directives and conditional assembly directives, that will be discussed later. (This is the default option.)
|
 Comments in Macros |
Any comment that starts with ;; will appear only in the macro
definition but not in macro expansions. Comments that start with
; (i.e., the standard comments) appear in macro expansions as well.
|
Example: Suppose that the MOVW macro is rewritten
as ahown below. Show how the following macro invocations
would appear in a .LST file. |
MOVW MACRO WORD1, WORD2
; moves source to destination
;; uses the stack
PUSH WORD2
POP WORD1
ENDM
.XALL
MOVW DS,CS
.LALL
MOVW P,Q
.SALL
MOVW AX,[SI]
| | | | | | | | | | | |
The above macro invocations would appear in a .LST file as follows:
.XALL
MOVW DS,CS
PUSH WORD2
POP WORD1
.LALL
MOVW P,Q
; moves source to destination
PUSH Q
POP P
.SALL
MOVW AX,[SI]
 Assembly errors during macro expansion |
If the assembler finds an error during macro expansion, it
indicates an error at the point of the macro invocation;
however, it is more likely that the problem is within
the macro itself. To find where the mistake really is,
you need to inspect the macro expansion in the .LST file.
|