1.5 Linking a PDP-11 C Program
After you compile a PDP-11 C source program or module,
invoke the Linker or Task Builder to combine your PDP-
11 system object modules into one executable image. The
executable image can then be executed on a PDP-11 system
or a VMS system with an RSX emulator. A source program
or module cannot run until you link it with the Task Builder
or Linker. The following sections show methods you can use
to invoke the Linker or Task Builder.
The RT-11 Linker and RSX Task Builder are system
programs that link relocatable object modules to form an
executable task image. Use the RT-11 Linker to build tasks
that execute on the RT-11 operating system or to build tasks
on the RSTS/E system that execute under the RT-11 Run-
Time System. Use the RSX Task Builder to build executable
tasks for the following systems.
.
RSX-11M/M-PLUS
.
Micro /RSX
.
RSX-11S
.
VAX-11 RSX operating systems
.
Tasks built on RSTS/E operating systems that execute
under the RSX Run-Time System
When you execute the LINK command or TKB command,
the Task Builder or RT-11 Linker performs the following
functions:
.
Resolves local and global symbolic references in the object
code
.
Assigns values to the global symbolic references
.
Signals an error message for any unresolved symbolic
reference
.
Allocates memory space for the executable image
The Task Builder also resolves references to resident common
blocks and resident libraries.
The object modules to be linked can come from user-specified
input files, user libraries, or system libraries. The Task
Builder resolves references to symbols defined in one module
and referred to in other modules. Should any symbols remain
undefined after all user-specified input files are processed, the
Task Builder automatically searches the appropriate system
object library to attempt to resolve them. For additional
information about libraries, refer to the Section 1.5.8.
You can also use the Task Builder to build tasks with overlay
structures. For additional information about the Task Builder
and Task Builder options, refer to the RSX-11M/M-PLUS
and Micro /RSX Task Builder Manual or the RSTS/E Task
Builder Reference Manual and Section 1.5.9.
1.5.1 Linking a Program on RSX Systems
Use the DCL LINK command to invoke the Task Builder.
For example, to link the PDP-11 C program PROG1 on
RSX, use the following command line:
$ link prog1,lb:[1,1]cfpursx.olb/library
You can also use the following format to link a program,
using a command file as follows:
LINK @command-file
For example, if you want to link using the command file
PROG1.CMD, you enter the following command:
$ link @prog1.cmd
Alternatively, you can invoke the Task Builder (under either
the DCL or MCR command line interpreters) by typing a
RUN command in the following format:
$ run tkb
Or, if your system manager has installed TKB, you can enter
the following:
$ tkb
In either case, after you press the Return key, the Task
Builder prints the TKB> prompt. You then enter the TKB
command.
After you press the Return key, the Task Builder prints
another TKB> prompt. You then:
1. Enter additional input files, if any.
2. Enter a line containing only two slashes (//) to tell the
Task Builder to create a task image and to exit.
3. Press the Return key.
See the RSX-11M/M-PLUS and Micro /RSX Task Builder
Manual for detailed instructions.
1.5.2 Linking a Program on RSTS/E Systems
There are two ways you can link programs on RSTS/E. You
can invoke the RSX Task Builder or the RT-11 Linker. The
following sections describe these two methods.
1.5.2.1 Invoking the RSX Task Builder on RSTS/E
There are three ways to invoke the RSX Task Builder on
RSTS/E. You can invoke the Task Builder by using the DCL
LINK command as follows:
$ link/cc prog1
You can run the Task Builder by entering a RUN command
in the following format:
$ run tkb
Or, if your system manager has installed TKB as a CCL
command, you can enter the following:
$ tkb
In each case, after you press the Return key, the Task
Builder prints the TKB> prompt. You then enter the TKB
command.
After you press the Return key, the Task Builder prints
another TKB> prompt. You then:
1. Enter additional input files, if any.
2. Enter a line containing only two slashes (//) to tell the
Task Builder to create a task image and to exit.
3. Press the Return key.
The following example shows how to taskbuild FOO.C on
RSTS/E, using the taskbuilder FOO.CMD and FOO.ODL files.
FOO.C contains the source code for FOO.C, which copies the
contents of one file to another file. FOO.ODL is the overlay
description file.
/*Sample FOO.C program.*/
#include <stdio.h>
#include <errno.h>
int main ()
{
FILE *in;
FILE *out;
int c;
char inname[133];
char outname[133];
printf ("\nInput file?:\n");
gets(inname);
printf ("\nOutput file?:\n");
gets(outname);
if (in = fopen(inname, "r"))
{
if (out = fopen(outname, "w"))
{
while ((c = getc(in)) != EOF)
putc(c,out);
fclose (out);
}
else
{
printf ("Could not open file %s\n",outname);
printf ("Error was %d\n", errno);
}
fclose (in);
}
else
{
printf ("Could not open file %s\n",inname);
printf ("Error was %d\n", errno);
}
}
The following file, FOO.CMD, calls the file FOO.ODL.
;Sample TKB CMD file to build program FOO.C for RSTS/E
SY:FOO=SY:FOO/MP
//
FOO.ODL is linked with FOO.C to produce an executable file.
;Sample TKB ODL file to build program FOO.C for RSTS/E
.ROOT USER
USER: .FCTR SY:FOO-LB:CEISRE/LB:$PRMXF-RMSROT-LIBR,RMSALL
LIBR: .FCTR LB:CEISRE/LB
@LB:RMS11S
.END
After compiling FOO.C, taskbuild the files using the following
command:
$ tkb @foo
See the RSTS/E Task Builder Reference Manual for more
detailed instructions.
1.5.2.2 Invoking the RT-11 Linker on RSTS/E
You can link your program on RSTS/E by invoking the
RT-11 Linker. You invoke the RT-11 Linker as follows:
$ run link.sav
See Section 1.5.3 for additional information on the RT-11
Linker.
1.5.3 Linking a Program on RT-11 Systems
You can invoke the RT-11 Linker in either of two ways:
using the Keyboard Monitor LINK command or using the
RUN command.
Using the Keyboard Monitor LINK command adheres to the
following syntax, where ``filespec'' represents the file to be
linked:
LINK[/option . . . ]filespec[/option . . . ][, . . . filespec[/option . . . ]]
or
LINK[/option . . . ]
FILE? filespec[/option . . . ][, . . . filespec[/option]]
To run the Linker using the RUN command, use the
following format:
RUN SY:LINK
The RUN command searches the system disk SY: for the
LINK program and starts it executing. The Linker returns
with a prompt when it is ready to accept input from your
terminal:
*
For example, if you want the object files WINKN, BLNKN,
and NOD linked into an executable memory image file, you
can enter a succession of commands as follows:
. run sy:link
(From this point on the linker issues the * prompt.)
* winkn,winkn=winkn,blnkn,nod
To exit the linker, enter Ctrl/C.
) prompt whenever
it awaits user input. The result in the example is two
files: WINKN.SAV, an executable memory image, and
WINKN.MAP, a load map of the memory image file. Both
are placed on the default device DK:.
When invoked with the RUN command either with or
without arguments, the RT-11 Linker accepts the first
command string in the form:
[bin-filespec][,map-filespec][,stb-filespec] = [infiles-list]
To make a job an RT-11 virtual job, use the $VIRTUAL$JOB
macro in one of the routines in the job:
#include <RTSYS.H>
$VIRTUAL$JOB
The following is an example of how to link on RT-11:
. run sy:link
* test/m:3000/b:3000,test=test,sy:ceisrt
To exit the linker, enter Ctrl/C.
The Task Builder can then be used as shown in Section 1.5.1.
TEST.C contains the source code which copies the contents of
one file to another file.
/*Sample TEST.C program.*/
#include <stdio.h>
#include <errno.h>
int main ()
{
FILE *in;
FILE *out;
int c;
char inname[133];
char outname[133];
printf ("\nInput file?:\n");
gets(inname);
printf ("\nOutput file?:\n");
gets(outname);
if (in = fopen(inname, "r"))
{
if (out = fopen(outname, "w"))
{
while ((c = getc(in)) != EOF)
putc(c,out);
fclose (out);
}
else
{
printf ("Could not open file %s\n",outname);
printf ("Error was %d\n", errno);
}
fclose (in);
}
else
{
printf ("Could not open file %s\n",inname);
printf ("Error was %d\n", errno);
}
}
The following file, TEST.CMD, calls the file TEST.ODL.
;Sample TKB CMD file to build program TEST.C for RSX or VMS
SY:TEST/CP=SY:TEST/MP
//
TEST.ODL is linked with TEST.C to produce an executable
file.
;Sample TKB ODL file to build program TEST.C for RSX or VMS
.ROOT USER
USER: .FCTR SY:TEST-LB:[1,1]CEISRSX/LB:$PRMXF-RMSROT-LIBR,RMSALL
LIBR: .FCTR LB:[1,1]CEISRSX/LB
@LB:[1,1]RMS11S
.END
After compiling TEST.C, taskbuild the files using either of the
following commands on VMS:
$ mcr tkb @test
or
$ mcr tkb
TKB> @TEST
1.5.5 Task Builder Command-Line Elements
When you invoke the Task Builder, certain files must be
present, and you can use various qualifiers. The following
sections describe the files that you need for task building and
the qualifiers that you can specify.
1.5.5.1 Creating CMD and ODL Files for Task Building
Before you link a PDP-11 C object file, you may want to
produce a command (CMD) file and an overlay description
file (ODL).
The following is an example of a CMD file that the Task
Builder uses to produce a TSK file:
SY:XBL201/CP=SY:XBL201/MP
//
For more information on CMD files, see the RSX-11M/M-
PLUS and Micro /RSX Task Builder Manual or the RSTS/E
Task Builder Reference Manual .
The following is an example of an ODL file that is used by the
CMD file for an RSX system:
.ROOT USER
USER: .FCTR SY:XBL201-LIBR
LIBR: .FCTR LB:[1,1]CEISRSX/LB
.END
For information about overlaying, see the Overlay Capability
and Overlay Loading Methods chapters in the RSX-11M
/M-PLUS and Micro /RSX Task Builder Manual , or the
appropriate sections about overlaying in the RSTS/E Task
Builder Reference Manual .
1.5.5.2 Command-Line Elements in CMD Files
The elements that you specify on the first line in the CMD
file are as follows:
task-file/qualifier,map-file/qualifier,infiles-list/qualifier
task-file
The file specification of the task-image output file. This file
specification may be omitted if no task-image file is desired.
If a specification is entered, only a file name is required; a file
type value of TSK (EXE under VAX-11/RSX) is assumed
if no file type is specified. Therefore, the following two
commands are equivalent. Note, however, that no map file is
created in either case.
TKB> FILE1/FP=FILE1
TKB> FILE1.TSK/FP=FILE1
map-file
The file specification of the map output file. This file
specification may be omitted if no task-image map file
is desired. If a specification is entered, only a file name is
required; a file type value of MAP is assumed if no file type
is specified. On RSX systems, the map file is automatically
spooled to the line printer. On some operating systems, the
map file is automatically deleted after it is printed.
infiles-list
The list of input files that contains compiled PDP-11 C object
modules. (This list may also contain compiled or assembled
libraries and modules that were written in a language other
than C, such as MACRO.) In many cases, this list contains
only one file specification; however, when there is more
than one specification, you must separate the individual
specifications with commas. Only a file name is normally
required; a file type value of OBJ is assumed.
1.5.5.3 Task Builder Qualifiers
You can use command qualifiers to modify the Task Builder's
output, as well as to include the On-Line Debugging Tool
(ODT). Task building output consists of an image file and an
optional map file.
The following list summarizes some of the most commonly
used command qualifiers that you can specify in the CMD
file. A brief description of each qualifier follows this list. For
a complete list of task-building command qualifiers, see the
sections about link qualifiers and TKB qualifiers in the RSX-
11M/M-PLUS and Micro /RSX Task Builder Manual , or
the section about task builder qualifiers in the RSTS/E Task
Builder Reference Manual .
Task-Image Output File Qualifiers
You can use the following qualifiers for the task-image
output file:
/FP
Specifies that the task uses the Floating-Point Processor
(FP11) or floating-point microcode option (KEF11A).
/DA
Specifies that the system debugging aid ODT is to be included
in the task.
/CP
Specifies that the task be checkpointable; must use for tasks
using standard I/O or memory management (calloc, free, and
so on).
/ID
Specifies that the task use I- and D-space. You can build
an I- and D-space task on RSX-11M-PLUS (Version 4.3
or higher), Micro /RSX (Version 4.3 or higher), and RSTS/E
(Version 10.0 or higher).
The PDP-11 C compiler generates code that will run in I-
and D-space.
/MU
Specifies that multiple versions of the task may be run
simultaneously. The read-only portions of the task are
shared.
Map File Qualifiers
You can use the following qualifiers for the map file:
/CR
Specifies that a global cross-reference listing is to be appended
to the map file.
/SP
Specifies that the map file is to be spooled to the line printer.
Input-File Qualifiers
You can use the following qualifiers for input files:
/LB
Specifies that the input file is to be a library file. (See
Section 1.5.8.)
/MP
Specifies that the input file is an overlay description file. (See
Section 1.5.9.)
1.5.6 Task Builder Error Messages
If the Task Builder detects any errors while linking object
modules, it displays messages indicating the cause and
severity of the error. If any fatal error conditions occur
(that is, errors with a severity of
*
FATAL
*
), the Task Builder
does not produce an image file.
Some common errors that occur during linking are as
follows:
.
The input file has a file type other than OBJ, and no file
type was specified on the command line.
If you do not specify a file type, the Task Builder searches
for a file that has a file type of OBJ by default. If the file
is not an object file and you do not identify it with the
appropriate file type, the Task Builder signals an error
message and does not produce an image file.
.
You tried to link a nonexistent module.
The Task Builder signals an error message if you misspell
a module name or if the compilation contains fatal
diagnostics.
.
A reference to a symbol name remains unresolved.
An error occurs when you omit required module or
library names from the command line and the Task
Builder cannot locate the definition for a specified
global symbol reference. In the following example on
RSTS/E, a main program module, OCEAN.OBJ, calls
the subprogram modules REEF.OBJ, SHELLS.OBJ,
and SEAWD.OBJ, and the following LINK command is
executed:
$ link/cc ocean, reef, shells, lb:cfpure/lb
Because SEAWD is not included in the link, the Task
Builder signals the following error message:
TKB -- *DIAG* -1 undefined symbols segment OCEAN
SEAWD
.
The task has grown over the 32K limit.
The error would be as follows:
Segment OCEAN has addr overflow:allocation deleted
If an error occurs when you link modules, you can often
correct the error by reentering the command string and
specifying the correct modules or libraries. If an error
indicates that a program module cannot be located, you may
be linking the program with the wrong PDP-11 C library.
1.5.7 Storage Considerations
Most storage for objects with the auto storage class specifier
is allocated on the stack in PDP-11 C. Therefore, when
linking, you should carefully consider how much automatic
storage your program needs at any time. Since C is a stack
language, many PDP-11 C programs require additional
stack space beyond the default provided by TKB or the RT-
11 Linker. If you do not allow for this, insufficient stack
space will cause your program to behave unpredictably.
As your program executes, it uses stack space for the
following:
.
Automatic variables within subroutines
.
Parameters passed to subroutines
.
Subroutine return addresses and return values
.
Registers saved by subroutines (up to 54 bytes)
.
Run-time library storage
Determine the amount of storage you need to allocate by
summing the space used for each item that uses stack
space. Include items from both the main program and each
subroutine. Each automatic variable, parameter, return
address, and return value requires the following space on the
stack:
.
char, short, pointer-2 bytes
.
long, float-4 bytes
.
double-8 bytes
.
arrays, structures-multiples of the variables involved
As with variables, you need to calculate the size of the
parameters, return addresses and values, and registers
for each subroutine as well as for the main program.
To set the size of the stack when using the RSX Task Builder
on RSX or RSTS systems, use the STACK option to set the
number of words of STACK used. The following Task Builder
command file allocates 1024 bytes of space to the stack:
SY:TEST/CP=SY:TEST/MP
/
STACK=512
//
On RT-11 systems, the stack is located above address 476. To
set the stack size when using the RT-11 Linker on RT-11 or
RSTS systems, use the /M and /B qualifiers to set the address
of where the stack begins and to link the code above the
stack. The following Linker commands allocate about 1024
bytes of space to the stack:
r link
test/m:2500/b:2500,test=test,sy:ceisrt
1.5.8 Library Usage
Libraries consist of a collection of object modules. When the
Task Builder or Linker encounters a library specification, it
searches the library for definitions of any of the currently
undefined global symbols. The modules containing these
definitions are included in the task image being built.
Run-time libraries (RTL) contain functions and macros to
perform input, output, and various task related to specific
operating environments. For proper support, you must link
your program to the run-time library developed for your
operating system. Section 1.5.8.1 explains how to select and
specify the run-time library.
Disk and resident libraries are available for use with some
operating systems. Disk Libraries are stored in files on
disk. The Task Builder can make a disk library a physical
part of a task image. From disk libraries, the Task Builder
copies object modules into the task image of each task that
references those modules.
Resident Libraries are located in main memory and are
shareable; that is, a single copy of each library is used by all
tasks that refer to it. The Task Builder can make a resident
library a logical part of a task image but not a physical part;
that is, the Task Builder can link the library to a task image
but cannot copy the library to a task image.
Section 1.5.8.2 has more information about system disk and
resident libraries. User disk and user resident libraries are
described in Section 1.5.8.3.
PDP-11 C provides a run-time library that can be installed
as a supervisor-mode library on some systems. When
a user task is linked to this library, a large part of the
PDP-11 C run-time library resides in supervisor mode,
thereby increasing the amount of user mode intruction
space available for your program. Section 1.5.8.4 has more
information about using the PDP-11 C supervisor-mode
library. Refer to the RSX-11M/M-PLUS and Micro /RSX
Task Builder Manual and the RSTS/E Task Builder
Reference Manual for more information about supervisor-
mode libraries.
1.5.8.1 PDP-11 C Run-Time System Object Libraries
You must link your program with the correct PDP-11 C
run-time library (RTL), so that the proper run-time support
is included. Each supported target operating system has two
run-time libraries associated with it. The FPU run-time
libraries support floating-point instructions, and the EIS
run-time libraries support EIS instructions.
When you compile your programs with /ENVIRONMENT=NOFPU,
you may link them to either the FPU or EIS run-time
library. However, if the target machine has floating-point
hardware, it is suggested that you link to the FPU library.
When you compile your programs with /ENVIRONMENT=FPU,
you should link to the FPU run-time library. Though
linking to the EIS library will work in some cases, certain
RTL routines might encounter problems. The release notes
indicate some, but not all, of the problems that you could
encounter.
The following table shows the different library names and
the instruction set they require for each supported operating
system.
Instruction Set
RSX
Systems
RSTS/E
Systems
RT-11
Systems
For programs that use standard I/O, refer to the /CP
taskbuilder switch and the input/output support package
sections in the PDP-11 C Run-Time Library Reference
Manual for additional information.
1.5.8.2 Using System Libraries
Each system has a system disk library. Consult with your
system manager to determine which system resident libraries
are available on your system. You can create your own user
disk and resident libraries.
Each RSX and RSTS/E system has a system disk library
called LB:SYSLIB.OLB. In addition, each RSX system has
available to it three system resident libraries. RSTS/E systems
have one system resident library available that are pertinent
to PDP-11 C.
The system disk library is as follows:
LB:[1,1]SYSLIB.OLB
The Task Builder automatically searches the system disk
library to see if any undefined global references remain after
all the input files have been processed. If the definition of one
of these undefined global symbols is found, the appropriate
object module is included in the task being built.
Consult your system manager to determine which of the
following system resident libraries are available on your
system.
Library System Description
A shared library of RMS-11 I/O routines
can be built in supervisor mode on RSX-
11M-PLUS systems
These system resident libraries are linked to a task by using
the Task Builder option, as follows:
For FCSRES:
LIBR = FCSRES:RO
For FCSFSL:
RESSUP=FCSFSL/SV
For RMSRES on a RSX system:
LIBR = RMSRES:RO
or
RESSUP=LB:[3,54]RMSRES/SV:0
For RMSRES on a RSTS/E system:
LIBR = RMSRES:RO
or
RESSUP=RMS$:RMSRES/SV:0
1.5.8.3 Creating User Libraries
Using the Librarian Utility Program (LBR), you can
construct your own PDP-11 C or assembly language disk
libraries. You then access these libraries by using the
library qualifier, /LB after the library name. Consult the
RSX-11M/M-PLUS Utilities Manual and the RSTS/E
Programmer's Utilities Manual for further information on
the LBR.
For example, if MATRIXLIB.OLB is a disk library containing
matrix manipulation routines and PROG is the object file of a
compiled PDP-11 C program that calls the matrix routines,
you could enter the following command line for the Task
Builder:
$ tkb prog/fp=prog,matrixlib/lb
You can construct resident libraries using the taskbuilder.
For more information, see the RSX-11M/M-PLUS and Micro /RSX Task Builder Manual .
1.5.8.4 Using the supervisor-mode Library
When a task uses supervisor-mode libraries the virtual
address space available for the task is increased because the
supervisor-mode library resides in a different address space.
Refer to the RSX-11M/M-PLUS and Micro /RSX Task
Builder Manual and the RSTS/E Task Builder Reference
Manual for more information about supervisor-mode
libraries.
PDP-11 C provides a run-time library that can be installed
as a supervisor-mode library on RSX-11 M-PLUS,
Micro /RSX and RSTS/E systems that support the FPU
processor. PDP-11 C does not provide a supervisor-mode
library for the RT-11 operating system.
When you link a user task to the run-time supervisor-
mode library, the user mode instruction space available
is substantially increased. This allows you to write larger
programs without using overlays.
Even more user mode instruction space can be made
available when the run-time supervisor-mode library is
used together with the system resident libraries, RMSRES
for RSTS/E and RSX systems, and FCSFSL and FCSRES for
RSX systems. (See Section 1.5.8.2 for more information about
system resident libraries.)
Since the run-time supervisor-mode library is Position
Independent Code (PIC), it does not have to reside in APR0
when other supervisor-mode libraries are linked with the
task.
The supervisor-mode library contains a subset of the
CFPURSX.OLB or CRPURE.OLB PDP-11 C run-time
libraries.The files for the supervisor-mode library include the
following:
.
For RSX and Micro /RSX systems:
CCSMRE.TSK
CCSMRE.STB
CCSMRE.LIB
You must install the library before you can use it. Use one of
the following formats to install the library.
For RSX and (Micro /RSX:
Using MCR:
> ins lb:[1,1]ccsmrx/ron=yes
For RSTS/E:
$ install/library/read_only lb:ccsmre
To link to the library, you must reference the module
CSMSUP.OBJ. The reference to CSMSUP.OBJ must occur
before any reference to the PDP11-C run-time library. This
can be done by extracting CSMSUP.OBJ as an object or by
referencing CSMSUP in the taskbuilder .ODL file.
To extract CSMSUP.OBJ as an object, use one of the
following commands:
For RSX or Micro /RSX:
LBR CSMSUP.OBJ=LB:[1,1]CFPURSX/EX:CSMSUP
For RSTS/E:
LBR CSMSUP.OBJ=LB:CFPURE/EX:CSMSUP
To reference CSMSUP in the taskbuilder .ODL file, use one
of the following commands:
For RSX or Micro /RSX:
label .FCTR directory : yourtask -LB:[1,1]CFPURSX/LB:CSMSUP- label1
For RSTS/E:
label .FCTR directory : yourtask -LB:CFPURE/LB:CSMSUP- label1 \
For example, in the following taskbuilder .ODL file the
CSMSUP.OBJ is referenced before the reference to the RSX
PDP-11 C run-time library CFPURSX. For an RSTS/E
system, reference the PDP-11 C run-time library CFPURE.
CPCSM.ODL
.root user
user: .fctr sy:yourtask-csmsup-user1
user1:.fctr rmsrot-libr,rmsall
libr: .fctr lb:[1,1]cfpursx/lb:$prmxf-lb:[1,1]cfpursx/lb
@lb:[1,1]rms11s
.end
The task is linked with the resident library by using the
RESSUP taskbuilder option as shown in the following
example. Note that the size of the stack is set to allow data to
be passed on the stack. The following example is written for
an RSX system, and uses CCSMRX and CFPURSX. For a
RSTS/E system, use CCSMRE and CFPURE.
CPCSM.CMD
yourtask/cp/id,yourtask/cr/ma/-sp,yourtask=yourtask/mp
stack=3000
ressup=lb:[1,1]CCSMRX/SV:0
Programs which use RMS or FCS to support PDP-11
C standard I/O can increase the available user-mode
instruction space by linking the task with both the PDP-
11 C supervisor-mode library and either RMSRES, FCSRES
or FCSFSL.
The following taskbuilder command file and ODL file
show how a program can be linked using the RMS-11 I/O
routines library, RMSRES, and the supervisor-mode library,
CCSMRX.
CMD File:
hello/fp/cp=hello/mp
ressup=lb:[3,54]rmsres/sv:0
ressup=lb:[1,1]ccsmrx/sv
//
ODL File:
.root user-rmsrot,rmsall
user: .fctr sy:hello-csm-io-libr
csm: .fctr lb:[1,1]cfpursx/lb:csmsup
io: .fctr lb:[1,1]cfpursx/lb:$prmxf
libr: .fctr lb:[1,1]cfpursx/lb
@lb:[1,1]rmsslx
.end
The following taskbuilder command file and ODL file show
how a program can be linked using RMSRES and the
supervisor-mode library CCSMRE.
CMD File:
hello/fp/cp=hello/mp
ressup=lb:rms$:rmsres/sv:0
ressup=lb:ccsmre/sv
//
ODL File:
.root user-rmsrot,rmsall
user: .fctr sy:hello-csm-io-libr
csm: .fctr lb:[1,1]cfpure/lb:csmsup
io: .fctr lb:[1,1]cfpure/lb:$prmxf
libr: .fctr lb:[1,1]cfpure/lb
@lb:[1,1]rmsslx
.end
The following taskbuilder command file and ODL file
show how a program can be linked using the File Control
Services library, FCSFSL, with the supervisor-mode library
CCSMRX. To use the FCS-11 I/O routines library, FCSRES,
with the supervisor-mode library, substitute FCSRES for
FCSFSL in the SUPLIB command line in the command file.
CMD File:
hello/fp/cp=hello/mp
suplib=fcsfsl/sv:0
ressup=lb:ccsmrx/sv
//
ODL File:
.root user
user: .fctr sy:hello-csm-io-libr
csm: .fctr lb:[1,1]cfpursx/lb:csmsup
io: .fctr lb:[1,1]cfpursx/lb:$prcxf
libr: .fctr lb:[1,1]cfpursx/lb
.end
1.5.9 Overlays
The overlay facility provided by the Task Builder and RT-11
Linker allows large programs to be executed in relatively
small areas of main memory. An overlaid program is
essentially a program that has been broken down into parts,
or overlays, that are loaded into memory automatically
during program execution. Please refer to Section 8.4 for
more detailed information.
Additional information on overlays can be found in the
following books:
.
For the RSX environment-Overlay Capability and
Overlay Loading Methods in the RSX-11M/M-PLUS
and Micro /RSX Task Builder Manual
.
For the RSTS environment- RSTS/E Task Builder
Reference Manual
.
For the RT-11 environment- RT-11 System Utilities
Manual