(Note: This command is only recognized in the FORT subsystem.)
RUNL <object-files> = <hstar> (<opts>) <libraries> ; <link-sets>
ULIB,CORE=nn,NAME=name,MAP,GO
fort runl /main.o = myprog (core=60,map) ; link(a) /ovly1.o ; link(c,a) /ovly2.o ; link(b) /ovly3.o ; link(d,b) /ovly4a.o ; /ovly4b.o ftn myprog 06>/output 05</input
RUNL permits the construction of link/overlay H* files, to permit the running or programs which would otherwise be too large to run in TSS. The user is responsible for making sure that overlays are brought into memory before they are used.
<link-sets> ::= <link-phrase> [;<link-phrase>]* <link-phrase> ::= LINK(name1,name2,entry) <object-files> | LINK(name1,name2) <object-files> | LINK(name1) <object-files> | LINK(name1,,entry) <object-files> <object-files> ::= <file> [; <file>]*
LINK(name1,name2,entry) <object-files>
Only <name1> has to be specified, the other two fields are optional. <name1> is the name to be given to the link overlay containing the following <object-files> object decks. <name2> is optional. If <name2> is given, it specifies the name of a (previously defined) link which <name1> will overlay. <entry> is also optional. If <entry> is given, it specifies the desired primary or secondary entry point (symdef) which will be used to enter the link when it is called.
Note that the <name>s and <entry> points must be less than or equal to six (6) characters in length. You will be using the <name>s in FORTRAN system subroutine calls when you bring overlays into memory (see below).
When your program is loaded (by GO, FTN, etc.), the link named "//////" is brought into memory and execution starts there. Normally, the "//////" link contains your FORTRAN main line program. Before you can use any subroutines in your overlays, you must bring the overlays into memory. One of the two following FORTRAN system subroutine calls will do this for you. Each call takes one argument which is the name of the overlay to bring into memory. This argument must be a FORTRAN character constant, and it must be exactly SIX (6) characters long. For example,
CALL LLINK( 'sixcha' ) - or - CALL LLINK( 'a ' )
Note that you have to left-justify and pad the name with blanks! The name is exactly the same name that you used as your first argument to the RUNL LINK statement for that overlay.
If using Fortran random I/O, the CALL RANSIZ must be placed in the main link, in order to ensure proper file wrapup by forcing the random I/O subroutine FRRD to reside in core with the main link at all times.
(1) creating the object files: FTN -go /main.f object=/main FTN -go /suba /subb /subc object=/obj1 FTN -go /subd /sube object=/obj2 FTN -go /subf object=/obj3 FTN -go /subg /subh /subi object=/obj4
(2) creating the link overlay H* using RUNL: FORT RUNL main = .h (ulib,map) /mylibrary ; link(ovly1) /obj1 ; link(ovly2,ovly1) /obj2 ; link(ovly3,ovly2) /obj3 ; link(ovly4,ovly3) /obj4
(3) running it: FTN .h 06>/output 05</input
One main program with three overlays, all loaded at the same place in memory. Note that each subroutine must be compiled into its own separate object file, since each subroutine is a separate overlay. (Subroutines which go into the same overlay can be compiled together into the same object file.) The main program must also be compiled separately.
C FTN main.f -go object=/main print, 'Starting MAIN.' call llink('axxxxa') call one call llink('bxxxxb') call two call llink('cxxxxc') call three stop end
C FTN one.f -go object=/one subroutine one print, 'Subroutine one called.' return end
C FTN two.f -go object=/two subroutine two print, 'Subroutine two called.' return end
C FTN three.f -go object=/three subroutine three print, 'Subroutine three called.' return end
Here are the commands to link the object decks all together correctly and then run the .h file. Note that FORTRAN needs a lot of extra memory! The first name in each RUNL LINK statement is exactly the name used in the CALL LLINK() subroutine call in FORTRAN. It must be six characters or less.
*FORT *RUNL /main = .h (map,core=60) ; link(axxxxa) /one ; link(bxxxxb,axxxxa) /two ; link(cxxxxc,bxxxxb) /three *GO
Also note that
..... link(cxxxxc,axxxxa) /three
does not work, even though one thinks it should.
Copyright © 1996, Thinkage Ltd.