.LF     List File


        .LF  [filename[.ext] [,linelength]]

See also:

.CP   .EF   .LI   .SF   .TF   .TW  


With the .LF directive you can divert the listing output from the screen to a file or other output device.
During the assembly process you can divert the listing to different files or devices as often as you like. However only one such diversion can be active at the same time.

Boundary Sync:

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


Per default the listing is output to the screen with a maximum line length of 254 characters (Version 3 has no length limit). This means that longer lines are simply broken down at the right end of the screen and continue on the next line. The .LF directive allows you to send the listing elsewhere.

The filename may be preceded by a path name, and a drive letter if you're using a Microsoft operating system. If no extension .ext is given the default extension .lst is used.

An already open list file will be closed when the .LF directive is encountered. If no filename is given the output will be redirected to the screen again.
If you want to add a comment on a line that should only contain an empty .LF directive this comment should be preceded with a semicolon, otherwise it is treated as a file name.

If a filename is given behind the .LF directive a new file will be created if the filename does not exist yet. If the filename does already exist its length is reduced to 0, effectively overwriting the existing file irreversible without prior warning.

The filename may be followed by the maximum line length to be used in the listing. A comma should separate the filename from the linelength expression.
Lines in the listing will be truncated at this maximum length. All other characters on such a line will be discarded in the listing. The minimum line length you can set is 64 characters long. The maximum length is 254 characters, excluding the closing CR and LF characters.
No error is given if a too small or too large number is entered, simpy the minimum or maximum length is used instead.

Source lines containing the .LF directive will only be interpreted during pass 2 of the assembly process. Any errors in the parameters will not be detected before pass 2.

Source lines containing the .LF directive will never be listed in a list file themselves.

Please note that you are still able to exclude parts of the program from being sent to the list file by using options of the .LI directive.


         .LF  list         Send listing to list.lst
         .LF  C:\ASSEMBLE\TEST.PRN  Send listing to TEST.PRN
;                           on drive C: in directory \ASSEMBLE\
         .LF             ; Close listing file, output to screen