List Control Directives 

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 : Allows listing of subsequent source lines (This is the default mode).
.XLIST : 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 : Enables listing of macro expansions. All source lines are listed, except those beginning with a double semicolon.
.SALL : Suppresses listing of all statements in macro expansions.
.XALL : 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

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