Getting started

SLINK has three modes of operation:

  1. command line mode,

  2. interactive mode and

  3. script file mode.

Command line mode takes all parameters from the command line whilst interactive mode processes commands one at a time as they are entered from the keyboard. This is very similar to LINK77, the Salford linker for the DBOS family of compilers. Script file mode reads the commands from a text file. This has two variations, a Salford LINK77 compatible command mode and a Microsoft compatible command mode.

It is easy to build executables with SLINK. For example, suppose that you compiled a program contained within one file, say MYPROG. The compiler will produce an object file called MYPROG.OBJ. To produce an executable from this, the following command line will suffice

slink myprog.obj

In response, SLINK will:

  1. Load MYPROG.OBJ.

  2. Set the default entry point for Silverfrost programs.

  3. Scan the Fortran library, FTN77.DLL or FTN95.DLL.

  4. Scan the Silverfrost C library, SALFLIBC.LIB.

  5. Scan the default list of system DLL's.

  6. Set the file name to MYPROG.EXE (derived from the name of the object file).

  7. Create the executable.

This command line illustrates SLINK's command line mode. Alternatively, we could use SLINK's interactive mode in the form:

$ load myprog
$ file

Note that SLINK's command prompt is a $, and that SLINK has provided the .OBJ extension. Interactive mode always terminates with a file command. The file command is used both to terminate the session and to optionally provide the filename that is to be used to store the output. SLINK will know that you are building an executable and automatically supplies the .EXE extension.



Copyright © 1999-2024 Silverfrost Limited