FST (Fitted) Modula-2 Version 4.0 Documentation

[Previous]  [Contents]  [Next]

3. Software installation

Before starting, please print the file READ.ME, which provides information about the distribution contents.

3.1 Theory

The library module TermIO (through which Terminal does its I/O) requires that the ANSI.SYS driver be installed.

The executable files (MC.EXE, M2LINK.EXE, ...) should, for ease of operation, be placed in a drive/directory named in the DOS PATH variable.

The editor configuration file M2ED.CFG must be accessible through the DOS PATH.

Both the compiler and the linker will use the environment variable M2LIB to locate required library modules (the format for the M2LIB entry matches that of the DOS PATH).

The environment variable M2MODEL may be set to 'HUGE' or 'LARGE'. If M2MODEL is not set, the compiler, by default, assumes that you want to compile for the HUGE model.

The compiler and utilities in this package do not keep many files open simultaneously. If you set the FILES parameter in CONFIG.SYS to 10 you should not encounter any problems.


     DEVICE=ANSI.SYS      FILES=10      BUFFERS=20

The compiler supports 2 different memory models. If you are going to be using both memory models, keep each set of library object files in a different directory, and change the M2LIB path according to the model in use. We use the following BAT files to take care of this:

     set M2MODEL=LARGE
     set M2LIB=C:\M2\LIB;C:\M2\LIB\L
     set M2MODEL=HUGE
     set M2LIB=C:\M2\LIB;C:\M2\LIB\H

where \M2\LIB is the directory where all the DEF and BIN files reside, \M2\LIB\L contains the LARGE memory model M2O files, ...

In the following discussion we will, for simplicity sake, assume that you will be using only one of the memory models.

3.2 Recommended setup for a hard disk system

Place the executable files (*.EXE) and M2ED.CFG in a directory currently in the DOS search path, or in a new directory (ex: \M2) to be added to the PATH list. Example:


Make a directory for the library files (ex: \M2\LIB) and copy all the .DEF, .M2O and .BIN files to it. To the AUTOEXEC.BAT file add the line:

     SET M2LIB=C:\M2\LIB

You will probably want to create a directory for your own reusable library modules. This directory can be added to the M2LIB environment variable. Example:


You may keep your projects in their own, individual, directories.