.LI     LIst options

Syntax:

        .LI  on | off | mon | moff | con | coff | ton | toff [,on | off | mon | moff | con | coff | ton | toff[,.....]]

See also:

.CP   .EF   .LF   .SF   .TF   .TW  

Function:

With the .LI directive you can precisely control what is listed to the list file or screen during assembly.
For instance if you put the directive .LI OFF at the very last line of your source file you will inhibit the time consuming listing of the symbol table. Please note that this symbol table is only listed at the end of the assembly on Version 2 of the SB-Assembler.

Boundary Sync:

In Version 3 of the SB-Assembler this directive will perform a boundary sync.

Explanation:

At least one list option should be present in the parameter field. Multiple list options should be separated by commas.

With the option on | off you can switch the listing completely on or off. Nothing will be sent to the list file or screen if the listing is switched off. Please note that error messages will always be listed, regardless of the settings of the list options.
The off list option has priority over all other list option. If the list option is switched off there's nothing the other options can do about it.

With the mon | moff option you can switch the listing of expanding Macros on or off. Expanding Macros will not be listed if this option is switched off (moff). The lines calling the Macros to expand will be listed however.
Please note that the listing of the definition of the Macro will not be affected by this list option.
If the Macro list option is switched on (mon) all following Macro expansions will be listed completely in the list file or to the screen. The letter M will precede all Macro line number in the list file.

With the con | coff option you can control the listing of source lines that are not assembled due to conditional assembly when the condition is false.
Source lines that are not assembled because a previous condition proved to be false will not be listed if the coff list option is selected. Program lines that are assembled because of a true condition will be listed normally.
All source lines will be listed if the con list option is selected. So also the lines that are not assembled due to a false condition will be listed. Source lines that are not assembled due to a false condition will be marked with the word SKIP in the line number column of the list file. Version 3 of the SB-Assembler will not print the word SKIP on the line number position for skipped lines. It will simply print an S in front of the line number in the list file.

Only version 3 of the SB-Assembler has a fourth list option, ton | toff. This option controls the listing of instruction timing information. If this option is switched on (ton) it will print the timing information in between parentheses just behind the line number on lines containing mnemonics. Lines containing comments only or directives won't have timing information printed.
If you're not interested in the timing information you can switch them off with the toff option.
Normally the timing information shows the number of clock cycles the instructions takes. Sometimes two values are printed, which means that the particular instruction can take two different times to execute, probably due to a previous status condition. At other times an * is printed behind the instruction time, which means that this particular instruction has some rather complicated instruction times, depending on several conditions. You should consult the processor's documentation in that case to find out what applies to your particular situation.
Be aware of the fact that the instruction times shown are derived from the original documentation. Later processor improvements can result in different instruction times. Especially the 8051 derivatives will probably show you many differences in instructions times.

Per default all three/four list options are switched on. This means that all source lines will be sent to the list file or screen.

It is allowed to have multiple list options in the parameter field after the .LI directive, as long as they are separated from each other by commas. It is even allowed to switch any of the list options on and off repeatedly on the same line, although only the last option will be remembered.
For example the next source line will switch the main and conditional list options on, and the Macro list option off.

         .LI  OFF,MON,COFF,ON,CON,MOFF

Source lines containing a .LI directive will never be listed in the list file them selves. Except when an error in such a line is detected.

Examples:

         .LI   ON              Switch main list option on
         .LI   OFF             Switch main list option off
         .LI   MON             Switch macro list option on
         .LI   MOFF            Switch macro list option off
         .LI   CON             Switch conditional list option on
         .LI   COFF            Switch conditional list option off
         .LI   ON,MON,CON      Switch all options on
         .LI   OFF,MOFF,COFF   Switch all options off
         .LI   ON,MOFF,CON     Only macro option off
         .LI   ON,OFF,ON,OFF   Results in main list option on
; Only for Version 3
         .LI   TON             Turn timing information on
         .LI   TOFF            Turn timing information off