4 Linker Opcodes
ksherlock edited this page 2022-12-08 17:59:46 -05:00

FASt

Doubles link speed of Linker in those files that have only one SAV

NOL

        NOL

Causes all assemblies to be done with a default of LST OFF instead of the usual ON default.

LEN

        LEN       LABEL

Puts LABEL in the symbol dictionary as an ENTry whose value is equal to the number of bytes of the last linked file.

POS

        POS       LABEL

Similar to LEN but sets LABEL equal to the number of number of bytes in the linked file from the start (or from the last zero-point; see below).

        POS

When used by itself with no label, POS resets the byte counter to zero for the next POS LABEL command.

Examples:

        LNK     FILE1
        LNK     FILE2       ; Link 1st & 2nd file 
        LEN     LABEL1      ; Set LABEL1 equal to length of FILE2
                            ; i.e., last linked file
        POS     LABEL2      ; Set LABEL2 equal to length of FILE1 + FILE2
        LNK     FILE3       ; Misc. file in our program...
        POS                 ; No operand sets byte counter to zero.
        LNK     FILE4
        LNK     FILE5       ; Link files 4 & S now.
        POS     LABEL3      ; Set LABEL3 to length of FILE4 + FILE5
        SAV     PROGRAM     ; Save final object file.

VER

        VER       NUMBER

This is used to specify the version of the OMF, i.e. the System Loader, that is to be used with the output object file. Versions 1 and 2 are supported. This the operand must be $1 or $2. The VER instruction should come before any other linking instructions except ASMs, which are not dependent on the version of the Loader in use. ProDOS 15 version 1.2 uses version 2 of the loader format, and this is the default version used by the GS Linker if VER is not specified. You will have to decide what OMF version to use. If you specify OMF version 1, your file can be loaded by any version of ProDOS 16. If you specify OMF version 2, ProDOS 16 version 1.2 or later will be required.

  • Merlin 8/16 Supplement