The procedure used to create a monolith containing the ADDCONST and REPDIM2 programs is shown below. (Of course, monoliths usually comprise many more than two programs.) All the files described are in ADAM_EXAMPLES.
Firstly, a library is created to contain the object code of all the programs intended to comprise the monolith. In this example the library is called MIXLIB.OLB.16
A master program which calls the program corresponding to the command entered must now be written. MIXTURE.FOR below will call ADDNEW or REPDIM2 as appropriate.
This program must now be compiled and linked. The special MLINK command is used to link monoliths. The object code library, MIXLIB, and anything else needed to link the constituent programs (e.g. graphics libraries) should also be included in the link.
A monolith interface file containing the interface files for each of the constituent programs
must now be created. MIXTURE.IFL is shown below. Note that the file begins with the line
“monolith
monolith-name” and ends with “endmonolith
”. All the necessary interface files are simply
included in between.
MIXTURE.ICL, an ICL command file to define the commands in the monolith should now be written. Each command points to the monolith which contains the program i.e. MIXTURE.EXE.
To try the monolith, simply enter ICL and load the procedure MIXTURE.ICL to define the commands. The first command which specifies a program in the monolith will cause the monolith to be loaded.
16Of course this step is not really necessary; you could simply list all the .OBJ files individually at the link stage.