• Keine Ergebnisse gefunden

SWITCH DESCRIPTION

Im Dokument for the (Seite 165-170)

THE ASSEMBLY PROCESS

FROM LIBRARY

6.8 SWITCH DESCRIPTION

The switches summarized in Table 6-1 are described in detail below.

6.8.1 Alphabetize Switch

The /A switch requests the Linker to list linked modules in alphabetical order as follows: .CSECTs, module names, and entry points within modules. The load map is normally arranged in order by module address as shown in Figure 6-1. Figure 6-6 is an example of an alphabetized load map.

6.8.2 Bottom Address Switch

The /B switch specifies the lowest address to be used by the relocatable code in the load module. When /B is not specified, the Linker positions the load module so that the lowest address is location 1000 (octal). If the .ASECT length is greater than 1000, the length of .ASECT is used.

The form of the bottom switch is:

/B:n

n is a six-digit unsigned octal number which defines the bottom address of the program being linked. An error message results if n is not specified as part of the /B command.

If more than one /B switch is specified during the creation of a load module, the first /B switch specification is used.

NOTE

The bottom value must be an unsigned even octal number. If the value is odd, an error message is gen-erated.

HT-11 LINK V03-01 LOAD MAP

SORT .SAV 19-5EP-78

SECTION ADDR SIZE ENTRY ADDR ENTRY ADDR ENTRY ADDR

. ABS. 000000 001000 $LRECL 000210 $NLCHN 000006 $USRSW 000000

$TRACE 004737 $V005A 000001 001000 000220

001220 001364 $OTI 001246

002604 002300 DCO$ 004164 ECO$ 004156 FCO$ 004152 GCO$ 004144 ICI$ 002612 ICO$ 003720 OCI$ 002604 OCO$ 003712 RCI$ 003006

$GET 002772

005104 000160 ISN$ 005104 LSN$ 005124 $ISNTR 005110

$LSNTR 005130

005264 000102 MOI$IA 005310 MOI$IM 005304 MOI$IS 005300 MOI$MA 005324 MOI$MM 005320 MOI$MS 005314 MOI$SA 005274 MOI$SM 005270 MOI$SS 005264 MOI$OA 005340 MOI$OM 005334 MOI$OS 005330 MOI$1A 005360 MOI$1M 005352 MOI$1S 005344 MOL$IS 005300 MOL$SS 005264 REL$ 005300 005366 000020 IFR$ 005366 IFW$ 005400

005406 000046 EOL$ 005406

005454 000062 TVD$ 005470 TVF$ 005462 TVI$ 005512 TVL$ 005454. TVP$ 005504 TVO$ 005476 005536 000036 CAI$ 005536 CAL$ 005544

005574 000174 SORT 005574

005770 000026 MOF$RA 006006 MOF$RM 005776 MOF$RP 006012 MOF$RS 005770

006016 000044 BEO$ 006036 BGE$ 006046 BGT$ 006044 BLE$ 006034 BLT$ 006056 BNE$ 006054 BRA$ 006050 NMI$11 006026 NMI$1M 006016 006062 000072 EXIT 006074 FOO$ 006062 STP$ 006074 006154 000002 $AOTS 006154

$ERRTB 006156 000100

$ERRS 006256 002637

011116 001534 $FIO 011600

012652 000202 $FMTDR 012652 $FMTDW 012702 $INITI 012750 013054 000416 $CLOSE 013054

013472 000106 LCI$ 013472 LCO$ 013540 013600 000302 $GETRE 013600 $TTYIN 013722 014102 000262 $PUTRE 014102

014364 000106 $FCHNL 014364 014472 000674 $OPEN 014472 015366 000110 $DUMPL 015366

015476 000414 $EOFIL 016046 $GETBL 015676 $PUTBL 015476 016112 000042 $WAIT 016112

TRANSFER ADDRESS = 001000 HIGH LIMIT = 016154

Example:

*OUTPUT,LP:=INPUT/B:500 Causes the input file to be linked starting at location 500 (octal).

6.8.3 Continue Switch

The Continue switch (lC) is used to allow additional lines of command string input. The /C switch is typed at the end of the current line and may be repeated on subsequent command lines as often as necessary to specify all input modules for which memory is available. If memory is exceeded, an error message is output. A /C switch is not entered on the last line of input.

Example:

*OUTPUT, LP:=INPUT IC

*

Input is to be continued on the next line; the Linker prints an asterisk.

6.8.4 Default FORTRAN Library Switch

By indicating the /F switch in the command line, the FORTRAN library, FORLIB.OBJ on the default device (SY:), is linked with the other object modules specified; the user does not need to specify FORLIB. For example:

*FI LE,LP:=AB.OBJ/F

The object module AB.OBJ and the FORTRAN library FORLIB are linked together to form a load module called FILE.SAY. (Note that the FORLIB default is SY:FORLIB.OBJ, not DK:FORLIB.OBJ.)

6.8.S Include Switch

The /1 switch allows subsequent entry at the keyboard of global symbols to be taken from any library and included in the linking process. When the /1 switch is specified, the Linker prints:

LIBRARY SEARCH:

Reply with the list of global symbols to be included in the load module; type a carriage return to enter each symbol in the list. A carriage return alone terminates the list of symbols. This provides a method for forcing modules (which are not called by other modules) to be loaded from the library.

Example:

*OUTPUT,LP:=INPUT,XLlB/I LIBRARY SEARCH:

A<CR>

GETSYM<CR>

CHAR<CR>

CHFLG <CR>

<CR>

6.8.6 LDA Fonnat Switch

