LINK.COM
1 supports the generation of overlay files2, but the linker tells the lack of two labels, namely ?ovlay
und ?ovla0
.
These are two entry points belonging to the PL/I run time library.
An alternative source was represented in the public domain, SIG/M Vol. 2363.
(Later on I obtained the PLILIB.IRL
library, containing the missing module4).
Starting with CP/M I didn't know the SIG/M source and the manner, which parameters are passing to the PL/I module.
Therefore I was looking for another solution.
I decided to use the PRL respectively the SPR format as created by LINK.COM
.
For the implementation I utilized SPR modules, created by the command “LINK file [OS]
”.
I wrote two utilities and the actual load routine used for loading the required module from an overlay file.
Description of the utilities and the load module:
Name | Invocation | Description |
---|---|---|
PRL2OVR |
PRL2OVR prl_file [ovm_file]
|
This utility reduces the header of an .SPR file.
The size of the header is originally 256 bytes und containes the length of the program code only.
PRL2OVR copies the first 128 bytes of the header and appends the program code.
|
OVLBLDPR |
OVLBLDPR [-] ovr_file list_of_ovm_files
|
This utility builds the entire overlay appending overlay modules.
Furthermore it creates a text file holding the length and the start record of each module.
This file may be inserted into the main file (e.g. by INCLUDE ).
The option “–” disables the creation.
|
LDPRL | Divers parameters |
The main program calls this routine to load an overlay module into memory.
Within the assembler source the symbol LODOVL must be declared EXTERN .
The parameters will be discussed more detailed beneath.
|
Description of parameters transferred to the module LDPRL
:
Invocation | ||
---|---|---|
Parameter | Transfer in register | Description |
Start record | L |
Defines the record starts with in the overlay of the module to be loaded |
Length of module | H |
Defines the length of the module to be loaded in the overlay |
External table | ^BC |
Address of a table which allows access to external routines |
Load address and FCB | ^DE |
Address of a parameter block holding
|
Return | ||
Parameter | Register/Carry flag | Description |
Result | Carry |
If an error occurs the C flag will be set |
Load address | ^HL |
Real load address, starting at a page boundary (0xPP00 ) |
End address | ^DE |
First free address after module code |
Structure of an overlay module:
The first byte of the overlay module defines whether external routines will be used or not:
No external routines | Use external routines | Description |
---|---|---|
NOP |
JP START JP EXT_1 JP EXT_2 ... JP EXT_n NOP START:.......... |
|
1. | The manual describes the function of LINK.COM in detail |
2. | Appendix E describes the creation of overlay files on detail |
3. | SIG/M (Special Interest Group/Microcomputers), a part of the Amateur Computer Club of New Jersey, used to compile public-domain software into disk volumes for regular release. The SIG/M disk set was started in 1980 and volumes 000 up to 310 may be found here. |
4. |
The PL/I package consists of pli80_13
(contains PLILIB.IRL ) and plm80x80 (contains PLMLANG.DOC (PL/M-80 Language Summary)).
I disassembled the load module which will be found here.
|
Werner Cirsovius | 1989, compiled August 2009, upgraded November 2012 |