.SF   Symbol File

Syntax:

        .SF  filename[.ext]

See also:

.CP   .EF   .LF   .LI   .TF   .TW  

Function:

The .SF directive allows you to create a Symbol file at the end of the assembly process.

Boundary Sync:

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

Explanation:

The symbol file lists all Global constant labels followed by .EQ directives and their value. Such a Symbol file could be used to transfer all constants from one program into another program for linking purposes.
Please note that no Local labels or Macro labels are included in the Symbol file.

The Symbol table is opened by the .SF directive in pass 2 of the assembly process and will only be filled with the symbols at the end of pass 2. Therefore errors are only recognized in pass 2.

As usual drive letter (on DOS/Windows machines) and path are allowed together with the filename. The extension .ext is optional. The default extension is .sym .
An already existing file with the name filename will be overwritten without prior notice.
Only in Version 2 of the SB-Assembler the Symbol file may also be directed to a device instead of a file like PRN:, LPT1: or COM1:

The .SF directive may only be used once in a program.

In version 3 local labels are also listed to the symbol file, grouped together with their parent global label. Macro labels are not listed though. The comment field in the symbol file will hold the number of references to the particular label and the source file it was declared in.

Examples:

Here's a small example of a symbol file, generated by Version 3 of the SB-Assembler:

AAAA            .EQ     $00000140   RefCount=  1, Mem=Code, Source=pass.asm
.LOCAL          .EQ     $00000014   RefCount=  1, Mem=Code, Source=pass.asm
BBBB            .EQ     $00000200   RefCount=  0, Mem=Code, Source=pass.asm
.LOCAL          .EQ     $00000020   RefCount=  0, Mem=Code, Source=pass.asm
LABEL1          .EQ     $00001234   RefCount=  2, Mem=Code, Source=pass.asm