Linker prints LIBRARY SEARCH:

User enters A, GETSYM, etc. which are to be included in the linking process.

Each symbol is entered by typing a carriage return; the list is terminated by an additional carriage return.

The LDA format switch (fL) causes the output file to be in LDA format instead of save image format. The LDA format file can be output to any device, including devices that are not block-replaceable such as paper tape, and is useful for files which are to be loaded with the Absolute Loader. The default extension .LDA is assigned when the /L switch is used.

The /L switch cannot be used in conjunction with the overlay switch (/0).

Example:

*DK:OUT,LP:=IN,IN2/L

6.8.7 Modify Stack Address

Links disk files IN and IN2; outputs an LDA format file OUT.LDA to the system device and a load map to the line printer.

The stack address, location 42, is the address which contains the user's stack pointer. The

/M

switch allows terminal keyboard specification of the user's stack address.

The form of the switch is:

/M:n

n is an even unsigned 6-digit octal number which defines the stack address. If n is not specified, the Linker prints the message:

STACK ADDRESS =

In this case, specify the global symbol whose value is the stack address. A number cannot be specified, and if a non-existent symbol is specified, an error message is printed and the stack address is set to the system default (1000 for save files).

Direct assignment (via .ASECT) of the stack address within the program takes precedence over assignment with the

/M

switch.

Example:

*OUTPUT=INPUT/M STACK ADDRESS = BEG 6.8.8 Overlay Switch

The Overlay switch (fO) is used to segment the load module so that the entire program is not memory resident at one time (overlay feature). This allows programs larger than the available memory to be executed. The switch has the form:

/O:n

where n is an unsigned octal number (up to six digits in length) specifying the overlay region to which the module is assigned. The /0 switch must follow (on the same line) the specification of the object modules to which it applies, and only one overlay region can be specified on a command line. Overlay regions cannot be specified on the first command line as this is the root segment. Therefore, the /C continuation switch must be used.

Co-resident overlay routines (a group of subroutines which occupy the overlay region and segment at the same time) are specified as follows:

*OBJA,OBJB,OBJC/O:n/C

*OBJD,OBJE/O:m/C

All modules mentioned until the next /0 switch will be co-resident overlay routines. If at a later time the /0 switch is given with the same value previously used (same overlay region), then the corresponding overlay area is opened for a new group of subroutines. The new group of subroutines will occupy the same locations in memory as the first group, but not at the same time. For example, if subroutines in object modules Rand S are to be in memory together, but are never needed at the same time as T, then the following commands to the Linker make Rand S occupy the same memory as T (but at different times):

*MAIN,LP:=ROOT/C

*R,S/O:l/C

*T/O:l

The above could also be written as:

*MAIN,LP:=ROOT/C

*R/O:l/C

*S/C

*T/O:l Example:

*OUTPUT, LP:=INPUT /C

*OBJA/O:l/C

*OBJB/0:2

Establishes two overlay regions

Overlays must be specified in order of increasing region number. For example:

.R LINK

*A=A/C

*B/O:l/C

*C/O:l/C

*D/O:l/C

*E,F/0:2/C

*G/0:3

The following overlay specification is illegal since the overlay regions are given in a random numerical order (an error message is printed in each case):

.R LINK

*A=A/C

*D/0:2/C

*B/O:l/C /0 IGNORED

*C/O:l/C /0 IGNORED

*G/0:3/C

*H/0:3/C

*E,F/0:2 /0 IGNORED

6.8.9 Symbol Table Switch

Use of the symbol table switch in the command line instructs the Linker to allow the largest possible memory area for its symbol table at the expense of making the link process slower. With the

IS

switch, library directories are not made resident in memory, but are left on disk. For example:

*OUTF,LP:=INPUT.OBJ,LlBR1.0BJ,LlBR2.0BJ/S

The directories of the library mes LIBRI and LIBR2 are not brought into memory, resulting in more room in the symbol table but longer link time.

If the

IS

switch is not used and the memory available to the Linker is approximately 10K or larger, the library directory is brought into memory (providing there is room); the directory is kept there until the library has been completely processed, thus reducing the size of the Linker's symbol table. If there is not enough room in memory for the direcctory (as is the case in an 8K system), the Linker determines this and leaves the directory on disk re-gardless of whether the

IS

switch was used or not.

The

IS

switch should be used only if an attempt to link a program failed because of symbol table overflow. Often, use of

IS

will allow the program to link.

6.8.10 Transfer Address Switch

The transfer address is the address at which a program is to be started when executed via an R or RUN command.

The Transfer Address switch (IT) allows terminal keyboard specification of the start address of the load module to be executed. This switch has the form:

IT:n

where n is a six-digit unsigned octal number which defmes the transfer address. If n is not specified, the message:

TRANSFER ADDRESS

=

is printed. In this case, specify the global symbol whose value is the transfer address of the load module, followed by a carriage return. A number cannot be specified in answer to this message. When a nonexistent symbol is specified, an error message is printed and the transfer address is set to 1 (so that the program cannot be executed).

If the transfer address specified is odd, the program does not start after loading and control returns to the monitor.

Direct assignment (.ASECT) of the transfer address within the program takes precedence over assignment with the IT switch. The transfer address assigned with a IT has precedence over that assigned with a .END assembly directive.

Example:

*PROG=PROG 1 ,PROG2,ODT IT

TRANSFER ADDRESS

=

O.ODT

The mes PROG1.0BJ,PROG2.0BJ and ODT.OBJ are linked to-gether and started at ODT's transfer address.

Im Dokument for the (Seite 165-170)