Digital PDFs
Documents
Guest
Register
Log In
AD-0988D-T2
January 1986
272 pages
Original
8.0MB
view
download
Document:
AA-0988D-TB Link Reference Manual Apr86
Order Number:
AD-0988D-T2
Revision:
0
Pages:
272
Original Filename:
AA-0988D-TB_Link_Reference_Manual_Apr86.pdf
OCR Text
TOPS-10 LINK Reference Manual AA-09880-TB, AO-09880-T1, AO-09880-T2 April 1986 This document describes LlNK-l0, the linking loader for TOPS-10. This document updates the document of the same name, order number AA-0988D-TB, published March 1983. OPERATING SYSTEM: TOPS-l0 V7.03 SOFTWARE: LlNK-l0 V6.0 Software and manuals should be ordered by title and order number. In the United States. send orders to the nearest distribution center. Outside the United States. orders should be directed to the nearest DIGITAL Field Sales Office or representative. Western Region Northeast/Mid-Atlantic Region Central Region Digital Equipment Corporation PO Box CS2008 Nashua, New Hampshire 03061 Telephone:(603)884-6660 Digital Equipment Corporation Digital Equipment Corporation Accessories and Supplies Center Accessories and Supplies Center 1050 East Remington Road 632 Caribbean Drive Schaumburg, Illinois 60195 Sunnyvale. California 94086 Telephone:(312)640--5612 Telephone:(408)734-4915 digital equipment corporation. marlboro. massachusetts First Printing, May 1973 Revised, July 1974 Revised, December 1975 Revised, April 1978 Updated, June 1978 Revised, March 1983 Updated, January 1985 Updated, April 1986 Copyright ©1973, 1983, 1986 by Digital Equipment Corporation. All Rights Reserved. The information in this document is subject to change without notice and should not be construed as a commitment by Digital Equipment Corporation. Digital Equipment Corporation assumes no responsibility for any errors that may appear in this document. The software described in this document is furnished under a license and may be used or copied only in accordance with the terms of such license. No responsibility is assumed for the use or reliability of software on equipment that is not supplied by Digital Equipment Corporation or its affiliated companies. The following are trademarks of Digital Equipment Corporation: DEC DECmate DECsystem-lO DECSYSTEM-20 DECUS DECwriter DIBOL MASSBUS PDP P/OS Professional Q-BUS Rainbow RSTS RSX RT UNIBUS VAX VMS VT Work Processor The postpaid READER'S COMMENTS form on the last page of this document requests the user's critical evaluation to assist us in preparing future documentation. CONTENTS CHAPTER 1 1.1 1.1.1 1.1.2 1.1.3 1.2 1.3 1.4 1.5 CHAPTER 2 2.1 2.2 2.3 CHAPTER 3 3.1 3.2 3.2.1 3.2.2 3.3 3.4 CHAPTER 4 4.1 4.2 4.2.1 4.2.1.1 4.2.2 4.2.3 4.2.4 4.3 4.4 CHAPTER 5 5.1 5.1.1 5.1.2 5.2 5.2.1 5.2.2 5.3 5.3.1 5.3.2 5.4 5.4.1 5.4.2 5.4.3 5.5 5.6 5.7 INTRODUCTION TO LINK INPUT TO LINK . • • . • . . • . 1-1 Object Modules • • 1-1 Commands to Link • 1-2 Libraries • • • • • • • • • 1-2 OUTPUT FROM LINK • • • • • 1-2 LINK'S OVERLAY FACILITY 1-3 LINK AND EXTENDED ADDRESSING • • 1-3 USING LINK • • • • • • • • • • • . . . . . . . . . 1-4 USING LINK AUTOMATICALLY COMMAND FORMATS • • • • • • • • • • COMMAND SWITCHES • • • • • • • • • • • EXAMPLE OF USING LINK AUTOMATICALLY • • • • • 2-1 • 2-2 • • 2-3 USING LINK DIRECTLY COMMAND STRING FORMAT SWITCHES TO LINK • • • Command Scanner Switches • Link Switches • • • • • • • • • . LIBRARIES AND SEARCHES • • • EXAMPLES USING LINK DIRECTLY • . . • 3-2 • • 3-3 3-3 . . • . • 3-4 • • •• 3-81 3-81 OUTPUT FROM LINK THE EXECUTABLE PROGRAM OUTPUT FILES • • • • • Executable Files • • Format of Sharable LOG Files • • • • Map files ••••• Symbol Files • • • • SYMBOL TABLE VECTOR MESSAGES • • • • • • • • • • • • • • • • • • • • • • • • • • • Save Files • • • • • • • • • • • •• • • ••••• • • • • •••••• • • • • • • • • • • • • 4-1 4-1 4-2 4-2 4-5 4-5 4-5 4-5 4-7 OVERLAY STRUCTURES • • • • • • Defining Overlay Structures An Overlay Example • • • • • WRITABLE OVERLAYS • • • • • • Writable Overlay Syntax Writable Overlay Error Messages RELOCATABLE OVERLAYS • • • • • • Relocatab1e Overlay Syntax • • • • • Relocatable Overlay Messages • • • • RESTRICTIONS ON OVERLAYS • • • • • Restrictions on Absolute Overlays Restrictions on Re1ocatab1e Overlays Restrictions on FORTRAN Overlays SIZE OF OVERLAY PROGRA~S • • DEBUGGING OVERLAYED PROGRAMS THE OVERLAY HANDLER • • • • • • • 5-1 • • • • • • 5-2 • 5-4 5-10 5-10 5-10 • • • • 5-11 5-11 • • • • • 5-11 5-12 5-12 • • • • • 5-13 5-13 5-14 • • • •• 5-14 5-14 OVERLAYS iii April 1986 5.7.1 5.7.2 5.7.3 5.7.4 5.8 5.8.1 5.8.2 5.8.3 5.8.4 CHAPTER 6 6.1 6.2 6.2.1 Calls to the Overlay Handler Overlay Handler Subroutines Overlay Handler Messages The FUNCT. Subroutine THE OVERLAY (OVL) FILE The Directory Block The Link Number Table The Link Name Table The Overlay Link · . . ·· . PSECTs LOADING PROGRAMS WITH PSECTs • • PSECT ATTRIBUTES • • • • • • • • • • CONCATENATED and OVERLAID APPENDIX A REL BLOCKS APPENDIX B LINK MESSAGES B.l B.2 B.3 APPENDIX C 5-15 · · · · 5-16 5-21 .····· 5-30 . · · · · · · · · 5-24 5-31 ·· ·· ··· ··· ··· ··· ·· ·· 5-32 5-32 5-33 ···· DESCRIPTION OF MESSAGES LIST OF MESSAGES INDEXED MESSAGES • • • • 6-1 • 6-3 • • • • 6-3 • B-1 • • • B-4 B-32 JOB DATA AREA LOCATIONS SET BY LINK INDEX TABLES 2-1 5-1 B-1 B-2 Switches for System Commands • • • • • • • • • Example of an Overlay Structure • • • • • • Severity Codes • • • • • • • • • • ••••• Special Message Segments • • • • • • • • • • • iv 2-2 5-2 B-2 B-3 April 1986 PREFACE This manual is the reference document for LINK, the TOPS-IO linking loader. The manual is aimed at the intermediate to highly-experienced applications programmer, and contains complete documentation of LINK. Chapter I provides a general introduction to LINK. Chapter 2 describes automatic use of LINK through one of the system commands DEBUG, EXECUTE, or LOAD. This chapter is sufficient for most loading tasks. Chapter 3 describes direct use of LINK. This discussion is useful for large or complicated loads. This chapter also discusses libraries and library searches. Chapter 4 describes output from LINK~ executable programS, most output files, and LINK messages. Included are descriptions of the internal format of save (.EXE) files. Chapter 5 discusses overlays, including overlay structures, overlay-related output files, the overlay handler and its messages, and the FUNCT. subroutine. This chapter has an extensive example of an overlay load. Many of the elements of this example are of interest outside the context of overlays. Appendix A gives a technical description of the output language translators, which is in the form of REL Blocks. Appendix B lists all LINK messages. Appendix C describes the job data area. The current copies of TOPS-IO documents are also useful: TOPS-IO Utilities Manual TOPS-IO Operating System Commands Manual TOPS-IO MAKLIB User's Guide TOPS-IO/TOPS-20 MACRO Assembly Reference Manual TOPS-IO/TOPS-20 COBOL-68 Language Manual TOPS-IO/TOPS-20 COBOL-74 Language Manual TOPS-IO/TOPS-20 SPEAR Manual TOPS-IO/TOPS-20 ALGOL Programmer's Guide TOPS-IO/TOPS-20 FORTRAN Language Manual Update DECsystem-IO/DECSYSTEM-20 Processor Reference Manual v from the CHAPTER 1 INTRODUCTION TO LINK LINK is the TOPS-IO's linking loader. It merges independently compiled or assembled modules into a single executable program. This merging process requires LINK to perform the following functions: 1. Perform the relocation calculations by converting relocatable addresses to virtual addresses, and by binding segments and PSECTs to addresses. 2. Resolve global symbol references by Polish fixups, and library searches. 3. Produce an executable program by providing information and a DDT runtime symbol table. global chain fixups, some JOBDAT The virtual address space used for loading your program is not hardware memory. During loading and execution, the system simulates this virtual space by swapping code between disk and hardware memory as required. For simplicity, we will refer to the virtual address space as memory. 1.1 INPUT TO LINK The primary input to LINK is the output from the language translators; it is a binary file containing machine language code corresponding to your program, called object modules. Other input may include your commands to LINK, and libraries containing object modules. 1.1.1 Object Modules An object module is output from a language translator; it is part of a binary file (REL file) containing machine language code corresponding to your program. This file is formatted into blocks, called REL Blocks, that LINK recognizes and can handle appropriately. The format of each REL Block Type is described in Appendix A. Most object modules contain relocatable code. This means that the addresses in the module are relative to the zero address. LINK loads the relocatable code at an arbitrary memory address, but adds a constant to each address referenced in the program. This resolves relative addresses to absolute addresses. 1-1 INTRODUCTION TO LINK I Using relocatable code simplifies your programming task. Your programming task is simpler because you need not worry about the loading addresses of your programs. Besides relocating and loading your object modules, LINK resolves values for global symbols: those that are defined in one module and used in others. LINK also resolves references to entry name symbols when modules containing these symbols are loaded. Using symbols in your programs makes your programming simpler. If you need to revise a program, it is much easier to change the value of a symbol than to change each occurrence of the value. This is especially important for global symbols. You need only change the value in the defining module; the other modules do not need retranslation. 1.1.2 Commands to Link LINK is controlled during loading by the command strings you give. Commands consist of file specifications and switches. LINK command strings are discussed in Chapter 3. 1.1.3 Libraries A library is a file containing object modules that may be needed to resolve references ln your program. For example, the FORTRAN library FORLIB contains subroutines that may be referenced by the output from the FORTRAN compiler. When loading FORTRAN-compiled code, LINK usually searches this library to satisfy any unresolved subroutine calls. Most language translators have their own libraries. You can construct your own libraries, and have LINK necessary subroutines. Libraries and searching Section 3.4. 1.2 search them for are discussed in OUTPUT FROM LINK The primary output from LINK is the executable program, called the core image. In the core image, all addresses are resolved to absolute memory locations, and all symbols (including subroutine calls) are resolved to absolute values or addresses. This core image may be executed immediately or saved as a sharable save (.EXE) file. The .EXE file may be created automatically by LINK. This occurs if you specify /SSAVE when you run LINK, or if the program is too complex to be left in core with LINK. You can also execute the core image under the control of program. a debugging During its processing, LINK generates messages, which are output to your terminal or a log file. Some of these give information about LINK's operation; some warn you about possible problems; some identify errors. LINK messages are described in Appendix B. 1-2 INTRODUCTION TO LINK At your option, LINK can generate three special files: the map file, the log file, and the symbol file. The map file contains information about symbols in your program modules. The log file records LINK's messages so that you can save them. The symbol file contains a symbol table for the load and has a file extension of .SYM. LINK's output files are described in Chapter 4. 1.3 LINK'S OVERLAY FACILITY If your program is larger than your available memory, you can use LINK's overlay facility to make it fit in memory. To do this, you define a tree structure for the program's modules. Then, at execution time, only part of the tree is in memory at one time. This reduces the amount of memory needed for execution. See Chapter 5 for a discussion of overlays. 1.4 LINK AND EXTENDED ADDRESSING The KL Model B processor is capable of using an address space consisting of 32 sections, each containing 512 pages. As of TOPS-10 Version 7.03, programs have been able to reference this expanded address space. For information on using extended addressing with a specific programming language, consult the documentation for that language. To load a program into a particular section, use the appropriate monitor command with the IUSE switch. Refer. to the TOPS-10 Operating System Commands Manual for more information. Use PSECTs to load a program into a nonzero section. for information on loading PSECTs. See Section 6.1 When loading a program that uses extended addressing, pay particular attention to the use of l8-bit and 30-bit addresses. If a program uses 30-bit addresses and you reference a 30-bit address as an l8-bit address, LINK truncates the 30-bit address and notifies you with the following message: %LNKFTH Fullword value [symbol] truncated to halfword LINK issues this warning if the truncation results in the loss of a section number. Refer to Appendix B for more information about this message. While writing an extended restrictions in mind: addressing program, keep the following • Programs that use overlays cannot use nonzero sections. • Programs should not store executable code into locations 0 through 17 of nonzero sections. However, you can store data that is not executed in these locations. If you store data in locations 0 through 17, use global addresses to reference the locations. If you use local addresses, ACs (accumulators) are referenced instead. In Section 1, locations 0 through 17 refer to ACs. LINK V6.0 1-3 April 1986 INTRODUCTION TO LINK 1.5 USING LINK You have two ways to use LINK: 1. You can use LINK automatically by means of the LOAD, EXECUTE, or DEBUG system commands. This is the easiest and best way to load many programs. Chapter 2 describes automatic use of LINK. 2. You can run LINK directly by typing R LINK to the monitor. This is necessary only for very large or complicated loads, such as those involving overlays. Chapter 3 discusses direct use of LINK. 1-4 April 1986 CHAPTER 2 USING LINK AUTOMATICALLY The system commands LOAD, EXECUTE, and DEBUG invoke LINK automatically. Each of these commands uses a simple command string; the system converts the string into more complicated LINK commands. This discussion of the LOAD, EXECUTE, and DEBUG commands does not attempt to describe them completely. Only those switches applying directly to loading will be discussed here. For a full discussion, see the TOPS-IO Operating System Commands Manual. These system commands invoke LINK: 2.1 • The LOAD command uses LINK to load your object modules into memory, but does not execute the program. Before loading, your source files are compiled, if necessary; this compilation will occur if there are no object modules for the specified source files, or if the object files are older than their source files. • The EXECUTE command uses LINK to load your program, and then executes the loaded program. Before loading, your source files are compiled, if necessary. • The DEBUG command works like the EXECUTE command, except that your program is executed under the control of a debugging program. The debugging program that is loaded depends on the type of program being loaded. See the /TEST switch for a list of languages. The system uses the file extension to determine the language in which the program is written. Therefore, it is highly recommended that you use standard file extensions when naming the files of your programs. Standard file extensions are listed in the appropriate Commands Manual for the operating system. COMMAND FORMATS The formats for the LOAD, EXECUTE, and DEBUG commands are the same. Each can accept a list of input file specifications and switches. The format for these commands is: .command/switches input-spec/switches, input-spec/switches, ... Where the command is one of the three system commands (LOAD, EXECUTE, or DEBUG), input-spec is the file specification of the program you want to load, and the switches are any of the valid switches for the command. 2-1 USING LINK AUTOMATICALLY If you separate the input file specifications with commas, each source file will be compiled into a separate object file. If you separate the input file specifications with plus signs, they will be compiled into a single object file. Section 2.3 shows examples of using LINK automatically. 2.2 COMMAND SWITCHES You can use switches with the LOAD, EXECUTE, and DEBUG commands to control LINK's loading. Table 2-1 briefly describes some of the command switches that apply to LINK. Refer to the TOPS-IO Operatins System Commands Manual for complete descriptions of the switches for these commands. Table 2-1 Switches for System Commands Meaning Switch I I I /COMPILE Forces compilation of source files even sufficiently recent REL file exists. if a /DDT This supersedes the default debugger Loads DDT. which is usually based on the selection, file in the command extension of the first string. /DEBUG Causes the FORTRAN debugging information. /MAP Produces a map file at the end of loading. file shows all global symbols loaded. /NOCOMPILE Compiles source files only if their REL files are older than the source files. /NOCOMPILE is the default. /NODEBUG Prevents the FORTRAN compiler debugging information. /NOSEARCH Suspends the effect of an earlier global/SEARCH switch. This is the default action. /SEARCH Loads only the modules from the specified library file that satisfy global references in the program. compiler to generate /NODEBUG is the default. from This generating You can use any LINK program switches with the system commands LOAD, EXECUTE, or DEBUG by using a special switch format. This format requires that you use a percent sign (%) instead of the usual slash (/), and that the entire switch specification be enclosed in double quotation marks ("). For example, you can pass the /ERRORLEVEL switch to LINK by using the command: .EXECUTE MYPROG %"ERRORLEVEL:O" 2-2 USING LINK AUTOMATICALLY Used directly with LINK, the command strings would include: I *MYPROG/ERRORLEVEL:O If you give more than one switch in this format, succeeding within the quotation marks must have the usual slashes: switches .EXECUTE MYPROG%"ERRORLEVEL:O/SEGMENT:LOW" LINK program switches are described in Section 3.2. 2.3 EXAMPLE OF USING LINK AUTOMATICALLY For this example, the following program, named MYPROG.FOR, is used: 10 TYPE 10 FORMAT (' This is written by MYPROG') STOP END The following example shows an interactive execution using the EXECUTE command: of the program . EXECUTE MYPROG. FOR ~ FORTRAN: MYPROG MAIN. LINK: Loading [LNKXCT MYPROG execution] This is written by MYPROG. CPU time 0.16 Elapsed time 0.28 EXIT The following example shows how to load a program for debugging the DEBUG command: .DEBUG MYPROG.FOR~ FORTRAN: MYPROG MAIN. LINK: Loading [LNKDEB FORDDT execution] STARTING FORTRAN DDT »START This is written by MYPROG. CPU time 0.16 Elapsed time 0.42 EXIT 2-3 using CHAPTER 3 USING LINK DIRECTLY If you have a loading task that cannot be handled conveniently by the EXECUTE, LOAD, or DEBUG system commands (such as loading overlays or PSECTs), you can load your program by using LINK directly. To do this, you must already have compiled or assembled all required object modules. To use LINK directly, type R LINK to the system. with an asterisk: LINK will respond a carriage .R LINK ~ * Continue typing command strings, return. For example, ending each one with .R LINK~ */OVERLAY ~ *TEST/LINK: TEST ~ * /NODE:TEST SPEXP/LINK:SPEXP~ * A command string consists of file specifications and switches. You can continue a command string to the next line by typing a hyphen immediately before pressing carriage return; LINK continues the line by responding with a number sign (#). For example, .R LINK ~ *MYPROG , MYMAP /MAP /CONTENTS : ALL- G£D #/ERRORLEVEL:O/LOG/LOGLEVEL:5~ * The use of continuation lines is more efficient as the command scanner must be invoked for every distinct command string. You can include a comment on a command line by beginning the comment with a semicolon; the remaining text on the line is not processed by LINK. When LINK sees the end of the command string (a carriage return), it processes the entire string, then prints an asterisk to begin the next line. This processing continues until one of the following occurs: 1. LINK finds a /GO switch in a command string. It then completes loading and exits to system command level (if you did not specify execution), or passes control to the loaded program for execution. 3-1 USING LINK DIRECTLY I 3.1 2. A fatal error occurs. LINK prints an error message and exits to system command level. 3. A /RUN switch is encountered. 4. Either /EXIT or ~z is encountered. COMMAND STRING FORMAT A LINK command string can contain file specifications, LINK switches, and command scanner switches. Command scanner switches are described in Section 3.2.1. LINK switches are described in Section 3.2.2. Some LINK switches take output file specifications as arguments; some switches are suffixed to output file specifications. Other file For example, the following specifications specify input files. command string tells LINK to use an input file called MYREL.REL to generate a saved output file called MYEXE.EXE: *MYREL,MYEXE/SAVE/GO LINK supplies the missing parts of the file defaults. specifications from its DEFAULTS For output files, the defaults are: I device DSK: file name name of last module with start address or, if none, then nnnLNK where nnn is your job number with leading zeros if necessary extension log file map file overlay file plotter file executable file symbol file directory your current path, i.e. LOG MAP OVL PLT EXE SYM [30,5526,LINK,TEST] For input files, the defaults are: I device DSK: extension REL directory your current path, i.e. You can change these Section 3.2.2). I defaults by using [30,5526,LINK,TEST] the /DEFAULT switch (see You can have LINK read command strings from an indirect command file. To do this, prefix an at-sign (@) to the command file specification. For example, the following commands tell LINK to read all command strings from the file LNKPRG.CCL. (.CCL is the default file extension for indirect command files, but if .CCL is not found, .CMD will be tried.) : . R LINK0!D *@LNKPRG0!D 3-2 USING LINK DIRECTLY 3.2 SWITCHES TO LINK LINK's handling of files depends on your use of LINK switches. There are two sets of switches to LINK. The first set of switches (command scanner switches) are optional switches that define your request to the system command scanner. These are described in Section 3.2.1. The second set of switches are switches to LINK that you can use to control and modify the linking and loading process. These are described in Section 3.2.2. 3.2.1 Command Scanner Switches The system SCAN module scans command lines for various system programs, one of which is LINK. You can include SCAN switches in your command strings for LINK; however, none of these switches is required in order to run LINK. The following SCAN switches are meaningful to LINK. The remaining SCAN switches, which are listed in LINK's HELP file, are ignored by LINK. Like LINK switches, SCAN switches are preceded by a slash (I), and can be abbreviated up to their first unique characters. SCAN Switches Meaningful to LINK Switch Meaning IESTIMATE:n Reserves n 128-word disk blocks for the specified output file. This does not work globally, but only on the file for which it is specified. By default, disk space is automatically allocated, as required, for files output to disk. This allocates blocks contiguously on the disk, thus providing improved access times. IEXIT Exits, but leaves LINK's core image in place. IHELP:arg Displays the HLP:LINK.HLP file. Specifying IHELP:SWITCHES types LINK and SCAN switches with no explanations. IMESSAGE:keyword Displays messages in the format specified by keyword. The keywords and their meanings are: INOOPTION PREFIX Displays only the message code from SCAN or LINK which are of the forms SCNxxx, or LNKxxx. FIRST Displays the prefix short message. and a CONTINUATION Displays the prefix longer message. and a Ignores any LINK switches DSK:SWITCH.INI[,] 3-3 found in the file I I USING LINK DIRECTLY Switch Meaning /OPTION:name Reads default LINK switches from the file SWITCH.INI, on the line that begins with LINK:name. If you use the /OPTION switch, it must appear in the first command string to LINK. /PROTECTION:n Assigns the 3-digit octal number n as protection for the specified output file. /RUN:file Runs the specified program after loading is finished. This switch is ignored if you have specified program execution. /RUNOFFSET:n Begins execution of the program given by /RUN switch at the address n locations after normal start address. If you omit n, default is 1. If you omit /RUNOFFSET, default is O. /TMPFIL:file:"str" Creates a TMPCOR file with the specified name. The name must be a 3-character filename. Usually, the string given in quotation marks is a command string to be executed by the program given in the /RUN switch when it is started one location after its normal start address (by /RUNOFFSET:l) . I I 3.2.2 the the the the the Link Switches This section lists the switches that may be used to instruct LINK to take special action while loading your programs. The switches are described in this section in alphabetical order, and for each switch the following information is shown, if appropriate: FORMAT FUNCTION EXAMPLES OPTIONAL NOTATIONS RELATED SWITCHES Switches can be abbreviated to save typing. However, in most cases, the switch must include enough characters to make it unique from other switches. For example, the switch /NOSYMBOL cannot be abbreviated to /NOSY, because this result in a conflict with the switch /NOSYSLIB. However, /NOSYM is a unique set of characters, and thus is a legal abbreviation for /NOSYMBOL. I I Certain switches that can be abbreviated to a single letter are: /D for /E for /G for /Hfor /L for /M for /N for /S for /T for /U for /V for /DEBUG /EXECUTE /GO /HELP /LOCALS /MAP /NOLOCAL /SEARCH /TEST /UNDEFINE /VERSION 3-4 USING LINK DIRECTLY Many switches accept a value that may be specified in decimal is the default) or octal. If the value can be specified in this is noted in the OPTIONAL NOTATIONS section of the description. To specify an octal value, type a number sign (#) the octal number. For example, /ARSIZE:39 can be specified in as /ARSIZE:#47. (which octal, switch before octal Some switches accept a value that specifies an amount of memory area. This value is interpreted as the number of pages, by default. However, this value may be specified as nK, where n IS the number l024-word blocks of memory (lK=2P). Where this is valid, it is noted in the OPTIONAL NOTATIONS section of the switch description. Some switches can be used either locally or globally (in particular, /LOCALS, /NOLOCAL, /NOSTART, /SEGMENT, /INCLUDE, /ONLY, /SEARCH, /START and /NOSEARCH). This means that if the switch is suffixed to a file specification, it applies only to that file; if it is not suffixed to a file specification, it applies to the files that follow on that command line. For example, in the following command strings /SEARCH is used both locally and globally: 1. *FILEl,FILE2/SEARCH,FILE3 2. *FILE4,/SEARCH FILE5,FILE6 In the first line, /SEARCH is suffixed to the file specification FILE2; only that file is loaded in search mode. In the second line, /SEARCH is not suffixed to a file specification; all the remaining files named in the command string are to be searched. In general, a switch used globally is disabled at the end of its command string, unless it is overridden by another switch. The second switch, if used locally, will override the first only for the local file. If the second switch is used globally, it will persist for the following files. For example, in the following command string, a globally-used switch (/SEARCH) is overridden by a locally used switch: */SEARCH FILEl,FILE2/NOSEARCH,FILE3 In this command string, FILEI and FILE3 will be loaded in search mode, but FILE2 will be loaded normally. NOTE The effects of a global switch on the same line as a /GO switch persist beyond the /GO switch and apply to any modules loaded during library searches. However, for certain languages default switches may override user-specified global switches. The following pages contain the listed in alphabetical order. switches 3-5 and their descriptions, I I I USING LINK DIRECTLY /ARSIZE FORMAT /ARSIZE:n Where n is a positive decimal integer. FUNCTION Sets the size of the overlay handler's table of multiply-defined global symbols. Use this switch if you have received LNKARL, LNKTMA, and LNKABT messages in a previous attempt to load your program. These messages will give instructions for the argument to the /ARSIZE switch. EXAMPLES */ARSIZE:39 G!D * Allocates 39 words for the multiply-defined global table in each link of an overlay structure. OPTIONAL NOTATIONS You can specify the table size in octal. 3-6 symbol USING LINK DIRECTLY /BACKSPACE FORMAT /BACKSPACE:n Where n is a positive decimal integer. FUNCTION Backspaces over n files on the current tape device. switch is ignored for non-tape devices.) EXAMPLES *MTAO: /BACKSPACE: 3 ~ * Backspaces magtape MTAO: by three files. OPTIONAL NOTATIONS If you omit n, it defaults to 1. RELATED SWITCHES /MTAPE, /REWIND, /SKIP, /UNLOAD 3-7 (The USING LINK DIRECTLY /COMMON FOR1~AT /COMMON:name:n Where name characters. is up to six SIXBIT-compatible ASCII n = a positive decimal integer. FUNCTION Allocates n words of labeled COMMON storage for FORTRAN and FORTRAN-compatible programs. The COMMON label is a name, which becomes defined as a global symbol. For unlabeled COMMON storage, use .COMM. simply omit the name. as the name, or You cannot expand a given COMMON area during loading. If your program modules define a given COMMON area to have different sizes, the module giving the largest definition must be loaded first. If the /COMMON switch gives the largest definition, it must precede the loading of the modules. EXAMPLES */COMMON:A: 1000 G!D * Creates a labeled COMMON area of 1000 words. */COMMON: .COMM.: 1000 ~ * Creates an unlabeled COMMON area of 1000 words. */COMMON:: 1000 G!D * Creates an unlabeled COMMON area of 1000 words. I OPTIONAL NOTATIONS You can specify the number of words in octal. RELATED SWITCHES /PSCOMMON LINK V6 .. 0 3-8 April 1986 USING LINK DIRECTLY /CONTENTS FORMAT /CONTENTS: (keyword, ... ,keyword) FUNCTION Each keyword gives a symbol type to be included in the map file if the file is generated. To generate the map file, use the /MAP switch. The keywords ALL, NONE, and DEFAULT reset all symbol types. Otherwise, using the /CONTENTS switch resets only those symbol types specified by keywords. In the following list of keywords, the defaults are in boldface: ABSOLUTE ALL COMMON DEFAULT ENTRY GLOBAL LOCALS NOABSOLUTE NOCOMMON NOENTRY NOGLOBAL NOLOCAL NONE NORELOCATABLE NOUNDEFINED NOZERO RELOCATABLE UNDEFINED ZERO I~clude absolute symbols. Include all symbols. Include COMMON symbols. Reset to LINK's defaults. Include entry-name symbols. Include global symbols. local Include local symbols. The symbols cannot be included in the map file unless the /LOCALS switch is also given. Exclude absolute symbols. Exclude COMMON symbols. Exclude entry-name symbols. Exclude global symbols. Exclude local symbols. Exclude all symbols. Exclude relocatable symbols. Exclude undefined symbols. Exclude symbols in zero-length programs. (a zero-length program contains no code or data; it contains only symbol definitions, e.g., JOBDAT. ) Include relocatable symbols. Include undefined symbols. Include symbols in zero-length programs. Only those symbols that satisfy all conditions in the keyword list will appear in the .MAP file. For example, if both the NOGLOBAL and RELOCATABLE settings are in force, all global symbols are excluded regardless of their relocatabilit.y. EXAMPLES I I */CONTENTS: (NOCOMMON,NOENTRY) ~ * Excludes COMMON and entry-name symbols. I * /CONTENTS : ALL ~ * Includes all symbols. OPTIONAL NOTATIONS You can omit parentheses if you give only one keyword. RELATED SWITCHES /MAP 3-9 USING LINK DIRECTLY /CORE FORMAT /COFE:nP Where n is a positive decimal integer. FUNCTION The Gives the initial low segment core size for LINK. core size given with /CORE should not be larger than that given with the /MAXCOR switch; if it is not, the core will be allocated initially, but the first time LINK expands core size, the allocation will be reduced to the size given by /MAXCOR. EXAMPLES * /CORE : 1 7P G!D * I Allocates l7P (lP=5l2 words) of core for the segment. initial OPTIONAL NOTATIONS You can specify the core size in octal. You can also specify the argument in K instead of P. RELATED SWITCHES /FRECOR, /MAXCOR, /RUNCOR 3-10 low USING LINK DIRECTLY /COUNTERS FORMAT /COUNTERS FUNCTION Displays information about relocation counters on the terminal. A relocation counter is an address counter that LINK uses while loading relocatable code. /COUNTERS returns the name, initial value, current value, and limit value of each counter. /COUNTERS first prints the following header: Reloc. ctr. initial value current value limit value where: Reloc. ctr. gives the name of relocation counter. initial value is the origin of the relocation counter. current value is the address of the next free location after the relocation counter has been loaded. limit value is an upper bound that you set using /LIMIT or that LINK sets by default for the relocation counter. This upper bound defines a point the relocation counter should not load beyond. If /LIMIT is used and the counter loads beyond this bound, LINK returns messages. See /LIMIT for more information. /COUNTERS may be used to determine the size of overlays when loading programs that might be too for the allocated memory space. Refer to Section 5.4 for more information. You can also use /COUNTERS to determine the size of PSECTs when loading extended addressing programs or programs that use PSECTs to conserve memory space. Refer to Chapter 6. EXAMPLES The following examples illustrate displays. the various The following display results from loading a does not contain code. /COUNTERS module that */COUNTERS GD [LNKRLC No relocation counters set] * The following display results from loading code. only absolute *ABCODE/COUNTERS GD [LNKRLC No relocation counters set Absolute code loaded] * LINK V6.0 3-11 April 1986 USING LINK DIRECTLY The following display code. results from loading only PSECT *PSCODE/COUNTERS ~ [LNKRLC Reloc. ctr. PSCODE initial value 20 current vaLue 25 limit value 1000000] * The following display results from loading contains both absolute and PSECT code. *MIXED/COUNTERS ~ initial value [LNKRLC Reloc. ctr. PSECTA 1400000 2500000 PSECTB 3600000 PSECTC Absolute code loaded] code current value 1400001 2500001 3600001 that limit value 4000000 4000000 4000000 * The following display formatted code. results from loading two-segment *TWOPRT/COUNTERS~ [LNKRLC Reloc. ctr. .LOW. .HIGH. initial value o 400000 current value 1642 400753 limit value 1000000 1000000] * RELATED SWITCHES LINK V6.0 /NEWPAGE, /SET, /LIMIT 3-12 April 1986 USING LINK DIRECTLY /CPU FORMAT /CPU:keyword Keyword: KAl0 KIl0 KLl0 KSl0 FUNCTION This switch is used to override LINK's handling of the processor information found in the .REL files being loaded. (See the description of the type 6 block in Appendix A). Ordinarily LINK prints a warning if all .REL files being loaded together do not have identical CPU types. This switch can be used either to make LINK flag certain modules built for a specific CPU type (by specifying all but that CPU type as keywords to /CPU) or to suppress LINK's warning message (by specifying all the CPU types associated with the .REL files being loaded). EXAMPLE */CPU:KI10<RET) * Will cause LINK to issue the %LNKCCD message modules with the KLl0 CPU type are encountered. OPTIONAL NOTATIONS if any /CPU: (keyword,keyword) 3-12.1 April 1986 USING LINK DIRECTLY THIS PAGE INTENTIONALLY LEFT BLANK. 3-12.2 April 1986 USING LINK DIRECTLY /DDEBUG FORMAT /DDEBUG:keyword FUNCTION Specifies a default debugging program to be loaded if /DEBUG or /TEST switch appears without an argument. The permitted keywords and specify are listed below. are supported by DIGITAL. ALGDDT ALGOL COBDDT COBOL DDT FAIL FORDDT FORTRAN MACRO PASCAL PASDDT SAIL SDDT SIMDDT SIMULA EXAMPLES the I the debugging programs they Only those printed in boldface Specifies ALGDDT as the default. Specifies ALGDDT as the default. Specifies COBDDT as the default. Specifies COBDDT as the default. Specifies DDT as the default. Specifies SDDT as the default. Specifies FORDDT as the default. Specifies FORDDT as the default. Specifies DDT as the default. Specifies PASDDT as the default. Specifies PASDDT as the default. Specifies ~he SAIL debugger as the default. Specifies the SAIL debugger as the default. Specifies SIMDDT as the default. Specifies SIMDDT as the default. I I */DDEBUG:FORTRAN ~ * Specifies FORDDT as the default debugging program for /DEBUG 0 r /TE&T swi tch. RELATED SWITCHES /DEBUG, /TEST 3-13 the I USING LINK DIRECTLY /DEBUG FORMAT /DEBUG:keyword FUNCTION Requests loading of a debugging program and sets the start address for execution as the normal start address of the debugging program. The /DEBUG switch also sets the /EXECUTE switch because it is assumed that the program is to be executed. The /GO switch is still required to end loading and begin execution. The /DEBUG switch turns on the /LOCALS switch for the remainder of the load. You can override this by using the /NOLOCAL switch, but the override lasts only during processing of the current command string. Local symbols for the debugging program itself loaded. I are never If debugging overlaid programs, you must specify /DEBUG when loading the root node. (Refer to Section 5.4 for more information.) The permitted keywords and the programs they load listed below. Only those printed in boldface supported by DIGITAL. ALGDDT ALGOL COBDDT COBOL DDT FAIL FORDDT FORTRAN MACRO PASCAL PASDDT SAIL SDDT SIMDDT SIMULA I are are Loads ALGDDT. Loads ALGDDT. Loads COBDDT. Loads COBDDT. Loads DDT. Loads SDDT. Loads FORDDT. Loads FORDDT. Loads DDT. Loads PASDDT. Loads PASDDT. Loads the SAIL debugger. Loads the SAIL debugger. Loads SIMDDT. Loads SIMDDT. If you give no keyword with /DEBUG, the default is either DDT or the debugging program specified by the /DDEBUG swi tch. EXAMPLES */DEBUG:DDT ~ * Loads DDT, sets the /EXECUTE switch, and the execution will be controlled by DDT. OPTIONAL NOTATIONS Abbreviate /DEBUG to /D. RELATED SWITCHES /DDEBUG, /TEST 3-14 specifies that USING LINK DIRECTLY /DEFAULT FORMAT /DEFAULT:keyword filespec filespec/DEFAULT:keyword FUNCTION Changes default specifications for input or output files. The defaults specified remain in effect until changed by another /DEFAULT switch. I The keywords allowed are: INPUT Specifies the defaults for specifications. input file OUTPUT Specifies the defaults for output specifications. file For input files, the initial defaults are: device extension directory DSK: REL User's connected directory For output files, the initial defaults are: device filename directory EXAMPLES DSK: Name of main program User's connected directory * /DEFAULT: INPUT . BIN C@ * Resets input file default extension to BIN. */DEFAULT:OUTPUT MTAO: ~ * Resets output file default device to MTAO:. OPTIONAL NOTATIONS If you omit the keyword, INPUT is assumed. 3-15 USING LINK DIRECTLY /DEFINE I FORMAT /DEFINE: (symbol:value, ... ,symbol:value) FUNCTION Assigns each symbol the decimal value following it. This causes them to be global symbols. You can use the /UNDEFINED switch to get a list of any undefined symbols, and then define them with /DEFINE. Defining an already defined symbol with /DEFINE an error message. EXAMPLES generates * /UNDEFINED ~ [LNKUGS 2 UNDEFINED GLOBAL SYMBOLS] A 400123 IGOR 402017 */DEFINE: (A:59l,IGOR:l) ~ * Gives the decimal respectively. values 591 and 1 to A and IGOR, NOTATIONS You can give the value in octal by typing # before the value. You can omit the parentheses if you define only one symbol. Specifying /DEFINE:FOO:BAR will define FOO to have the value of BAR if BA~ is already defined. RELATED SWITCHES /UNDEFINED, /VALUE OPTIONAL I 3-16 USING LINK DIRECTLY /ENTRY FORMAT /ENTRY FUNCTION Requests terminal typeout (in octal) of all entry name symbols loaded so far. Each entry name symbol will have been defined by an ENTRY statement (MACRO, FORTRAN, or BLISS), a FUNCTION statement (FORTRAN), a SUBROUTINE statement (FORTRAN, or COBOL), or a PROCEDURE declaration (ALGOL) . If you are using the overlay facility, /ENTRY requests only the entry name symbols for the current link. EXAMPLES */ENTRY ~ [LNKLSS LIBRARY SEARCH SYMBOLS SQRT. 3456 * RELATED SWITCHES /NOENTRY 3-17 (ENTRY POINTS)] I USING LINK DIRECTLY /ERRORLEVEL FORMAT /ERRORLEVEL:n FUNCTION Suppresses terminal typeout of LINK messages with message level n and less, where n is a decimal number between 0 and 30 inclusive. You cannot suppress level 31 messages. LINK's default is /ERRORLEVEL:IO. See Appendix B for the level of each LINK message. EXAMPLES */ERRORLEVEL: 10 ~ * Suppresses all messages of level 10 and less. */ERRORLEVEL:O ~ * Permits typeout of all messages. I RELATED SWITCHES /VERBOSITY, /MESSAGE 3-18 USING LINK DIRECTLY /EXCLUDE FORMAT /EXCLUDE: (subroutine, .•. ,subroutine) FUNCTION Prevents loading of the specified modules from the current file even if they are required to resolve global symbol references. You can use the /EXCLUDE switch for any of the following purposes: EXAMPLES • If a library has several modules with the same search symbols, you can select the module you want by excluding the others. • You can prevent modules from giving multiple definitions of a symbol by selectively excluding one or more of them. • you can delay In defining an overlay structure, loading of a module until a later link by excluding it. */SEARCH LIBFIL.REL/EXCLUDE: (MODI,MOD2) ~ * Searches LIBFIL as a library but prevents loading of and MOD2 even if they are referenced. MODI OPTIONAL NOTATIONS You can omit the module. one RELATED SWITCHES /INCLUDE parentheses 3-19 if you specify only USING LINK DIRECTLY /EXECUTE FORMAT /EXECUTE FUNCTION Tells LINK that the loaded program is to be executed Loading continues beginning at its normal start addre£s. until a /GO switch is found. The /EXECUTE and IDEBUG switches are mutually exclusive. EXAMPLES */EXECUTE ~ * OPTIONAL NOTATIONS You can abbreviate IEXECUTE to IE. RELATED SWITCHES IDEBUG, IGO, IRUN, ITEST 3-20 USING LINK DIRECTLY /FRECOR' FORMAT /FRECOR:nK Where n is a positive decimal integer. FUNCTION Requires LINK to maintain a minimum amount of free memory after any expansions. LINK's default free memory is 4K. If you use the /FRECOR:nK switch, LINK computes n times 1024 words and maintains the resulting number of words of free memory, if possible. If the modules to be loaded are quite large, a amount of free memory avoids some moving of areas. larger The following areas may be expanded during loading: 1. ALGOL symbol information (AS). 2. Bound global symbols (BG). 3. Dynamic area (DY). 4. Fixup area (FX). 5. Global symbol tables (GS). 6. User's high segment code (HC). 7. User's low segment code (LC). 8. Local symbol tables (LS). 9. Relocation tables (RT). 10. Argument typechecking (AT) I Each of these areas has a lower bound, an actual upper bound, and a maximum upper bound. LINK normally maintains space between the actual and maximum upper bounds for each area. The total of these areas is at least the space given by the /FRECOR switch, if possible. If the low segment code area exceeds the limit set by the user (with /MAXCOR) or by the system (CORMAX), LINK recovers free core by concatenating these free areas. When all this recovered space is used, one or more of the areas overflows to disk, and free core is no longer maintained. EXAMPLES */FRECOR: 7K ~ * Maintains 7K of free core, if possible. OPTIONAL NOTATIONS You can specify the free core in octal. RELATED SWITCHES /CORE, /MAXCOR, /RUNCOR LINK V6.0 3-21 I April 1986 I I USING LINK DIRECTLY /GO FORMAT /GO FUNCTION Ends loading after the current module. LINK then performs any required library searches, generates any required output files, and does one of the following: EXAMPLES • Begins execution at the normal start address loaded program (if you used /EXECUTE). • Begins execution at the start address of the debugging program (if you used /DEBUG, or both /TEST and /EXECUTE) . • Exits to swi tch) . the monitor (if you used no of the execution *MYPROG/EXECUTE/GO ~ [LNKXCT MYPROG EXECUTION] Begins execution of the loaded program at its normal start address. *MYPROG/DEBUG/GO ~ [LNKDEB DDT EXECUTION] Begins execution of the loaded program at the normal start address of DDT. OPTIONAL NOTATIONS Abbreviate /GO to /G. RELATED SWITCHES /DEBUG, /EXECUTE, /RUN, /TEST 3-22 USING LINK DIRECTLY /HASHSIZE FORMAT /HASHSIZE:n Where n is a positive decimal integer. FUNCTION Gives a minimum for the initial size of the global symbol table. LINK selects a prime number larger than n for the initial size. If you know that you will need a large global symbol table, you can save time and space by allocating space for it with /HASHSIZE. You should give a hash size at least 10 percent larger than the number of global symbols in the table. If LINK gives the message [LNKRGS Rehashing Global Symbol Table] during a load, you should use the /HASHSIZE switch for future loads of the same program. The minimum hash size for loading a program appears in the header lines of the map file. The default hash size (initially 251 decimal). EXAMPLES is a LINK assembly * /HASHSIZE: 1000 ~ * Sets the hash size to the prime number 1021. 3-23 parameter USING LINK DIRECTLY /INCLUDE FORMAT /INCLUDE: (module, ... ,module) FUNCTION Specifies modules to be loaded regardless requests for them. of any global In library search mode, an /INCLUDE switch requests loading of the specified modules. If the switch is associated with a file, the request is cleared after that file is searched. If not, the request persists until the modules are found. When LINK is not in library search mode, the /INCLUDE switch associated with a file requests that only the specified modules be loaded, and the request is cleared after that file is processed. An /INCLUDE switch not associated with a file requests loading of the specified modules, and the request persists until the modules are found. You can use /INCLUDE in an overlay load to force a module to be loaded in an ancestor link common to successor links that reference that module. This makes the module available to all links that are successors to its link. EXAMPLES */SEARCH LIBI/INCLUDE: (MODI,MOD2) ~ * Searches LIBI and loads MODI and MOD2 even if they are not referenced. OPTIONAL NOTATIONS You can omit the module. RELATED SWITCHES /EXCLUDE, /NOINCLUDE, /MISSING parentheses 3-24 if you specify only one USING LINK DIRECTLY /LIMIT FORMAT /LIMIT:psect:address FUNCTION Allows you to specify an upper bound for a specific PSECT. In the format description, psect should be the PSECT name, which has been defined with either the /SET switch or in one of the modules already loaded. Address should be the upper bound address of the specified PSECT, expressed in either numeric or symbolic form. This address should be one greater than the highest location which may be loaded in the PSECT. If the PSECT grows beyond the address specified in the /LIMIT switch, LINK will send a warning to your terminal, but will continue to process input files and to load code. The warning message will take the following form: %LNKPEL PSECT <psect> exceeded limit of <address> No chained references will be resolved, and LINK will suppress program execution, producing the following fatal error: ?LNKCFS Chained fixups have been suppressed This action prevents unintended PSECT overlays. PSECT overlays can cause loops and other unpredictable behavior, because LINK uses address relocation chains in the user image that is being built. EXAMPLE *TESTI ~ * /COUNTERS G!D [LNKRLC RELOC. CTF. .LOW. Q R INITIAL VALUE a 1000 4500 CURRENT VALUE 140 4000 10500 LIMIT VALUE 1000000 1000000 1000000] */LIMIT:Q: 4000 ~ *TEST2 G!D %LNKPEL PSECT Q EXCEEDED LIMIT OF 4000 DETECTED IN MODULE .MAIN FROM FILE DSK:TEST2.REL * /COUNTERS G!D CURRENT VALUE LIMIT VALUE [LNKRLC RELOC. CTR. INITIAL VALUE .LOW. o 140 1000000 Q 4000 1000 5000 R 4500 10500 1000000] *TEST/SAVE/GO @) %LNKPOV PSECTS RAND Q OVERLAP FROM ADDRESS 4500 TO 5000 ?LNKCFS CHAINED FIXUPS HAVE BEEN SUPPRESSED In this example, a program named TESTl, which contains two PSECTs, is loaded. The PSECTs are named Q and R. After TESTI is loaded, the /COUNTERS switch shows that the upper bound of PSECT Q is 4000. 3-25 USING LINK DIRECTLY The /LIMIT switch is used to limit PSECT Q to 4000. A second program, TEST2, also requires storage for PSECT Q. Therefore, when TEST2 is loaded, LINK produces a warning to the effect that the limit that was set haS been exceeded. The /COUNTERS switch shows that PSECT Q now requires an upper bound of 5000. When the programs are started (with /GO) , LINK produces the POV warning message and the CFS fatal error message. RELATED SWITCH /COUNTER OPTIONAL NOTATIONS A defined global symbol can be used to specify the limit value, e.g., /LIMIT:FOO:BAR. 3-26 USING LINK DIRECTLY /LINK FORMAT /LINK:name I Where name is up to 6 RADIX-50 compatible characters. FUNCTION Directs LINK to give the specified name to the current core image and outputs the core image to the overlay file. /LINK is used to close an overlay link. LINK first performs any required library searches and assigns a number to the link. For a discussion of overlay structures, see Chapter 5. The current core image has all modules loaded since beginning of the load or since the last /LINK switch. EXAMPLES the *SPEXP/LINK:ALPHA~ * Loads module SPEXP and outputs the overlay file as a link called ALPHA. core image to OPTIONAL NOTATIONS If you omit the link name, LINK uses only its assigned number. RELATED SWITCH /NODE 3-27 the USING LINK DIRECTLY /LOCALS FORMAT /LOCALS FUNCTION Includes local symbols from a module in the symbol table. LINK does not need these tables, but you may want them for debugging. To have the symbol table included in a program use the /SYMSEG switch. The /LOCALS and /NOLOCAL switches may be used locally or globally. If the switch is suffixed to specification, it applies only to that file; if it suffixed to a file specification, it applies following files in the same command line. EXAMPLES either a file is not to all */SYMSEG ~ */LOCALS A,B/NOLOCAL,C,/NOLOCAL D ~ * Loads A with local symbols, B without local symbols, with local symbols, and D without local symbols. OPTIONAL NOTATIONS You can abbreviate /LOCALS to /L. RELATED SWITCHES /NOLOCAL, /SYMSEG 3-28 C USING LINK DIRECTLY /LOG FORMAT logfilespec/LOG FUNCTION Specifies a file specification for the log file (see Section 4.2.2). Any LINK messages output before the /LOG switch is encountered are not entered in the log file. EXAMPLES *LOGFI L/LOG G!D * Specifies the file DSK:LOGFIL.LOG in the user's directory. *TTY: /LOG G!D * Directs log messages to the user's terminal. OPTIONAL NOTATIONS You can omit all or part of the logfilespec. The defaults are: device filename extension directory DSK: name of main program LOG your logged-in directory You can change the defaults using the /DEFAULT switch. RELATED SWITCHES /LOGLEVEL 3-29 USIN~ LINK DIRECTLY /LOGLEVEL FORMAT /LOGLEVEL:n FUNCTION Suppresses logging of LINK messages with level n and less, where n is a decimal number between 0 and 30 inclusive. You cannot suppress level 31 messages. See Appendix B for the level of each LINK message. The default is /LOGLEVEL:IO. EXAMPLES * /LOGLEVEL: 0 G!D * Logs all messages. I RELATED SWITCHES /ERRORLEVEL, /LOG 3-30 USING LINK DIRECTLY /MAP FORMAT mapfilespec/MAP:keyword FUNCTION Specifies a file specification for the map output file (see Section 4.2). The contents of the file are determined by the /CONTENTS switch or its defaults. Permitted keywords and their meanings are: EXAMPLES END Produces a map file at the end of the load. This is the default if you omit the keyword. ERROR error if a fatal Produces a map file Any modules loaded after this occurs. To switch will not appear in the log. is generated, ensure that a .MAP file specify this switch before the loading of .REL files. NOW Library Produces a map file immediately. searches will not have been performed unless forced. *MAPF I L/MAP : END ~ * Generates a map in the file DSK:MAPFIL.MAP area at the end of loading. OPTIONAL NOTATIONS in your You can omit all or part of the mapfilespec. The defaults are: device filename extension directory DSK: name of main program MAP user's connected directory You can change the defaults using the /DEFAULT switch. You can abbreviate /MAP to /M. RELATED SWITCHES /CONTENTS 3-31 disk I USING LINK DIRECTLY /MAXCOR FORMAT /MAXCOR:nP Where n is a positive decimal integer. FUNCTION Requires LINK to overflow low segment code larger than n pages to disk. The disk overflow may contain symbol areas, low segment code, and high segment code. If you specify MAXCOR smaller than the memory already used, disk overflow occurs at the next expansion and memory is reduced to your specified MAXCOR. If you specify MAXCOR smaller than LINK's minimum requirement, you will get an error message. You must then use another /MAXCOR switch to enlarge the core. EXAMPLES * /MAXCOR: 3 OP G!D * Specifies a maximum core use of 30 pages (lP=5l2 words). OPTIONAL NOTATIONS You can specify the core in octal. You can specify the switch argument as K instead of P. RELATED SWITCHES JCORE, jFRECOR, jRUNCOR 3-32 USING LINK DIRECTLY /MAXNODE FORMAT /MAXNODE:n Where n is a positive decimal integer. FUNCTION Specifies the number of links to be defined when the LINK will overlayed program requires more than 256 links. certain allocate extra space in the OVL file for fixed-length tables based on the number of links specified with this switch. Note that this switch must be placed after the /OVERLAY switch and it must precede the first /NODE switch in the set of commands to LINK. EXAMPLES *TEST/OVERLAY/MAXNODE: 500 ~ * Reserves space for 500 defined links. discussion on overlays. RELATED SWITCHES /OVERLAY 3-33 See Chapter 5 for a USING LINK DIRECTLY /MISSING FORMAT /MISSING FUNCTION Requests terminal typeout of modules requested /INCLUDE switch that have not yet been loaded. EXAMPLES *MYPROG ~ * /SEARCH/INCLUDE: (MODI, MOD2) LIBI ~ */MISSING ~ [LNKIMM I INCLUDED MODULE MISSING] *LIB2/INCLUDE: (MOD2) Cili) */MISSING ~ [LNKIMM NO INCLUDED MODULES MISSING] with the * This example shows the use of /MISSING to see if all the required modules have been loaded. The module MOD2 was not yet loaded, and it was in LIB2. In response to the first use of the switch, LINK indicated that one necessary module was missing. After the missing module was included (module named LIB2), the switch is used again. LINK responded to the second use of the switch by indicating that all necessary modules were present. I RELATED SWITCHES /INCLUDE, /UNDEFINED 3-34 USING LINK DIRECTLY /MTAPE FORMAT /MTAPE:keyword FUNCTION Specifies tape operations to be performed on the current' device. (A tape device remains current only until end-of-line or until another device is specified, whichever is earlier.) The switch is ignored if the current device is not a tape. The operation is performed immediately if /MTAPE is given with an input file or with an already initialized output file. Otherwise, the operation is performed when the output file is initialized. The valid keywords and the operations they specify are: MTBLK MTBSF MTBSR MTDEC MTEOF MTEOT MTIND MTREW MTSKF MTSKR MTUNL MTWAT EXAMPLES Writes 3 inches of blank tape. Backspaces one file. Backspaces one record. Initializes DIGITAL-compatible 9-channel tape. writes an end-of-file mark. Spaces to logical end-of-tape. Initializes industry-compatible 9-channel tape. Rewinds tape to the load point (BOT). Skips one file. Skips one record. Rewinds and unloads tape. Waits for tape I/O to finish. *MTAO : /MTAPE : MTEOT ~ *MTAO : /MAP: NOW ~ * Spaces to logical end-of-tape on MTAO: file. RELATED SWITCHES /BACKSPACE, /REWIND, /SKIP, /UNLOAD 3-35 and writes a map USING LINK DIRECTLY /NEWPAGE FORMAT /NEWPAGE:keyword FUNCTION Sets the relocation counter to the first word of the next page. If the counter is already at a new page, this switch is ignored. The permitted keywords and their relocation counters are: EXAMPLES LOW Resets the low-segment counter to new page. If you omit the keyword, this is the default. HIGH Resets the high-segment counter to new page. */NEWPAGE:HIGH ~ *SUBRI G!D * /NEWPAGE: LOW ~ *SUBR2C@ * Sets the high-segment counter to a new page, loads SUBRl, sets the low-segment counter to a new page, and loads SUBR2. Note that SUBRI and SUBR2 are not necessarily loaded into the high and low segments respectively; the /NEWPAGE switch sets a counter, but does not force the next loaded module into the specified segment. I RELATED SWITCHES /SET, /COUNTER 3-36 USING LINK DIRECTLY /NODE FORMAT /NODE:argument FUNCTION Opens an overlay link. /NODE places LINK's relocation counter at the end of a previously defined link in an overlay structure, which becomes the immediate ancestor to the next link defined. (For a discussion of overlay structures, see Chapter 5.) The /NODE switch must precede any modules to be placed the new link. in Three kinds of arguments are permitted: A name given with a previous /LINK switch. LINK will • place the relocation counter at the end of the specified link. • A negative number the current path. (-n). LINK backs up n links along • A positive number n or O. LINK begins further loading at the end of link number n. You can use 0 to begin loading at the root link. NOTE It is recommended that you use a link name (or 0 for the root link) rather than a nonzero number. This is because a change in commands defining an overlay may change some of the link numbers. EXAMPLES For examples defining overlay structures, see Chapter 5. RELATED SWITCHES /LINK, /OVERLAY, /PLOT 3-37 USING LINK DIRECTLY /NOENTRY FORMAT /NOENTRY: (symbol,symbol, ... ) FUNCTION Deletes entry name symbols from LINK's overhead tables when loading overlays, thereby saving space at run time. If you know that execution of the current load will not reference certain entry points, you can use /NOENTRY to delete them. /NOENTRY differs from /NOREQUEST in deletes requests for symbols, while symbols that might be requested. EXAMPLES */ENTRY ~ [LNKLSS LIBRARY SEARCH SYMBOLS SQRT. 3456 * /NOENTRY: (SQRT.) ~ */ENTRY ~ that /NOREQUEST /NOENTRY deletes (ENTRY POINTS)] * I I Deletes SQRT. so that it cannot symbol request. be used to fulfill OPTIONAL NOTATIONS You can omit the parentheses if only one symbol is given. RELATED SWITCHES /ENTRY, /EXCLUDE, /NOEXCLUDE, /MISSING, /REQUEST, /NOREQUEST 3-38 /INCLUDE, /NOINCLUDE, a USING LINK DIRECTLY /NOINCLUDE FORMAT /NOINCLUDE FUNCTION Clears requests for previous /INCLUDE. EXAMPLE *LIBI/INCLUDE: (MODI,MOD3) ~ * /NOINCLUDE ~ modules that were specified in a * Loads MODI and MOD3 from LIBI. However, if are not found immediately, stop searching. RELATED SWITCHES /INCLUDE, /EXCLUDE, /MISSING 3-39 the modules USING LINK DIRECTLY /NOINITIAL FORMAT /NOINITIAL FUNCTION Prevents loading of LINK's initial global symbol table (JOBDAT) . The /NOINITIAL switch cannot operate after the first file specification because JOBDAT will be already loaded. The initial global symbol table contains the JBxxx symbols described in Appendix C. The /NOINITIAL switch is commonly used for: EXAMPLES • Loading LINK JOBDAT) . itself • Loading a private necessary) . • Building an .EXE file executive mode (for loader) . (to copy * /NOINITIAL GID * 3-40 get of the latest JOBDAT (to copy alter of if that will eventually run in example, a monitor or bootstrap USING LINK DIRECTLY /NOLOCAL FORMAT /NOLOCAL FUNCTION Suspends the effect of a preceding /LOCALS switch so that local symbol tables will not be loaded with their modules. The /LOCALS and /NOLOCAL switches may be used locally or globally. If the switch is suffixed to specification, it applies only to that file; if it suffixed to a file specification, it applies following files in the same command string. This switch is useful if you need space, because local symbols are segment by default. EXAMPLES either a file is not to all to conserve memory loaded into the low * /LOCALS A, B/NOLOCAL ,C ,/NOLOCAL D G!:.D * Loads A with local symbols, B without local symbols, with local symbols, and D without local symbols. OPTIONAL NOTATIONS Abbreviate /NOLOCAL to /N. RELATED SWITCHES /LOCALS 3-41 C USING LINK DIRECTLY /NOREQUEST FORMAT /NOREQUEST: (symbol,symbol, ... ) FUNCTION Deletes references to links from LINK's overhead tables when loading overlay programs. If you know that the execution of the current load will not require certain links, you can use /NOREQUEST to delete references to them. /NOREQUEST differs from /NOENTRY in that /NOENTRY deletes symbols that might be requested, while /NOREQUEST deletes the requests for them. EXAMPLES I */REQUEST ~ [LNKRER REQUEST EXTERNAL REFERENCES] ROUTN. SQRT. */NOREQUEST: (ROUTN. ,SQRT.)~ */REQUEST ~ * Deletes references to ROUTN. and SQRT. OPTIONAL NOTATIONS You can omit the parentheses if only one symbol is given. RELATED SWITCH /NOENTRY 3-42 USING LINK DIRECTLY /NOSEARCH FORMAT /NOSEARCH FUNCTION Suspends the effect of a previous /SEARCH switch. Files named between a /SEARCH and the next /NOSEARCH are searched as libraries, so that modules are loaded only to resolve global references. The /SEARCH and /NOSEARCH switches may be used locally or globally. If the switch is suffixed to specification, it applies only to that file; if it suffixed to a file specification, it applies following files in the same command string. EXAMPLES *FILEI ~ * /SEARCH A ,B/NOSEARCH, C ,/NOSEARCH D ~ * Searches A, loads B, searches C, and loads D. RELATED SWITCHES /SEARCH 3-43 either a file is not to all USING LINK DIRECTLY /NOSTART FORMAT /NOSTART FUNCTION Directs LINK to disregard any start addresses found after the /NOSTART switch. Normally LINK keeps the most recent start address found, overwriting any previously found. The /NOSTART switch prevents this replacement. EXAMPLES *MAINI , /NOSTART MAIN2, MAIN3 ~ * Directs LINK to save the start address from MAINI instead of replacing it with other start addresses from MAIN2 and MAIN3. RELATED SWITCHES /START 3-44 USING LINK DIRECTLY /NOSYMBOL FORMAT /NOSYMBOL FUNCTION Prevents construction of user symbol tables. Symbols are then not available for the map file, but the header for the file can still be generated by the /MAP switch. The /NOSYMBOL switch prevents writing an ALGOL SYM file if it would otherwise have been written. If you do not need the map file or symbols, you can loading by using the /NOSYMBOL switch. EXAMPLES * /NOSYMBOL ~ * 3-45 speed USING LINK DIRECTLY /NOSYSLIB FORMAT /NOSYSLIB: (keyword, ... ,keyword) FUNCTION Prevents automatic search of the system libraries named as keywords. LINK usually searches system libraries at the end of loading to satisfy unresolved global references. The /NOSYSLIB switch prevents this search. The /NOSYSLIB switch can also be used to terminate searching of libraries that were specified in a previous /SYSLIB switch. When you specify searching of a library with /SYSLIB, that library will continue to be searched for every module you load. You can use /NOSYSLIB to specify libraries that should not be searched. Refer to /SYSLIB for more information. The permitted keywords and the libraries they specify are listed below. Only those printed in boldface specify libraries supported by DIGITAL. ANY ALGOL BCPL COBOL F40 FORTRAN NELIAC PASCAL SAIL SIMULA EXAMPLES Prevents Prevents Prevents Prevents Prevents Prevents Prevents Prevents Prevents Prevents all library searches. search of ALGLIB. search of BCPLIB. search of LIBOL or C74LIB. search of LIB40. search of FORLIB. search of LIBNEL. search of PASLIB. search of SAILIB. search of SIMLIB. */NOSYSLIB: (ALGOL,COBOL) ~ * Prevents search of the system libraries ALGLIB and LIBOL. I OPTIONAL NOTATIONS If you omit keyword it defaults to ANY. You can omit parentheses if only one keyword is given. RELATED SWITCH /SYSLIB 3-46 USING LINK DIRECTLY /NOUSERLIB ]fORMAT filespec/NOUSERLIB FUNCTION Discontinues automatic searching of the specified file at each /LINK or /GO switch. If you need a file searched for some links but not others, you can use the /USERLIB and /NOUSERLIB switches to enable and disable automatic search of the file. EXAMPLES */OVERLAY~ *MYFORL/USERLIB:FORTRAN~ *MODI/LINK:MODI~ */NODE:MODI MOD2/LINK:MOD2~ *MYFORL/NOUSERLIB ~ * Loads the overlay handler; requests search of MYFORL as a FORTRAN library; loads MODI and MOD2 as links; discontinues search of MYFORL. OPTIONAL NOTATIONS If you omit the filespec, LINK discontinues search of all user libraries. RELATED SWITCHES /USERLIB 3-47 USING LINK DIRECTLY jONLY FORMAT jONLY:keyword FUNCTION Directs LINK to load only the specified segment two-segment modules. The permitted keywords are: HIGH LOW BOTH I Loads only high segments. Loads only low segments. Loads both segments. The jONLY switch is ignored for for PSECTed modules. EXAMPLES of one-segment modules and *jONLY:HIGH MODI,MOD2~ *MOD3jONLY: BOTH ~ * Loads high segment for MODI and MOD2; for MOD3. 3-48 loads both segments USING LINK DIRECTLY /OTSEGMENT FORMAT /OTSEGMENT:keyword FUNCTION Specifies the time and manner of loading system. the object-time The permitted keywords are: DEFAULT Suspends the effect of a /OTSEGMENT:SHARABLE /OTSEGMENT:NONSHARABLE switch. HIGH As for /OTSEGMENT:SHARABLE. LOW AS FOR /OTSEGMENT:NONSHARABLE. previous or NONSHARABLE Loads the object-time system into user core image at load time. The user program may have code in both segments. The object-time system may have code in both segments. SHARABLE Binds the object-time system at execution time. The user program is in the low segment and the object-time system is in the high segment. LINK's default action is to bind the oqject-time system at execution time. This normal action occurs if none of the following are true. • You specify /OTSEGMENT:NONSHARABLE. • You have loaded any code into the high segment. • You have specified /SEGMENT:HIGH for some modules. • You have specified /SYMSEG:HIGH. • Your low segment is too big for systems to fit. sharable object-time If any of these is true, a non-sharable object-time system is loaded as part of your program. EXAMPLES *MYPROG/SYSLIB/OTSEGMENT:NONSHAR~ * Loads a non-sharable copy of part of your program. RELATED SWITCHES /SEGMENT 3-49 the object-time system as USING LINK DIRECTLY /OVERLAY FORMAT filespec/OVERLAY~ (keyword, ••• ,keyword) FUNCTION Initiates construction of an overlay structure. discussion of overlay structures, see Chapter 5. For a The permitted keywords and their meanings are listed below. The default settings are printed in boldface. • ABSOLUTE Specifies that links are absolute. This is the default situation when overlays are loaded. The inverse situation is to use /OVERLAY:RELOCATABLE. Relocatable overlays are described in Chapter 5. LOGFILE Outputs runtime overlay messages to your terminal. NOLOGFILE Suppresses output overlay messages • NOWARNING Suppresses messages. PATH Specifies that each link path be loaded with its link. RELOCATABLE Specifies relocatable. TREE Specifies that the overlay have a tree structure. WARNING Outputs overlay warning messages to user terminal. WRITABLE Specifies that the links are writable. Refer to Chapter 5 for more information. of warning overlay that runtime links will are will EXAMPLES See Chapter 5. OPTIONAL NOTATIONS You can omit the parentheses if only one keyword is given. 3-50 January 1985 USING LINK DIRECTLY /PATCHSIZE FORMAT /PATCHSIZE:n Where n is a positive decimal integer. FUNCTION Allocates n words of storage to precede the symbol table. The allocated storage is in the same segment (high or low) as the symbol table. The default is /PATCHSIZE:64. The storage allocated is available for patching or for defining new symbols with DDT, and is identified by the global symbol "PAT .. " EXAMPLES */SYMSEG:HIGH/PATCHSIZE:200~ * Loads the symbol table in the high segment after allocating 200 words between the last loaded module and the symbol table. OPTIONAL NOTATIONS You can specify the patchsize in octal. RELATED SWITCHES /SYMSEG 3-51 USING LINK DIRECTLY /PLOT FORMAT filespec/PLOT FUNCTION Directs LINK to output a tree diagram of your overlay structure. You can have the diagram formatted for a plotter (by default) or for a line printer (by giving the device as LPT:). Each box in the diagram shows a link number, its name (if you gave one with the /LINK switch), and its relationship to other links (as defined by your commands). The /PLOT switch cannot precede the /OVERLAY switch. EXAMPLES See Chapter 5. OPTIONAL NOTATIONS LINK has default settings for the size of the overlay diagram and the increment for drawing lines. You can override these by giving the /PLOT switch in the form: filespec/PLOT: (LEAVES:value,INCHES:value,STEPS:value) Where the values for each parameter define: INCHES Width of diagram in inches. The defaults are INCHES:29 for plotter and INCHES:12 for line printer. LEAVES Number of links without successors that can appear in one row. The defaults are LEAVES:16 for plotter and LEAVES:8 for line printer. STEPS Increments per inch for drawing defaults are STEPS:lOO for STEPS:20 for line printer. lines. plotter The and For line printer diagrams, you cannot give INCHES or LEAVES different from the defaults. The STEPS parameter should be between 10 and 25. For plotter diagrams, you should give INCHES and LEAVES in a ratio of about 2 to 1. For example, INCHES:40 and LEAVES:20. If LINK cannot design the diagram on one page, it will automatically design subtrees for diagrams on more pages. RELATED SWITCHES /LINK, /NODE, /OVERLAY 3-52 USING LINK DIRECTLY /PLTTYP FORMAT /PLTTYP:keyword FUNCTION Allows a user to specify the type generated by the /PLOT switch. KEYWORDS DEFAULT Generate output for a printer only if the is a printer or terminal. PLOTTER Generate output for a plotter. PRINTER Generate output for a printer. of plot file to be device EXAMPLES .R LINK *TEST/OVERLAY *DSK:TEST/PLOT/PLTTYP:PRINTER *OVL0,OVLI/LINK:TEST */NODE:TEST OVL2 /LINK:LEFT */NODE:LEFT OVL5 /LINK:LEFTI */NODE:LEFT OVL6 /LINK:LEFT2 */NODE:TEST OVL3,OVL4 /LINK:RIGHT *TEST /SAVE /GO EXIT Causes all output from the /PLOT printer format. RELATED SWITCHES switch to be in line /PLOT 3-53 April 1986 USING LINK DIRECTLY /PSCOMMON FORMAT /PSCOMMON:psect:common FUNCTION Specifies where LINK is to load COMMON blocks. This switch causes the FORTRAN common specified by the argument common to be loaded into the PSECT specified in the argument psect. Use the /PSCOMMON switch before loading the specified common and before declaring the common's size with the /COMMON switch. /PSCOMMON only affects common blocks defined with the /COMMON switch. If the common block is created by a REL block, /PSCOMMON is ignored, and the PSECT specified by the REL file is used. EXAMPLES In the following example, /SET defines the SECTA PSECT's orIgIn, /PSCOMMON specifies that COMABC is loaded into SECTA, and /COMMON defines the common size. */SET:SECTA:3000000 ~ */PSCOMMON:SECTA:COMABC ~ */COMMON:COMABC: 10000 ~ *PROG~ * RELATED SWITCHES LINK V6.0 /COMMON 3-54 April 1986 USING LINK DIRECTLY /REDIRECT FORMAT /REDIRECT:lowpsect:highpsect FUNCTION Loads two-segment formatted REL files as part of a program using PSECTs. The argument lowpsect is the name of the PSECT to receive the low-segment code and highpsect is the name of the PSECT to receive the high-segment code. You must redirect both the high and the low segments. EXAMPLES The following example loads a two-segment program (TWOPRT), and displays the low- and high-segment values using /COUNTERS. *TWOPRT G!D * /COUNTERS G!D [LNKRLC Reloc. ctr. .LOW. .HIGH. initial value IlJ 41lJ1lJ1lJ1lJ1lJ current value 1642 41lJ1lJ753 limit value leJeJeJllJllJeJ leJllJeJllJllJllJ] * Next, PSECT origins are set for PSHI and PSLO, .LOW. is redirected into PSLO, .HIGH. is redirected into PSHI, and /COUNTERS is used to display PSHI and PSLO values. */SET:PSHI:4eJeJllJleJ ~ */SET: PSLO: 35eJ0 ~ */REDIRECT:PSLO:PSHI~ *TWOPRT~ */COUNTERS ~ [LNKRLC Reloc. ctr. PSHI PSLO initial value 4eJ0eJleJ 3500 current value 4eJeJ753 52eJ2 limit value leJeJeJf.?JeJeJ If.?Jf.?Jf.?JeJ0eJ] * LINK V6.1lJ 3-54.1 April 1986 USING LINK DIRECTLY /REQUEST FORMAT /REQUEST FUNCTION Requests terminal typeout of all other links. external references to If you use /REQUEST to get the names of external references, you can then either delete the references with the /NOREQUEST switch, or load the referenced modules. EXAMPLES */REQUEST<RET) [LNKRER REQUEST EXTERNAL REFERENCES] ROUTN. SQRT. */NOREQUEST:ROUTN.<RET) */SEARCH LIBI<RET) * Obtains the external references ROUTN. and SQRT.; deletes the request for ROUTN.i searches the file LIBI for a module containing the entry point SQRT. RELATED SWITCHES /NOREQUEST 3-54.2 April 1986 USING LINK DIRECTLY /REQUIRE FORMAT /REQUIRE: (symbol, ... ,symbol) FUNCTION Generates global requests for the specified symbols. LINK uses these symbols as library search symbols (entry points) . /REQUIRE differs from /INCLUDE in that /INCLUDE requests a module by name, while /REQUIRE requests an entry name symbol. Thus you c~n use /REQUIRE to specify a function (for example, SQRT.) even if you do not know the module name. You can use /REQUIRE to load a module into a to all links that reference the module. link common Note that the global requests generated by the /REQUIRE switch do not use the standard calling sequence, and are therefore not visible to the /REQUEST switch. EXAMPLES * /UNDEFINED ~ [LNKUGS NO UNDEFINED GLOBAL SYMBOLS] */REQUIRE: (ROUTN. ,SQRT.) ~ * /UNDEFINED G!!) [LNKUGS 2 UNDEFINED GLOBAL SYMBOLS] ROUTN. SQRT. * OPTIONAL NOTATIONS You can omit the parentheses if only one symbol is given. RELATED SWITCHES /SEARCH, /NOSEARCH I 3-55 USING LINK DIRECTLY /REWIND FORMAT /REWIND FUNCTION Rewinds the current input or output device if is a tape. If not, the switch is ignored. EXAMPLES *MTAO:/REWIND~ * Rewinds tape on MTAO:. 3-56 the device USING LINK DIRECTLY /RUNAME FORMAT /RUNAME:name FUNCTION Assigns a job name for execution of your program. This name is stored inside the monitor and is used in the SYSTAT display. If you give no /RUNAME switch, the default name is the name of the module with the start address. If there is no such module, the name nnnLNK is used, where nnn is your 3-digit job number. EXAMPLES */RUNAME:LNKDEV~ * Assigns the name LNKDEV for job execution. 3-57 I USING LINK DIRECTLY /RUNCOR FORMAT /RUNCOR:nP Where n is a positive decimal integer. FUNCTION Allocates n pages of memory for the program's low at execution time. EXAMPLES *MYPROG/RUNCOR:22P/EXECUTE/GO~ segment [LNKXCT MYPROG Execution] Specifies that MYPROG will allocation of 22 pages. OPTIONAL NOTATIONS execute with a low-segment You can specify the argument in octal. You can specify the switch argument as K instead of P. 3-58 USING LINK DIRECTLY /SAVE FORMAT filespec/SAVE FUNCTION Directs LINK to create an .EXE file. The file extension defaults to .EXE. For example, if you enter FOO.BAR/SAVE, LINK creates a file FOO.EXE. Note that if you want to run the saved file with system command, the file extension must be .EXE. EXAMPLES the *MYPROGG!!) *DSKZ:GOODIE.EXE/SAVE/GO~ * Directs LINK to save GOODIE.EXE on DSKZ:. RELATED SWITCH the /SSAVE 3-59 linked version of MYPROG as USING LINK DIRECTLY /SEARCH FORMAT /SEARCH FUNCTION Directs LINK to load selectively from all following files up to the next /NOSEARCH or /GO. These files are searched as libraries, and only modules whose entry point name resolves a global request are loaded. Using /NOSEARCH discontinues the library search mode, but for each link the system libraries are still searched (unless you used the /NOSYSLIB switch), and user libraries are still searched (if you used the /USERLIB switch). The /SEARCH and /NOSEARCH locally or globally. I switches may be used either Note that search requests in .TEXT blocks may be processed in the reverse order of the entered /SEARCH switches. Keep this in mind when specifying the order in which the modules are to be searched. See Block Types Greater Than 3777 in Appendix A for more information. EXAMPLES */SEARCH A,B/NOSEARCH,C,/NOSEARCH D~ * Searches A, loads B, searches C, and loads D. RELATED SWITCHES /NOSEARCH 3-60 January 1985 USING LINK DIRECTLY /SEGMENT FORMAT /SEGMENT:keyword FUNCTION Specifies which segment is to be used for loading following modules. FORTRAN object code is an exception; both segments are loaded into the low segment unless one or more of the following is true: • You used the /OTSEGMENT:NONSHARABLE switch. used the /SEGMENT:HIGH switch to load code • You the high segment. into used the /SEGMENT:DEFAULT switch to load code into • You both segments. • Some code is already loaded into the high segment. The keywords for the /SEGMENT switch are: DEFAULT Suspends effect /SEGMENT:HIGH. of /SEGMENT:LOW or HIGH Load into high segment, even if impure code. LOW Loads into low segment. NONE Same as DEFAULT. If the switch is suffixed to a file specification, it applies only to that file; if it is not suffixed to a file specification, it applies to all following files in the same command string. EXAMPLES */SEGMENT:LOW MODI,MOD2,/SEGMENT:HIGH MOD3~ * Loads MODI and MOD2 into the low segment; loads MOD3 into the high segment even if its code is impure. RELATED SWITCHES /OTSEGMENT 3-61 I USING LINK DIRECTLY /SET FORMAT /SET:name:address Where name is .HIGH., .LOW., or a PSECT name, and is a 30-bit octal address or a defined symbol. I FUNCTION Sets the loading position of a PSECT, or sets or .LOW. relocation counter. address the .HIGH. For setting the loading position of a PSECT, name is the name of the PSECT, and address is a virtual memory address. The /SET switch must precede the modules that will make up the specified PSECT. The /SET switch is not needed if the REL files already contain origin information. NOTE If you load PSECTs so that the resulting core image contains gaps, you must generate an EXE file and execute that file (rather than executing the loaded core image). It is good practice to generate an .EXE file for all PSECTed programs. If you do not ask for an .EXE file and you need one, will generate one for you. EXAMPLES LINK */SET:A: 200000 G!D * Specifies that the PSECT named A is to be loaded with origin at address 200000. its * /SET: • HIGH. : 400000 G!D * Sets the high segment relocation counter .HIGH. to the address 400000~ Note that saying /SET:.HIGH. causes a high segment to appear and a vestigial JOBDAT area to be built. RELATED SWITCHES LINK V6.0 /COUNTER, /LIMIT 3-62 April 1986 USING LINK DIRECTLY /SEVERITY FORMAT /SEVERITY:n FUNCTION Specifies that messages of severity level greater than n will terminate the load, where n is a decimal number between 0 and 30 inclusive. Level 31 messages always terminate the load. The defaults are /SEVERITY:24 for /SEVERITY:16 for batch jobs. EXAMPLES timesharing */SEVERITY:30~ * Specifies that only level 31 messages are fatal. 3-63 jobs, and USING LINK DIRECTLY /SKIP FORMAT /SKIP:n Where n is a positive decimal integer. FUNCTION Skips forward over n files on the current tape device. (A tape device remains current only until end-of-line or until another device is specified, whichever occurs first.) If the device is not a tape, the switch is ignored. EXAMPLES *MTAO:/SKIP:4 ~ * Skips forward over 4 files on MTAO:. RELATED SWITCHES /BACKSPACE, /MTAPE, /REWIND, /UNLOAD 3-64 USING LINK DIRECTLY /SPACE FORMAT /SPACE:n Where n is a positive decimal integer. FUNCTION Specifies that n words of memory will follow the current link at execution time. This memory allocation will not increase the size of the overlay file, but it will increase the size of the program at run time. The /SPACE switch is used to allocate space for use by the object time system. The OTS uses this space for I/O buffers, and as scratch space in FORTRAN and heap space in ALGOL. You should place the /SPACE switch before the first /LINK switch, to ensure allocation for the root link. It is possible to allocate space after one or more overlays are linked. This might be useful if an overlay has unusual storage requirements: buffers for a file which is open only while that overlay is resident, or a large local matrix. To allocate space between overlays, use /SPACE when loading the overlay that will be using this file or matrix. LINK allows one /SPACE switch for the root node, and one for each overlay. The default amount of memory allocated, if you do not specify /SPACE, is 2000 for the root link and 0 (zero) for other links. If the space allocated for a relocatable link is too small, the overlay handler can relocate it. If the space allocated for an absolute link is too small, a fatal error occurs. EXAMPLES * lOVE RLA Y G£) *TEST/SPACE:90/LINK:MAIN G£) * /NODE:MAIN SUBI/LINK:SUBI~ * /NODE:MAIN SUB2/LINK:SUB2G£) * Allocates 90 words of memory to follow the root link for the program. See Chapter 5 for a discussion on overlay. OPTIONAL NOTATIONS You can specify the number of words in octal. 3-65 I USING LINK DIRECTLY /SSAVE FORMAT filespec/SSAVE FUNCTION Specifies the same actions as the /SAVE switch, except that at execution time the program's high segment will be sharable. The extension of the file created by LINK is always EXE; other file extensions are ignored. If, for example you enter FOO.BAR/SSAVE, LINK creates a file FOO.EXE. EXAMPLES *DSK: SHRPRG/SSAVE ~ * Requests a sharable save file DSK:SHRPRG.EXE. I RELATED SWITCH /SAVE 3-66 USING LINK DIRECTLY /START FORMAT /START:symbol /START:address /START Where symbol is a defined global symbol and address 30-bit octal address. is a FUNCTION Specifies the start address for the loaded program, and prevents replacement by any start addresses found later. You can use the /START switch with no argument to disable a previously given /NOSTART switch. EXAMPLES *MAIN l/START: ENTRY 1 ,MAIN2,MAIN3 G£) * Defines the start address as ENTRY 1 in MAIN1, and prevents replacement of this start address by any others found in MAIN 2 or MAIN 3. RELATED SWITCHES LINK V6.0 /NOSTART 3-67 April 1986 I USING LINK DIRECTLY /SUPPRESS FORMAT /SUPPRESS:symbol Where symbol is a previously defined global symbol. FUNCTION Used to suppress a previously defined global symbol. If the symbol is unknown, this switch has no effect. Use this switch if a global symbol is defined in two modules and you wish to suppress one of the definitions. LINK suppresses a defined global symbol by setting its definition to undefined in the global symbol table. LINK does not remove the symbol definition from the symbol table. As a result, the symbol table built for debugging contains both the old and new values of the symbol. Since LINK sets the symbol to undefined in the symbol table, it expects that a subsequent module will be loaded that contains a global definition for the symbol. If the symbol is not defined later, LINK issues the Undefined Global Symbol (LNKUGS) error. EXAMPLES In the following example, the ENTPTR symbol is used in both the TEST and TEST2 programs. First, LINK is run, TEST is loaded, and the value of ENTPTR is shown using the /VALUE switch • • R LINKG!D *TESTG!D */VALUE:ENTPTR~ [LNKVAL Symbol ENTPTR 140 defined] Next, ENTPTR's value is suppressed using /SUPPRESS and its current value is shown. Note that the value is now undefined. */SUPPRESS:ENTPTR~ */VALUE:ENTPTR~ [LNKVAL Symbol ENTPTR o undefined] Finally TEST2 is loaded and the value is shown again. *TEST2~ */VALUE:ENTPTR~ [LNKVAL Symbol ENTPTR 200 defined] In the next example, TEST and TEST2 are loaded, but ENTPTR is not suppressed after TEST is loaded. In this example, LINK issues the Multiply-defined global symbol warning • • R LINK(§) *TEST~ *TEST2 %LNKMDS Multiply-defined global symbol ENTPTR Detected in module .MAIN from file TEST2.REL Defined value = 140, this value = 200 3-68 January 1985 USING LINK DIRECTLY /SYFILE FORMAT filespec/SYFILE:keyword FUNCTION Requests LINK to output a symbol file to the given filespec, and sets the /SYMSEG:DEFAULT switch. If you previously specified /NOSYM, the /SYFILE switch has no effect. The symbol file contains global symbols sorted for DDT. If you used the /LOCALS switch, it also contains local symbols, module names, and module lengths. The permitted keywords and their meanings are: EXAMPLES ALGOL Requests symbols in ALGOL's format. The first word of the table is "XWD 1044, count." The remaining words are copied out of Type 1044 REL blocks. If an ALGOL main program has been loaded, then /SYFILE:ALGOL becomes the default. RADIX50 Requests symbols in Radix-50 format. The first word of the table is negative. Each symbol requires two words in the table: the first is the symbol name in Radix-50 format; the second is the symbol value. TRIPLET Requests symbols in triplet format. The first word of the table is zero. Each symbol requires three words in the table: the first word contains flags; the second is the symbol name in SIXBIT; the third is the symbol value. I *SYMBOL/SYFILE ~ * Creates a symbol file called SYMBOL with Radix-50 format. OPTIONAL NOTATIONS the symbols in I If you omit the keyword, RADIX50 is assumed. 3-69 April 1986 USING LINK DIRECTLY /SYMSEG FORMAT /SYMSEG:keyword FUNCTION Places the symbol table so that it will not be overwritten during execution or debugging. Keywords and their meanings are: , EXAMPLES DEFAULT Places the symbol table in the low segment, except for overlaid programs. For overlays, symbols are not loaded. HIGH Places the segment. LOW Places the symbol table in the low segment. NONE Prevents loading of the symbol table. PSECT:name Places the symbol table at the end of the PSECT (after allocating any space required by the /PATCHSIZE switch). symbol table in the high */SYMSEG: LOW C§) * Places the symbol table in the program low segment. RELATED SWITCHES /LOCALS, /NOLOCALS 3-70 April 1986 USING LINK DIRECTLY /SYSLIB FORMAT /SYSLIB:keyword FUNCTION Forces searching of one or more system libraries, immediately after you end the command line. LINK will also automatically search a system library if code from the corresponding compiler has been loaded. By default, LINK searches the system libraries that are appropriate for the language compiler, after all the modules of the program are loaded. /SYSLIB forces the search to take place immediately. After you specify a library with /SYSLIB, the library you specified will be searched every time you load a module, until you use /NOSYSLIB to end searching of that library. The permitted keywords and the libraries they specify are listed below. Those printed in boldface specify libraries supported by DIGITAL. ANY ALGOL BCP COBOL F40 FORTRAN NELIAC PASCAL SAIL SIMULA EXAMPLES Forces search of all system libraries. Forces search of ALGLIB. Forces search of BCPLIB. Forces search of LIBOL or C74LIB. Forces search of LIB40. Forces search of FORLIB. Forces search of LIBNEL. Forces search of PASLIB. Forces search of SAILIB. Prevents search of SIMLIB. *TESTI/SYSLIB:ALGOL~ *TEST2/NOSYSLIB:ALGOL * Where TESTI is a FORTRAN module, LINK will search both FORLIB and ALGLIB for TESTI. Where TEST2 is a FORTRAN module, LINK will search only FORLIB when TEST2 is loaded. OPTIONAL NOTATIONS You can omit the keyword. LINK will search all libraries for which corresponding code has been loaded. RELATED SWITCHES /NOSYSLIB 3-71 USING LINK DIRECTLY /TEST FORMAT /TEST:keyword FUNCTION Loads the debugging program indicated by keyword. Unlike the /DEBUG switch, /TEST causes execution to begin in the loaded program (not in the debugging module). This switch is useful if you expect the program to run successfully, but want the debugger available in case the program has errors. The /TEST switch turns on the /LOCALS switch for the remainder of the load. You can override this by using the /NOLOCAL switch, but the override lasts only during processing of the current command string. Local symbols for the debugging module loaded. itself are The permitted keywords and the programs they load listed below. Only those printed in boldface supported by DIGITAL. I ALGDDT ALGOL COBDDT COBOL DDT FAIL FORDDT FORTRAN MACRO PASCAL PASDDT SAIL SDDT SIMDDT SIMULA I EXAMPLES never are are Loads ALGDDT. Loads ALGDDT. Loads COBDDT. Loads COBDDT. Loads DDT. Loads SDDT. Loads FORDDT. Loads FORDDT. Loads DDT. Loads PASDDT. Loads PASDDT Loads the SAIL debugger. Loads the SAIL debugger. Loads SIMDDT. Loads SIMDDT. *MYPROG/TEST: FORTRAN ~ * Loads MYPROG and FORDDT. OPTIONAL NOTATIONS If you give no keyword with /TEST, the default is either DDT or the debugging program specified by the /DDEBUG switch. RELATED SWITCHES /DDEBUG, /DEBUG 3-72 USING LINK DIRECTLY /UNDEFINED FORMAT /UNDEFINED FUNCTION Requests terminal typeout (in octal) of undefined global symbols. You can use /UNDEFINED to get a list of undefined symbols, and then define them with the /DEFINE switch. EXAMPLES * /UNDEFINED ~ [LNKUGS 2 UNDEFINED GLOBAL SYMBOLS] A 400123 IGOR 402017 */DEFINE: (A:59l,IGOR:l) ~ * Gives the decimal respectively. values 591 and OPTIONAL NOTATIONS You can abbreviate /UNDEFINE to /U. RELATED SWITCHES /DEFINE, /VALUE 1 to A and IGOR, I 3-73 USING LINK DIRECTLY /UNLOAD FORMAT device/UNLOAD FUNCTION Rewinds and unloads the specified tape device. (This switch is ignored if the current device is not a tape device.) The /UNLOAD is not performed until the current file processing is completed. EXAMPLES *MTAO: /UNLOAD ~ * Rewinds and unloads MTAO. RELATED SWITCHES /BACKSPACE, /MTAPE, /REWIND, /SKIP 3-74 USING LINK DIRECTLY /UPTO FORMAT /UPTO:addr Where addr is a 30-bit octal address upper limit to which the symbol address can be replaced by a symbol. that specifies table can grow. the The FUNCTION Sets an upper limit to which the symbol table can expand. EXAMPLE */UPTO: 550000 ~ I * Included in a FORTRAN load, this switch would override the default upper bound for the symbol table. This might be used if FOROTS begins above 550000. RELATED SWITCH LINK V6.0 /SYMSEG 3-75 April 1986 I USING LINK DIRECTLY /USERLIB FORMAT filespec/USERLIB: (keyword, ... ,keyword) FUNCTION Directs LINK to search the user library given by filespec before searching system libraries. The keyword indicates that the given library is to be searched only if code from the corresponding compiler was loaded. Keywords and their meanings are given below. Only those printed in boldface indicate compilers and libraries supported by DIGITAL. ALGOL ANY BCPL COBOL FORTRAN NELIAC PASCAL SAIL SIMULA EXAMPLES Search Always Search Search Search Search Search Search Search as an ALGOL library. search this library. as a BCPL library. as a COBOL library. as a FORTRAN library. as a NELIAC library. as a PASCAL library. as a SAIL library. as a SIMULA library. *MYFORL/USERLIB:FORTRAN ~ * Directs LINK to search the user library MYFORL (before searching FORLIB) if any FORTRAN-compiled code is loaded. I OPTIONAL NOTATIONS You can omit the parentheses if only one keyword is given. RELATED SWITCHES /NOUSERLIB, /SYSLIB 3-76 CHAPTER 4 OUTPUT FROM LINK The primary output from LINK is the executable program formed from your input modules and switches. During its processing, LINK gives errors, warnings, and informational messages. At your option, LINK can generate any of several files. 4.1 THE EXECUTABLE PROGRAM The executable program that LINK generates (called the core image) consists mostly of data and machine instructions from your object modules. In the core image, all relocatable addresses have been resolved to absolute addresses, and the values of all global references have been resolved. You have several options for loading the purpose of the load. Those options are: • program, depending on the Execute the program. To do this, include the /EXECUTE switch any place before the /GO switch. LINK will pass control to your program for execution. the program under the control of DDT. To do this, • Execute use the /DEBUG switch before the first input file specification. 4.2 • Execute the program and debug it after execution. To do this, use the /TEST and /EXECUTE switches before the first input file specification. After execution, type DDT to the system to enter the debugging program. • Save the core image as an EXE file. /SAVE switch. See Section 4.2. To do this, use OUTPUT FILES At your option, LINK can produce any of the following output files: • Saved (executable) file. • Log file. • map file. 4-1 the OUTPUT FROM LINK 4.2.1 • Symbol file. • Plotter file (see Section 5.1). • Overlay file (see Section 5.1). Executable Files The executable file, sometimes called the saved or .EXE file, is a copy of the completed core image generated by LINK. You can create an executable file by supplying the /SSAVE switch before the /GO switch when you are loading the program with direct commands to LINK. The executable file will retain the same file name as the source program, with a file extension .EXE. Alternatively, you can type the file specification, followed by /SSAVE (or /SAVE), and the executable file will be written to the file you specified. If you load the program with the system LOAD command, you may then save the executable file by typing the system SAVE command. You can run the executable file later, without running LINK, by using the system command RUN, or the two system commands GET and START. The following section describes the internal format of the executable file. See Chapter 3 for descriptions of /SAVE and /SSAVE switches. 4.2.1.1 Format of Sharable Save Files - A sharable save file is divided into two main areas: the directory area, which contains information about the structure of the file, and the data area, which contains the data of the file. The following diagram illustrates the general save file: Directory Area: I format of a sharable ==========~========~==== Directory Section 1----------------------1 1 Entry Vector Section 1 1----------------------1 1 Terminating Section ======================== Data Area: I Data Section The directory area of the sharable save file has three distinct sections: the directory section, the entry vector section, and the terminating section. The size of the directory area depends on the access characteristics of the pages in the data area of the save file. LINK V6.0 4-2 April 1986 OUTPUT FROM LINK Each of the sections in the directory area begins with a header word containing its identifier code in the left half and its length in the right half. Each section is described in the following paragraphs. The directory section is the first of the three sections and describes groups of contiguous pages that have identical access. The length of this section varies according to the number of groups that can be generated from the data portion of the save file. The more data pages that can be combined into a single group, the fewer groups required, and the smaller the directory section. The format of the directory section is as follows: 17 18 8 9 35 1======================================:================1 1 Identifier code 1776 1 1 Number of words (including this word) in directory section 1======================================================= Access bits 1 Page number in file, or 0 if group of pages is all zero 1======================================================= Repeat count Page number in the process 1======================================================= 1=======================================================1 1 Access bits Page number in the file J========================~==============================1 1 Repeat count 1 Page number in the process 1 !=========:==:=================~========================! PSECT attributes are used to set the access description of Block Type 24 in Appendix A. bits. Refer to the The directory section has one header word containing 1776 count, where count is the number of words in the directory section, including this header word. words is Word 0, .SVFPF, specifies the access flags and the page number in file. The flag bits are: the The header word is followed by word pairs. formatted as follows: Bit Symbol Meaning 0 1 SV%HIS SV%SHR SV%WRT SV%CON SV%SYM Page Page Page Page Page 2 3 4 is is is is is Each pair in high segment. sharable. writable. concealed. part of symbol table. Word I, .SVPPC, contains the repeat count in Bits 0-8, number in the process in the remaining bits. LINK V6.0 of 4-3 and the page .Apri1 1986 OUTPUT FROM LINK The repeat count is the number (minus 1) of consecutive pages in the group described by the word pair. Pages are considered to be in a group when the following three conditions are met: 1. The pages are contiguous. 2. The pages have the same access. 3. The pages are allocated but not loaded. A group of all zero pages is indicated by a file page number of 0. The word pairs are repeated for each group of space. pages in the address The entry vector section follows the directory section. It points to the first word of the entry vector, and gives the length of the vector. 17 18 35 1=============:================================~========1 1 Identifier code 1775 Number of words (including this word) in entry vector section 1=~=====================================================1 254000 1 1 1===============================~=======================1 Starting address 1==~================================~===================1 This format is the default. However, if you make special provisions in your program, the format becomes the following. (Refer to the description of Block Type 7 in Appendix A for further information.) 17 18 35 1=======================================================1 1 1 Identifier code 1775 1 Number of words (including this word) in entry vector section 1 1 1=======================================================1 Number of words in entry vector 1=======================================================1 1 Address of entry vector 1 1==~====================================================1 The data for this section is the address of the entry vector. The terminating section, called the end section, always immediately precedes the data section. The format of the terminating section is the following: 1=======================================================1 1 1 Identifier code 1777 1 1 1 1=======================================================1 The data area follows the terminating section, beginning at page boundary. the LINK V6.0 April 1986 4-4 next OUTPUT FROM LINK 4.2.2 LOG Files A LOG file is generated if you use the /LOG switch. LINK then writes most of its messages into the specified file. You can control the kinds of messages entered in the LOG file by using the /LOGLEVEL switch. For an example of a LOG file, see Section 5.1. 4.2.3 Map files The map file is generated if you use the /MAP switch. LINK constructs a symbol map in this file. The kinds of symbols included depends on your use of the /CONTENTS, /LOCALS, /NOLOCALS, /NOINITIAL, and /NOSYMBOLS switches. For an example of a map file, see Section 5.1. For a list of /MAP options, refer to Section 3.2.2. 4.2.4 Symbol Files The symbol file (or SYM file) is generated if you use the /SYFILE switch. This file contains all global symbols, module names, and module lengths, and, if you used the /LOCALS switch, all local symbols. 4.3 SYMBOL TABLE VECTOR A symbol table vector is a pointer to the symbol tables of a program. There is one symbol table vector, and an undefined and defined symbol table per program. When an extended symbol table is used, the contents of .JBUSY in JOBDAT are zeroed, and the address of the symbol table vector is loaded into .JBSYM. The symbol table vector contains two pointers: one to defined RADIX-50 symbols, the other to undefined RADIX-50 symbols. The symbol table vector contains subtables that point to each symbol table and give their length and type. Each subtable is three words long, although only the first two words are currently used. The format of a symbol table vector is illustrated below. LINK V6.0 4-5 April 1986 OUTPUT FROM LINK 35 516 ==:~=============================== Symbol Table Vector 1 Sub- 1 Tablel n 1 1 Vector Length Words Type Symbol table length 1 ----------------------------------Symbol table pointer I Reserved for DIGITAL, must be 0 1 Sub- -Tablel n in Type I I table length I Symbol 1 1 1 1 Symbol table pointer I Reserved for DIGITAL, must be 0 I ========:===:======~:============== Symbol Table Word Symbol Meaning .SYSTL Defines the length in words vector including this word. .SYTYP First subtable word, fields: SY.TYP of the symbol table containing the following two is a 6-bit field that contains table type. the symbol The types are: Code Name Type 1 .SYRD5 .SYR5U Radix-50 Radix-50 Reserved Reserved 2 3-37 40-77 SY.LEN 1 • SYADR defined symbols undefined symbols for DIGITAL for customers is a 30-bit field that contains the length in words of the particular symbol table. Lowest word in the table • If bit 0 is 1, this word contains a section-local address. If bit 0 is 0, this word contains a global address. A section-local address is an 18-bit address. A global address is a 30-bit address. The Reserved word must be zero. LINK V6.0 4-6 April 1986 OUTPUT FROM LINK 4.4 MESSAGES During its processing, LINK issues messages about what it is doing, and about errors or possible errors it finds. LINK also responds to query switches such as /COUNTER, /ENTRY, /MISSING, /REQUEST, and /UNDEFINED. Each LINK message has an assigned level and an assigned severity. (See Appendix B for the level and severity of each message.) The level of a message determines whether it will be output to your terminal, the log file, or both. You can control this output by uSlng the /ERRORLEVEL switch for the terminal and the /LOGLEVEL switch for the log file. LINK's defaults are /ERRORLEVEL:10 and /LOGLEVEL:10. Responses to query switches and messages that require you to do something immediately are never output to the LOG file. For example, if you use the /UNDEFINE switch, LINK responds with the LNKUGS message; this message is output to the terminal but not to the log file. The severity of a message determines whether LINK considers the message fatal (that is, whether the job is terminated). You can set the fatal severity with the /SEVERITY switch. The default severities are 24 for interactive jobs and 16 for batch jobs. For both terminal messages and log file entries, LINK can issue short, medium, or long messages, depending on your use of the /VERBOSITY switch. For /VERBOSITY:SHORT, LINK gives only a 6-letter code; for /VERBOSITY:MEDIUM, LINK gives the code and a medium-length message; for /VERBOSITY:LONG, LINK gives the code, a medium-length message, and a long message. Appendix B gives each 6-letter message code, long messages, and its level and severity. 4-7 its medium-length and April 1986 CHAPTER 5 OVERLAYS If your loaded program is too large to execute in one piece, you may be able to define an overlay structure for it. This permits the system to execute the program with only some parts at a time in your virtual address space. The overlay handler removes and reads in parts of the program, according to the overlay structure. NOTE You only need an overlay structure if your program is too large for your virtual address space. If the program can fit in your virtual space, you should not define an overlay structure for it; the monitor's page swapping facility is faster than overlay execution. 5.1 OVERLAY STRUCTURES An overlay program has a tree structure. (The tree is usually pictured upside down.) The tree is made up of links, each containing one or more program modules. These links are connected by paths. Using LINK switches, you define each link and each path. At the top of the (upside down) tree is the root link, which must contain the main program. First-level links are below the root link; each first-level link is connected to the root link by one path. Second-level links are below the first-level links, and each is connected by a path to exactly one first-level link. A link at level n is connected by a path to exactly one link at level n-l. Notice that a link can have more than one downward path (to links), but only one upward path (to predecessor links). successor Figure 5-1 shows a diagram of an overlay structure with 5 links. root link is TEST; the first-level links are LEFT and RIGHT; second-level links are LEFTl and LEFT2. 5-1 The the OVERLAYS Figure 5-1 Example of an Overlay Structure Defining an overlay structure allows your program to execute in a smaller space. This is because the code in a given link is allowed to make reference to memory only in links along a direct upward or downward path. In the structure in Figure 5-1, the link LEFT can reference memory in itself, in the root link (TEST), or in its successor links LEFTI and LEFT2. More generally, a link can reference memory in any link that is vertically connected to it. Referencing memory in any other link is not allowed. For example, path from LEFTI to LEFT2 is not a direct upward or downward path. a Because of this restriction on memory references, only one complete vertical path (at most) is required in the virtual address space at anyone time. The remaining links can be stored on disk while they are not needed. 5.1.1 Defining Overlay Structures LINK has a family of overlay-related switches. These switches are described in detail in Section 3.2.2. The following example shows command strings for defining the overlay diagrammed in Figure 5-1. (Some of the command lines in this example are indented for clarity.) I *TEST/LOG/LOGLEVEL:2 */ERRORLEVEL:5 *TEST/OVERLAY *TEST/MAP *LPT:TEST/PLOT *OVLO,OVLl/LINK:TEST * /NODE:TEST QVL2/LINK:LEFT * /NODE:LEFT OVL5/LINK:LEFTI * /NODE:LEFT OVL6/LINK:LEFT2 * /NODE:TEST OVL3,OVL4/LINK:RIGHT *TEXT/SSAVE */EXECUTE/GO 5-2 :Define TEST. LOG :Important messages iDefine TEST.OVL :Define TEST.MAP :Request diagram iRoot link :Left branch :Left-left branch :Left-right branch :Right branch :Define TEST.EXE OVERLAYS The first command string above defines the log file for the overlay. TEST/LOG specifies that the file is named TEST.LOG. The /LOGLEVEL:2 switch directs that messages of level 2 and above be entered in the log file. In the second command string, the /ERRORLEVEL:5 switch directs that messages of level 5 and above be typed out on the terminal. The third command string, TEST/OVERLAY, tells LINK that an overlay structure is to be defined, and that the file fo~ the overlay is to be TESTOVL. The fourth command string, TEST/MAP, defines the file TEST.MAP, will contain symbol maps for each link. which The next command string, LPT:TEST/PLOT, directs that a tree diagram of the overlay links be printed on the line printer. The next command string, OVLO,OVLl/LINK:TEST, loads the files OVLO.REL and OVLl.REL into the root link. The /LINK:TEST switch tells LINK that no more modules are to be in the root link, and that the link name is TEST. Each of the next four lines defines one link form: with a string of the /NODE:linkname filename/LINK:linkname The /NODE:linkname switch specifies the previously defined link to which the present link is an immediate successor. The filenames/LINK:linkname part of the line names the files containing modules to be included in the current link and specifies the name of the link. The first of these four lines begins with /NODE:TEST, which tells LINK that the link being defined is to be an immediate successor to TEST, the root link. Then (on the same line), the string OVL2/LINK:LEFT loads the file OVL2.REL, ends the link, and names it LEFT. The next line, /NODE:LEFT OVL5/LINK:LEFTl, defines a link named LEFTI containing the file OVL5.REL, and this link is an immediate successor to the link LEFT. The next line, /NODE:LEFT OVL6/LINK:LEFT2, defines another immediate successor to LEFT, this time containing the file OVL6.REL and called LEFT2. The last link is defined in the next line, /NODE:TEST This string defines the link RIGHT, which is an OVL3,OVL4/LINK:RIGHT. immediate successor to TEST and contains the files OVL3.REL and OVL4.REL. The next-to-last line, TEST/SSAVE, directs LINK to create the saved file TEST.EXE. The last line, /EXECUTE/GO, specifies that the loaded program is to be executed, and that all commands to LINK are completed. The process also produced an executable file TEST.EXE, which can be run using the RUN system command. However, to run the program, the file TEST.OVL must be present, because it provides the code for the links. 5-3 I OVERLAYS An Overlay Example 5.1.2 The following pages show terminal listings with the example above. These pages are: I of the files associated 1. Terminal copy overlay. 2. Terminal copy of the compilation of the source files. 3. Terminal copy of the interactive use of LINK execute the overlay. to 4. The file TEST. LOG generated by LINK, messages issued during the load. shows the log 5. The file TEST. MAP generated by LINK, which shows symbol for the overlay. maps 6. The tree diagram requested by the LPT:/PLOT switch. of the FORTRAN 5-4 source used files which in the define and OVERLAYS • tl'pe oldO. fa r TYPE 1 FoRMAT('l','Execution begins in (,lain program ol.llO') TYPE 11 11 FoRMAT(P(,'ol,110 calls ol.ll2A') CAll ol,ll2A TYPE 2 FoRMAT(fU{,'Return to ol,llO') TYPE 21 21 FoRMAT(lX,'o~110 calls ol.llll') CAll ol,llll TYPE 2 TYPE 3 FoRMAT(/l){,'Execution ends in (,lain progra(,l ol,llO'//) STOP END .tl'pe ol.rll.for SUB ROUT I NE ol,lLl TYPE 1 FoRMAT(/lX,' CAll ol,ll3 TYPE 2 FoRMAT(/lX,' 2 RETURN END .t}'pe Return to ol;ll') o~)12ffor SUBROUTINE oVl2A TYPE 1 oVl2A c all s ol,llS') FoRMAT(/lX,' CAll ol,llS TYPE 2 FORMAT ( / P( , ' Return to ol,ll2A') TYPE 3 ol.ll2A calls mllG') FORMAT ( P(, ' CAll ol.llG TYPE 2 RETURN END SUBROUTINE oVl2B TYPE 1 ol,ll2B doesn't call anl'thing') FORMAT ( /1 X, ' RETURN END 3 . t}' pe f ol,lll call s ol.ll3') t}' pe ov13.for SUBROUTINE m l l3 TYPE 1 FoRMAT(flX, ' RETURN END ovlll.for SUBROUTINE ol,llll TYPE 1 FoRMAT(/lX,' CAll oVll TYPE 2 FOrmAT ( / 1 X, ' RETURN END ol,ll3 doesn't call anything') oVlll calls ol;ll') Return to ol,llll') .type ovlS.for SUBROUTINE o~llS TYPE 1 FoRMAT(/lX,' RETURN END .type 01,11 G. for SUBROUTINE ol;lG TYPE 1 FoRMAT(/lX,' CAll ol.ll2B TYPE 2 FoRMAT( / 1){,' RETURN END o~llS o~llG doesn't call anything') call s oVl2B') Return to oVlG') 5-5 OVERLAYS • COM PILE ol)lO ,ol.ll I ,ol.ll 2 ,ol/l3 ,ol.IU! ,ol.ll5 ,ol.llG FORTRAN: ol)lO oi/lt) FORTRAN: DilL. I ol/li FORTRAN: ol/l2 ol/l2A oVl2B FORTRAN: oVl3 ol/l3 FORTRAN: OVU! ol.lla FORTRAN: ol/l5 ol.ll5 FORTRAN: ol/lG oVlG • R lINK *TEST/loG/loGlEVEl:5 */ERRoRlEVEl:5/NoINITIAl *TEST lol.IERlAY *TEST/MAP *oSK:TEST/PLoT/PLTTYP:PRINTER *oVLO,oVLI/LINK:TEST [LNKLMN Loading IIlodule ol,lLO frOM file oSK:oI)LO.REL[10,3551 ,LINK5A]] [LNKLMN Loading Module ol/Ll frolll file oSK:oI.IL1.REL[It),3551 ,LINK5A]] [LNKLMN Loading Module ol.IRLAY fro~1 file SYS:oI.IRLAY.REL[1 ,5]] [LNKLMN Loading ModlJle JoBoAT from file SYS:JoBoAT.REL[1 ,a]] [LNKLMN Loading Module FoRINI from file SYS:FoRLIB.REL[l ,5]] [LNKLMN Loading Module FoRDST frolll file SYS:FoRLIB.REL.[1 ,5]] [LNKLMN Loading Module FoRPSE from file SYS:FoRLIB.REL[l ,5]] [LNKELN End of link n'-tiliber naille TEST] */NooE:TEST oI,lL2/LINK:LEFT [LNKLMN Loading Module ol/L2A frolll file oSK:oI/L2.REL[10,3551 ,LINK5A]] [LNKLMN LoadilH Itlodule ol/L2B froln file DSK:oI/L2.REL[10,3551 ,LINK5A]] [LNKELN End of I inK nU~lbe r 1 naMe LEFT] */NoDE:LEFT oI,lL5/LINK:LEFT1 [LNKLMN Loading ~lodule DI,IL5 from file DSK:OI.ll5.REUIO,3551 ,LINK5A]] [LNKELN End of I inK numbe r 2 name LEFT1] */NOoE:LEFT OI,lLG ILINK:LEFT2 [LNKLMN Loading Module OI.ILG from file DSK:OI.ILG.REL[IO,3551 ,LINK5A]] [LNKELN End of linf( nUltlber 3 naille LEFT2] */NODE:TEST OI,lL3,OI,lLa/LINK:RIGHT [LNKLMN Loading Module OI)L3 from file DSK:OI.IL3.REL[10,3551 ,LINK5A]] [LNKLMN Loading ~Iodule OI,lLa from file DSK:OI)La.REL[10,3551 ,lINK5A]] [LNKELN End of linf( nUlllber naMe RIGHT] *TEST ISSAt.JE */EXECUTE/GO [LNKXCT OI,lLO execution] ° a Execution begins in main prograM OI.ILO Qt.ILO CALLS Ol/L2A OI.IL2A CALLS Ol,lL5 ol)L5 DOESN'T CALL AN'lTH I NG RETURN TO OI.IL2A ol.IL2A CALLS ol.ILG ol.JL.G CALLS ot.I L2B ol.IL2B DOESN'T CALL AN'lTH I NG RETURN TO ol/LG RETURN TO ol.IL2A RETURN TO ol/LO ol.ILO CALLS OI,lLa OI/L.a CALLS DVL 1 ot.IL 1 CALLS ol/L3 oVL3 ~OESN'T CALL AN'lTH I NG RETURN TO oVL 1 RETURN TO ol.ILI.! RETURN TO OVL.O Execution ends in Main prograM OI/LO CPU tillie 0.32 Elapsed tiMe 0.95 EXIT 5-6 OVERLAYS ·TYPE TEST.LOG 12: 55: 15 6 12: 55: 15 6 12: 55: 16 6 6 12: 55: 16 12: 55: 16 6 6 12: 55: 16 6 12: 55: 16 7 12: 55: 19 LMN LMN LMN LMN LMN LMN LMN ELN Loadin!ll~odule OI.lLO from file DSK:OI,JLO.REL[10,3551 ,LINK5A] Loadin91l10dule OVLl frolll file DSK:OI,JL1.REL[10,3551,LINK5A] Loading module OI,JRLAY frOll1 file SYS:OI,JRLAY.REL[1 ,5] Loadin!lmo,hlle JOBDAT frol,1 file SYS:JOBDAT.REL[1 ,1I] Loading 1,lodule FORINI frolll file SYS:FORLIB.REL[I.5] Loadin!llllodule FORDST frol,1 file SYS:FORLIB.REL[1 ,5] Loadin!llllodule FORPSE frol,1 file SYS:FORLIB.REL[1 ,5] End of 1 inf( nUI,lbe r 0 nal,le TEST 12: 55: 19 12: 55: 19 12:55:20 6 6 7 LMN LMN ELN Loading 1,lodule Ol,lL2A frolll file OSK:OI,JL2.REL[10,3551 ,LINK5A] Loadin!llllod'Jle Ol,JL2B frolll file DSK:Ql,JL2.REL[!0,3551 ,LINK5A] End of linK nUI,lbe r 1 nallle LEFT 12:55:20 12:55:20 6 7 LMN ELN Loadin!ll'lodule OVL5 frolll file DSK:OVL5.REL[10,3551 ,LINK5A] End of 1 inf( IHllllbe r 2 nallle LEFTI 12:55:20 12:55:20 LMN ELN Loadin!llllodule OVL6 from file DSK:OI,IL6.REL[10,3551,LINK5A] End of linK IHllllber 3 nal,le LEFT2 12:55:21 12:55:21 12:55:21 LMN LMN ELN Loadin!llllodule Ol,IL3 from file DSK:OI,lL3.REL[10,3551.LINK5A] Loading mod'Jle Ol,lLlI from file DSK:OI,JLlI.REL[10,3551.LINK5A] End of linK numbe r 1I nal,le RIGHT • TYPE TEST. MAP page TEST IKLlKS LINK symbol map of Produced b}' LINK 'Jersion 5A(2030) on 17-Dec-82 at 12:55:23 TEST Overla}' no. 0 Overla}' is absolute o ends at 100211 len!lth 10025 = 9P LO'N se!llllent starts at 7763. len!lth 32 (octal). 26. (decilllal) Control Blocf( address is 1I91 '.'0 rds free in La'•• se!ll,lent 95 Global s}'I,lbols loaded. therefore 1,lin. hash size is 106 Start address is 235. located in pro!lral,1 OVLO ************* OI.lLO frOll1 DSK:OI,JLO.REL[10.3551.LINK5A Lo',' segment starts at 1110 ends at High segment starts at 235 ends at MAIN. Global 235 created b}' FORTRAN IKL/KS on 1I-Nov-82 at 15 00:00 2311 len!lth 75 (octal). 61. (dec l'lal) 3115 length 111 (octal>. 73. (dec 1,lal> 235 Entry Relocatable OVLO Relocatable ************* OI,ILI frOll1 DSK:OI,JL1.REL[10.3551.LINK5A] LO'N segment starts at 3116 ends at High seSlllent starts at 1I00 ends at OVL1 1I01 Entfl' created by FORTRAN IKL/KS on 1I-No.,'-82 at 111:1I7:00 377len!lth 32 (octal>. 26. (decimal) 1I112 len!lth 1I3 (octal). 35. (decimal) FORon, Relocatable 500010 Global Absolute ************* OVRLAY from SYS: OI.lRLAY. REU 1 .5] LO'N segment starts at High se'glllent starts at CLROI) • INIOI,J. REMOI,J. SAVOV. .OVRLA .OVRLU 2712 2570 26211 2665 5224 35111 2-Au!l-82 9: 18: 00 created b}' MACRO on 1001l (0 c tal) • 6226 1 en !It h 5223 ends at (0 c tal) , 1I11115 5107 1 en !It h ends at 1I113 En trY En trY Entry En trY Entry En t fl' GETOI,J. LOGOI) • RUNOV. 'X,OVRLA .OI,JRLO .OVRWA Relocatable Relocatable Relocatable Relocatable Relocatable Relocatable 2610 Ent ry Relocatable 2731 Entry Relocatable 26112 Entry Relocatable Suppressed 501000201l Global Absolute 5302 Global Relocatable 5301 Global Relocatable ************* JOBDAT from SYS:JOBDAT.REUI ,1I] created by MACRO on 26-FEB-81 at 19:25:00 Zero length Illodule ************* 5-7 516. ( dec i ilia 1 ) 23111. (decimal> OVERLAYS FORINI created by MACRO on 15-Sep-82 at 19:45:00 1040 ( 0 c t a I) , 7476 I en !It h 6437 ends at 210 ( 0 c t a I) , 6436 I en !It h 8227 ends at from SYS:FORLI6.REUI ,5] LOIN segment starts at High segment starts at Entry Entry Entry En trY 6432 6402 6344 6362 ABORT. ALCOR. CLOSE:. DEC. LINK symbol map of Re I ocatatol e Relocatable Relocatable Relocatable ALCHN. CERPT. DBMS. DECHN. TEST IKLlKS page Relocatable Relocatable Relocatable Relocatable Relocatable Relocatable Relocatable Relocatable Relocatable Relocatable Relocatable Relocatable Relocatable ENC. E){ITI. FIND. FOROP. IF 1. IN. INQ. MTHER. NLI • OPEN. RESET. TRACE. 544. ( dec i (,I a I) 136. ( dec i ma I) 6406 6437 6416 6410 Entry Global En t fl' En trY Relocatable Relocatable Relocatable Relocatable 6360 6346 6376 8422 6424 6350 6420 6430 6364 6342 6227 6412 En t fl' En t fl' En trY Entry En t fl' Entry Entfl' Entry Entry En trY En t fl' Entry Relocatable Relocatable Relocatable Relocatable Relocatable Relocatable Relocatable Relocatable Relocatable Relocatable Relocatable Relocatable FORINI En t fl' Entry En trY Entry En trY En trY En trY Entry Entry En trY En t fl' En t rl' Entry 6404 6400 6372 6340 6414 6426 6336 6370 6374 6366 6352 6354 6356 DECDR. E}{IT f FIN. FORER. FUNCT. IFO. INIT • IOLST. MTOP. NLO. OUT. RTB. WT6. ************* FORDST created by MACRO on 15-Sep-82 at 19:45:00 7477 I en !It h 1 ( 0 eta I) , 7477 ends at from SYS:FORLI6.REL[1 ,5] High se!lment s t~a r t s at DBSTP$ Entry 7477 1. ( dec i (,I a I) Relocatable ******** *.~*** FORPSE fro~l SYS:FORLIB.REL[1 ,5] LOIN segment starts at High segment starts at 7501 PAUS. created by MACRO on 15-Sep-82 at 19:45:00 7702 ends at 7762len!lth 61 (octal), 49. (decimal) 7500 ends at 7701lenHh 202 (octal), 130. (deci(,lal) Ent fI' STDP. Relocatable 7504 EntrY Relocatable ************* Index to LINK symbol map ofoff'X,e Name Pol !Ie Pa!le Name FORPSE JOBDAT FORDST FORINI LINK SY~lbol Name Pol !Ie Name Pol !Ie OIJRLAY OIJLO Ql.ILI map of page 3 TEST IKLlKS pa!le 4 TEST IKLlKS name LEFT Overlay no. Overlay is absolute 14262len!lth 236 = 1P 14025 ends at Low se!lment starts at 30 (octal), 24. (deci(,lal) Control BlocK address is 14221, len9'th Path is 0 333 INords free in Low se!lment 6 Global symbols loaded, therefore min. hash size is 7 ************* OlJL2A from DSK:OIJL2.REU10.3551 ,LINK5A] Low segment starts at 14025 ends at 14077 ends at High segment starts at OIJL2A 14100 Entry created by FORTRAN IKL/KS on 4-NoIJ-82 at 14:47:00 14076len!lth 52 (octal), 42. (deci(tlal) 14173len!lth 75 (octal), 61. (deci~lal) Relocatable ************* OIJL2B from DSK: OIJL2. REU 10,3551 ,LINK5A] Low se!lment starts at 14174 ends at 14207 ends at Hi!lh segment starts at OIJL26 14210 Entry created by FORTRAN IKL/KS on 4-NoIJ-82 at 14 47:00 14206lenHh 13 (octal), 11. (dec mal) 14220 length I 12 (octal) , 10. (dec mal) Relocatable ************* 5-8 OVERLAYS LINK S}'hlbol map of TEST IKLlKS olJerla}' no. name LEFTI overla}' is absolute Low segment starts at 111263 ends at 1113116 length 611 = 1P Control Block address is 111137, lenHh 20 (octal), 16. (decimal> PathisOol 281 war d s f r e e in Low s e gm e n t 3 Global s}'mbols loaded, therefore min. hash size is 1I ************* oVLS from oSK:oVLS.REU10,3SSI ,LINKSAJ Low segment starts at 111263 ends at High segment starts at 111277 ends at oVLS 111300 Ent r)' created b}' FORTRAN IKL/KS on 1I-NoIJ-82 at 111:1I7:00 111276 length III (octal). 12. (decimal> 111316 length 20 (octal). 16. (decimal) Relocatable ************* LINK symbol map of pa ge 6 113 TEST IKLlKS Overlay no. 3 name LEFT2 olJerlal' is absolute Low segment starts at 111263 ends at 11111117 length 16S = lP Control Block address is 1111120. len!lth 20 (octal). 16. (decimal) PathisOol 216 '.10 rds free in Low segment 1I Global sl'mbols loaded. therefore min. hash size is S ************* oVL6 from oSK:oVL6.REU10.3SSI ,LINKSAJ Low segment starts at 111263 ends at High segment starts at 111332 ends at 0~JL6 111333 En trY created by FORTRAN IKL/KS on 1I-Nov-82 at 111:1I7:00 111331 length 1I7 (octal). 39. (decimal> 1111117 length 66 (octal). SlI. (decimal> Relocatable ************* LINK symbol map of TEST IKLlKS Overlay no. 1I name RIGHT o'!erlaY is absolute Low segment starts at 111025 ends at 111207 length 163 = IP Control Block address is 22 (octal>. 16. (decimal) 111156. len!lth Path is 0 376 wo rds free in Low se gment 5 Global symbols loaded. therefore hiln. hash size is 6 ************* oVL3 from oSK :0l.lL3. REU 10 .3551 .LINK5AJ Low segment starts at 111025 ends at High segment starts at 1110111 ends at 0l.lL3 lL101l2 Entry created by FORTRAN IKL/KS on 1I-Nov-82 at 11l:L17:00 1110110 len!lth III (octal>, 12. (decimal> lL1060 length 20 (octal). 16. (decimal) Relocatable ************* ol.lLLI from oSK:0l.lLLI.REU10.3551 .LINK5AJ created by FORTRAN IKL/KS on L1-Nov-82 at ILl:L17:00 Low segment starts at ILl061 ends at 111112 len!lth 32 (octal). 26. (decimal) High segment starts at lL1113 ends at lL1155 len!lth L13 (octal>. 35. (decimal> oVLLI ILlllL1 Entry Relocatable ************* page 8 Index to overlay number of TEXT IKL/KS Overlay Pa!le Over I a}' Page Overlay Page o'Jerlay Page 110 111 112 113 6 IILI 7 Page Name Page 3 LI 5 Index to overlay names of TEST Name LEFT LEFTI Pa !Ie Name Page Name LEFT2 6 RIGHT [End of LINK map of TEST TEST] 5-9 OVERLAYS The listing file TEST.OVL will look similar to the following: o TEST 4 RIGHT 3 LEFT2 MR-S-2596-83 5.2 WRITABLE OVERLAYS Ordinarily each overlay link built by LINK is copied by the overlay handler from the OVL file to the address space at runtime. The contents of any locations that have been modified will be lost each time the overlay link is copied from the OVL file. This can be prevented by the use of writable overlays. If a link is specified as writable, the overlay handler copies that link to a temporary file on disk before overwriting it. Later, when the copied link is needed, the overlay handler retrieves the link from the temporary file rather than the OVL file. In this way, any modified values are preserved. Because writable overlays involve more file I/O, they are slower than the default (nonwritable) overlays and should only be used when the program structure and storage requirements demand dynamic storage in overlay links. I To specify that an overlay is writable, use the FORTRAN SAVE statement in the program, and specify /OVERLAY:WRITABLE when loading the program with LINK. 5.2.1 Writable Overlay Syntax To build a writable overlay, specify the keyword /OVERLAY switch in the LINK command line: WRITABLE with the filespec/OVERLAY:WRITABLE 5.2.2 Writable Overlay Error Messages The overlay handler must write and update a temporary file. In addition to the error messages associated with all overlays, there are two additional error messages for writable overlays: ? OVLCWF Cannot write file [filename]: [reason] ? OVLCUF Cannot update file [filename]: [reason] If either of these messages appears, you should check for disk quota violations or other conditions that could prevent the overlay handler from writing a temporary file. 5-10 January 1985 OVERLAYS 5.3 RELOCATABLE OVERLAYS LINK ordinarily allocates 2000 extra words at the end of the root link and no extra space at the end of each subsequent link. This is adequate for programs with static storage requirements. If a link requires extra storage at run-time, you can use the /SPACE switch to make the necessary allowances for the program's requirements. The /SPACE switch allows you to specify the number of words to be allocated after the current link is loaded. However, there are programs whose dynamic run-time storage requirements are unpredictable. For example, a program's run-time storage requirements may vary according to the program's input. For this class of programs, relocatable overlays can be useful. For relocatable overlays LINK places extra relocation information in the OVL file, permitting overlay links to be relocated at runtime. The overlay handler, using the FUNCT. subroutine, can determine where the link will fit in the address space and resolve relocatable addresses within the link. This extra processing causes relocatable overlays to run slower than nonrelocatable overlays. Relocatable overlays should only be used when you cannot determine the dynamic storage requirements of a program. 5.3.1 Relocatable Overlay Syntax To build a relocatable overlay, specify the RELOCATABLE keyword to the /OVERLAY switch in the LINK command line: filespec/OVERLAY:RELOCATABLE 5.3.2 Relocatable Overlay Messages If /OVERLAY: (LOGFILE,RELOCATABLE) is specified during the loading of a program, informa~ional messages of the following form are sent to the user's terminal: %OVLRLL Relocating link [linkname] at [address] 5-11 OVERLAYS 5.4 RESTRICTIONS ON OVERLAYS The following restrictions apply to all overlayed programs: • Overlayed programs cannot be run execute-only. • PSECTed programs cannot be overlayed. • Overlayed programs with large buffer requirements must use the /SPACE switch. If an %OVLMAN (Memory not available) error is encountered, the program should be reloaded using the /SPACE switch with each link. • If the program uses more than 256 links, use the /MAXNODE switch to specify the number of links necessary for the program. LINK will allocate extra space in the the OVL file for tables that require it, based on the number of links you specify. 5.4.1 Restrictions on Absolute Overlays The following restrictions apply to absolute overlaid programs: 1. Any intermediate results stored in non-root links are lost as soon as the links are overlaid. Do not expect to retain a value stored in a non-root link unless /OVERLAY:WRITABLE has been specified. 2. Certain forms of global, inter-overlay references are not recommended because you cannot be sure that the necessary modules will be in memory at the right time. Some of these references are: • Additive fixups, in the form FOO##+BAR where another overlay. FOO is • Left-hand fixups, in the form XWD FOO##,BAR, where FOO is in another overlay. • Fullword fixups, in the form EXP FOO##, where FOO another overlay. • Similarly, MOVEI 1,FOO##, where FOO is in a different overlay, should not be used, because the necessary module may not be in memory. is in in In fact, the only predictable inter-overlay global reference is one that brings the necessary module into memory, such as PUSHJ P,FOO##. 5-12 OVERLAYS 5.4.2 Restrictions on Relocatable Overlays The following restriction applies to relocatable overlays: • Complex expressions involving relocatable symbols are not relocated properly in a relocatable overlay. No standard DEC compiler produces such expressions. MACRO programmers should avoid using them in subroutines that are to be loaded as part of an overlayed program. Any expression that causes MACRO to generate a Polish fixup block will not be properly relocated at runtime. The following are examples of such complex expressions: such a complex expression: MOVEI 1,A## + B## + C## A, ,0 5.4.3 Restrictions on FORTRAN Overlays The following restriction applies to FORTRAN programs that are written with associate variables and using the overlay facility. • If the associate variable is declared in a subroutine, that subroutine must be loaded in the root link of the overlay structure. Accessing a file opened with an associate variable changes the value of the specified variablE~. If this variable is in a nonresident overlay link when the access is made, program execution will produce unpredictable results. Moreover, the value of the variable will be reset to zero each time its overlay link is removed from memory. Only variables declared in routines that are loaded into the root link will always be resident. However, variables declared in COMMON and in the root link will always be resident, and may be safely used as associate variables. • If you place COMMON in a writable overlay, be sure that all references to the variables in that COMMON are in the same overlay or its successors. • A FORTRAN ASSIGN statement may be used in a relocatable overlay. If the ASSIGN is made in a subroutine, the value of the assigned variable may be preserved from one call of that subroutine to the next. However, the overlay containing that subroutine could then be replaced in memory by a different overlay. If the overlay containing the subroutine is relocated differently when brought back into memory, any subsequent GOTO may fail. 5-13 OVERLAYS 5.5 SIZE OF OVERLAY PROGRAMS Although most programs have a consistent size, the size of an overlay program depends on which overlays are in memory. This can be ascertained by using the /COUNTER switch when linking the program. To do this, place /COUNTER after the /LINK switch for the overlay of which you want to know the size, but before the next /NODE switch. This will give you the size of the program when the overlay is actually loaded into memory. The display will include all routines loaded from the runtime libraries. This allows you to determine which overlay is the largest, and whether the program can be loaded without restructuring. 5.6 DEBUGGING OVERLAYED PROGRAMS COBDDT and ALGDDT can be used to debug overlay programs, but FORDDT cannot. To use DDT with an overlaid program, the program should be loaded using /SYMSEG:LOW, with local symbols for the desired modules. To set breakpoints in an overlay, put a subroutine in the root node, and call the subroutine from the overlay. Such a subroutine need consist only of a SUBROUTINE statement, a RETURN, and an END. The breakpoint can be set at this subroutine before the program starts running. When a FORTRAN program starts running, it calls RESET. in FOROTS, which removes the symbol table. The symbol table will return after the first overlay is called. If you need the symbols for debugging the root link, insert a CALL INIOVL at the beginning of the main program (refer to Section 5.7.1 for more information). This call will reinstall the symbol table. LINK builds a separate symbol table for each overlay, so that all the symbols known to DDT are for modules that are currently in memory. Note that it is not possible to single-step through RESET. ($X and $$X will not work). Set a breakpoint after RESET. if you are debugging a root link, and use $G. 5.7 THE OVERLAY HANDLER LINK's overlay handler is the program that supervises overlay structures defined by LINK switches. execution of When you load an overlay structure, the overlay handler is loaded into the root link of the structure. From there it can supervise overlaying operations, because the root link is always in your virtual address space during execution. During execution, when a link not in memory is called, the overlay handler brings in the link, possibly overlaying one or more links already in memory. 5-14 OVERLAYS The overlay handler consists of self-modifying code and data, and two 128-word buffers. One of these buffers, IDXBFR, contains a 128-word section of the link number index table. This allows 256 links to be directly referenGed at anyone time. The second buffer, INBFR, contains the preambles and relocation tables, if required, of the individual links. There are two ways of overlaying links during execution: 5.7.1 1. A call to a link not in memory implicitly calls the overlay handler to overlay one or more links with the required links. This action of the overlay handler is transparent to the user. 2. An explicit call to one of several entry points in the overlay handler can cause one or more links to be overlaid. These entry points and calls to them are discussed in the sections below. Calls to the Overlay Handler Overlays can be used transparently, or they can be explicitly called from the program. Such calls are made to one of the entry points in the overlay handler. The overlay handler has five entry points that are available for calls from user programs. To call the overlay handler from a MACRO program, you must use the standard calling sequence, which is: MOVEI PUSHJ I I 16,arglst 17,entry-name Where arglst is the address of the first argument list, and entry-name is the entry-point name. in the argument The argument list must be of the form: -n, ,0 arglst: Z code,addrl in is number of arguments iFor first argument Z code,addrn iFor nth argument Where addr •.. is the address of the argument. The legal values of "code" are 2 (for a link number), 17 (for an ASCIZ string), and 15 (for a character string descriptor). For each word of the argument list, the code indicates the type of argument. The code occupies the AC field, bits 9 through 1:2. The address gives the location of the argumenti it can be indirect and indexed. To call the overlay handler from a FORTRAN program, the call of the form: must be Where subroutine is the name of the desired subroutine, and arglst a list of arguments separated by commas. is CALL subroutine (arglst) 5-15 I OVERLAYS 5.7.2 Overlay Handler Subroutines Each of the seven callable subroutines in the overlay handler has an entry name symbol for use with MACRO, and a subroutine name for use with FORTRAN, as follows: I I MACRO Entry Name Symbol FORTRAN Subroutine Subroutine Function CLROV. CLROVL Specifies a non-writable overlay. GETOV. GETOVL Brings specified links into memory. INIOV. INIOVL Specifies the file from which the overlay program will be read, if the load time specification is to be overridden. LOGOV. LOGOVL Specifies or closes the file in which runtime messages from the overlay handler will be written. REMOV. REMOVL Removes specified links from memory. RUNOV. RUNOVL Moves into memory a specified link begins execution at its start address. SAVOV. SAVOVL Specifies a writable overlay. and Declaring a Non-Writable Link (CLROV.) You can declare an overlay link to be non-writable, using the CLROV. entry point. This does not immediately affect the program, but waits until the link is about to be overlaid or read in. If the link is already non-writable, this entry point has no effect. Example MOVEI PUSHJ arglst: l6,arglst l7,CLROV. -n, , a Z l7,addrl ;n is number of arguments ;for first ASCIZ linkname Z l7,addrn ;for nth ASCIZ linkname OR arglst: -n, , a Z 2,addrl ;n is number of arguments ;for first link number Z 2,addrn ;for nth link number Where addr .•. is the address of the argument. 5-16 OVERLAYS Getting a Specific Path (GETOV.) The subroutine to bring a specific path into core can be used to make sure that a particular path is used when otherwise the overlay handler might have a choice of paths. It is illegal to specify a path that overlays the calling link. I To call the subroutine from a FORTRAN program, use: CALL GETOVL (linkname, •.. ,linkname) where each linkname is the ASCIZ name of a link in the desired path. To call the subroutine from a MACRO program, use the standard calling sequence: MOVEI PUSHJ FORTRAN 16,arglst 17,GETOV. The argument list has one word for each link required path. to be in the Example arglst: -n, ,0 Z l7,addrl ;n is number of arguments Z 17,addrn OR arglst: -n, ,0 Z 2,addrl ;n is number of arguments Z 2,addrn Where addr ••• I is the address of the argument. Initializing an Overlay (INIOV.) The overlay initializing subroutine specifies a file from which the overlay program will be read. This sdbroutine is used to override the file specified at load time. The file specified to INIOV. can have any valid specification, but it must be in the correct format for an overlay (OVL) file. To call the subroutine from a FORTRAN program, use: I CALL INIOVL ('filespec') where 'filespec' is a literal constant that can give a device, filen~me, a file type, and a project-programmer number (PPN). To call the subroutine from a MACRO program, use the standard calling sequence: MOVEI PUSHJ 16,arglst 17,INIOV. 5-17 a FORTRAN I OVERLAYS The argument list is of the form: -1, ,0 arglst: Z 17,address of ASCIZ filespec where filespec is an ASCIZ string (ASCII ending with nulls) give a device, a filename, a file type, and a PPN that can NOTE If you call INIOV. with no arguments, it initiates the overlay handler and reads in the symbols for the root link, using the 6verlay file specified at load time. This can be useful for debugging the root link before any successor links have been read in, because symbols are not normally available until the first link comes into memory. Specifying an Overlay Log File (LOGOV.) You can specify an output file for runtime messages from the overlay The log file handler. These messages are listed in Section 5.5. to the entry includes the elapsed run time since the first call overlay handler. To call this subroutine from a FORTRAN program, use: I I CALL LOGOVL ('filespec') where 'filespec' is a literal constant filename, a file type, and a PPN. that can give a device, a To close the file, use CALL LOGOVL (0) To call the subroutine from a MACRO program, use the standard calling sequence: FORTRAN 16,arglst 17,LOGOV. The argument list is of the form: -1, ,0 arglst: Z 17,address of ASCIZ filespec I Where filespec is an ASCIZ string that can give a device, a a file type, and a PPN. To close the log file, the argument list is: -1 , ,0 arglst: Z 17,address of word containing zero 5-18 filename, OVERLAYS Removing Specific Links from Memory (REMOV.) The subroutine to remove specific links from memory, once they are no longer required, can be used to reduce core image size for faster execution. Specifying removal of the calling link causes an error. I To call the subroutine from a FORTRAN program, use: CALL REMOVL (linkname, ••• ,linkname) Where each linkname is the ASCIZ name of a link memory. to be removed To call the subroutine from a MACRO program, use the standard calling sequence: MOVEI PUSHJ from FORTRAN l6,arglst l7,REMOV. The argument list has one word for each link to be removed. Example -n, ,0 arglst: ;n is number of arguments Z 17,addrl Z l7,addrn OR arglst: -n, ,0 Z 2,addl ;n is number of arguments Z 2,addrn Where addr •.. is the address of the argument. Running a Specific Link (RUNOV.) The subroutine for running a specific link allows you to transfer program execution to the start address of a particular link. (An error occurs if the link has no start address.) If the link is not already in memory, it and its path are brought in. You can use this subroutine to overlay the calling link, because the next instruction executed is the start address of the named link; therefore, there is no automatic return to the calling link. NOTE The FORTRAN compiler does not generate start addresses for subroutines. FORTRAN main programs cannot be loaded into non-root links. Therefore, to use RUNOVL to transfer control to a FORTRAN subroutine in a non-root link, you must use the /START switch at load time to define a start address for the link. 5-19 I OVERLAYS To call the subroutine RUNOVL from a FORTRAN program, use: CALL RUNOVL (linkname) Where linkname is the ASCIZ name of the link to be run. To call the subroutine from a MACRO program, use the standard calling sequence: MOVEI PUSHJ FORTRAN l6,arglst l7,RUNOV. The argument list is of the form: -1, ,0 arglst: Z l7,address of ASCIZ linkname OR -1, ,0 arglst: Z 2,address of link number Declaring A Writable Link (SAVOV.) You can dynamically declare an overlay link to be writable by calling SAVOV. This does not affect the current state of the code immediately, but waits until the link is about to be overlaid. If the link already writable, this symbol has no effect. Example MOVEr PUSHJ arglst: l6,arglst l7,SAVOV. is number of arguments -n, ,0 in Z l7,addrl ifor first ASCIZ linkname Z l7,addrn ifOr nth ASCIZ linkname OR arglist: is number of arguments ifor first link number -n, ,0 Z 2,addrl in Z 2, addrn ifOr nth link number Where addr ••. is the address of the argument. If called with no arguments, SAVOV. file. 5-20 only initializes the temporary OVERLAYS 5.7.3 Overlay Handler Messages This section lists all of the overlay handler's messages. (The messages from LINK, which have the LNK prefix, are given in Appendix B. ) For each overlay handler message, the last three letters of the six-letter code, the severity, and the text of the message are given in boldface. Then, in lightface type, comes an explanation of the message. When a message is issued, the three letters are suffixed to letters OVL, forming a 6-letter code of the form OVLxxx. explanation of the message will be printed only if you us':, /OVERLAY:LOG switch. the The the The severity of a message determines whether the job will be terminated when the message is issued. Level 31 messages terminate program execution. Level 8 messages are warnings: they do not terminate execution, but the error may affect the execution of the program. Levell messages are informational and are printed on the terminal only if you specified /OVERLAY:LOGFILE. Code Sev ARC 31 Message and Explanation Attempt to remove caller from link [name or number] The named link attempted to remove the link that called it. This error occurs when the call to the REMOV. subroutine requests removal of the calling link. ARL 8 Ambiguous request in link number using link number [number] [number] for [symbol], More than one successor link satisfies a call from a predecessor link, and none of these successors is in memory. Since all their paths are of equal length, the overlay handler has selected an arbitrary link. CCF COL 31 31 Cannot close file [file], status [octal] For some reason, the overlay handler cannot close its working files. This is a file I/O error. one of Cannot delete link [name or number], FUNCT. return [number] status This is an internal LINK error, and is not expected to occur. If it does, please notify your Software Specialist, or send a Software Performance Report (SPR) to DIGITAL. Return status is one of the following: 1 3 CFF 31 Core already deallocated Illegal argument passed to FUNCT. module Cannot find file [file] [reason] The overlay handler has attempted, unsuccessfully, to open an EXE, OVL, or .TMP file. 5-21 OVERLAYS Code Sev CGM 31 Message and Explanation Cannot get memory from OTS, FUNCT. return status [octal] The system does not have enough free memory to load the overlay link. The status is returned from the object-time system, and depends on the particular FUNCT. function that the overlay handler used. See Section 5.7.4 for the FUNCT. function codes and status messages. CRF 31 Cannot read file [file] [reason] An error occurred when reading the overlay file. The file was closed after the last successful read operation. CSM 31 Cannot shrink memory, FUNCT. return status [octal] A request to the object-time system to reduce memory, if possible, failed. This error is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. CUF 31 Cannot update file [file] [reason] An error occurred when updating the TMP file into non-resident writable overlay links are written. CWF 31 Cannot write file [file] which [reason] An error occurred when creating the TMP file used to store non-resident writable overlay links. DLN 1 Deleting link [name or number] after [hh:mm:ss] The named a call to since the is output IAT 31 link has been removed from memory as a result of the REMOV. subroutine. The time is elapsed time first call to the overlay handler. This message only to the overlay log file, if any. Illegal argument type on call to [subroutine] A user call to the named overlay handler an illegal type of argument. IEF 31 subroutine gave Input error for file [file], status [octal] An error occurred while reading the OVL or TMP file. ILN 31 Illegal link number [number] A user call to one of the overlay handler subroutines gave an illegal Link number as an argument. IMP 31 Impossible error condition at PC=[address] This is an internal error caused by monitor call error returns that should not occur. This message is issued instead of the HALT message. This error is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. IPE 31 Input positioning error for file [file], status [octal] An error occurred while reading the OVL or TMP file. 5-22 January 1985 OVERLAYS Code Sev IVN 8 Message and Explanation Inconsistent version numbers The OVL and EXE files found were not created at time, and may not be compatible. LNM 31 the same Link number [decimal] not in memory A call to the REMOV. subroutine has removed the named link from memory. It must be restored by a call to GETOV. or RUNOV. MAN 31 Memory not available for status [octal] absolute [link], FUNCT. return There is not enough room for the overlay handler to load the specified link into the part of memory th~ link was built for. Two options are available: a) Use the /SPACE switch at load time to reserve more space for the link, or b) Build a relocatable overlay using the RELOCATABLE option to the /OVERLAY switch at load time. MEF 31 Memory expansion failed, FUNCT. return status [octal] The overlay handler was unable to get free space from the memory manager. Restructure your overlay so that the minimum number of links are in memory at any time. NMS NRS 8 31 Not enough memory to load symbols, FUNCT. [octal] return status There was not enough free space available to load into memory. symbols No relocation table for symbols A relocation table was not included for the symbol table. It is possible that LINK failed to load the relocation table because there wasn't enough room in memory. NSA 31 No start address for link [name or number] A user call to the RUNOV. subroutine requests execution to continue at the start address of the named link, but that link has no start address. NSD 31 No such device for [file] An invalid device was specified. OEF 31 Output error for file [file], status [octal] An error occurred when writing the overlay file. The file was closed after the last successful write operation. OPE 31 Output positioning error for file [file], status [bctal] An error occurred while writing the TMP file used to non-resident writable overlay links. 5-23 hold OVERLAYS Code Sev RLL 1 Message and Explanation Relocating link [name or number] at [address] The named relocatable link has been loaded at the given address. This message is output only to the overlay log file. RLN 1 Reading in link [name or number] after [time] The named link has been loaded. The time given is elapsed time since the first call to the overlay handler. This message is output only to the overlay log file. STS 8 OTS reserved space too small The object-time system does not have space for its minimum number of buffers. Reload, using the /SPACE switch for the root link with an argument greater than 2000 (octal). ULN 31 Unknown link name [name] A call to one of the overlay handler subroutines gave invalid link name as an argument. Correct the call. USC 8 an Undefined subroutine [name] called from [address] A required subroutine was not loaded. The instruction at the given program counter address calls for an undefined subroutine. Correct the call or load the required subroutine. I WLN 1 Writing [link] after [time] The overlay handler is link. 5.7.4 writing out a writable overlay The FUNCT. Subroutine Each DIGITAL-supplied object-time system has a subroutine that the overlay handler uses for memory management, I/O, and message handling. This subroutine has a single entry point, FUNCT., and is called by the sequence: MOVEI PUSHJ l6,arglst l7,FUNCT. The format of the argument list is: -<n+3>,,0 arglst: Z 2,address of integer function code Z 2,address for error code on return Z 2,address for status code on return Z code,address of first argument Z code,address of nth argument 5-24 OVERLAYS Where function code is one of the function codes described below; error code is a 3-letter ASCII mnemonic output by the object-time system (after ?, %, or [); and status (on return) contains one of the following values: -1 o n Function not implemented Successful return Number of the error message Most object-time systems allocate separate space for their own use and for the use of the overlay handler. This minimizes the possibility that the overlay handler will request space that the object-time system is already using. The permitted function code arguments, their names, and their meanings are: Code Name Function o ILL Illegal function; 1 GAD Get a specific segment of memory. 2 COR Get a given amount of memory from anywhere space allocated to the overlay handler. 3 RAD Return a specific segment of memory. 4 GCH Get an I/O 5 RCH Return an I/O channel. 6 GOT Get memory from the object-time system. 7 returns -1 status. in the to the ROT Return memory to the object-time system. 10 RNT Get the initial runtime, in milliseconds, from object-time system. the 11 IFS Get the initial runtime file specification program being run. the 12 CBC Cut back core (if possible) to reduce job size. 13 F.RRS Read retain status (DBMS) 14 F.WRS Write retain status 15 F.GPG Get pages 16 F.RPG Return pages 17 F.GPSI Get TOPS-20 PSI channel 20 F.RPSI Return TOPS-20 PSI channel All FUNCT. channel~ space allocated of (DB~S) I codes are reserved to DEC. The following subsections describe each function FUNCT. subroutine (except the reserved functions). 5-25 of the OVERLAYS ILL (0) Function This function is illegal. status returned is -1. GAD (1) The argument list is ignored, and the Function The GAD function gets memory from a specific address in the allocated to the overlay handler. The argument list points to: arg 1 arg 2 space Address of requested memory Size of requested allocation (in words) A call to GAD with arg 2 equal to -1 requests all available memory. On return, the status is one of the following: o 1 2 3 COR (2) Successful allocation Not enough memory available Memory not available at specified address Illegal arguments (address + size > 256K) Function The COR function gets memory from any available space allocated to the overlay handler. The arguments are: arg I arg 2 Undefined (address of allocated memory on return) Size of requested allocation On return, the status is: o 1 3 RAD (3) Core allocated Not enough memory available Illegal argument (size > 256K) Function The RAD function returns the memory starting at the specified to the overlay handler. The arguments are: arg 1 arg 2 Address of memory to be returned Size of memory to be returned (in words) On return, the status is one of the following: o 1 3 Successful return of memory Memory cannot be returned Illegal argument (address or size > 256K) 5-26 address OVERLAYS GOT (6) Function The GOT function gets memory from the object-time system. Its arguments are: arg 1 arg 2 space allocated to the Undefined (address of allocated memory on return) Size of memory requested On return, the status is one of the following: o 1 3 ROT (7) Successful allocation Not enough memory available Illegal argument (size> 256K) Function The ROT function arguments are: arg 1 arg 2 returns memory to the object-time system. Its Address of memory to be returned Size of memory to be returned (in words) On return, the status is one of the following: o 1 3 Successful return of memory Memory cannot be returned Illegal argument (address or size> 256K) RNT (10) Function The RNT function returns the initial runtime, in milliseconds, from the object-time system. (At the beginning of the program, the object-time system will have executed a RUNTIM UUO: the result is the time returned by RNT.) Its arguments are: arg 1 arg 2 Undefined Ignored (contains initial runtime on return) On return, the runtime is in arg 1, and the status is is O. IFS (11) o. The status Function The IFS function returns the initial runtime file specification from the object-time system. (This initial file specification is the one used to begin the program: that is, it was given with a compile-class command.) Its arguments are: arg 1 arg 2 arg 3 Undefined (SIXBIT device on return) Undefined (SIXBIT filename on return) Undefined (project-programmer number on return) On return, the status is one of the following: o Successful return 1 Error 5-27 OVERLAYS CBC (12) Function The CBC function cuts back memory if possible, which reduces the of the job. It uses no arguments, and the returned status is o. size RRS (13) Function ( Reserved for DBMS ) Returns ARGI = O. On return, the status is always O. WRS (14) Function ( Reserved for DBMS ) Returns ARGI GPG = O. On return, the status is always O. (15) Function The GPG function is used to fetch a page. arg2: The arguments are: size to be allocated, in words On return, argl = address of allocated memory, on page boundary and the status is one of the following: o if allocated OK 1 if not enough memory 3 if argument error RPG (16) Function The RPG function is used to return pages. argl: arg2: The arguments are: address (a word) size (in ,,,ords) On return, the status is: o if deallocated OK 1 if wasn't allocated 3 if argument error GPSI (17) The GPSI function can be running in a TOPS-20 controlled access to the exist and that SIR and other JSYS necessary to exampl e) . used to get a PSI channel for programs environment. This entry point provides only PSI tables. It will arrange that the tables EIR have been done but does not do AIC or any (ATI or MTOPR, set up the channel for The arguments are: argl: channel number, or -1 to allocate any user-assignable channel arg2: level number arg3: address of interrupt routine 5-28 OVERLAYS On return, arg1 contains the channel number allocated originally specified). On return, the status is: (if -1 was o if OK 1 if channel was already assigned 2 if no free channels 3 if argument error NOTE This function is used by TOPS-20 programs. It is a reserved function in the TOPS-10 environment. RPSI (20) Function This entry point provides only controlled access to the PSI tables. It does not do DIC or any other JSYS necessary to release a channel. It just clears the level and interrupt address fields in CHNTAB. This function accepts the following argument: arg1: channel number On return the status is one of the following: o if OK 1 if channel wasn't in use 3 if argument error NOTE This function is used by TOPS-20 programs. It is a reserved function in the TOPS-10 environment. 5-29 OVERLAYS 5.8 THE OVERLAY (OVL) FILE This section contains diagrams of the contents of the output by LINK as a result of the /OVERLAY switch. diagram shows the overall scheme of the file: overlay file The following Scheme of the Overlay (OVL) File =======================================================1 1 Directory Block 1 1 =======================================================1 1 Link Number Table 1 1 =======================================================1 1 Link Name Table 1 1 =======================================================1 1 writable Link Flags Table 1 1 =======================================================1 1 Link 1 1 -------------------------------------------------------I I-----------------~-------------------------------------I 1 1 1 Link 1 I 1 I=========~=============================================1 5-30 OVERLAYS 5.8.1 The Directory Block The following diagram shows the contents of the Directory Block: Directory Block .DIHDR: .DIRGN: .DIVER: .DILPT: .DINPT: .DIWPT: .DIFLG: 1=======================================================1 1 0 (Reserved) 1 Length of Directory Block 1 1-------------------------------------------------------I 1 0 (Reserved) 1 1-------------------------------------------------------I 1 Version Number of Corresponding EXE file 1 1-------------------------------------------------------I 1 -(Size of Link No. Table) ILink Number Table Block No.1 1-------------------------------------------------------I I-(Size of Link Name Table) 1 Link Name Table Block No.1 1-------------------------------------------------------I I-(Size of Writable FIg Tbl) 1 Writable FIg Tbl Block No 1 1-------------------------------------------------------I 1 Flags 1 1-------------------------------------------------------I 1 0 (Reserved) 1 1=======================================================1 In the fourth word above, the size of the Link Number Table (in words) is half the number of links (rounded upward); the Link Number Table Block No. is the number of the 128-word disk block containing the Link Number Table. (There are four disk blocks per disk page.) In ~he fifth word above, the size of the Link Name Table (in words) is twice the number of links; the Link Name Table Block No. is the number of the 128-word disk block containing the Link Name Table. The table defined by the .DIWPT word above consists of a string of two-bit bytes. The first bit, OW.WRT, indicates whether the corresponding overlay link is writable. This bit is set under the control of a REL block of type 1045 (writable links). The second bit, OW.PAG, indicates whether the corresponding overlay link is currently paged into the runtime overlay temporary file. This is strictly a run-time flag and should be zero in the overlay file. This flag is defined in the overlay file to allow the overlay handler to set up its flag table with a single read operation. The .DIFLG word in the directory block contains a single bit flag (bit 0) . If this bit is set the overlay file contains at least one writable overlay. This information is also contained in the Writable Link Table. However, by having the information available in the directory block the overlay handler can determine if any links are writable without scanning the Writable Link Table. All other bits in the .DIFLG word are reserved and must be zero. NOTE If a user requests both writable and relocatable overlays, only halfwords known to be relocatable at load time will be correctly relocated when the link is refetched. 5-31 OVERLAYS 5.8.2 The Link Number Table The following diagram shows the contents of the Link Number Table: Link Number Table 1=======================================================1 1 Pointer to Link 0 1 Pointer to Link 1 1 1-------------------------------------------------------I 1 Pointer to Link 2 1 Pointer to Link 3 1 1-------------------------------------------------------I 1-------------------------------------------------------I 1 Pointer to Link n-l 1 Pointer to Link n 1 1=======================================================1 Each pointer is a disk block number. Any unused disk block of the Link Number Table are zeros. 5.8.3 words in the last The Link Name Table The following diagram shows the contents of the Link Name Table: Link Name Table 1=======================================================1 1 Link Number 1 1-------------------------------------------------------I 1 SIXBIT Link Name 1 1=======================================================1 1=======================================================1 1 Link Number 1 1-------------------------------------------------------I 1 SIXBIT Link Name 1 1=======================================================1 Any unused words in the last disk block of the zeros. 5-32 Link Name Table are OVERLAYS 5.8.4 The Overlay Link The following diagram shows the overall scheme of each overlay link in the overlay file: Scheme of an Overlay Link =======================================================1 1 Preamble 1 1 =======================================================1 1 Code for Link 1 1 =======================================================1 Link Control Section 1 1 1 =======================================================1 1 EXTTAB 1 1 =======================================================1 1 INTTAB 1 1 =======================================================1 1 Relocation Table 1 1 =======================================================1 1 Other Relocation Tables 1 1 =======================================================1 5-33 OVERLAYS The Preamble The following diagram shows overlay link: the contents of the preamble for Preamble 1=======================================================1 1 a (Reserved) 1 Length of Preamble 1 1------------------------------------------------------1 a (Reserved) 1 a (Reserved) 1------------------------------------------------------1 a (Reserved) 1 Link Number 1------------------------------------------------------SIXBIT Link Name 1------------------------------------------------------IPointer to List of Bound Links Starting with Root Link 1------------------------------------------------------Pointer to List of Bound Links Ending with Root Link 1------------------------------------------------------Equivalence Pointer 1------------------------------------------------------Address of Control Section 1-------------------------------------------------------I 1 Flags 1 1-------------------------------------------------------I Absolute Address at Which Link Loaded 1-------------------------------------------------------I 1 Length of Link (Code through INTTAB) 1 1-------------------------------------------------------I Disk Block Number of Start of Link Code' 1-------------------------------------------------------I a (Reserved) 1-------------------------------------------------------I Disk Block Number of Relocation Table 1------------------------------------------------------Disk Block Number of Other Relocation Tables 1------------------------------------------------------a (Reserved) 1------------------------------------------------------Disk Block Number of Radix-50 Symbols 1------------------------------------------------------IBlock Number of Relocation Tables for Radix-50 Symbols 1------------------------------------------------------Next Free Memory Location for Next Link 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1======================================================= 5-34 an OVERLAYS Code for the Link The code for each link consists of a core image that was constructed from the REL files placed in the link. This core image contains the code and data for the link. The Control Section The following diagram shows the contents of the Control Section: Control Section 1=======================================================1 1 0 (Reserved) 1 Length of Header 1 1-------------------------------------------------------I 1 0 (Reserved) 1 0 (Reserved) 1 1-------------------------------------------------------I 1 0 (Reserved) 1 Link Number 1 1-------------------------------------------------------I SIXBIT Link Name 1-------------------------------------------------------I 1 Ptr to Ancestor in Core 1 Ptr to Successor in Core 1 1-------------------------------------------------------I 1 - (Length of Symbol Table) 1 Address of Symbol Table 1 1-------------------------------------------------------I o (Reserved) Start Address for Link -------------------------------------------------------I Memory Needed to Load Link First Address in Link -------------------------------------------------------I - (Length of EXTTAB) 1 Pointer to EXTTAB 1 -------------------------------------------------------I - (Length of INTTAB) Po inter to INTTAB -------------------------------------------------------I Address of Symbols on Disk -------------------------------------------------------I Relocation Address -------------------------------------------------------I Copy of Block Number for Code -------------------------------------------------------I -(Length of Radix-50 SymTab) IBlk No. of Radix-50 SymTabl 1 1 1 1 1 1 1 1 1 1 1 =======================================================1 5-35 OVERLAYS The EXTTAB Table The following diagram shows the contents of the EXTTAB table: EXTTAB 1=======================================================1 JSP 1,.OVRLA 1 1 1-------------------------------------------------------I Flags IAddress of Callee's INTTAB 1-------------------------------------------------------I Callee's Link Number IPtr to Callee's Control Secl 1-------------------------------------------------------I 1 Backward Pointer 1 Forward Pointer 1 1 1 1 1=======================================================1 1=======================================================1 JSP l,.OVRLA 1 1 1-------------------------------------------------------I Flags IAddress of Callee's INTTAB 1-------------------------------------------------------I Callee's Link Number IPtr to Callee's Control Secl 1-------------------------------------------------------I 1 Backward Pointer 1 Forward Pointer 1 1 1 1 1=======================================================1 The flags in the left half of meanings: the second word Bit Meaning (if bit is on) o Module is in core. Module is in more than one link. Relocatable link is already relocated. I 2 5-36 have the following OVERLAYS The INTTAB Table The following diagram shows the contents of the INTTAB table: INTTAB 1=======================================================1 1 0 (Reserved) 1 Address of Entry Point 1 1-------------------------------------------------------I 1 0 (Reserved) 1 Forward Pointer 1 1=======================================================1 1=======================================================1 1 0 (Reserved) 1 Address of Entry Point 1 1-------------------------------------------------------I 1 0 (Reserved) 1 Forward Pointer 1 1=======================================================1 5-37 OVERLAYS The Relocation Table The following diagram shows the contents of the Relocation Table: Relocation Table 1=======================================================1 1 Relocation Word 1 1-------------------------------------------------------I 1-------------------------------------------------------I Relocation Word 1 1 1=======================================================1 The Relocation Table contains one bit for each halfword of the link. If the bit is on, the halfword is relocatable; if it is off, the halfword is not relocatable. The first word contains the relocation bits for the first 22 (octal) words of the 'link; the second word contains the relocation bits for the next 22 (octal) words; and so forth for all words in the link. This table exists only when relocatable overlays the jOVERLAY:RELOCATABLE switch. 5-38 are requested with OVERLAYS The Other Relocation Tables The following diagram shows Tables: the contents of the Other Relocation Other Relocation Tables I===========================================~===========1 Number of Words Following for This Link 1 1 1-------------------------------------------------------I 1 Link Number 1 Planned Load Address 1 1-------------------------------------------------------I 1 Relocation Halfword 1 Ptr to Words of Code 1 1-------------------------------------------------------I 1-------------------------------------------------------I 1 Relocation Halfword 1 Ptr to Words of Code 1 1=======================================================1 1=======================================================1 1 Number of Words Following for This Link 1 1-------------------------------------------------------I 1 Link Number 1 Planned Load Address 1 1-------------------------------------------------------I 1 Relocation Halfword 1 Ptr to Words of Code 1 1-------------------------------------------------------I 1-------------------------------------------------------I 1 Relocation Halfword 1 Ptr to Words of Code 1 1=======================================================1 This table exists only when relocatable overlays have been requested with the OVERLAY/RELOCATABLE switch. The Other Relocation Tables are used to hold internal LINK references. 5-39 CHAPTER 6 PSECTs PSECTs (Program SECTions) are programmer- or system-defined regions of code and data that LINK relocates in memory. PSECTs are used to structure a program's memory space, or to load a program that uses extended addressing. 6.1 LOADING PROGRAMS WITH PSECTs When loading programs with PSECTs, you must specify the or1g1n of the PSECT. LINK then uses this PSECT origin to store the data in the PSECTs. To specify a PSECT origin, include the origin in the source program or use the LINK /SET switch. See the appropriate language manual for including the origin in the source program and Chapter 3 for the /SET switch. Defining an upper bound is also important when loading PSECTs. The LINK /LIMIT switch defines an upper bound for a PSECT. If the PSECT loads to this bound, LINK returns a warning and an error message. Despite these messages, LINK continues to process input files and to load code. The warning is: %LNKPEL PSECT [psect] exceeded limit of [address] Although LINK does continue to process input files and load code, the program is incomplete and should not be used. LINK does issue the following fatal error: --?LNKCFS Chained fixups have been suppressed Chained fixups references. are a method Using /LIMIT to define an overlaps. PSECT overlaps unpredictable behavior. that LINK uses to resolve symbol upper bound prevents dgintended PSECT can cause LINK to loop and produce other For example, the LRGPRO and BIGPRO modules each contain two PSECTs, BIG and GRAND. LRGPRO is loaded and /COUNTERS is used to check PSECT origins and current values. PSECT origins are found by looking under the initial value column and PSECT current values are found by looking under the current value column of the /COUNTERS output. The upper bound is found by looking under the limit value column • • R LINK ~ */SET:BIG:1000 ~ */SET:GRAND: 5400 ~ *LRGPRO ~ 6-1 April 1986 I PSECTs * /COUNTERS ~ [LNKRLC Reloc. ctr. .LOW. BIG GRAND initial value o 1000 5400 current value 140 5100 10500 limit value 1000000 1000000 1000000] * /COUNTERS shows that the current value for PSECT BIG and the initial value for PSECT GRAND are close together in memory. The current value for BIG is 5100 and the PSECT origin for GRAND is 5400. The /LIMIT switch can now be used to restrict PSECT BIG's current value to PSECT GRAND's initial value using the following: */LIMIT:BIG:GRAND~ /LIMIT prevents an unintended overlap because it causes LINK to issue a warning if the current value for BIG exceeds GRAND's origin. The warning is: %LNKPEL PSECT [psect] exceeded limit of [address] The warning message indicates' that the PSECTs overlaped, and that PSECTs BIG and GRAND need to be farther apart in memory. The /COUNTERS switch shows a new current value greater than 5400. Notice that the limit set with the /LIMIT switch is shown in the limit value column. *BIGPROG£) %LNKPEL PSECT BIG exceeded limit of 5400 detected in module .MAIN from file DSK:BIGPRO.REL[12,3456] */COUNTERS~ [LNKRLC Reloc. ctr. .LOW. BIG GRAND initial value o 1000 5400 current value 140 6300 10500 limit value 1000000 5400 1000000] /GO continues loading the program, and LINK issues a warning and fatal error message. The warning is: %LNKPOV Psects [psect] and [psect] overlap from address [address] [address] to The fatal error message is: ?LNKCFS chained fixups have been suppressed For example, */GO~ %LNKPOV Psects BIG and GRAND overlap from address 5400 to 6300 ?LNKCFS chained fixups have been suppressed EXIT Now, LINK is re-run and the PSECTs are moved farther apart in In this example, GRAND's origin is reset from 5400 to 7000 • memory. • R LINK0!D */SET:BIG:I000~ */SET:GRAND: 7000 ~ *LRGPRO~ 6-2 January 1985 PSECTs */COUNTERS ~ [LNKRLC Reloc. ctr. .LOW. BIG GRAND * */LIMIT:BIG:GRAND ~ *BIGPRO ~ */COUNTERS ~ [LNKRLC Reloc. ctr. .LOW. BIG GRAND initial value 0 1000 7000 current value 140 5100 10500 limit value 1000000 1000000 1000000] initial value 0 1000 7000 current value 140 6300 10500 limit value 1000000 5400 1000000] */GO~ EXIT 6.2 PSECT ATTRIBUTES PSECT attributes specify how LINK stores a PSECT in page access of the PSECT. memory, The CONCATENATED or PSECTs. how 6.2.1 OVERLAID attribute specifies and LINK the stores CONCATENATED and OVERLAID LINK uses the CONCATENATED or OVERLAID attributes when loading PSECTs into memory. These attributes are specified when the PSECT is defined in the source program, and are contained in REL Blocks 24 and 1050. See Appendix A for information on these blocks. If the attribute is not specified, LINK uses CONCATENATED. The following example illustrates how PSECTs are stored in memory. In this example, modules MAINKO and MAINKC contain three PSECTs, ALPHA, BETA, and GAMMA. There is an additional module named SUBMD1. The ALPHA and BETA PSECTs have the CONCATENATE attribute. The GAMMA PSECT, which is a data PSECT declared in each module, has the OVERLAID attribute defined in MAINKO and the CONCATENATE attribute defined in MAINKC. First, LINK is run and the origin is set for PSECTs ALPHA, GAMMA • BETA, and • R LINK ~ */SET:ALPHA:3000/SET:BETA:5000/SET:GAMMA:7000 ~ Next, MAINKO is loaded with GAMMA defined as OVERLAID, and is used to display the initial, current, and limit values. *MAINKO ; OVERLAID GAMMA ~ * /COUNTERS ~ [LNKRLC Reloc. ctr. initial value .LOW. 0 ALPHA 3000 BETA 5000 GAMMA 7000 6-3 current value 140 3017 5011 7025 /COUNTERS limit value 1000000 1000000 1000000 1000000] April 1986 I PSECTs Now, SUBMDl is loaded, /COUNTERS is used, and /GO is used to load modules and exit LINK. the Notice that the current values for ALPHA and BETA have increased, that the current value for GAMMA remains the same. and *SUBMD1~ * /COUNTERS G!D [LNKRLC Reloc. ctr. .LOW. ALPHA BETA GAMMA */GOG!!) initial value o 3000 5000 7000 current value 140 3033 5041 7025 limit value 1000000 1000000 1000000 1000000] EXIT In the following example, LINK is run and the origin is set for PSECTs ALPHA, BETA, and GAMMA • • R LINK G!D */SET:ALPHA:3000/SET:BETA:5000/SET:GAMMA:7000~ Now, MAINKC is loaded with GAMMA defined as CONCATENATE, and /COUNTERS is used. *MAINKC ;CONCATENATED GAMMA@) * /COUNTERS G!D [LNKRLC Reloc. ctr. initial value current value .LOW. o 140 ALPHA 3000 3017 BETA 5000 5011 GAMMA 7000 7025 limit value 1000000 1000000 1000000 1000000] * Next, SUBMDl is loaded, /COUNTERS is used, and /GO is used to load the modules and exit LINK. Notice that all current values have increased. *SUBMDl G!D * /COUNTERS ~ [LNKRLC Reloc. ctr. .LOW. ALPHA BETA GAMMA initial value o 3000 5000 7000 */GO~ current value 140 3033 5041 7035 limit value 1000000 1000000 1000000 1000000] EXIT • 6-4 April 1986 PSECTs 6.2.2 RWRITE The RWRITE attribute sets the page access for PSECTs to read/write. This attribute can be set in the source program or omitted, as RWRITE is the default. For example, the following MACRO statement defines for the ALL PSECT • read/write access • PSECT ALL/RWRITE,IOOO 1000 is the PSECT's origin. NOTE The RONLY attribute does exist for compatibility with MACRO-20 and LINK-20, but is not recommended for use on TOPS-IO. You should not use RONLY on TOPS-IO because TOPS-IO does not support read-only pages in the low-segment and LINK considers PSECTs to be part of the low segment. LINK does build an .EXE file from .REL files that have the RONLY attribute set, but these files cannot be run on TOPS-IO. 6-5 January 1985 APPENDIX A REL BLOCKS The object modules that LINK loads are output from the language translators. These object modules are formatted into REL (RELocatable) Blocks, each of which contains information for LINK. This appendix describes each type of REL Block and gives its Terms used throughout this discussion are defined as follows: Header Word: a fullword giving the REL Block Type in its and a short count or long count in its right half. format. left half Short Count: a halfword giving the length of the REL Block, excluding relocation words (which appear before each group of 18 decimal, or 22 octal words), and excluding the header word. Long Count: a halfword giving the length of the REL Block, including all words in the block except the header word itself. Relocation Word: a fullword containing the relocation bits for up to 18 decimal or 22 octal words following words. Each relocation bit is either 1, indicating a relocatable halfword, or 0, indicating a nonrelocatable halfword. The first two relocation bits give the relocatability of the left and right halves, respectively, of the next following word; the next two bits give the relocatability of the two halves of the second following word; and so forth for all bits in the word, except any unused bits, which will be zero. If a REL Block has relocation words, the first one follows the header word. If more than 18 (decimal) data words follow this relocation word, the next word (after the 18 words) is another relocation word. Thus, a REL Block that has relocation words will have one for each 18 words of data that it contains. If the REL Block does not contain an integral multiple of 18 words, the last relocation word will have unused bits. NOTE A block with a zero short include a relocation word. Data Word: MBZ: count does not Any word other than a header word or a relocation word. Must Be Zero. NOTE All numbers in this appendix specifically noted as decimal. A-I are octal I unless January 1985 I REL BLOCKS The diagram below shows a REL Block having a short count of 7, relocation word. Block Type and a 7 Relocation Word Data Word 1 Data Word 2 Data Word 3 Data Word 4 Data Word 5 Data Word 6 Data Word 7 ======================================================= The diagram below shows a REL Block having a short count of 31 and two relocation words. 1=======================================================1 1 Block Type 1 31 1 1-------------------------------------------------------I 1 Relocation Word 1 1-------------------------------------------------------I 1 Data Word 1 1 1-------------------------------------------------------I 1-------------------------------------------------------I 1 Data Word 22 1 1-------------------------------------------------------I 1 Relocation Word 1 1-------------------------------------------------------I 1 Data Word 23 1 1-------------------------------------------------------I 1-------------------------------------------------------I 1 Data Word 31 1 A-2 January 1985 1=======================================================1 REL BLOCKS REL Block Types must be numbered in the range 0 to 777777. The following list shows which numbers are reserved for DIGITAL, and which for customers: Use Type Numbers o40 100 402 600 700 1000 2000 4000 37 77 401 577 677 777 1777 3777 - 777777 Reserved Reserved Reserved Reserved Reserved Reserved Reserved Reserved Reserved A-3 for for for for for for for for for DIGITAL customers DIGITAL customers customer files DIGITAL files DIGITAL customers ASCII text January 1985 REL BLOCKS Block Type 0 (Ignored) 1=======================================================1 1 a 1 Short Count 1 1-------------------------------------------------------I 1 Relocation Word 1 I--------------------------~----------------------------I 1 Data Word 1 1-------------------------------------------------------I 1-------------------------------------------------------I Data Word I 1 1=======================================================1 Block Type a is ignored by LINK. If the short count is 0, then no block consists of only one word. in a REL file. relocation word follows, and the This is how LINK bypasses zero words A-4 January 1985 REL BLOCKS Block Type 1 (Code) 1=======================================================1 1 1 1 Short Count 1 1-------------------------------------------------------I Relocation Word 1 1-------------------------------------------------------I 1 Data Word 1 1-------------------------------------------------------I 1 1-------------------------------------------------------I Data Word 1 I 1=======================================================1 Block Type 1 contains data and code. The first data word gives the address at which the data is to be loaded. This address can be relocatable or absolute, depending on the value of bit 1 of the relocation word. The remaining data words are loaded beginning at that address. If the start address is given in symbolic, Block Type 1 is used: the following format of 1=======================================================1 1 1 1 Short Count 1 1-------------------------------------------------------I 1 Relocation Word 1 1-------------------------------------------------------I 1 Symbol 1 1-------------------------------------------------------I 1 Offset 1 1-------------------------------------------------------I 1-------------------------------------------------------I 1 Data Word 1 1-------------------------------------------------------I In this alternate format, the first four bits of the first data word (Symbol) are 1100 (binary), and the word is assumed to be a Radix-50 symbol of type 60. The load address is calculated by adding the value of the global symbol to the offset given in the following word. The third and following data words are loaded beginning at the resulting address. The global symbol must be defined when the Type 1 Block is found. A-5 January 1985 REL BLOCKS Block Type 2 (Symbols) 1=======================================================1 1 2 1 Short Count 1 1-------------------------------------------------------I 1 Relocation Word 1 1-------------------------------------------------------I ICode 1 Radix-50 Symbol 1 1-------------------------------------------------------I 1 Second Word of Pair 1 1-------------------------------------------------------I 1-------------------------------------------------------I ICode 1 Radix-50 Symbol 1 1-------------------------------------------------------I 1 Second Word of Pair 1 1=======================================================1 The first word of each pair has a code in bits a to 3 and a Radix-50 symbol in bits 4 to 35 (decimal). The contents of the second word of a pair depends on the given code. The octal codes and their meanings are: Code Meaning 00 This code is illegal in a symbol block. 04 The given symbol is a global definition. Its value, contained in the second word of the pair, is available to other programs. 10 The given symbol is a local definition, and its value is contained in the second word of the pair. If the symbol is followed by one of the special pairs or by a Polish REL Block (as explained below, under code 24), the symbol is considered a partially defined local symbol. Otherwise, it is considered fully defined. 14 The given symbol is a block name (from a translator that uses block structure). The second word of the pair contains the block level. The symbol is considered local; if local symbols are loaded, the value of the block name is entered in the symbol table as its block level. 24 The given symbol is a global definition. However, it is only partially defined at this time, and LINK cannot yet use its value. If the symbol is defined in terms of another symbol, then the next entry in the REL file must be a word pair in a Block Type 2 as follows: 1=======================================================1 1 60 1 Other Symbol 1 1·-------------------------------------------------------I 1 50 1 Th i s Symbol 1 1=======================================================1 In this format, code 50 indicates that the right word depends on the other symbol. A-6 half of the January 1985 REL BLOCKS Code Meaning If the partially defined symbol is defined in terms of a Polish expression, then the next entry in the REL file must be Block Type 11 (Polish), whose store operator gives this symbol as the symbol to be fixed up. A fixup resolves the symbol. The store operator must be -4 or -6. 30 The given symbol is a global definition. However, it is only partially defined at this time, and LINK cannot yet use its value. If the symbol is defined in terms of another symbol, then the next entry in the REL file must be a word pair in a Block Type 2 as follows: 1=======================================================1 1 60 1 'Other Symbol 1 1-------------------------------------------------------I 1 70 1 This Symbol 1 1=======================================================1 In this format, code 70 indicates that the word depends on the other symbol. left half of the If the partially defined symbol is defined in terms of a Polish expression, then the next entry in the REL file must be Block Type 11 (POLISH), whose store operator gives this symbol as the symbol to be fixed up. The store operator must be -5. 34 The given symbol is a global definition. However, it is only partially defined at this time, and LINK cannot yet use its value. If the symbol is defined in terms of another symbol, then the next entry in the REL file must be a word pair in a Block Type 2 as follows: 1=======================================================1 1 60 1 Other Symbol 1 1-------------------------------------------------------I 1 50 1 This Symbol 1 1-------------------------------------------------------I 60 Other Symbol 1-------------------------------------------------------I 1 70 1 This Symbol 1 1 1 1 1=======================================================1 This format indicates that both halves of the the other symbol. depend on 44 The given symbol is a global definition exactly as in code except that it is not output by DDT. 04, 50 The given symbol is a local symbol exactly except that it is not output by DDT. 60 The given symbol is a global request. LINK's handling of the symbol depends on the value of the code in the first four bits of the second word of the pair. These codes and their meanings are: 00 word as in code 10, The right half of the word gives the address of the first word in a chain of requests for the global memory address. In each request, the right half of the word gives the address of the next request. The chain ends when the address is o. A-7 January 1985 REL BLOCKS Code Meaning 40 The right half of the word contains an address. The right half of the value of the requested symbol is added to the right half of this word. 50 The rest of the word contains a Radix-50 symbol whose value depends on the requested global symbol. (If the given Radix-50 symbol is not the one defined in the previous word pair, then this word is ignored.) When the value of the requested symbol is resolved, it is added to the right half of the value of the Radix-50 symbol. 60 The right half of the word contains an address. The right half of the value of the requested symbol is added to the left half of this word. 70 The rest of the word contains a Radix-50 symbol whose value depends on the requested global symbol. (If the given Radix-50 symbol is not the one defined in the previous word pair, then this word is ignored.) When the value of the requested global symbol is resolved, it is added to the left half of the value of the Radix-50 symbol. 64 The given symbol is a global definition exactly as in code except that it is not output by DDT. 24, 70 The given symbol is partially defined, where the left half is deferred, as in code 30, except that it is not output by DDT. 74 The given symbol is partially defined, where the right half is deferred, as in code 34, except that it is not output by DDT. Symbols are placed in the symbol table in the order that LINK finds them. However, DDT expects to find the symbols in a specific order. For a non-block-structured program, that order is: Program Name Symbols for Program For a block-structured program whose structure is: Begin Block 1 (same as program name) Begin Block 2 End Block 2 Begin Block 3 Begin Block 4 End Block 4 End Block 3 End Block 1 A-8 January 1985 REL BLOCKS the order is: Program Name (Block 1) Block Name 2 Symbols for Block 2 Block Name 4 Symbols for Block 4 Block Name 3 Symbols for Block 3 Block Name 1 Symbols for Block 1 This ordering follows the rule that the name and symbols for each block must occur in the symbol table in the order of the block endings in the program. NOTES 1. Only one fixup by a Type 2, la, 11, or 12 Block is allowed for a given field. (There can be separate fixups for the left and right halves of the same word. ) 2. Fixups are not necessarily performed in the LINK finds them. A-9 order January 1985 I REL BLOCKS Block Type 3 (HISEG) I 1=======================================================1 1 3 Short Count 1 1 1-------------------------------------------------------I 1 Relocation Word 1 1-------------------------------------------------------I IHigh-Segment Program Break 1 High-Segment Origin 1 1-------------------------------------------------------I 1 (Low-Segment Program Break) 1 (Low-Segment Origin) 1 1=======================================================1 Block Type 3 tells LINK that code segment. I is to be loaded into the high Short Count is either I or 2. If the left half of the first data word is 0, subsequent Type I blocks found are assumed to have been produced by the MACRO pseudo-op HISEG. This usage is not recommended. It means that the addresses in the blocks are relative to 0, but are to be placed in the program high segment. The right half of the first data word is the beginning of the high segment (usually 400000). (the preferred If the left half of the first data word is nonzero usage), subsequent Type I blocks found are assumed to have been produced by the MACRO pseudo-op TWOSEG. The right half is interpreted as the beginning of the high segment, and the left half is the high-segment break; the high-segment length is the difference of the left and right halves. (One-pass translators that cannot calculate the high-segment should set the left half equal to the right half.) break If the second word appears in the HISEG block, its left half shows the low-segment program break, and its right half shows the low-segment origin (usually 0). A-IO January 1985 REL BLOCKS Block Type 4 (Entry) 1=======================================================1 1 4 1 Short Count 1 1-------------------------------------------------------I Relocation Word (Zero) 1-------------------------------------------------------I Radix-50 Symbol 1 1 1 1 I----------------------------~--------------------------I 1-------------------------------------------------------I 1 Radix-50 Symbol 1 1=======================================================1 Block Type 4 lists the entry name symbols for a program module. If a Type 4 block appears in a module, it must be the first block in the module. A library file contains a Type 4 block for each of its modules. When LINK is in library search mode, the symbols in the block are compared to the current list of global requests for the load. If one or more matches occur, the module is loaded and the name of the module is marked as an entry point in map files, etc. If no match occurs, the module is not loaded. If LINK is not in library search mode, no comparison of requests and entry names is made, and the module is always loaded. Refer to Block Type 17 for more information about libraries. Refer to block type 14. A-II January 1985 REL BLOCKS Block Type 5 (End) I 1=======================================================1 1 5 1 Short Count 1 1-------------------------------------------------------I 1 Relocation Word 1 1-------------------------------------------------------I 1 First Data Word 1 1-------------------------------------------------------I 1 (Second Data Word) 1 1=======================================================1 Block Type 5 ends a program module. A Block Type encountered earlier in the module than the Type 5 block. I 6 must be Short Count is 1 or 2. If the module contains a two-segment program, the first data word is the high-segment break and the second data word is the low-segment break. If the module contains a one-segment program, the first data word is the program break and the second data word is the absolute break. If count is 1, then second word is assumed to be o. Each PRGEND pseudo-op in a MACRO program generates a Type 5 REL block. Therefore a REL file may contain more than one Type 5 block. A library REL file has a Type 5 block modules. A-12 at the end of each of its January 1985 REL BLOCKS Block Type 6 (Name) 1=======================================================1 1 6 1 Short Count 1 I 1-------------------------------------------------------I Relocation Word 1-------------------------------------------------------I Radix-50 Symbol 1-------------------------------------------------------I 1 (CPU) 1 (Compiler) 1 (Length of Blank Common) 1 1-------------------------------------------------------I 1 1 1 1 Block Type 6 contains the program name, and must precede any Type 2 blocks. (A module should begin with a Type 6 block and end with a Type 5 block.) I Short Count is 1 or 2. The first data word is the program name in Radix-50 format; this name cannot be blanks. The second data word is optional; if it appears, it contains CPU codes in bits 0 to 5, a compiler code in bits 6 to 17 (decimal), and the length of the program's blank COMMON in the right halfword. The CPU codes specify processors for program execution as: Bit Bit Bit Bit 2 3 4 5 KSIO KLIO KIlO KAIO If all these bits are off, then any of the processors can be used execution. The compiler code specifies the compiler that produced the The defined codes are: 0 1 2 3 4 5 6 Unknown Not used COBOL-68 ALGOL NELIAC PL/I BLISS 7 10 11 12 13 14 15 SAIL FORTRAN MACRO FAIL BCPL MIDAS SIMULA A-13 16 17 20 21 22 23 24 25 REL for file. COBOL-74 COBOL BLISS-36 BASIC SITGO (Reserved) PASCAL JOVIAL January 1985 REL BLOCKS Block Type 7 (Start) I==================~==================~=================1 1 7 1 Short Count 1 I 1-------------------------------------------------------I 1 Relocation Word 1 1-------------------------------------------------------I 1 Start Address 1 1-------------------------------------------------------I 1 (60) 1 (Optional Radix-50 Symbol) 1 I============================~=======================~~=I Block Type 7 contains the start address for program execution. LINK uses the start address in the last such block processed by the load, unless /START or /NOSTART switches specify otherwise. Short Count is 1 or 2. If the second (optional) word is present, it must be a Radix-50 symbol with the code 60; LINK forms the start address by adding the value of the symbol to the value in the right half of the preceding word (Start Address) II I LINK builds an entry vector if it is specified or non-zero. LINK V6.0 A-l4 April 1986 REL BLOCKS Block Type 10 (Internal Request) 1=======================================================1 1 10 1 Short Count 1 1-------------------------------------------------------I Relocation Word 1-------------------------------------------------------I 1 Pointer to Last Request 1 Value 1 1-------------------------------------------------------I 1 1 1-------------------------------------------------------I 1 Pointer to Last Request 1 Value 1 1-------------------------------------------------------I Block Type 10 is generated by one-pass compilers to resolve requests caused by forward references to internal symbols. The MACRO assembler also generates Type 10 blocks to resolve requests for labels defined in literals; a separate chain is required for each PSECT in a PSECTed program. Each data word contains one request for an internal symbol. The left half is the address of the last request for a given symbol. The right half is the value of the symbol. The right half of the last request contains the address of the next-to-last request, and so on, until a zero right half is found. (This is exactly analogous to Radix-50 code 60 with second-word code 00 in a Block Type 2.) If a data word contains -1, then the following word contains a request for the left (rather than right) half of the specified word. In this case, the left half of r.he word being fixed up contains the address of the next-to-last left half request, and so on, until a zero left half is found. (This is a left half chain analogous to the right half chain described above.) NOTES 1. Only one fixup by a Type 2, 10, 11, or 12 is allowed for a given field. (There can be separate fixups for the left and right halves of the same word.) 2. Fixups are not necessarily performed in the LINK finds them. A-IS order January 1985 I REL BLOCKS Block Type 11 (Polish) 1=======================================================1 11 1 1 Short Count 1 1-------------------------------------------------------I 1 Relocation Word 1 1-------------------------------------------------------I Data Halfword Data Halfword 1-------------------------------------------------------I 1 1 1 1-------------------------------------------------------I I Data Halfword 1 Data Halfword 1 1=======================================================1 Block Type 11 defines Polish fixups for operations on relocatable values or external symbols. Only one store operator code can appear in a Block Type 11; this store operator code can be either a symbol fixup code or a chained fixup code. The store operator code appears at the end of the block. NOTES I 1. Only one fixup by a Type 2, 10, 11, or 12 Block is allowed for a given field. (There can be separate fixups for the left and right halves of the same word. ) 2. Fixups are not necessarily performed in the LINK finds them. order The data words of a Type 11 block form one Polish string of halfwords. Each halfword contains one of the following: 1. A symbol fixup store operator code. A symbol fixup defines the value to be stored in the value field of the symbol table for the given symbol. A symbol fixup store operator code is followed by two or four data halfwords. 2. A chained fixup store operator code. A chained fixup takes a relocatable address whose corrected virtual address is the location for storing or chaining. A chained fixup store operator code is followed by one data halfword. 3. A data type code. Data type code 0 is followed by a data halfword; a data type code 1 or 2 is followed by two data halfwords. 4. An arithmetic or logical operator code. A-16 ua nuary 1985 REL BLOCKS 5. A PSECT index code. This code defines a PSECT index to be used for calculating the relocated addresses that appear in this block. PSECT indexes are needed only for PSECTed programs. A global PSECT index"is associated with a Block Type 11. This index appears as the first halfword after the relocation word, and it defines the PSECT for the store address or store symbol. Any addresses for a different PSECT must be preceded by a different PSECT index. Thus, a relocatable data halfword in a different appear in one of the following formats: PSECT must 1-------------------------------------------------------I 400nnn (operator code) 1-------------------------------------------------------I (operands) 1-------------------------------------------------------I 1 1 I 1 1 OR 1-------------------------------------------------------I I 1 400nnn 1 1-------------------------------------------------------I (operator code) (operands) 1-------------------------------------------------------I 1 1 1 where the different PSECT index is nnn+l. Any relocatable address that does not have an explicit preceding PSECT index code preceding its data type code is assumed to be in the same PSECT as the store address for the block. The current PSECT may be set by a previous REL Block type. 6. A halfword of data {preceded by a data type o halfword) or two halfwords of data (preceded by a data type 1 or 2 halfword) • A sequence of halfwords containing a data type code 0 data halfword can begin in either half of a word. and a The codes and their meanings are: Symbol Fixup Store Operator Codes: -7 Fullword replacement. No chaining is done. -6 Fullword symbol fixup. The following one or two words contain the Radix-SO symbol{s) (with their 4-bit codes). The first is the symbol to be fixed up, and the second is the block name for a block-structured program (O or nonexistent for other programs). A-17 January 1985 REL BLOCKS -5 two words Left half symbol fixup. The following one or The first is the symbol to be contain the Radix-50 symbols. is the block name for a fixed up, and the second (0 or nonexistent for other block-structured program programs) • -4 Right half symbol fixup. The following one or two words contain the Radix-50 symbols. The first is the symbol to be fixed up, and the second is the block name for a block-structured program (0 or nonexistent for other programs) • Chained Fixup Store Operator Codes: -3 Fullword chained fixup. The halfword following points to the first element in the chain. The entire word pointed to is replaced, and the old right half points to the next fullword. -2 Left half chained fixup. The halfword following the first element in the chain. points to -1 Right half chained fixup. The halfword following points the first element in the chain. to Data Type Codes: o The next halfword is an operand. 1 The next two halfwords form a fullword operand. 2 The next two halfwords form a Radix-50 symbol that is global request. The operand is the value of the symbol. a Arithmetic and Logical Operator Codes: NOTE Operands are encountered. read in the order that they are 3 Add. 4 Subtract. 5 Multiply. 6 Divide. 7 Logical AND. 10 Logical OR. 11 Logical shift. (A positive second operand causes a shift to the left. A negative operand causes a shift to the right.) 12 Logical XOR. 13 Logical NOT (one's complement). A-18 January 1985 REL BLOCKS 14 Arithmetic negation (two's complement). 15 Count leading zeros (like JFFO instruction). Refer to the MACRO Assembler Reference Manual for information about the ~L operand, which this code implements. 16 Remainder. 17 Magnitude. 20 Maximum. 21 Minimum. 22 Comparison. Returns 0 if the two operands are different; -1 if they are equal. 23 Used to resolve the links in a chain. 12. 24 Symbol definition test. Returns 0 if the operand (a Radix-50 symbol) is unknown; 1 if it is known but undefined; -1 if it is known and defined. 25 Skip N words of Polish. 26 Skip N words of Polish on some condition. 27 Return contents of location N. Refer to Block Type PSECT Index Codes: 400nnn PSECT index nnn, where nnn is a 3-digit octal integer. For an example of a Type 11 block, the MACRO statements EXTERN B EXP <A*B+A) A: Generate (assuming that A has a relocatable value of zero): ======================================================= 11 6 o 001011001001101101 1 3 (Add) 5 (Multiply) o (Halfword Operand Next) o (Relocatable) 2 (Fullword Radix-50 Next) 1st Half of Radix-50 B 2nd Half of Radix-50 B 1 0 (Halfword Operand Next) o (Relocatable) 1-3 (Rh Chained Fixup Next) 0 (Chain Starts at 0') 1 1======================================================= The first word contains the block type (11) and the short count (6). The second word is the relocation word; it shows that the following halfwords are to be relocated: right half of second following word, left half of fifth following word, left half of sixth following word. A-19 January 1985 REL BLOCKS The next word shows that the two operations to be performed are addition and multiplication; because this is in Polish prefix format, the multiplication is to be performed on the first two operands first, then addition is performed on the product and the third operand. The next two halfwords define the first operand. The first halfword is a data type code 0, showing that the operand is a single halfword; the next halfword is the operand (relocatable 0). The next three halfwords define the second operand. The first of these halfwords contains a data type code 2, showing that the operand is two halfwords containing a Radix-50 symbol with code 60. The next two halfwords give the symbol (B). The next two halfwords define the third operand. The first of these halfwords contains a data type code 0, showing that the operand is a single halfword; the next halfword gives the value of the operand (relocatable 0). The next two halfwords give the store operator for the block. The first of these halfwords contains the chained fixup store operator code -3, showing that a fullword chained fixup is required; the next halfword contains the operand (relocatable 0), showing that the chain starts at relocatable zero. The last halfword is irrelevant, and should be zero. LINK issues the LNKJPB error message. A-20 If it is not, January 1985 REL BLOCKS Block Type 12 (Chain) 1=======================================================1 1 12 Short Count I" 1 1-------------------------------------------------------I 1 Relocation Word 1 1-------------------------------------------------------I 1 Chain Number 1 1-------------------------------------------------------I Chain Address Store Address 1-------------------------------------------------------I 1 1 1 1-------------------------------------------------------I 1 Chain Number 1 1-------------------------------------------------------I Chain Address Store Address 1 1 1 1=======================================================1 Block Type 12 chains together data structures from separately compiled modules. (The MACRO pseudo-ops .LINK and .LNKEND generate Type 12 blocks.) Block Type 12 allows linked lists that have entries in separately compiled modules to be constructed so that new entries can be added to one module without editing or recompiling any other module. The data words in a Type 12 block are paired. The first word of each pair contains a chain number between 1 and 100 (octal). (The chain number is negative if the pair was generated by a .LNKEND pseudo-op.) The second word contains a store address in the right half, and a chain address in the left half. The store address points to the location where LINK will place the chain address of the last entry encountered for the current chain. The first entry in a chain has a zero in the word pointed to by the store address. A MACRO statement of the form: .LINK chain-number,store-address,chain-address A MACRO generates a word pair in a Type 12 block with a a for the address field in the REL block. A MACRO statement of the form: chain generates a word pair in a Type 12 block statement of the form: as shown above. .LINK chain-number,store-address .LNKEND chain-number,store-address generates a word pair in a Type 12 Block address and a negative chain number. with a a for the chain As LINK processes a load, it performs a separate chaining for each different chain number found; thus a word pair in a Type 12 block is related to all other word pairs having the same chain number (even in other loaded modules). Type 12 pairs having different chain numbers (even in the same module), are not related. A-21 January 1985 REL BLOCKS NOTE Chain numbers Digital. above 100 (octal) are reserved by To show how the chains are formed, we will take some pairs from different programs having the same chain number (1 in the example). The following four programs contain .LINK or .LNKEND pseudo-ops for the chain numbered 1. After each program, the word pair generated in the Type 12 block appears. NOTES 1. results from a When LINK stores an address that Type 12 REL Block, only the right half of the receiving location is written. You can safely store another value in the left half; it will not be overwritten. 2. Only one fixup by a Type 2, 10, 11, or 12 Block is allowed for a given field. (There can be separate fixups for the left and right halves of the same word. ) 3. Fixups are not necessarily performed in the LINK finds them. A-22 order January 1985 REL BLOCKS Example TITLE MODO TAGO: BLOCK 1 .LNKEND 1,TAGO END 1=======================================================1 -1 1 1 1-------------------------------------------------------I 1 0 1 Value of TAGO 1 1=======================================================1 TITLE MODI TAGI: BLOCK 1 .LINK I,TAGI END 1=======================================================1 1 1 1 1 1 1 1-------------------------------------------------------I a Value of TAGl 1=======================================================1 TITLE MOD2 TAG2: BLOCK 1 .LINK I,TAG2 END 1=======================================================1 1 I 1 1 1 1 \-------------------------------------------------------I a Value of TAG2 /=======================================================1 A-23 January 1985 REL BLOCKS TITLE MOD3 TAG3: BLOCK 1 TAG33: BLOCK 1 .LINK I,TAG33,TAG3 END 1=======================================================1 1 1 1 1-------------------------------------------------------I 1 Value of TAG3 1 Value of TAG33 1 1=======================================================1 Suppose we a negative recognizes 1. LINK the chain. load MODO first. The .LNKEND statement for MODO generates chain number. LINK sees, the negative chain number (-1) and this as the result of a .LNKEND statement for chain number remembers the store address (value of TAGO) as the base of Next we load MODI. The .LINK statement for MODI does not use the third argument, so the chain address is O. LINK sees that this is the first entry for chain number 1. Because it is the first entry, LINK places a 0 in the store address (value of TAGl). LINK then remembers the value of TAGI for use in the next chain entry. (If the chain address is 0, as it is in MODI, LINK remembers the store address; if the chain address is nonzero, LINK remembers the chain address.) Next we load MOD3. The .LINK statement in MOD3 uses a third argument (TAG3), therefore, the value of TAG3 is used as the chain address. LINK places its remembered address (value o£ TAGI) in the store address (value of TAG33). Because the chain address (value of TAG3) is nonzero, LINK remembers it for the next entry. Finally we load MOD2. Like MODI, the .LINK statement for MOD2 does not take a third argument, and thus the chain address is O. LINK places the remembered address (value of TAG3) in the store address (value of TAG2). Because the chain address is 0, LINK remembers the store address (value of TAG2). At the end of loading, LINK places the last remembered address (value of TAG2) at the address (value of TAGO) given by the .LNKEND statement in MODO. A-24 January 1985 REL BLOCKS The results of the chaining can the loaded core image: b~ TAGO: TAG3: TAG33: diagram of I I TAG2:IValue of TAG3 I I I MOD3 I I I I IValue of TAGI I following MOD2 MODO I I IValue of TAG2 I I I seen in the MODI I I TAGI: I I I I o Note that the order of loading for modules with .LINK statements is critical. (A module containing a .LNKEND statement can be loaded any time; its treatment is not affected by the order of loading.) For example, if we load the four programs in the order MODO, MODI, we get a different resulting core image: MODO TAGO: I I IValue of TAGI I I I TAG3: TAG33: MOD3, MODI I I TAGI: IValue of TAG3 I I I MOD3 I I I I IVal ue of TAG2 I MOD2, MOD2 I I TAG2: I I I I o A-25 January 1985 REL BLOCKS Block Type 14 (Index) /=======================================================/ / 14 / 177 / /-------------------------------------------------------I Sub~Block / / . . / / /--------------------------~----------------------------I /-------------------------------------------------------I / I / I Sub-Block / 1 /-------------------------------------------------------I -1 1 Ptr To Nxt ReI Blk Typ 14 1 / /=======================================================/ Each sub-block is of the form: 1===============================;=======================1 / Index-Version Number I Count of Symbols 1 /-------------------------------------------------------I Radix-50 Symbol / /-------------------------------------------------------I 1 /-------------------------------------------------------I Radix-50 Symbol /-------------------------------------------------------I 1 Pointer to Module Containing Entry Symbols 1 / 1 1=======================================================/ I Block Type 14 contains a list of all entry points in a library produced by MARLIB. The block contains 177 (octal) data words (with no relocation words); if the index requires more entries, additional Type 14 blocks are used. If 177 data words are not needed, zero words pad the block to a length of 177. -1 indicates the end of the sub-block information. The Type 14 block consists of a header word, a number of sub-blocks, and a trailer word containing the disk block address of the next Type 14 block, if any. Each disk block is 128 words. Each sub-block is like a Type 4 block, with three differences: 1. The sub-block has no relocation words. 2. The last word of the sub-block points to the module that contains the entry points listed in the sub-block. The right half of the pointer has the disk block number of the module within the file; the left half has the number of words (in that block) that precede the module. If there is no next block, then the word after the last sub-block is -1. 3. The index-version number is used so that old blocks can still be loaded, even if the format changes in the future. I A-26 January 1985 REL BLOCKS Block Type 15 (ALGOL) 1=======================================================1 1 15 1 Short Count 1 I------------------~------------------------------------I 1 Relocation Word 1 1-------------------------------------------------------I 1 Load Address 1 Length 1 1-------------------------------------------------------I 1 Chain Address . 1 Offset 1 1-------------------------------------------------------I . 1-------------------------------------------------------I 1 Chain Address 1 Offset 1 1=======================================================1 Block Type 15 is used to build the special ALGOL OWN block. The first data word contains the length of the module's OWN block in the right half, and the desired load address for the current OWN block in the left half. Each following word contains an offset for the start of the OWN block in the right half, and the address of a standard righthalf chain of requests for that word of the OWN block in the left half. When LINK sees a REL Block Type 15, it allocates a block of the requested size at the requested address. The length of the block is then placed in the left half of the first word, and the address of the last OWN block seen is placed in the right half. If this is the first OWN block seen, 0 is stored in the right half of the first word. The remaining data words are then processed by adding the address of the first word of the OWN block to each offset, and then storing the resulting value in all the locations chained together, starting with the chain address. At the end of loading, LINK checks to see if the symbol %OWN is undefined. If it is undefined, then it is defined to be the address of the last OWN block seen. In addition, if LINK is creating an ALGOL symbol file, the file specification of the symbol file is stored in the first OWN block loaded. This file specification must be standard TOPS-I0 format and can include (in order): device, file name, file extension, and project-programmer number. A-27 January 1985 REL BLOCKS Block Type 16 (Request Load) 1=======================================================1 1 16 1 Short Count 1 1-------------------------------------------------------I 1 Relocation Word (Zero) 1 I----------------------------~--------------------------I SIXBIT Filename 1 1 1-------------------------------------------------------I 1 Project-Programmer Number 1 1-------------------------------------------------------I 1 SIXBIT Device 1 1-------------------------------------------------------I 1-------------------------------------------------------I SIXBIT Filename 1-------------------------------------------------------I 1 Project-Programmer Number 1 1-------------------------------------------------------I 1 SIXBIT Device 1 1 1 1=======================================================1 Block Type 16 contains a list of files to be loaded. The data words are arranged in triplets; each triplet contains information for one file: file name, project-programmer number, and device. The file extension is .REL. LINK saves the specifications for the files to be loaded, discarding duplicates. At the end of loading, LINK loads all specified files immediately before beginning library searches. The MACRO pseudo-op .REQUIRE generates a Type 16 REL Block. A-28 January 1985 REL BLOCKS Block Type 17 (Request ~ibrary) 1=======================================================1 1 17 1 Short Count 1 1-------------------------------------------------------I 1 Relocation Word (Zero) 1 1-------------------------------------------------------I SIXBIT Filename 1 1 I-------------------------------~-----------------------I 1 Project-Programmer Number 1 1-------------------------------------------------------I SIXBIT Device 1-------------------------------------------------------I 1 1 I----------------------~--------------------------------I 1 SIXBIT Filename 1 1-------------------------------------------------------I 1 Project-Programmer Number 1 1-------------------------------------------------------I 1 SIXBIT Device 1 1=======================================================1 Block Type 17 is identical to Block Type 16 except that the specified files are loaded in library search mode. The specified files are searched after loading files given in Type 16 blocks, but before searching system or user libraries. The MACRO pseudo-op .REQUEST generates a Type 17 REL Block. A-29 January 1985 REL BLOCKS Block Type 20 (Common) 1===========================7===========================1 1 20 1 Short Count 1 1-------------------------------------------------------I 1 Relocation Word (Zero) 1 1-------------------------------------------------------I 1 Radix-50 Symbol 1 1-------------------------------------------------------I Length of Labeled Common Block 1-------------------------------------------------------I 1 1 1-------------------------------------------------------I Radix-50 Symbol 1-------------------------------------------------------I Length of Labeled Common Block 1 1 1 1 1=======================================================1 Block Type 20 allocates labeled COMMON areas. The label for unlabeled COMMON is ".COMM.". If a Block Type 20 appears in a REL file, it must appear before any other block that causes code to be loaded or storage to be allocated in the core image. The data words are arranged in pairs. The first word of each pair contains a COMMON name in Radix-50 format (the four-bit code field must contain 60). The second contains the length of the area to be allocated. For each COMMON entry found, LINK first determines whether the COMMON area is already allocated. If not, LINK allocates it. If the area has been allocated, the allocated area must be at least as large as the current requested allocation. COMMON blocks can be referenced from other block types as standard globally defined symbols. However, a COMMON block must be initially allocated by a REL Block Type 20, by a REL Block Type 6 (for blank COMMON), or by the /COMMON switch to LINK. Any attempt to initially define a COMMON block with a standard global symbol definition causes the LNKSNC error when the redefining Block Type 20 is later seen. A-30 January 1985 REL BLOCKS Block Type 21 "(Sparse Data) I======================z====.===========================1 1 21 1. Short Count 1 I----------------------~--------------------------------I 1 Relocation Word (Zero) 1 I--------------------~----------------------------------I 1 1 1 Sub-Block 1 1 1 1-------------------------------------------------------I 1-------------------------------------------------------I 1 1 1 Sub-Block 1 1 1 1=======================================================1 Each sub-block is of the form: 1=======================================================1 Long Count 1 Address 1 1-------------------------------------------------------I 1 Data Word 1 1-------------------------------------------------------I 1 1-------------------------------------------------------I 1 Data Word 1 1=======================================================1 Block Type 21 contains data to be loaded sparsely in a large area. The first word of each sub-block contains the long count for the sub-block in the left half, and the address for loading the data words in the right half. If the first four bits of the first data word of each sub-block are 1100 (binary) then the word is assumed to be a Radix-50 symbol of type 60; in this case the left half of the second word is the sub-block count, and the right half plus the value of the symbol is the load address. A-31 January 1985 REL BLOCKS Block Type 22 (PSECT Origin) 1=======================================================1 1 22 1 Short Count 1 1-------------------------------------------------------I Relocation Word 1-------------------------------------------------------I (SIXBIT PSECT Name) or (PSECT Index) 1-------------------------------------------------------I PSECT Origin 1 1 1 1 1 1 1=======================================================1 Block Type 22 contains the PSECT origin (base address). Block Type 22 tells LINK to set the value of the relocation counter to the value of the counter associated with the given PSECT name. All following REL blocks are relocated with respect to this PSECT until the next Block Type 22 or 23 is found. When data or code is being loaded into this PSECT, addresses are relocated for the PSECT counter. all relocatable MACRO generates a Block Type 22 for each .PSECT and .ENDPS it processes. These Type 22 blocks are interleaved with blocks to indicate PSECT changes. A Type 22 block is also at the beginning of each symbol table to show to which PSECT refers. A-32 pseudo-op the other generated the table January 1985 REL BLOCKS Block Type 23 (PSECT End Block) 1=======================================================1 1 23 1 Short Count 1 I-----------------------------~-------------------------I 1 PSECT Index 1 1-------------------------------------------------------I PSECT Break 1 1 1=======================================================1 Block Type 23 contains information about a PSECT. The PSECT index uniquely identifies the PSECT within the module loaded. The Type 24 block assigns the index. being The PSECT break gives the length of the PSECT. This break is relative to the zero address of the current module, not to the PSECT origin. A-33 January 1985 REL BLOCKS Block Type 24 (PSECT Header Block) 1=======================================================1 I 1 24 1 Short Count 1 1-------------------------------------------------------I Relocation Word 1-------------------------------------------------------I PSECT Name (SIXBIT) 1-------------------------------------------------------I Attributes PSECT Index 1-------------------------------------------------------I PSECT Origin 1 1 1 1 1 1 1 1 1 1=======================================================1 Block Type 24 contains information concerning a specified PSECT. The first word contains the block type number and the number of words associated with the block. The second word contains the relocation information. The third word contains the PSECT name in SIXBIT. The fourth word is the PSECT origin specified for this module. Bit Interpretation MACRO .PSECT Keyword 13 PSECT is page-aligned. PALIGNED 14 Concatenate parts of PSECTs seen in distinct modules. CONCATENATE 15 Overlay parts of PSECTs seen in distinct modules. OVERLAY 16 Read-only RONLY 17 Read and write RWRITE LINK must find a Type 24 block for a PSECT before it finds the index for that PSECT. {MACRO generates a complete set of Type 24 blocks for all PSECTS in a module before generating Type 2 (Symbol Table) Blocks and Type 11 (POLISH) Blocks.) A-34 January 1985 REL BLOCKS Block Type 37 (COBOL Symbols) 1=======================================================1 1 37 1 Short Count 1 1-------------------------------------------------------I Relocation Word 1-------------------------------------------------------I Data Word 1-------------------------------------------------------I 1 1 1 1 1-------------------------------------------------------I Data Word 1 1 1=======================================================1 Block Type 37 contains a debugging symbol table for COBDDT, the COBOL debugging program. If local symbols are being loaded, the table is loaded. If a REL file contains a Block Type 37, it must appear after all other blocks that cause code to be loaded or storage to be allocated in the core image. This block is in the same format as the Type 1 REL Block. A-35 January 1985 REL BLOCKS Block Type 100 (.ASSIGN) 1=======================================================1 100 1 Short Count 1 1 1-------------------------------------------------------I 1 Relocation Word 1 I-------------------------~-----------------------------I Radix-50 Symbol I 1 ICode 1 I---------------------------------------------------~---I ICode 1 Radix-50 Symbol 2 1 1-------------------------------------------------------I Offset 1 1 1=======================================================1 Block Type 100 defines Symbol 1 (in the diagram above) as a new global symbol with the current value of Symbol 2, and then increases the value of Symbol 2 by the value of the given offset. NOTE Symbol 2 must be completely Type 100 is found. A-36 defined when the Block January 1985 REL BLOCKS Block Type 776 (Symbol File) 1=======================================================1 1 776 1 Long Count 1 1-------------------------------------------------------I .JBSYM-Style Symbol Table Pointer 1-------------------------------------------------------I .JBUSY-Style Symbol Table Pointer 1-------------------------------------------------------I Data Word 1 1 1 1 1 1 I-----------------------~-------------------------------I 1-------------------------------------------------------I Data Word 1 1 1=======================================================1 Block Type 776 must begin in the first word of the file, if it occurs at all. This block type shows that the file is a Radix-50 symbol file. The data words form a Radix-50 symbol table for DDT in the same format as the table loaded for the switches /LOCALS/SYMSEG or the switch /DEBUG. A-37 January 1985 REL BLOCKS Block Type 777 (Universal File) 1=======================================================1 1 777 . 1 Long Count 1 1-------------------------------------------------------I Data Word 1 1 I-----------------------~-------------------------------I 1-------------------------------------------------------I Data Word 1 1 1=======================================================1 Block Type 777 is included in a universal (UNV) file that is produced by MACRO so that LINK will recognize when a UNV file is being loaded inadvertently. When a Block Type 777 is encountered, LINK produces a ?LNKUNS error. A-38 January 1985 REL BLOCKS Block Type 1000 (Ignored) 1=======================================================1 1 1000 I· Long Count 1 1----------------------------------------------------- --I 1 Data Word 1 I-------------------~-----------------------------------I 1----------------------------------------------------- --I 1 Data Word 1 1=======================================================1 Block Type 1000 is ignored by LINK. A-39 January 1985 REt. BLOCKS Block Type 1001 (Entry) I 1=======================================================1 1 1001 1 Long Count 1 1-------------------------------------------------------I Symbol 1 1 I--------------------------~----------------------------I 1-------------------------------------------------------I Symbol 1 1 1=======================================================1 Block type 1001 is used to declare symbolic entry points. Each word contains one SIXBIT symbol. This block is similar in function to block type 4. A-40 January 1985 REL BLOCKS Block Type 1002 (Long Entry) 1===============3:==:==============~====================1 1 1002 1 Long Count 1 1---------------------··---------------------------------I Symbol Name 1 I-------------------------------~-----------------------I I . 1-------------------------------------------------------I Symbol Name 1 I I=======:===============================~===============1 Block Type 1002 is used to declare a s'ymbolic entry point with a name in SIXBIT. The count reflects the symbol length in words. LINK V6.0 A-40.l long April 1986 REL BLOCKS Block Type 1~~3 (Long Title) ======:==:===========~===============~================= 1 1~~3 1 .'. Long Count 1 1-----------------------------------------------------1 1 1 1 Count of Title words 1 1--------------_·_-------------------------------------I 1 Program Title 1 1-----------------------------------------------------1 1 Additional Program Title 1 1-----------------------------------------------------1 1 Additional Program Title 1 1-----------------------------------------------------1 . 11-----------------------------------------------------1 1 Count of 1 1 2 1 ASCII Comment Words 1 1-----------------------------------------------------1 1 More Comment Words 1 11-----------------------------7-----------------------1 More Comment Words 1 I-----------------------------~-~---------------------1 11-----------------------------------------------------1 3 1 Count of Compiler Words 1 1-----------------------------------------------------1 1 Compiler Code 1 CPU Bits 1 1-----------------------------------------------------1 1 Compiler Name (in ASCII) 1 1----------------_·_-----------------------------------I 1 Additional Compiler Name 1 1-----------------------------------------------------1 1 Additional Compiler Name 1 1-----------------------------------------------------1 1----------------------------------------------------1 1 4 1 0 1 1----------------------------------------------------1 1 Compile Date and Time 1 1----------------------------------------------------1 1 Compiler Version Number 1 1----------------------------------------------------1 LINK V6.0 A-40.2 April 1986 REL BLOCKS Block Type 1~~3 (Cont.) ================~=======:====================~====== 5 Device Name SIXBIT UFD 6 TOPS-l~ File Name File Extension 7 Number of SFDs SIXBIT SFD 1 SIXBIT SFD 2 . 11----------------------------------------------------1 1 Count of File 1 1 1 Spec Words (in ASCII) 1 1----------------------------------------------------1 1 File Spec I 1----------------------------------------------------1 1 File Spec 1 1----------------------------------------------------1 1~ TOPS-1~ TOPS-l~ TOPS-l~ . 1-----------------------------------------------------1 1 11 1 ~ 1 1----------------------------------------------------1 1 Source Version Number 1 1----------------------------------------------------1 1 Date and Time 1 I=================~~====================~============I Block Type 1~03 is used to declare long title symbols in SIXBIT and to furnish other information about the source module. This block type contains the information that LINK prints in the map file. Block Type l~03 consists of sub-blocks 1 through 11 (octal). The Title sub-block must be the first sub-block specified and cannot be omitted. You can omit other sub-blocks, but the sub-blocks must remain in numerical order. The Program Title is a one word title from 1 to 72 SIXBIT characters long. You can specify a title of 0, and LINK defaults to .MAIN, but you may want to enter a more specific title. For the compiler code and the CPU code, refer to Block Type 6, where these codes are listed. LINK V6.0 A-4~.3 the explanation of April 1986 REL BLOCKS Sub-blocks 5 through 7 contain the device name, UFD, and SFD where the file resides. In sub-block 10, the TOPS-10 file specification must be the following format: specified in [dir]file.ext This specification identifies the source file. LINK outputs this file specification to the map file in ~he order you enter it. The Time and Date are in TOPS-10 format. The date is derived code that is given by the following formula: code = from a 31[12(year-1964)+(month-l)]+(day-l) You can obtain the current day, month, and year using the formulas: day = mod(code,31)+1 month = mod(code/31,12)+1 year = (code/372)+1964 The Time is the time in milliseconds that has elapsed since midnight. See the TOPS-10 Monitor Calls Manual specifying date and time. LINK V6.0 A-40.4 for additional information on April 1986 REL BLOCKS Block Type lBB4 (Byte Initialization) 1I=======~==============================================1 10B4 1 Long Count 1 1------------------------------------------------------I 1 Relocation Word 1 1-------------------------------------------------------I 1 Byte Count 1 1------------------------------------------------------I 1 Byte Pointer 1 1------------------------------------------------------I 1 Byte String 1 1------------------------------------------------------I . The above Block Type lBB4 format is used to move a character into static storage. This format uses old style relocation. string The byte count is the number of bytes in the string. The byte pointer is relocated and used to initialize a string in the user's program. A second format for Block Type l0B4 follows: ===========:==============================:============ 10B4 Long Count Relocation Word Global Symbol Byte Count Byte Pointer Byte String In this format, the global symbol (in SIXBIT) is used to relocate the byte pointer. The symbol must be defined when this REL block is encountered. LINK V6.B A-4B.5 April 1986 REL BLOCKS Block Types 1m1m - 1m37 (Code Blocks) Block Types 1010 through 1037 are similar in function to Block Type 1. They contain code and data to be loaded. These blocks also contain relocation bytes that permit inclusion of PSECT indexes local to the module. For programs that use PSECTs with many inter-PSECT references, this permits a substantial decrease in the size of the REL files. The number of PSECTs that can be encoded in this manner is limited by the size of the relocation byte. A set of parallel code blocks differing only in the size of the relocation byte permits the compiler or assembler to select the most space efficient representation according to the number of PSECTs referenced in a given load module. This set of blocks is divided by the type of relocation: Right Relocation Block Types 1010 - 1017 Left/Right Relocation Block Types 1020 - 1027 Thirty-bit Relocation Block Types 1030 - 1037 LINK V6.0 A-40.6 April ~986 REL BLOCKS Block Type 1042 (Request Load for SFDs) /=======================================================1 1042 1 Long Count 1 -------------------------------------------------------I Device / -------------------------------------------------------/ SIXBIT Filename -------------------------------------------------------I File Extension Directory Count -------------------------------------------------------/ Project-Programmer Number / -------------------------------------------------------I SFDl -------------------------------------------------------I SFD2 -------------------------------------------------------I 1 1 1 1 1 Block Type 1042 contains a list of files to be loaded. It is similar to blocks of Type 16, but it supplies TOPS-10 sub-file directories for the files being requested. The first three data words (device, file name, and extension) are required. The right half of the third word (directory count) specifies the number of directory levels that are included. For example, the directory [27,5434,SFD1,SFD2] would have a directory count of 3. LINK saves the specifications for the files to be loaded, discarding duplicates. LINK loads all specified files at the end of loading, and immediately before beginning library searches. A-41 January 1985 I REL BLOCKS Block Type 1043 (Request Library for SFDs) I =======================================================1 1043 Long Count 1 1 Device SIXBIT Filename File Extension Directory Count Project-Programmer Number SFDI SFD2 Block Type 1043 specifies the files to be searched as libraries. It is similar to Type 17 Blocks, except that it provides TOPS-I0 sub-file directories. The first three data words (device, file name, and extension) are required. The right half of the third word (directory count) specifies the number of directory levels that are included. For example, the directory [27,5434,SFDl,SFD2] would have a directory count of 3. The specified files are searched after requested files are loaded, but before user and system libraries are searched. A-42 January 1985 REL BLOCKS Block Type 104·~ (ALGOL Symbols) 1=======================================================1 1 1044 1 Long Count 1 I 1-------------------------------------------------------I Data Word 1 1 I-----------------------------~-------------------------I . 1-------------------------------------------------------I Data Word 1 1 1=======================================================1 Block Type 1044 contains a debugging ALGOL debugging program. symbol table for ALGDDT, the If an ALGOL main program has been loaded, or if you have used the /SYFILE:ALGOL switch, LINK writes the data words into a SYM file. In addition, if any Type 15 (ALGOL OWN) REL blocks have been seen, LINK stores the file specification of the file into the first OWN block loaded. NOTE If you have specified the /NOSYMBOLS switch, or if you have specified the /SYFILE switch with an argument other than ALGOL, then LINK ignores any Type 1044 blocks found. A-43 January 1985 REL BLOCKS Block Type 1045 (Writable Links) I 1=======================================================/ 1 1045 1 Long Count / 1-------------------------------------------------------I Flags / 1-------------------------------------------------------I Symbol / 1-------------------------------------------------------I Symbol / 1-------------------------------------------------------I 1 1 1 1-------------------------------------------------------I Symbol / 1 /=======================================================/ Block type 1045 declares as writable either the link containing the current module or the links containing the definitions of the specified symbols or both. This block type must follow any common block declarations (Types 20 or 6) in a module. The flag word indicates which links are writable. If bit one is set then the link containing the current module and the links containing the definitions of the specified symbols are writable. If bit one of the flag word is not set then the link containing the current module is not writable, but the links containing the specified symbols are writable. All unused flag bits are reserved and should be zero. Any symbols specified in a block of Type 1045 must be defined in the path of links leading from the root link to the current link. A module cannot declare a parallel or inferior link to be writable. If the symbol name contains six or fewer characters it is represented in a single word, left justified, with the following format: /=======================================================/ SIXBIT Symbol Name / 1=======================================================/ 1 A-44 January 1985 REL BLOCKS If the symbol name contains more than six characters it is represented in the following format: Bits o 5 6 29 30 35 /=======================================================/ / 0 / Reserved (0) / Long Count I /-------------------------------------------------------I / Word 1 of SIXBIT Symbol Name / /-------------------------------------------------------I / Word 2 of SIXBIT Symbol Name 1 /-------------------------------------------------------I 1-------------------------------------------------------I / Word (N-l) of SIXBIT Symbol Name 1 /=======================================================/ The first six bits of a long symbol are always O. This distinguishes a long symbol name from a single word symbol name. N is the length of the symbol name including the header word. The remaining words contain the symbol name in SIXBIT, six characters to a word, left justified. A-45 January 1985 I REL BLOCKS Block Type 1059 (Long PSECT Name Block) o 17 18 35 I====================:=====~:===========================1 1 1050 1 Long Count 1 1-------------------------------------------------------I 1 Reserved for DIGITAL, MBZ 1 Index 1 1-------------------------------------------------------I I SIXBIT Symbol Name 1 1-------------------------------------------------------I 1 Attributes 1 1--------------------------------------------------------I 1 Origin (Optional) 1 1==============================================:=========1 where SIXBIT Symbol Name may be either a word characters, or the following block. o of 5 6 up to six 29 30 35 SIXBIT I===============================================~=======1 1 0 1 Reserved for DIGITAL, MBZ 1 Long Count 1 1-------------------------------------------------------I 1 First word of SIXBIT Symbol Name 1 1-------------------------------------------------------I 1 Second word of SIXBIT Symbol Name 1 1-------------------------------------------------------I . 1-------------------------------------------------------I 1 Nth word of SIXBIT Symbol Name 1 1=======================================================1 Block Type 1059 creates a PSECT with the given name, if none currently exists. It also assigns a unique index number to the PSECT. This index is binding only in the current module. LINK clears PSECT indexes at the end of each module. PSECT indexes in any given module must be declared in consecutive order starting at index 1. Block Type 1050 also assigns attributes to a PSECT and specifies PSECT's origin address. The attributes that can be assigned are: the Bit Description 11 PSECT is confined to one section. If this bit is set, LINK gives an error if the PSECT overflows. You can set Bit 11 or Bit 12, but not both. Bit 11 is the default. There is no equivalent MACRO .PSECT keyword. 12 PSECT is in a nonzero section. If this bit is set, LINK gives a warning if the PSECT is placed in Section 0. There is no equivalent MACRO .PSECT keyword. 13 PSECT is PAGE-ALIGNED. MACRO .PSECT keyword. LINK V6.0 A-46 PALIGNED is the equivalent April 1986 REL BLOCKS Bit Description 14 CONCATENATED parts of PSECTs seen in distinct modules. You can set Bit 14 (CONCATENATED) or Bit 15 (OVERLAID), but not both. The CONCATENATE and OVERLAID attributes are mutually exclusive. These attributes span modules; so if one module sets an attribute and a later module sets a mutually exclusive attribute, LINK issues the warning: %LNKCOE Both CONCATENATE specified for psect [name]. and OVERLAY attributes If neither is set, CONCATENATED is the default, and a warning message is not returned if subsequent pieces of the PSECT are marked OVERLAID. CONCATENATED is the equivalent MACRO .PSECT keyword. 15 OVERLAID parts of PSECTs seen in distinct modules. OVERLAID is the equivalent MACRO .PSECT keyword. 16 This PSECT must be READ-ONLY. You can set Bit 16 (READ-ONLY) or Bit 17 (WRITABLE), but not both. The READ-ONLY and WRITABLE attributes are mutually exclusive. These attributes span modules; so if one module sets an attribute and a later module sets a mutually exclusive attribute, LINK issues the warning: %LNKRWA Both READ-ONLY and specified for psect [name]. WRITABLE attributes If neither is set, WRITABLE is the default, and a warning message is not returned if subsequent pieces of the PSECT are marked READ-ONLY. RONLY is the equivalent MACRO .PSECT keyword. 17 This PSECT must be WRITABLE. MACRO .PSECT keyword. RWRITE is the equivalent All other bits in the Attributes word must be 0. The origin specified in this block is absolute. At least one Block Type 1050 (or the related Block Type 24) is required for each PSECT being loaded, and this block must be loaded prior to any other blocks that reference its PSECT (that is, use the unique index number). LINK V6.0 A-47 April 1986 REL BLOCKS Block Type 1051 (Set Current PSECT) I=======================:=:=====:~:=====================1 1 1051 1 Long Count 1 1-------------------------------------------------------I 1 Reserved for DIGITAL, MBZ 1 Index 1 1===========================:===========================1 Block Type 1051 resets the "current PSECT", against which LINK relocates subsequent REL blocks if no PSECT is explicitly specified. LINK V6.0 A-48 April 1986 REL BLOCKS Block Type 1052 (PSECT End) I=========~=====================::==:===================1 1 1052 1 Long Count 1 1-------------------------------------------------------I 1 MBZ 1 PSECT Index Number 1 1-------------------------------------------------------I 1 PSECT Break 1 1-------------------------------------------------------I . 1-------------------------------------------------------I 1 MBZ 1 PSECT Index Number 1 1-------------------------------------------------------I 1 PSECT Break 1 1=======================================================1 Block Type 1052 allocates additional space for a given PSECT. This space is located between the last address in the PSECT containing data and the address given by the PSECT break. A block of Type 1052 can contain more than one pair of PSECT indexes and breaks. A module must contain a block of Type 24 (PSECT Name) or Type 1050 (Long PSECT Name) with the given PSECT index before a block of Type 1052 is generated. If a given PSECT has more than one Block Type 1052 in a single module, the block with the largest break address is used. The break is interpreted as being relative to the the current module. LINK V6.0 A-49 PSECT's origin in April 1986 REL BLOCKS Block Type 1~6~ (Trace Block Data) =======================================================1 106~ Long Count 1 1 -------------------------------------------------------I SIXBIT Edit Name 1 Active Code Last Changer Creator Code 15-Bit Date Created Installer Code 15-Bit Date Installed Reserved Edit Count \ PCO Group Count / Associated Edit Names and Codes / \ 1 1 1-------------------------------------------------------I 1 1 \ / Program Change Order Groups / \ 1 1 I===============================~=======================1 Block Type 1~6~ contains ignores this block type. data used A-5~ by the MAKLIB program. LINK April 1986 REL BLOCKS Block Type 1979 (Long Symbol Names) I=====:=~:===================~======:================================1 1 1070 1 Long Count 1 I-----------------------------------~--------------------------------1 1 Code 10 1 N Ipi R 1 V 1 0 1 1--------------------------------------------------------------------1 1 Left PSECT index 1 Right PSECT index 1 1--------------------------------------------------------------------1 1 Value 1 1--------------------------------------------------------------------1 1 Name 1 1--------------------------------------------------------------------1 \ / n Additional Name Words / \ I------------------------------~-------------------------------------1 \ / v Additional Value Words / \ I=====~=~============================================================1 This block defines a long symbol. can: A symbol defined with this block o be written to the DDT symbol table. Symbols longer than 6 characters are truncated when output to the DDT symbol table. o be written to the map file if requested. o have its value relocated as specified. o resolve global requests. The Long Symbol Name Block is divided into two sections, the basic and the extension sections. The basic section consists of four words: the flag word, an PSECT index word, the value word, and name word. optional The Flag word contains information about the type of symbol, the length of the symbol name, and relocation. The optional word defines the PSECT index. The Value word contains the symbol's value. The Name word contains the symbol's name. If the name or the value cannot fit in a single word, the block contains an extension section that consists of as many words as are necessary to accommodate the symbol name and the value. The length of the symbol name and value is stored in the Flag word and determines how many words are allocated for the long symbol name in the extension section. The maximum size of the symbol is 72 characters. In the case of a short symbol name, only the basic section is used. The following pages provide detailed information on the each word, the field, bits, and description is given. LINK V6.0 A-51 block. For April 1986 REL BLOCKS Header Word Field Bits Description Block Type 0-17 1070 Block Length 18-35 Number of words used in this block Flag Word Field Bits Code 0-8 Description A nine-bit code field: Bit 0 Must Be Zero 000 Program name 100 Local symbol definitions 110 Suppressed to DDT 120 MAP only 200 Global symbols complately defined by one word 202 Undefined 203 Right fixup 204 Left fixup 205 Right and left fixups 206 30-bit fixup 207 Fullword fixup 210-217 Suppress to DDT 220-227 MAP only Global symbol request for chain fixup 240 Ignored (no fixup) 241 Undefined 242 Undefined 243 RH fixup 244 LH fixup 245 Undefined 246 30-bit fixup 247 Fullword fixup Global request for additive fixups (the value of x has the same meaning as in 0-7 above) 240247 250257 260267 Global request for additive symbol fixups (the value of x has the same meaning as in 0-7 above) 300 Block names NOTE All symbols that require a fixup for their definition must have the fixup block immediately following the entry. LINK V6.0 A-52 April 1986 REL BLOCKS Field Bits Description 9-10 Must Be Zero N--Name length 11-17 If not zero, extended name field of length n words is used, so that the name occupies n+l words. P--PSECT Flag 18 If Bit 18=0, relocate with respect to the current PSECT. No PSECT numbers are needed. If Bit 18=1, relocate with respect to the PSECT specified in the next word. R--Relocation Type 19-21 3-bit relocation type field. o 1 2 3 4 5 V--Value field Absolute Right half Left half Both halves 30-bit Fullword 22-28 Number of additional value value is a long symbol. 29-35 Not used words if PSECT Indexes PSECT Indexes Exists only if Bit 18 equals 1 in the Flag word. Contains Left and Right PSECT numbers. Bit 0 and Bit 18 of this word are zeros. Value Value Word Contains the symbol value. This may be relocated as specified by the relocation type and the PSECT numbers provided. Contains a symbol for 26x codes. Name Name Word Contains the symbol name in SIXBIT. N Additional Name Words Additional name field Optional. It exists only if N > 0. It contains the additional characters when a long symbol name is used. V Additional Value Words Additional value field Optional. It exist only if the V field is greater than 0. This field contains the additional characters when a long symbol name is being resolved. The first word contains the length of the extended field. LINK V6.0 A-53 April 1986 REL BLOCKS The following fixup rules apply to this block: • Only one fixup by a Type 2, 10, 11, 12, 15, 1070, 1072, or 1120 Block is allowed for a given field. There can be separate fixups for the left and right halves of the same word. • Fixups are not necessarily performed in the order LINK them. • Chained halfword fixups cannot cross section boundaries; they wrap around to the beginning of the section. Also, they cannot fixup a location that resolves to word zero of a section unless it is the only address in the chain. • Chairted fixups must be in strict descending address order. • A location must contain data before the location can be fixed up. LINK V6.0 A-54 finds April 1986 REL BUOCKS Block Type Ig72 (Long Polish Block) 1===~========~===================~=========3============1 1072 I Long I Count 1 1------------------------,-------------------------------I 1 Half-Word Polish String 1 1-------------------------------·-----------------------I . 1=======================================================1 Long Polish Blocks of Type 1072 define Polish fixups for operations on relocatable long external symbols. This Block Type is interpreted as a string of l8-bit operators and operands. The block is in Polish prefix format, with the store operator at the end of the block. Each halfword can contain one of the following: • A halfword code in which the first 9 bits contain the data length (when applicable) and the second 9 bits contain the code telling LINK how to interpret the data that follows. • A halfword data or a part of a larger data packet to be interpreted by LINK as indicated by the code that immediately precedes it. • A PSECT index of the format 400000+n. The PSECT index field of a long Polish block causes LINK to relocate addresses against the PSECT number specified in the Un" of the PSECT index 400000+n. • A Polish operator. NOTE Operations are performed in the order are encountered. in which they CODE DEFINITIONS Data Packet Codes Category Code Operand xxxyyy next "xxx+l" halfwords contain data of type "yyy" 000000 001000 halfword - absolute fullword - absolute 000001 001001 halfword - relocatable fullword - relocatable Description fullword symbol name in Radix-50 xxx+l halfwords of symbol name SIXBIT in NOTE You cannot store a symbol in a single halfword. You must place the symbol in the first halfword and fill the second halfword with zeroes. LINK V6.0 A-55 April 1986 REL BLOCKS Polish Operator Codes Category Code Description Operator 000100 000101 000102 000103 000104 000105 000106 000107 000110 000111 000112 000113 000114 000115 000116 000117 000120 000121 000122-00177 Add Subtract Multiply Divide Logical AND Logical OR Logical shift Logical XOR One's complement (not) Two's complement (negative) Count leading zeros Remainder Magnitude Maximum Minimum Equal relation Link Defined Reserved Store Operator Codes Store Operator LINK V6.0 xxx=0 or 1 For xxx=0 Next two halfwords contain a symbol to be resolved. xxx777-xxx770 Chained fixup with relocatable addresses. Next xxx+1 halfwords contain the start address of the chain. 000777 Right half chained fixup with relocatable address. Next halfword contains a relocatable address. 000776 Left half chained fixup with relocatable address. Next halfword contains a relocatable address. 000775 30-bit chained fixup with address. Next halfword relocatable address. 000774 Fullword chained fixup with relocatable address. Next halfword contains a relocatable address. 001777 Right half chained fixup with relocatable address. Next fullword contains a relocatable address. 001776 Left half chained fixup with relocatable address. Next fullword contains a relocatable address. A-56 Radix-50 relocatable contains a April 1986 REL BLOCKS PSECT index 1211211775 3121-bit chained fixup with address. Next fullword relocatable address. relocatable contains a 1211211774 Fullword chained fixup with relocatable address. Next halfword contains a relocatable address. xxx767-xxx764 Chained fixups addresses. 121121121767-121121121764 Chained fixup with absolute Next halfword contains an address. 1211211767-1211211764 Chained fixup with absolute fullword address. Next two halfwords contain absolute address. xxx757-xxx754 Symbol fixup. For 1<=xxx<=377 the next xxx+l halfwords contain a SIXBIT symbol name to be resolved. xxx757 xxx756 xxx755 xxx754 Right half symbol fixup. Left half symbol fixup. 3121-bit symbol fixup. Ful1word symbol fixup. xxx747-xxx7121121 Not defined 4 121121 121121 121 l2I+n PSECT index for PSECT N. with absolute address. absolute The following fixup rules apply to this block: • Only one fixup by a Type 2, 1121, 11, 12, 15, 11217121, 112172, or 112121 Block is allowed for a given field. There can be separate fixups for the left and right halves of the same word. • Fixups are not necessarily performed in the order LINK them. • Chained halfword fixups cannot cross section boundaries; they wrap within a section. Also, they cannot fixup a location that resolves to word zero of a section unless it is the only address in the chain. • Chained fixups must be in strict descending address order. • A location must contain data before the location can be fixed up. LINK V6.121 A-57 finds April 1986 REL BLOCKS Block Type l~74 (Long Common Name) 1=======================================================1 1 1~74 1 Long Count 1 1-------------------------------------------------------I 1 PSECT Index 1 Symbol Length 1 1-------------------------------------------------------I 1 Common Block Length 1 1-------------------------------------------------------I Symbol 1 1 (More Symbol) 1 1 ===================================================~== ==== Block Type LINK V6.m 1~74 defines a long COMMON name. A-58 April 1986 REL BLOCKS Block types 1129-1127 (Argument Descriptor Blocks) I=====:====================~=~===:====================== 1 1120 - 1127 1 Long Count 1------------------------------------------------------N-Bit Byte Relocation Information Argument Block Address or 0 Associated Call Address or 0 Loading Address or 0 Length of Function Name (in bytes) Function Name (ASCIZ) . 1-------------------------------------------------------I 1 Flag Bi ts 1 Argument Count 1 1-------------------------------------------------------I 1 First Argument's Primary Descriptor 1 1-------------------------------------------------------I 1 First Argument's Secondary Descriptor 1 1-------------------------------------------------------I 1 Second Argument's Primary Descriptor 1 1-------------------------------------------------------I 1 Second Argument's Secondary Descriptor 1 1-------------------------------------------------------I . 1-------------------------------------------------------I 1 nth Argument's Primary Descriptor 1 1-------------------------------------------------------I 1 nth Argument's Secondary Descriptor 1 1=======================================================1 A block of this type is generated for the argument list to each subroutine call. The subroutine entry point also specifies one block with this format, though for the cal lee the argument block address is zero. If a descriptor block is associated with an argument list it must always follow the loading of the argument list. The associated call address is used by LINK in diagnostic error messages and its value is determined by the compiler. The argument block address is nonzero if the descriptor block is associated with a call. In this case the argument block address points to the base of the argument block. The argument block address, associated call address address are all relocatable. and the loading The argument descriptors in these type blocks describe the properties of each formal (in the case of an entry point) or actual (in the case of a call). In either case the name of the associated routine is specified as a byte count, that can only be 6 characters long, followed by an ASCIZ string. Each primary description is optionally followed by a secondary descriptor. A-59 April 1986 REL BLOCKS There are five flag bits in the Descriptor Block: Bit Usage If bit 0 is 1 then a difference between the actual number of arguments and the expected number of arguments is flagged as a warning at load time. If bit 0 is 0 no action is taken. 1 If bit 1 is 1 then the block is associated with a function call. If bit 1 is 0 then the block is associated with the function definition. 2 If bit 2 is 1 then the descriptor block is loaded into user memory at the loading address. This bit is ignored. 3 If bit 3 is 1 then the cal lee returns a the value's descriptor is the last specified. 4 If bit 4 is 1, and the caller expects a return value, which is not provided by the called function, or if the called function unexpectedly returns a value, then LINK will issue an error. The severity of the error is controlled by the coercion block. value and descriptor The format for the argument descriptors is as follows: Bit Usage o (Reserved) 1 No update. In a caller block the argument is a literal, constant, or expression. In a cal lee block the argument won't be modified. 2-4 Passing mechanism 000 - pass by address 001 - pass by descriptor 010 - pass immediate value Others - reserved 5 Compile-time constant 6-11 Argument type code (see below) 12-17 (Reserved) 18 Implicit argument descriptor 19-26 (Reserved) 27-35 Number of secondary descriptors A-60 April 1986 REL BLOCKS The argument type codes are as follows: Type-Code Usage 1 FORTRAN logical 2 Integer 3 (Reserved) 4 Real 5 (Reserved) 6 36-bit string 7 Alternate return (label) 10 Double real 11 Double integer 12 Double octal 13 G-floating real 14 Complex 15 COBOL format byte str ing descr iptor, strings), or FORTRAN character 16 BASIC shared string descriptor 17 ASCIZ string 20 Seven-bit ASCII string (for constant Secondary descriptors are used to convey information about the length of a data object passed as an argument and (in the case of the callee's argument descriptor block) whether or not a mismatched length is permissible. Secondary descriptors have the following format: Bit Usage POSe 0-2 (For callee only) Defines the permissible relationships between formal and actual lengths. The values are: 000 001 010 011 100 101 110 - Any relationships are allowed Lengths must be equal Actual < formal Actual <= formal Actual > formal Actual >= formal Reserved I I I - Reserved 3-5 Length of argument (in words) A-61 April 1986 REL BLOCKS Block Type ll3~ (Coercion Block) I==========================================~============1 I 1130 1 Long Count 1 1-------------------------------------------------------I Field Code I Action 1 1-------------------------------------------------------I i Formal Attribute 1 Actual Attribute 1 1-------------------------------------------------------I ! Field Code 1 Action 1 \-------------------------------------------------------I I Formal Attribute 1 Actual Attribute 1 1-------------------------------------------------------I ~ . 1-------------------------------------------------------I 1 Field Code 1 Action 1 1-------------------------------------------------------I I Formal Attribute 1 Actual Attribute 1 1=======================================================1 Block Type 113~ specifies which data type associations are permissible and what action LINK should take if an illegal type association is attempted. It may also specify actions to be taken by LINK to modify an actual parameter. The Coercion Block must be placed before any instance of the caller/callee descriptor block in the REL file. If more than one coercion block is seen during a load, the last block seen is used for type checking. If the descriptor block and command section, no error message is given. strings are not in the same When a caller's argument descriptor block is compared to the descriptor block provided by the callee, LINK first checks bit ~ and the argument counts of the descriptor block. If bit 0 is set and the argument counts differ, a warnlng is given. However, if a byte descriptor is not word-aligned, no warning is given. Next LINK compares the argument descriptors. The particular formal/actual palr is looked up in the internal table LINK builds using the information in the coercion block. The item field code designates which field of the argument descriptor is being checked. The field codes are defined as follows: Field Code· Condition o Check update Check passing mechanism Check argument type code Check if compile-time constant Check number of arguments Check for return value Check length of argument 1 2 3 4 5 6 A-62 April 1986 REL BLOCKS If the fields of the formal/actual pair do not match, LINK searches the internal table set up by the coercion block. If the table does not specify an action to take in the event of such a mismatch, LINK issues an informational message. If the formal/actual pair differs in more than one field then LINK takes the most severe action specified for the mismatches. If an actual/formal pair differ and no coercion block has been seen, LINK ignores the difference. If the caller has specified a descriptor block but the subroutine has not, or if the subroutine has specified a descriptor and the caller has not, LINK does not flag the condition as an error and does not take any special action. If LINK finds an entry in its internal table for a particular actual/formal mismatch, it uses the action code found in the entry to select one of the following five possible responses: Code (18 Bits) Action Informational message 1 Warning 2 Error 3 Reserved for the specific conversion of static descriptor pointers (in the argument list) into addresses. The descriptor pointers are supplied by FORTRAN blocks of types 112x. NOTE The actual conversion process involves the following actions: • If byte descriptor's P field is not word-aligned, issue a warning and continue. • pick up word address of start string. • Put the address of the string into the associated argument block in place of the address of the string descriptor. 4 Suppress the message. 5-777776 Reserved 777777 Fatal error These messages can be displayed or suppressed. Refer descriptions of the /ERRORLEVEL and /LOGLEVEL switches. A-63 of to the April 1986 REL BLOCKS Block Type 1131 (TWOSEG Redirection Block) I======~==============================================1 1 1 1131 Long Count 1 1-----------------------------------------------------1 1 Name of PSECT for low segment, or ~ / /-----------------------------------------------------1 Name of PSECT for high segment, or ~ 1 1 1=====================================================1 where each PSECT name has the form: I====================================~================1 1 SIXBIT Symbol Name 1 1=====================================================/ or ~ 5 6 17 18 29 3~ 35 /=======================================================1 1 ~ 1 Reserved for DIGITAL, MBZ 1 Long Count 1 1--------------------------------------------------------I 1 First word of SIXBIT Symbol Name 1 1--------------------------------------------------------I 1 Second word of SIXBIT Symbol Name 1 1-------------------------------------------------------I 1-------------------------------------------------------I 1 Nth word of SIXBIT Symbol Name 1 1=======================================================1 Block Type 1131 permits TWOSEG REL modules to be loaded into PSECTs by a compiler. You must redirect both the high and the low segment, you cannot redirect one or the other. Also, you cannot redirect both the high and low segment into the same PSECT. This block does not affect the modules to be loaded. LINK V6.~ current A-64 module, but all subsequent April 1986 REL BLOCKS Block Type 1149 (PL/l debugger information) I=============~=======================================1 1 1140 1 Long count 1 1-----------------------------------------------------1 1 Data Word 1 1-----------------------------------------------------1 . 1-----------------------------------------------------1 1 Data Word I 1=====================================================1 Block type 1140 is ignored by LINK. A-65 April 1986 REL BLOCKS Block Type 116~ (Extended Sparse Data Initialization Block) ======================~============:=================~= 1160 Long R I FIB I P I 0 I SYMLEN I Count PSECT Symbol (SYMLEN words) Origin S Address Repetition Count if R=l Fill Count if F=1 Fill Byte if F=l I Byte Count if B=l I--------------------------~--------------------------I I Data Bytes I ==============================:=============:~=:======= Block Type 1160 supports the loading of data into different PSECTs and sections. This REL block allows separate program units to load data into different bytes in the same word of memory at different times during the loading process. Block Type 1160 fields are described below. Field Name Position R Bit ~ If R is is a I-bit field. one, the Repetition Count word exists. If R is zero, the Repetition Count is assumed to be 1. F Bit 1 is a I-bit field. If F is one, the Fill Count and Fill Byte words exist. If F is zero, no fill is used. B Bit 2 is a I-bit field. If B is one, the Byte Count word exits. If B is zero, one Data Byte is assumed. P Bits 3-8 is a 6-bit field. This is the position within the word where the first byte is to be stored. Unused Bit 9 is an unused bit that must zero. LINK V6.0 Description A-66 be April 1986 REL BLOCKS Field Name position SYMLEN Bits 10-17 is an 8-bit field. SYMLEN is the length in words of the global symbol to be used to calculate the address to store the byte string. If SYMLEN is zero, there is no global symbol. The value of the symbol is added to the origin address. The symbol must be completely defined before this addition occurs. PSECT Bits 18-35 is an l8-bit field. PSECT is the PSECT to relocate the Origin Address against. The relocation is 30-bit. If PSECT is zero, the Origin Address is absolute. Symbol Bits 0-35 is a SIXBIT symbol name of the length specified in SYMLEN. The value of this symbol is added to the Origin Address. ~ The symbol must be defined when the block is seen, or a fatal error occurs. S Bits 0-5 is a 6-bit field. S is size of the data bytes. Origin Address Bits 6-35 is a 30-bit field. Origin Address is the address where LINK begins to store Data Bytes. Repetition Count Bits 0-35 is a 36-bit field. If flag bit R is one, Repetition Count exists and contains the number of times to repeat the data store. The Data Bytes are stored and the fill operation is performed as many times as specified in the Repetition Count. Fill Count Bits 0-35 is a 36-bit field. If flag bit F is one, Fill Count exists and specifies how many times to store the Fill Byte after storing Data Bytes. LINK V6.0 Description A-67 the April 1986 REL BLOCKS Field Name Position Fill Byte Bits "-35 Description is a 36-bit field. If flag bit F is one, Fill Byte exists and contains the right justified value to be used in the fill operation. Byte Count is a 36-bit field. If flag bit B is one, Byte Count exits and specifies the number of Data Bytes to be stored. Data Bytes are the data to be stored, of the length specified by the Byte Count, or 1 if flag bit B is not set. This data is stored left-justified, packed as many to a word as fit without overlapping a word boundary. LINK V6." A-68 April 1986 REL BLOCKS Block Type Greater Than 3777 (ASCIZ) 1=======================================================1 1 ASC I I 1 ASC I I 1 ASC I I 1 ASC I I 1 ASC I I 1 ~ 1 1-------------------------------------------------------I 1 ASC I I 1 ASC I I 1 ASC I I 1 ASC I I 1 ASC I I 1 ~ I 1-------------------------------------------------------I 1-------------------------------------------------------I 1 ASCII 1 ASCII 1 ASCII 1 ASCII 1 ~ 1 ~ 1 I======~==~~===========================~================1 When LINK reads a number larger than 3777 in the left half of a REL Block header word, the block is assumed to contain ASCIZ text. If the module containing the text is being loaded, LINK reads the ASCII characters as if they were a command string, input from the user's terminal. LINK reads the string as five 7-bit ASCII characters per word; bit 35 of each word is ignored. The string and the block end when the first null ASCII character (~00) is found in the fifth 7-bit byte of a word (bits 28-34). After loading the current REL file, LINK processes text statements in the reverse order in which they are encountered -- from the end to the beginning of a module. For example, the first, second, and third statements from the beginning of a module are processed third, second, and first. As a result, search requests may be processed in the reverse order of entered /SEARCH switches. Keep this in mind when specifying the order the modules are to be searched. A-69 April 1986 APPENDIX B LINK MESSAGES This appendix lists all of LINK's messages. (The messages from the overlay handler, which have the OVL prefix, are given in Chapter 5.) B.l DESCRIPTION OF MESSAGES Section B.2 lists LINK's messages. For each message, the last three letters of the 6-letter code, the level, the severity, and its medium-length message are given in boldface. Then, in lightface type, comes the long message. When a message is issued,the three letters are suffixed letters LNK, forming a 6-letter code of the form LNKxxx. to the The level of a message determines whether it will be issued to the terminal, the log file, or both. You can use the /ERRORLEVEL and /LOGLEVEL switches to control message output. For some messages an asterisk (*) is given for the level or severity. This means that the value is variable, and depends on the conditions that generated the message. The severity of a message determines whether the load will be terminated when the message is issued. Table B-1 lists the severity codes used in LINK, along with their meanings. The /SEVERITY switch provides a means for lowering the severity that is considered fatal. The severity also determines the first character on the message line printed to the terminal. This character can then be detected by the batch system. For all informational messages, the character is [. Warnings use %, and fatal errors use ? B-1 LINK MESSAGES Table B-1 Severity Codes Code Meaning 1-7 Informational; messages of this severity indicate LINK's progress through the load. generally 8-15 warning; LINK is able to recover by itself the load. and continue 16 Warning if timesharing, but fatal and stops running under batch. the load 20 Fatal; LINK can only partially recover and continue the load. The loaded program may be incorrect. Undefined symbols cause this action. 24 This is for file access errors. Under batch, this is fatal and stops the load. Under timesharing, this is a warning, and LINK prompts for the correct file specification if possible. 31 Always fatal; if LINK stops the load. The /VERBOSITY switch determines whether the medium-length and long messages are issued. If you use /VERBOSITY:SHORT, only the 6-1etter code, the level, and the severity are issued. If you use /VERBOSITY:MEDIUM, the medium-length message is also issued. If you use /VERBOSITY: LONG , the code, level, severity, medium-length message, and long message are issued. Those portions of the medium-length messages enclosed in braces ({ and }) are optional, and are only printed in appropriate circumstances. Those portions of the medium-length messages enclosed in square brackets are filled in at runtime with values pertinent to the particular error. Table B-2 describes each of these bracketed quantities. B-2 LINK MESSAGES Table B-2 Special Message Segments [area] The name of one management areas. [date] The date when LINK is running. [decimal] A decimal number, such as a node number. [device] A device name. [file] A file specification. [label] An internal label in LINK. [memory] A memory size, such as 17P. [name] The name of the loaded program or a node overlaid program. [octal] An octal number, such as a symbol value. [reason] The reason for a file access failure, one of the messages shown in Section B.3. [switch] The name of a switch associated with the error. [symbol] The name of a symbol, such as common block name. [type] The type or attributes associated with a symbol. of LINK's internal a The octal status codes that appear in TOPS-IO messages more thoroughly in the TOPS-IO Monitor Calls Manual. memory in subroutine are an or described Whenever possible, LINK attempts to indicate the module and file associated with an error. This information represents the module currently being processed by LINK, and may not always be the actual module containing the error. For instance, if LINK detects a multiply-defined symbol, either value may be the incorrect one. In this case, LINK reports only the second (and subsequent) redefinition and the module containing it. B-3 LINK MESSAGES B.2 LIST OF MESSAGES Code Lev Sev ABT 31 31 Message Load aborted due to %LNKTMA /ARSIZE: needed was [decimal] errors, max. You loaded programs containing more ambiguous subroutine requests than can fit in the tables of one or more overlay links. You received a LNKARL message for each ambiguous request, and a LNKTMA message for each link with too many requests. You can solve this problem by using the /ARSIZE switch just before each /LINK switch to expand the tables separately. AIC 31 31 Attempt to increase size of {blank common} {common [symbol]} from [decimal] to [decimal] {Detected in module [symbol] from file [file]} FORTRAN common areas cannot be expanded once defined. Either load the module with the largest definition first, or use the /COMMON: switch to reserve the needed space. AMM Argument mismatch in argument [decimal] in call to routine [symbol] called from module [symbol] at location [octal] The caller supplied argument does not match argument expected by the callee. AMP 8 8 the ALGOL main program not loaded You loaded ALGOL procedures, but no main The program. missing start address and undefined symbols will cause termination of execution. ANM 31 31 Address not in memory LINK expected a particular user address to be in memory, but it is not there. This is an internal LINK error. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. ARL I 8 8 Ambiguous request in link [decimal] {name [name]} for [symbol] defined in links [decimal], [decimal], ••• More than one successor link can satisfy a call from a predecessor link. The predecessor link requested an entry point that is contained in two or more of its successors. You should revise your overlay structure to remove the ambiguity. * The level and severity of this message is determined by compiler-generated coercion block. See Block Type 1130 in Appendix A. B-4 LINK MESSAGES Code Lev Sev Message If you execute the current load, one of the following will occur when the ambiguous call is executed: • If only one module satisfying the request is in memory, that module will be called. • If two or more modules satisfying the request are in memory, the one with the most links in memory will be called. • If no modules satisfying the request are in memory, the one with the most links in memory will be called. If a module cannot be selected by the methods 2 or 3 above, an arbitrarily selected module will be called. AZW 31 31 Allocating zero words LINK's memory manager was called with a request for 0 words. This is an internal LINK error. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. cao 31 31 Cannot build overlays outside section 0. You tried to build an overlay structure for a program that is either too large to fit in Section 0 or is loaded outside Section 0 by default. Check the commands input to LINK and the language compiler. CCD 31 31 CPU conflict {Detected in module [symbol] from file [file]} You have loaded modules compiled with conflicting CPU specifications, such as loading a MACRO program compiled with the statement .DIRECTIVE KL10 and another compiled with .DIRECTIVE KI10. Recompile the affected modules with compatible CPU specifications. CCE 8 8 Character constant not word aligned in call to routine [routine] called from module [module] at location [address] LINK detected a character constant that did not begin on a word boundary. This error probably results from a language translator error. This error is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. LINK V6.0 8-5 April 1986 • LINK MESSAGES Code Lev Sev CCS 31 31 Message Cannot create section [octal] LINK is unable to create the specified section. This could be because your system does not have extended addressing hardware, or because there are insufficient resources to create a section. CFS 31 31 Chained fix ups have been suppressed The specified PSECT grew beyond the address specified In the /LIMIT switch. The program is probably incorrect. Use the /MAP or /COUNTER switch to check for accidental PSECT overlaps. Refer to Section 3.2.2 for more information about the /LIMIT switch. CLF 1 1 Closing log file, continuing on file [file] You have changed the log file specification. The old log file is closed; further log entries are written in the new log file. CM6 31 31 Cannot mix COBOL-68 and COBOL compiled code {Detected in module [symbol] from file [file]} You cannot use COBOL-68 and COBOL files in the same load. Compile all COBOL programs with the same compiler and reload. CM7 31 31 Cannot mix COBOL-74 and COBOL compiled code {Detected in module [symbol] from file [file]} You cannot use COBOL-74 and COBOL files in the same load. Compile all COBOL programs with the same compiler and reload. CMC 31 31 Cannot mix COBOL-68 and COBOL-74 compiled code {Detected in module [symbol] from file [file]} You cannot use COBOL-68 and COBOL-74 files in the same load. Compile all COBOL programs with the same compiler and reload. CMF 31 31 COBOL module must be loaded first {Detected in module [symbol] from file [file]} You are loading a mixture files and other files. COBOL-compiled files first. I CMP 31 28 of COBOL-compiled Load one of the Common [symbol] declared in multiple PSECTS {Detected in module [symbol] from file [file]} You cannot load modules produced by FORTRAN with modules produced by G-floating FORTRAN. Compile all FORTRAN modules the same way, then reload. LINK V6.0 B-6 April 1986 LINK MESSAGES Code Lev Sev Message CMX 8 8 Cannot mix G-floating FORTRAN compiled code with FORTRAN compiled code {Detected in module [symbol] from [file]} You loaded a module which specified that the named common block must be loaded in a PSECT which is not compatible with the PSECT in which it was originally loaded. Compile the module with the common in the same PSECT as the original. CNW 31 31 Code not yet written at [label] You attempted to use an unimplemented feature. This is an internal LINK error. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. COE 8 Both CONCATENATE and OVERLAY attributes specified for PSECT [name] {Detected in module [symbol] from file [file]} 8 One of the modules you loaded explicitly sets an attribute for the named PSECT which conflicts with the declaration of PSECT attributes in the current module. Check the compiler switches or assembly language directives that were used in the generation of this module. COF Cannot open file [file] * * LINK cannot open the specified file for input. CPU 31 31 Module incompatible with specified CPU {Detected in module [symbol] from file [file]} The module you are attempting to load does not contain a .DIRECTIVE for any of the CPUs you specified with the /CPU switch. Recompile the module with the proper .DIRECTIVE, or use a different /CPU switch. CRS 1 1 Creating section [octal] LINK prints this informational message when a module is loaded into a new section. The message is printed only if you have specified /ERROR:0. CSF 1 1 Creating saved file LINK is generating your executable (.EXE) file. DEB 31 1 [name] execution LINK is beginning program execution at the named debugger. LINK V6.0 B-7 April 1986 LINK MESSAGES Code Lev Sev DLT 31 1 Message Execution deleted Though you have asked for program execution, LINK cannot proceed due to earlier fatal compiler or LINK errors. Your program is left in memory or in an executable file. DNS 8 8 Device not specified for switch [switch] You used a device switch (for example, /REWIND, /BACKSPACE), but LINK cannot associate a device with the switch. Neither LINK's default device nor any device you gave with the /DEFAULT switch can apply. Give the device with or before the switch (in the same command line). DRC 8 8 Decreasing relocation counter [symbol] from [octal] to [octal] {Detected in module [symbol] from file [file]} You are using the /SET switch to reduce the value of an already defined relocation counter. Unless you know exactly where each module is loaded, code may be overwritten. DSC 31 31 Data store to common [symbol] not in link number [decimal] {Detected in module [symbol] from file [file]} You loaded a FORTRAN-compiled module with DATA statement assignments to a common area. The common area is already defined in an ancestor link. Restructure the load so that the DATA statements are loaded in the same link as the common area to which they refer. DSL 31 * Data store to location [octal] not in link number [decimal] {Detected in module [symbol] from file [file]} You have a data store for an absolute location outside the specified link. Load the module into the root link. NOTE If the location is less than 140, this message has level 8 and severity 8. • DUZ 31 31 Decreasing undefined symbol count below zero LINK's undefined symbol count has become negative. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. 8-8 April 1986 LINK MESSAGES Code Lev Sev EAS 31 31 Message Error creating area AS [file] overflow file [reason] LINK could not make the ALGOL symbol table on disk. You could be over your disk quota, or the disk could be full or have errors. ECE 31 31 Error creating EXE file [reason] [file] LINK could not write the saved file on disk. You could be over your disk quota, or the disk could be full or have errors. EGO 1 1 Emergency GETSEG done LINK has expanded its low segment so large that one of its larger high segments will not now fit 1n memory. LINK will attempt to shrink its internal tables so that the GETSEG will succeed and loading continue. EHC 31 31 Error creating area HC [file] overflow file [reason] LINK could not write your high-segment code on disk. You could be over your disk quota, or the disk could be full or have errors. ElF 31 31 Error for input file [file] Status [octal] for file A read error has occurred on the input file. Use of the file is terminated and the file is released. ELC 31 31 Error creating area LC [file] overflow file [reason] LINK could not write your low-segment code on the disk. You could be over your disk quota, or the disk could be full or have errors. ELF 1 1 End of log file LINK has finished writing your file is closed. ELN 1 1 log file. The End of link number [decimal] {name [name]} The link is loaded. ELS 31 31 Error creating area LS [file] overflow file [reason] LINK could not write your local symbol table on the disk. You could be over your disk quota, or the disk could be full or have errors. 8-9 April 1986 LINK MESSAGES Code Lev Sev EMS 1 1 Message End of MAP segment The map file is completed and closed • EOE 31 31 • EXE file output error Status [octal] [f ile] for file LINK could not write the saved file on the disk. EOI 31 31 Error on input Status [octal] for file [file] An error has been named file. EOO 31 31 31 31 detected 31 31 reading the while writing the Error creating overlay file [reason] [file] LINK could not write the disk. ESN while Error on output [file] An error has been named file. EOV detected overlay file on the Extended symbol not expected Long symbol names (more than six characters) are not implemented. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. I ETP 31 31 Error creating area TP [file] overflow file [reason] LINK could not make the type checking area on disk. You are over your disk quota, the disk is full, or the disk has errors. EXP 1 1 Expanding low segment to [addr] This informational message is printed when expands the low segm~nt memory allocation. EXS 1 1 LINK EXIT segment LINK is in the last stages of loading your program (for example, creating .EXE and symbol files, preparing for execution if requested) • • FCF 1 1 Final code fixups LINK is reading one or both segment overflow files backwards to perform any needed code fixups. This may cause considerable disk overhead, but occurs only if your program is too big for memory. LINK V6.0 8-10 April 1986 LINK MESSAGES Code Lev Sev FEE * * Message ENTER error [reason] [file] See Section B.3 for the list messages. FIN 1 1 of possible long LINK finished LINK is finished. Control is passed to the monitor, or to the loaded program for execution. FLE * * LOOKUP error [reason] [file] See Section B.3 for the list messages. of possible long • FRE * * RENAME erro r [reason] [f i 1 e] See Section B.3 for the list messages. of possible long • FSN 31 31 FUNCT. subroutine not loaded During final processing of your root link, LINK found that the FUNCT. subroutine was not loaded. This would cause an infinite recursion if your program were executed. The FUNCT. subroutine is requested by the overlay handler, and is usually loaded from a default system library. Either you prevented searching of system libraries, or you did not load a main program from an overlay-supporting compiler into the root link. FTB 15 15 Fullword value [symbol] truncated to halfword This message is printed when a symbol that has a value greater than 777777 is used to resolve a halfword reference. This warning message helps you to be sure that global addresses are used properly throughout the modules in a load. GSE * * GETSEG error [reason] [file] See Section B.3 for the list messages. BCL 31 31 of possible long 8igh segment code not allowed in an overlay link {Detected in module [symbol] from file [file]} You have attempted to load high segment code into an overlay link other than the root. Any high segment code in an overlaid program must be in the root. B-ll April 1986 LINK MESSAGES Code Lev Sev Message HSL 31 31 Attempt to set high segment origin too low {Detected in module [symbol] from file [file]} You have'set the high-segment counter to a page containing low-segment code. Reload, using the /SET:.HIGH.:n switch, or (for MACRO programs) reassemble after changing your TWOSEG pseudo-oPe HTL 31 31 Symbol hash table too large Your symbol hash table is larger than the maximum LINK can generate (about 50P). This table size is an assembly parameter. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. lAS 31 31 Error inputting area as Status [octal] for [file] An error occurred while symbol table. ICB 8 8 reading in the file ALGOL Invalid chain REL block (type 12) link number [octal] {Detected in module [symbol] from file [file]} REL block type 12 (Chain), generated by the MACRO pseudo-op .LINK and .LNKEND, must contain a number from 1 to 100 (octal) in its first word. The link word is ignored. IDM 31 31 Illegal data mode for device [device] You specified an illegal combination of device and data mode (for example, terminal and dump mode). Specify a legal device. IHC 31 31 Error inputting area HC Status [octal] for [file] in your Error inputting area LC Status [octal] for [file] file in your Error inputting area LS Status [octal] for [file] file An error occurred while reading symbol table. local An error occurred high-segment code. ILC 31 31 An error occurred low-segment code. ILS IMA 31 8 31 8 while while reading file reading in your Incremental maps not yet available The INCREMENTAL keyword for the /MAP switch not implemented. The switch is ignored. 8-12 is April 1986 LINK MESSAGES Code Lev Sev IMI 31 31 Message Insufficient memory to initialize LINK LINK needs more memory than is available. IMM * 1 [Decimal] [file] } included modules missing {from file You have requested with the /INCLUDE switch that the named modules (if any) be loaded. Specify files containing these modules. INS 31 31 I/O data block not set up LINK attempted a monitor call (for example, LOOKUP, ENTER) for a channel that is not set up. This is an internal LINK error. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. IOV 31 31 Input error for overlay file Status [octal] file [file] for An error occurred when reading the overlay file. IPO 31 31 Invalid Polish operator [octal] {Detected in module [symbol] from file [file]} You are attempting to load a file containing an invalid REL Block Type 11 (Polish). This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. IPX 31 31 Invalid PSECT index {for PSECT [symbol]} {Detected in module [symbol] from file [file]} A REL block contains a reference to a nonexistent PSECT. This error is probably caused by a fault in the language translator used for the program. This error is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. IRB 31 31 Illegal REL block type [octal] {Detected in module [symbol] from file [file]} The file is not in the proper binary format. It may have been generated by a translator that LINK does not recognize, or it may be an ASCII or. EXE .f i 1 e • IRC 31 31 Illegal relocation counter {Detected in module [symbol] from file [file]} One of the new style 1000+ block types has an illegal relocation counter. This message is not expected to occur~ If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. B-13 April 1986 LINK MESSAGES Code Lev Sev Message IRR 8 8 Illegal request/require block {Detected in module [symbol] from file [file]} One of the REL block types 1042 or 1043 is in the wrong format. This message is not expected to occur. If it does, please notify your SoftwareSpeqialist or send a Software Performance Report (SPR) to DIGITAL. ISM 31 31 Incomplete symbol in store operator in Polish block (type 11) {Detected in module [symbol] from file [file]} The specified module contains an incorrectly formatted Polish Fixup Block (Type 11). The store operator specifies a symbol fixup, but the block ends before the symbol is fully specified. This error is probably caused by a fault in the language translator used for the program. This error is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. ISN 31 31 Illegal symbol name [symbol] {Detected in module [symbol] from file [file]} The LINK symbol table routine was called with the blank symbol. This error can be caused by a fault in the language translator used for the program. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. ISP 31 31 Incorrect symbol pointer There is an error in the global symbol table. This is an internal LINK error. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. ISS 8 8 Insufficient space for symbol table after [symbol] -- table truncated PSECT There is insufficient address space for the symbol table between the named PSECT and the next higher one or the end of the address space. Restructure your PSECT layout to allow sufficient room for the symbol table, or use /UPTO to allow more room. IST 31 31 Inconsistency in switch table LINK has found errors in the switch table passed from the SCAN module. This is an internal errore This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Raport (SPR) to DIGITAL. B-14 April 1986 LINK MESSAGES Code Lev Sev ITB 31 31 Message Invalid text in ASCII block from file [file] LINK has failed to complete the processing of an ASCII text REL block from the named file. This is an internal· error. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. ITP 31 31 Error inputting area TP {Status [octal]} for file [file] An error occurred while reading in the type checking area. The status is represented by the right half of the I/O status word. Refer to the TOPS-10 Monitor Calls Manual for more information. IUU * 31 Illegal user UUO at PC [octal] LINK's user UUo (LUUO) handler has detected an illegal UUO. This is an internal error. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. IVC 31 31 Index validation check failed at address [octal] The range checking of LINK's internal tables and arrays failed. The address given is the point in a LINK segment at which failure occurred. This is an internal error. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. JPB 8 8 Junk at end of Polish block {Detected in module [symbol] from file [file]} The specified module contains an incorrectly formatted Polish Fixup Block (Type 11). Either the last unused halfword (if it exists) is nonzero, or there are extra halfwords following all valid data. LOS 1 I LOAD segment The LINK module processing. LFB 1 1 LNKLOD is LINK V6.0 1 1 its LINK log file begun on [date] LINK is creating your log file as defining the logical name LOG:. LFC beginning a result of LINK is continuing your log file as a result the /LOG switch. of Log file continuation B-15 April 1986 LINK MESSAGES Code Lev Sev LFI 1 1 Message Log file initialization LINK is beginning your log file as a the /LOG switch. LII 8 1 result of Library index inconsistent, continuing REL Block Type 14 (Index) for a MAKLIB generated library file is inconsistent. The library is searched, but the index is ignored. A LIN 1 1 LINK initialization LINK is beginning its processing by initializing its internal tables and variables. LMM Length mismatch for argument [decimal] in call to routine [symbol] called from module [symbol] at location [octal] The length of the argument passed by the caller does not match what the called routine expects it to be. LMN 6 1 Loading module [symbol] from file [file] LINK is loading the named module. LNA 8 8 Link name [name] already assigned to link number [decimal] You used this name for another link. different name for this link. LNL 8 8 Specify a Link number [decimal] not loaded The link with this number has not yet been loaded. Tbe /NODE switch is ignored. If you have used link numbers instead of link names with the /NODE switch, you may have confused the link numbers. To avoid this, use link names. LNM 31 31 Link number [decimal] not in memory LINK cannot find the named link in memory. This is an internal error. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. The level and severity of this message is determined by a compiler-generated coercion block. See Block Type 1130 in Appendix A. B-16 April 1986 LINK MESSAGES Code Lev Sev LNN 8 8 Message Link name [name] not assigned The name you gave with the /NODE switch is not the name of any loaded link. The switch is ignored. LNS 31 8 Low segment data base not same size The length of LINK's low segment differs from the length stored in the current LINK high segment. This occurs if some but not all of LINK's .EXE files have been updated after rebuilding LINK from sources. Update all of LINK's .EXE files. LSM 8 8 /LINK switch missing while loading [decimal] -- assumed link number Your use of the /NODE switch shows that you want to begin a new overlay link, but the current link is not yet completely loaded. LINK assumes a /LINK switch immediately preceding the /NODE switch, and loads the link (without a link name) • LSS 31 1 {No} Library search {[symbol] [octal] symbols (entry po ints) The listed symbols and their values (if any) are those that are library search entry points. MDS 8 8 Multiply-defined global symbol [symbol] {Detected in module [symbol] from file [file]} Defined value = [octal], this value = [octal] The named module contains a new definition of an already defined global symbol. The old definition is used. Make the definitions consistent and reload. MEF 31 31 Memory expansion failed LINK cannot expand memory further. All permitted overflows to disk have been tried, but your program is still too large for available memory. A probable cause is a large global symbol table, which cannot be overflowed to disk. It may be necessary to restructure your program, or use overlays, to alleviate this problem. MMF 31 31 Memory manager failure The internal memory manager in LINK has failed a consistency check. This error should not occur. If it does, contact your software specialist or send a Software Performance Report (SPR) to DIGITAL. LINK V6.0 8-17 April 1986 LINK MESSAGES Code Lev Sev MOV 1 1 Message Moving low segment to expand area [area] LINK is rearranging its low segment to make more room for the specified area. Area is one of the following: AS ALGOL symbol table BG bound global symbols DY dynamic free memory FX fixup area GS global symbol table HC your high-segment code LC your low-segment code LS local symbol tables RT relocation tables MPS 1 I MAP segment The LINK module LNKMAP is writing a map file. MPT 31 31 Mixed PSECT and TWOSEG code in same module {Detected in module [symbol] from file [file]} This module contains both PSECT code and TWOSEG code. LINK cannot load such a module. Change the source code to use PSECTs .HIGH. and .LOW. as the high and low segments, and remove the TWOSEG or HISEG pseudo-ops. MRN 1 I Multiple regions not yet implemented The REGION keyword for the /OVERLAY switch not implemented. The argument is ignored. MSN 8 8 is Map sorting not yet implemented Alphabetical or numerical sorting of the map file is not implemented. The symbols in the map file appear in the order they are found in the REL files • • MSS 8 8 /MAXCOR: set too small, expanding to [memory] The current value of MAXCOR is too small for LINK to operate. You can speed up future loads of this program by setting the /MAXCOR switch to this expanded size at the beginning of the load. MTB 8 8 /MAXCOR: too big, [memory] used You are attempting to specify the /MAXCOR switch so large that the low segment cannot fit before the high segment. LINK will use only the core indicated. B-18 April 1986 LINK MESSAGES Code Lev Sev MTS 8 8 Message /MAXCOR: required too small, at least [memory] is LINK needs more space than you gave with the /MAXCOR switch. Give a new /MAXCOR switch with at least the required size. NAP 31 31 No store address in polish block (Type 11 1072) {Detected on module [symbol] from R6 [file]} or The specified module contains an incorrectly formatted polish fixup block (Type 11 or 1072). The store operator specifies a memory fixup, but the block ends before the address is specified. This error is probably caused by a fault in the language translator used for the program. This error is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. NBR 31 31 Attempt to position to node before the root The argument you gave for the /NODE switch would indicate a link before the root link. (For example, from a position after the third link in a path, you cannot give /NODE:-4.) NEB 8 8 No end block seen {Detected in module [symbol] from file [file]} No REL Block Type 5 (End) was found in the named module. This will happen if LINK finds two Type 6 blocks (Name) without an intervening end, or if an end-of-file is found before the end block is seen. LINK simulates the missing end block. However, fatal messages usually follow this, because this condition usually indicates a bad REL file. NED 31 24 Non-existent device [device] You gave a device that does not exist on this system. Correct your input files and reload. NHN 31 31 No high segment in non-zero section You have attempted to load high segment into a program with a non-zero section. segments must reside in Section 0. NPS 8 8 code High Non-existent PSECT [symbol] specified for symbol table You have specified the name of a PSECT after which LINK should append the symbol table, but no PSECT with that name was loaded. Load the named PSECT or specify an existing PSECT for the symbols. LINK V6.0 8-19 April 1986 I LINK MESSAGES Code Lev Sev NSA 31 1 Message No start address Your program does not have a starting address. This can happen if you neglect to load a main program. Program execution, if requested, will be suppressed unless you specified debugger execution. NSM 31 31 /NODE switch missing after /LINK switch You used the ILINK switch, which indicates that you want to begin a new overlay link, but you have not specified a INODE switch to tell LINK where to put the new overlay link. NSO 31 31 No store operator in Polish block (type 11) {Detected in module [symbol] from file [file]} The specified module contains an incorrectly formatted Polish Fixup Block (Type 11). Either the block does not have a store operator, or LINK was not able to detect it due to the block's invalid format. This error is probably caused by a fault in the language translator used for the program. This error is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. NVR No value returned by routine [symbol] from module [symbol] at location [octal] called The called routine does not return a value, however the caller expected a returned value. OAS 31 31 Error outputting area as Status [octal] [file] An error occurred while writing symbol table. OEL 8 8 out for file the ALGOL Output error on log file, file closed, load continuing {Status [octal] for file [file]} An error has occurred on the output file. The output file is closed at the end of the last data successfully output. OEM 8 8 Output error on map file, file closed, continuing Status [octal] for file [file] load An error has occurred on the output file. The output file is closed at the end of the last data successfully output. :j: The level and severity of this -message is determined by a compiler-generated coercion block. See Block Type 1130 in Appendix A. B-20 April 1986 LINK MESSAGES Code Lev Sev OES 8 8 Message Output error on symbol file, file closed, continuing Status [octal] for file [file] load An error has occurred on the output file. The output file is closed at the end of the last data successfully output. OEX 8 8 Output error on XPN file, file closed, continuing Status [octal] for file [file] load An error has occurred on the output file. The output file is closed at the end of the last data successfully output. OPD 31 31 OPEN failure for device [device] An OPEN or INIT monitor call for the specified device failed. The device may be under another user's control. OFN 31 31 Old FORTRAN (F40) module not available {Detected in module [symbol] from file [file]} The standard released version of LINK support F40 code. OFS 31 31 does not Overlay file must be created on a file structure Specify a disk device for the overlay file. ORe 31 31 Error outputting area HC Status [octal] for file [file) An error occurred high-segment code. ORN 31 31 while writing out your Overlay handler not loaded Internal symbols in the overlay handler could not be referenced. If you are using your own overlay handler, this is a user error; if not, it is an internal error and is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. OLC 31 31 Error outputting area LC Status [octal] for file [file] An error occurred low-segment code. OLS 31 31 while writing out your Error outputting area LS Status [octal] for file [file) An error occurred while writing out symbol table. B-2l your local April 1986 LINK MESSAGES Code Lev Sev OMB 31 31 Message /OVERLAY switch must be first The /OVERLAY switch must appear before you can use any of the following switches: /ARSIZE, /LINK, /NODE, /PLOT, /SPACE. (It is sufficient that the /OVERLAY switch appear on the same line as the first of these switches you use.) ONS 8 1 Overlays not supported in this version of LINK LINK handles overlays with its LNKOVI and LNKOV2 modules. Your installation has substituted dummy versions of these. You should request that your installation rebuild LINK with the real LNKOVI and LNKOV2 modules. OOV 31 31 Output error for overlay file Status [octal] file [file] An error has occurred while writing the file. OS2 1 1 8 8 overlay Overlay segment phase 2 LINK's module LNKOV2 file. OSL for is writing your overlay Overlaid program symbols must be in low segment You have specified /SYMSEG:HIGH or /SYMSEG:PSECT when loading an overlay structure. Specify /SYMSEG:LOW or /SYMSEG:DEFAULT. OTP 31 31 Error outputting area TP {Status [octal] for file [file]} An error occurred while writing out the typechecking area. The status is represented by the right half of the I/O status word (refer to the TOPS-10 Monitor Calls Manual) • PAS 1 1 Area AS overflowing to disk The load is too large to fit into the allowed memory and the ALGOL symbol table is being moved to disk. PBI 8 8 Program break module [symbol] [octal] invalid {Detected from file [file]} in The highest address allocated in the named module is greater than 5l2P. This is usually caused by dimensioning large arrays. Modify your programs or load list to reduce the size of the load. LINK V6e0 B-22 April 1986 LINK MESSAGES Code Lev Sev ~L 8 8 Message Program too complex [file] to load, saving as file Your program is too complex to load into for one of the following reasons: memory • There are page gaps between below the high segment). PSECTs (except • There are PSECTs above high segment. origin of • Your program will not fit in memory with LINK's final placement code. • One or more attribute. PSECTs the has the the along read-only LINK has saved your program as an .EXE file on disk and cleared your user memory. You can use a GET or RUN command to load the .EXE file. PCX 8 1 Program too complex to load run from file [file] and execute, will Your program is too complex to load into for one of the following reasons: memory • There are page gaps between below the high segment). PSECTs (except • There are PSECTs above high segment. origin of • Your program will not fit in memory with LINK's final placement code. • One or more attribute. PSECTs the has the the along read-only LINK will save your program as an .EXE file on disk and automatically run it, but the .EXE file will not be deleted. PEF 31 8 Premature end of file from file [file] LINK found an end-of-file inside a REL block (that is, the word count for the block extended beyond the end-of-fi1e). This error may be caused by a fault in the language translator used for the program. B-23 April 1986 LINK MESSAGES Code Lev Sev PEL 15 15 Message PSECT [symbol] exceeded limit of [octal] The specified PSECT grew beyond the address specified in the /LIMIT switch. The program is probably incorrect. Use the /MAP or /COUNTER switch to check for accidental PSECT overlaps. Refer to Section 3.2.2 for more information about the /LIMIT switch. PRC 1 1 Area HC overflowing to disk The load is too large to fit into the allowed memory and your high-segment code is being moved to disk. PLC 1 1 Area LC overflowing to disk The load is too large to fit into the allowed memory and your low-segment code is being moved to disk. PLS I 1 Area LS overflowing to disk The load is too large to fit memory and your local into the allowed Possible modification of argument [decimal] in call to routine [symbol] called from module [symbol] at location [octal] PMA The caller has specified that the argument should not be modified. The called routine contains code which may modify this argument. In some cases this message will occur although the argument is not actually modified by the routine. POT 1 1 Plotting overlay tree LINK is creating your overlay tree file. 8 POV 8 PSECTs [symbol] and [symbol] address [octal] to [octal] overlap from The named PSECTs overlap each other in the indicated range of addresses. If you do not expect this message, restructure your PSECT origins with the /SET switch. I PTP 1 1 Area TP overflowing to disk The load is too large to fit into the allowed memory and your argument typechecking tables are being moved to disk. The level and severity of this message is determined by a compiler-generated coercion block. See Block Type 1130 in Appendix A. LINK V6.0 B-24 April 1986 LINK MESSAGES Code Lev Sev Message PTL 31 31 Program too long {Detected in module [symbol] from file [file]} Your program extends beyond location 777777, which is the highest location that LINK is capable of loading. You may be able to make your program fit by moving PSECT or1g1ns, lowering the high-segment origin, loading into a single segment, reducing the size of arrays in your program, or using the overlay facility. PUF 31 31 PAGE. UUO failed, error code was [code] UUO Refer to the description of the PAGE. the TOPS-10 Monitor Calls Manual. RBS 31 31 in REL block type [octal] too short {Detected in module [symbol] from file [file]} The REL block is inconsistent. This may be caused by incorrect output from a translator (for example, missing argument for an end block). Recompile the module and reload. RED 1 1 Reducing low segment to [memory] LINK is reclaiming internal tables. RER * I memory {Ro} Request external entry points) { [symbol] [octal]} by deleting references its (inter-link The listed symbols and their values (if any) represent subroutine entry points in the current link. RGS 1 1 Rehashing global symbol table from [decimal] [dec imal] to LINK is expanding the global symbol table either to a prime number larger than your /HASHSIZE switch requested, or by about 50 percent. You can speed up future loads of this program by setting /HASHSIZE this large at the beginning of the load. RLC 31 I Reloc ctr. initial value current value {[symbol] [octal] [octal]} The listed symbols and values represent the current placement of PSECTs in your address space. B-25 April 1986 LINK MESSAGES Code Lev Sev RME 31 * Message REMAP error{, incorrect} high segment origin may be The REMAP UUO to place your program's high segment has failed. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. RUM 31 31 Returning unavailable memory LINK attempted to return memory to the memory manager, but the specified memory was not previously allocated. This is an internal error. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. RWA 8 80th READ-ONLY and WRITABLE attributes specified for PSECT [name] 8 One of the modules you loaded explicitly sets an attribute for the named PSECT which conflicts with the declaration of PSECT attributes in the current module. Check the compiler switches or assembly language directives that were used in the generation of this module. SFU 8 8 Symbol table fouled up There are errors in the local symbol table. Loading continues, but any maps you request will not contain control section lengths. This is an internal error. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. SIF 31 31 Symbol insert failure, non-zero hole found LINK's hashing algorithms failed; they are trying to write a new symbol over an old one. You may be able to load your files in a different order. This is an internal error. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. SMP 8 8 SIMULA main program not loaded You loaded some SIMULA procedures or classes, but no main program. Missing start address and undefined symbols will terminate execution. LINK V6.0 B-26 April 1986 LINK MESSAGES Code Lev Sev Message SNC 31 31 Symbol [symbol] already defined, but not as common {Detected in module [symbol] from file [file]} You defined a FORTRAN common area with the same name as a non-common symbol. You must indicate which definition you want. If you want the common definition, load the common area first. SNL 1 1 Scanning new command line LINK is ready to process the next command line. SNP 8 8 Subroutine [symbol] in link number [decimal] not on path for call from link number [decimal] {name [name]} The named subroutine is in a different path than the calling link. Redefine your overlay structure so that the subroutine is in the correct path. SNS 31 31 SITGO not supported {Detected in module [symbol] LINK does not support produced by the SITGO program by using SITGO. SOE 31 31 from file [file]} the REL file format compiler. Load your Saved file output error Status [octal] [file] for file An error occurred in outputting the .EXE file. SRB 8 8 Attempt to set relocation counter [symbol] below initial value of [octal] {Detected in module [symbol] from file [file]} You cannot use the /SET switch to set the named relocation counter below its initial value. The attempt is ignored. SRP 31 31 /SET: switch required for PSECT [symbol] {Detected in module [symbol] from file [file]} Relocatable PSECTS are not implemented; you must specify an explicit absolute origin with the /SET switch for the named PSECT. SSN 8 8 Symbol table sorting not yet implemented Alphabetical or numerical sorting of the symbol table is not implemented. The symbols appear in the order they are found. B-27 April 1986 LINK MESSAGES Code Lev Sev SST 1 1 Message Sorting symbol table LINK is ,rearranging the symbol table, and if required, is converting the symbols from the new to old format as indicated on the /SYMSEG, /SYFILE, or /DEBUG switch. STC 1 1 Symbol table completed The symbol table has been according to the /SYMSEG, switch. STL 31 31 sorted and moved /SYFILE, or /DEBUG Symbol too long A symbol specified in a REL block is larger than the maximum allowed by LINK. I T13 31 31 LVAR REL block (type 13) not implemented {Detected in module [symbol] from file [file]} REL Block Type 13 (LVAR) is obsolete. MACRO pseudo-op TWOSEG. TDS 8 8 Use the Too late to delete initial symbols LINK has already loaded the initial symbol table. To prevent this loading, place the /NOINITIAL switch before the first file specification. TMA 31 8 Too many ambiguous requests in link [decimal] {name [name]}, use /ARSIZE: [decimal] {Detected in module [symbol] from file [file]} You have more ambiguous subroutine requests (indicated by LNKARL messages) than will fit in the table for this link. Continue loading. Your load will abort at the end with a LNKABT message; if you have loaded all modules, the message will give the size of the needed /ARSIZE switch for a reload. TML 31 31 Too many links use /MAXNODE You specified more overlay links than were allowed by the current value for the /MAXNODE switch. Reload the program with a larger /MAXNODE value. LINK V6.0 B-28 April 1986 LINK MESSAGES Code Lev Sev TMM * * Message Type mismatch seen for argument [decimal] in call to routine [symbol] called from module [symbol] at location [octal] The data type of the argument passed by the caller does not match what the called routine expects. TTF 8 8 Too many titles found In producing the index for a map file, LINK found more program names than there are programs. The symbol table is in error. This is an internal error. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. UAR 8 8 Undefined assign for [symbol] {Detected in module [symbol] from file [file]} The named symbol was referenced in a REL Block Type 100 (ASSIGN), but the symbol is undefined. This is generated with the MACRO pseudo-op .ASSIGN. The assignment is ignored. You should load a module that defines the symbol. UCB 8 Unknown common [symbol] 8 referenced A reference was made to a common block that does not exist. UGS * 1 {NO} Undefined global symbols {[symbol] [octal] The listed symbols and their values (if any) represent symbols not yet defined by any module. Each value is the first address in a chain of references for the associated symbol. If this message resulted automatically at the end of loading, this is a user error. In this case, the load will continue, leaving references to these symbols unresolved. UNS 31 31 (type Universal file REL block supported from file [file] Extraction of symbols from file is not implemented. a MACRO 777) not universal The level and severity of this message is determined by a compiler-generated coercion block. See Block Type 1130 in Appendix A. LINK V6.0 B-29 April 1986 I LINK MESSAGES Code Lev Sev Message URC 31 1 Unknown Radix-58 symbol code [octal] [symbol] {Detected in module [symbol] from file [file]} In a REL Block Type 2 (Symbols), the first 4 bits of each word pair contain the Radix-50 symbol code. LINK found one or more invalid codes in the block. This error can be caused by a fault in the language translator used for the program. URV Unexpected return value in call to routine [symbol] called from module [symbol] at location [octal] The called routine returns a value which was not expected by the caller. USA 8 8 Undefined start address [symbol] You gave an undefined global symbol as the start address. Load a module that defines the symbol. USB 8 Undefined symbol in byte array (type 1004) block 8 LINK has detected an undefined global symbol in a Type 1004 REL block. This global symbol is used to relocate a byte pointer and must be defined before the 1004 block that uses it is seen. This error is probably the result of an error in the language translator used to generate the REL file. USC 31 8 Undefined subroutine [symbol] called number [decimal] {name [name]} from link The named link contains a call for a subroutine you have not loaded. If the subroutine is required for execution, you must reload, including the required module in the link. USD 8 8 Undefined symbol [symbol] in 1160) spare data (type LINK has detected an undefined global symbol in a Type 1160 REL block. This global symbol is used to relocate a byte pointer and must be defined before the 1160 block that uses it is seen. This error is probably the result of an error in the language translator used to generate the REL file. The level and severity of this message is determined by a compiler-generated coercion block. See Block Type 1130 in Appendix A. LINK V6.0 B-30 April 1986 LINK MESSAGES Code Lev Sev USI 8 16 Message Undefined [swi tch] symbol [symbol] illegal in swi tch You have specified an undefined symbol to a switch that can only take a defined symbol or a number. Specify the correct switch value. UUA 8 8 Undefined /UPTO: address [symbol] You gave the named symbol as an argument to the /UPTO switch, but the symbol was never defined. Load a module that defines the symbol, or change your argument to the /UPTO switch. VAL 31 1 Symbol [symbol] [octal] [type] LINK has printed the specified symbol, its value and its attributes as requested. tINA * * Wrong number of arguments in call to routine [symbol] called from module [symbol] at location [octal] The number of arguments in the routine call is not the number of arguments expected by the called routine. XCT 31 1 [llame] execution LINK is beginning execution of your program. ZSV 8 8 Zero switch value illegal You omitted required arguments for a switch (for example, /REQUIRE with no symbols). Respecify the switch. B-31 April 1986 LINK MESSAGES B.3 INDEXED MESSAGES The following pages list the indexed messages issued with the LINK messages LNKFEE, LNKFLE, LNKFRE, and LNKGSE. The medium-length messages in the table are substituted for the [reason] field in the main messages. The level and severity of these messages depend on the particular file access error. Thus, each indexed message includes the level and severity actually assigned to the main message. Idx Lev Sev o 31 31 Message (0) Illegal file name One of the following conditions occurred: 31 24 o The specified file name was illegal. o When updating a file, the specified file name did not match the file being updated. o The RENAME monitor call following monitor call failed. 31 24 LOOKUP (0) file was not found The named file existing file. 1 a was not found. Specify an (1) nc. directory for project-programmer number The named directory does not e~ist on the named file structure, or the project-programmer number given was incorrect. 2 31 24 (2) protection failure You do not have sufficient access privileges use the named file. 2 31 31 to (2) directory full The directory on the DECtape has no room for the file. Delete some files from the DECtape or specify another device. 3 31 24 (3) file was being modified Another job is currently modifying file. Try accessing the file later. 4 31 24 the named (4) rename file name already exists The named file already exists, or a different file was specified on the ENTER monitor call following a LOOKUP monitor call. 8-32 April 1986 LINK MESSAGES Idx Lev Sev 5 31 31 Message (5) illegal sequence of UUOs LINK has specified an illegal sequence of monitor calls. (For example, a RENAME without a preceding LOOKUP or ENTER monitor call, or a LOOKUP after an ENTER.) This is an internal error. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. 6 31 31 (6) bad UFD or bad RIB One of the following conditions occurred: 7 31 31 o A transmission, device or data error occurred while attempting to read the directory or the RIB of the named file. o A hardware-detected device or data error was detected while reading the named directory's RIB or data block. o A software-detected data inconsistency error was detected while reading the named directory's or file's RIB. (7) not a saved file The named file is not a saved file. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. 31 31 (1~) not enough memory The system cannot supply enough memory to use as buffers or to read in a program. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. 11 31 31 (11) device not available The named device is currently not available. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. 12 31 31 (12) no such device The named device does not exist. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. B-33 April 1986 LINK MESSAGES Idx Lev Sev 13 31 31 Message (13) not two re10c reg. capability The machine does not have a two-register relocation capability. This message can never occur and is included only for completeness of the LOOKUP, ENTER and RENAME error codes. If it does occur, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. 14 31 24 (14) no room or quota exceeded You have exceeded the quota of the named directory, or the entire capacity of the file structure. Delete some files, or specify a directory or structure with sufficient space. 15 31 24 (15) write lock error Specify a operator to The named device is write-locked. write-enabled device or ask the write-enable the named device. 16 31 31 (16) not enough monitor table space There is not enough internal monitor table space for the named file. Try the load at a later time. 17 1 1 (17) partial allocation only Because of the named directory's quota or the available space on the file structure, the total number of blocks requested could not be allocated. A partial allocation was given. 31 31 (2g) block not free on allocation The block required by LINK is not available for allocation. This message can never occur and is included only for completeness of the LOOKUP, ENTER and RENAME error codes. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. 21 31 31 (21) can't directory supersede You have attempted directory. 22 31 31 (enter) to supersede an existing the named (22) can't delete (rename) a non-empty directory You have attempted to delete a directory that is not empty. This message can never occur and is included only for completeness of the LOOKUP, ENTER and RENAME error codes. If it does occur, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. B-34 April 1986 LINK MESSAGES Idx Lev Sev Message 23 31 24 (23) SFD not found One of the sub-file path was not found. 24 31 24 directories in the named (24) search list empty A LOOKUP or ENTER monitor call was performed on generic device DSK: and the search list is empty. 25 31 24 (25) SFD nested too deeply You have directory allowed. 26 31 24 attempted to access a sub-file nested deeper than the maximum level (26) no-create on for specified SFD path No file structure in your job's search list has both the no-create bit and the write-lock bit equal to zero, and has the named directory. 27 31 24 (27) segment not on swap space A GETSEG monitor call was issued from a locked low segment to a high segment which is not a dormant, active or idle segment. This message can never occur and is included only for completeness of the LOOKUP, ENTER and RENAME error codes. If it does occur, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. 3~ 31 24 (3~) can't update file A LOOKUP and ENTER monitor call was given to update a file, but the file cannot be updated for some reason. (For example, another user is superseding it or the file was deleted between the time of the LOOKUP and the ENTER). 31 31 24 (31) low segment overlaps high segment The end of the low segment beginning of the high segment. 32 31 31 is above the (32) RUN not allowed when not logged in An attempt has been made to run a program from a not-logged-in job. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. 8-35 April 1986 LINK MESSAGES Idx Lev Sev 33 31 31 Message (33) file still has outstanding ENQ/DEQ locks The ENQ/D&Q facility has been used for simultaneous updating. of the named file, but some ENQ/DEQ requests are still outstanding and the file cannot be closed. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. 34 31 31 (34) bad .EXE file directory format The named file has a bad .EXE format directory. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. 35 31 31 (35).EXE format files must have .EXE extension An attempt has been made to run an .EXE-format file with a non-.EXE extension. .EXE format files (those with an internal directory) must have the extension .EXE. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. 36 31 31 (36) .EXE file directory is too big An attempt has been made to run an .EXE-format file with a directory that is too large for the monitor to handle. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (SPR) to DIGITAL. 37 31 31 (37) network capability exceeded for TSK: The monitor's ability to accept another connection has been exceeded. 40 31 31 (40) task is not available The named task is not existing task name. 41 31 31 network available. Specify an (41) undefined network node for TSK: You have specified a network node that does not exist. Wait for the node to come up or specify an existing network node. 42 31 31 ([octal]) Unknown cause This message indicates that a LOOKUP, ENTER or RENAME monitor call error occurred with an error code larger in number than the errors LINK knows about. This message is not expected to occur. If it does, please notify your Software Specialist or send a Software Performance Report (S PR) to DIGITAL. 8-36 April 1986 APPENDIX C JOB DATA AREA LOCATIONS SET BY LINK LINK sets a number of locations between 40 and 140 (octal) in the user's program. These locations are known as the Job Data Area (commonly abbreviated to JOBDAT). They are used by the TOPS-10 monitor. In addition, two segment programs will have a vestigial Job Data Area of eight words following the high segment origin. Job Data Area Address Mnemonic Use 41 .JB41 HALT if not specified otherwise. Executes by LUUOs. 42 .JBERR Right: Number of errors during loading. 74 • JBDDT Left: Right: Highest location occupied by DDT • Start address of DDT if loaded. 115 • JBHRL Left: Right: High segment length • Highest address in high segment. 116 .JBSYM Left: Right: Negative length of symbol table. Address of table. For extended symbol tables, this word contains a positive value which is the pointer to the symbol table vector (see Section 4.3). 117 .JBUSY Left: Right: Negative length of undefined symbol table. Address of undefined symbol table. If 0, there is no undefined symbol table, or the pointer to an extended symbol table is stored in .JBSYM. 120 .JBSA Left: Right: First free location in low segment. Start address of program. 121 .JBFF Right: First free location in low segment. 124 .JBREN Right: Reenter address of program. LINK V6.0 C-1 April 1986 I I JOB DATA AREA LOCATIONS SET BY LINK Address Mnemonic Use 131 .JBOVL Address of header block for link in an overlaid program. 133 .JBCOR Left: 137 .JBVER Version number: see description switch in Section 3.2.2. Highest location of low with data. the root segment loaded of /VERSION Vestigial Job Data Area Offset Mnemonic Use o .JBHSA Copy of .JBSA. 1 .JBH41 Copy of .JB4l. 2 .JBHCR Copy of .JBCOR. 3 • JBHRH LH: RH: 4 • JBHVR Copy of .JBVER • 5 • JBHNM Prog ram Name • 6 .JBHSM High segment symbol table, if any_ 7 .JBHGA High segment origin page in bits 9-17. left half of .JBHRL • right half of .JBREN. C-2 April 1986 INDEX Abbreviating switches, 3-4 Allocating memory, 3-58, 3-65 space, 3-23 /ARSIZE LINK switch, 3-6 /BACKSPACE LINK switch, 3-7 Blocks REL, A-I Calls to overlay handler, 5-15 .CCL files, 3-2 Clearing DECtape, 3-80 module requests, 3-39 Closing overlay links, 3-27 CLROV., 5-16 CLROVL, 5-16 Code relocatable, 1-2 Command comments, 3-1 indirect files, 3-2 str ing, 3-2 /COMMON LINK switch, 3-8 CONCATENATE PSECTs attribute, 6-3 Conserving memory space, 3-41 Constructing overlays, 3-50 /CONTENTS LINK switch, 3-9 Continuing commands, 3-1 /CORE LINK switch, 3-10 CORE (see memory), 3-21 Core image, 1-2 /COUNTERS switch, 3-11 /CPU LINK switch, 3-12.1 CPU type specifying, 3-12.1 Creating EXE files, 3-59 sharable save files, 3-66 Data word, A-I /DDEBUG LINK switch, 3-13 DDT, 2-1 /DEBUG LINK switch, 3-14 DEBUG system command, 2-1 Debuggers loading, 3-14, 3-72 specifying, 3-13 Debtigging overlayed programs, 5-14 /DEFAULT LINK switch, 3-15 Default file specifications, 3-15 /DEFINE LINK switch, 3-16 Diagram tree, 3-52 Displaying relocation counters, 3-11 Ending loading, 3-22 /ENTRY LINK switch, 3-17 Entry name symbols ·deleting, 3-38 Entry points overlay handler, 5-15 Entry vector section sharable save file, 4-4 /ERRORLEVEL LINK switch, 3-18 /ESTIMATE SCAN switch, 3-3 /EXCLUDE LINK switch, 3-19 /EXECUTE LINK switch, 3-20 EXECUTE system command, 2-1 Execution starting, 3-20 /EXIT SCAN switch, 3-3 Extended addressing, 1-3 EXTTAB table, 5-36 File core image, 4-1 executable, 1-2 library, 1-2 log, 1-3, 4-5 map, 1-3, 4-5 overlay format, 5-30 REL, 1-1 sharable save, 1-2, 3-59 symbol, 1-3, 3-69, 4-5 FORTRAN COMMON storage, 3-8 /FRECOR LINK switch, 3-21 FUNCT. subroutine, 5-11, 5-24 GETOV., 5-17 GETOVL, 5-17 Global switches, 3-5 Global symbols, 1-2 suppressing, 3-68 Index-l April 1986 /GO LINK switch, 3-22 /HASHSIZE LINK switch, 3-23 Header word, A-I /HELP SCAN switch, 3-3 IDXBFR, 5-14 INBFR, 5-15 /INCLUDE LINK switch, 3-24 Including local symbols, 3-28 INIOV., 5-17 INIOVL, 5-17 INTTAB table, 5-37 Job data area see JOBDAT JOBDAT, C-l Libraries searching, 3-60, 3-71, 3-76, 3-81 Library file, 1-2, 3-81 /LIMIT LINK switch, 3-25, 6-1 Limits symbol table, 3-75 /LINK LINK switch, 3-27 LINK command, 3-1 messages, 4-7, B-1 number table format, 5-32 overlay switches, 5-2 starting, 3-1 switch, 3-4 LOAD system command, 2-1 Loading FORTRAN COMMONs into PSECTs, 3-54 PSECTs, 6-1 two-segment code using PSECTs, 3-54.1 Local switches, 3-5 /LOCALS LINK switch, 3-28 /LOG LINK switch, 3-29 Log file, 1-3, 4-5 overlay, 5-18 specifying, 3-29 /LOGLEVEL LINK switch, 3-30 LOGOV., 5-18 LOGOVL, 5-18 Long count, A-I Magtape operations, 3-35 Maintaining free memory, 3-21 /MAP LINK switch, 3-31 Map file, 1-3, 4-5 /MAXCORE LINK switch, 3-32 /MAXNODE LINK switch, 3-33 MBZ, A-I Memory size specifying, 3-5 /MESSAGE SCAN switch, 3-3 Messages controlling, 3-78 levels, 4-7 LINK, 4-7, B-1 overlay handler, 5-21 severity, 4-7, B-2 suppressing, 3-18, 3-30 /MISSING LINK switch, 3-34 Modules loading, 3-19, 3-55 specifying, 3-24 /MTAPE LINK swi tch, 3-35' Naming overlay links, 3-27 /NEWPAGE LINK switch, 3-36 /NODE LINK switch, 3-37 /NOENTRY LINK switch, 3-38 /NOINCLUDE LINK switch, 3-39 /NOINITIAL LINK switch, 3-40 /NOLOCAL LINK switch, 3-41 Non-writable links declaring, 5-16 /NOREQUEST LINK switch, 3-42 /NOSEARCH LINK switch, 3-43 /NOSTART LINK switch, 3-44 /NOSYMBOL LINK switch, 3-45 /NOSYSLIB LINK switch, 3-46 /NOUSERLIB LINK switch, 3-47 Number of overlay links specifying, 3-33 Object modules, 1-1 Object-time systems loading, 3-49 Obtaining information, 3-34, 3-54.2, 3-73, 3-77 Index-2 April 1986 /REDIRECT switch, 3-54.1 REL blocks, A-l REL file, 1-1 Relocatable code, 1-2 overlays, 5-11 Relocation counters displaying, 3-11 setting, 3-36, 3-62 REMOV., 5-19 Removing links, 5-19 REMOVL, 5-19 /REQUEST LINK switch, 3-54.2 /REQUIRE LINK switch, 3-55 Resetting symbol types, 3-9 Restrictions Overlays, 5-12 /REWIND LINK switch, 3-56 Rewinding magtape, 3-56 Root link, 5-1 /RUN SCAN switch, 3-4 /RUNAME LINK switch, 3-57 /RUNCOR LINK switch, 3-58 Running links, 5-19 RUNOV., 5-19 RUNOVL, 5-19 /ONLY LINK switch, 3-48 /OPTION SCAN switch, 3-4 Origin PSECTs, 6-1 /OTSEGMENT LINK switch, 3-49 Overflow to disk, 3-32 OVERLAID PSECTs attribute, 6-3 /OVERLAY LINK switch, 3-50 Overlay handler, 5-14 Overlay link, 3-37 closing, 3-27 deleting, 3-42 format, 5-33 name table format, 5-32 naming, 3-27 overlay code, 5-35 paths, 5-1 preamble, 5-34 Overlaying links, 5-15 Overlays, 1-3 constructing, 3-50 program size, 5-14 relocatable, 5-11 restrictions, 5-12 writable, 5-10 /PATCHSIZE LINK switch, 3-51 Permanent switches, 3-5 /PLOT LINK switch, 3-52 Plot file specifying, 3-53 /PLTTYP LINK switch, 3-53 Predecessor overlay links, 5-1 Preventing JOBDAT loading, 3-40 Printing entry name symbols, 3-17 Program controlling termination, 3-63 executable, 4-1 /PROTECTION SCAN switch, 3-4 /PSCOMMON LINK switch, 3-54 PSECTs, 6-1 attributes, 6-3 CONCATENATE, 6-3 OVERLAID, 6-3 loading, 6-1 loading two-segment code into, 3-54.1 origin, 6-1 preventing unintented overlaps, 6-1 specifying upper bounds, 3-25, 6-1 PSECTs origin, 3-62 /SAVE LINK switch, 3-59 Save file format, 4-2 SAVOV., 5-20 SAVOVL, 5-20 SCAN switches, 3-3 /SEARCH LINK switch, 3-60 Searching libraries, 3-60, 3-71, 3-76, 3-81 /SEGMENT LINK switch, 3-61 Segments loading, 3-48 specifying, 3-61 /SET LINK switch, 3-62, 6-1 /SEVERITY LINK switch, 3-63 Severity codes of messages, B-2 Sharable save file, 1-2, 3-59 entry vector section, 4-4 Short count, A-l /SKIP LINK switch, 3-64 Skipping magtape, 3-64 /SPACE LINK switch, 3-65 Index-3 April 1986 Specifying job names, 3-57 memory size, 3-1~ start addresses, 3-67 /SSAVE LINK switch, 3-66 /START LINK switch, 3-67 Structure overlay, 5-1 tree, 5-1 Successor overlay links, 5-1 /SUPPRESS LINK switch, 3-68 Switch global, 3-5 local, 3-5 permanent, 3-5 temporary, 3-5 values, 3-5 /SYFILE LINK switch, 3-69 Symbol defining, 3-16 Symbol file, 1-3, 4-5 Symbol table vector, 4-5 /SYMSEG LINK switch, 3-7~ /SYSLIB LINK switch, 3-71 System command switches, 2-2 Table relocation, 5-38 Table (Cont. ) symbol, 3-7~ Temporary switches, 3-5 /TEST LINK switch, 3-72 /TMPFIL SCAN switch, 3-4 /UNDEFINED LINK switch, 3-73 /UNLOAD LINK switch, 3-74 Unloading magtape, 3-74 Uppar bounds for PSECTs, 6-1 specifying, 3-25 /UPTO LINK switch, 3-75 /USERLIB LINK switch, 3-76 /VALUE LINK switch, 3-77 /VERBOSITY LINK .swi tch, 3-78 /VERSIO~ LINK switch, 3-79 Virtual memory, 1-1 Word relocation, A-I Writable links declaring, 5-2~ Writable overlays, 5-l~ /ZERO LINK switch, Index-4 3-8~ April 1986 TOPS-10 LINK Reference Manual AA-0988D-TB READER'S COMMENTS NOTE: This form is for document comments only. DIGITAL will use comments submitted on this form at the company's discretion. If you require a written reply and are eligible to receive one under Software Performance Report (SPR) service, submit your comments on an SPR form. Did you find this manual understandable, usable, and well-organized? Please make suggestions for improvement. Did you find errors in this manual? If so, specify the error and the page number. Please indicate the type of reader that you most nearly represent. o Assembly language programmer o Higher-level language programmer o Occasional programmer (experienced) o User with little programming experience o Student programmer o Other (please specify)~~~~~~~~~~~~~~~~~~~~~ Name Date _~_ _ _ _ _ _ _ __ Organization _~_ _~~_~~_ _~___ Telephone _ _ _ _ _ _ _ _~ Street ____________________________________________ City ____________________ State _____ Zip Code _ _ __ or Country , , I I , , , - - - - - - - - - Do Not Tear - Fold Here and Tape --------------------------------------------, IIIIII No Postage Necessary if Mailed in the United States A BUSINESS REPLY MAIL FIRST CLASS PERMIT NO. 33 MAYNARD MASS. I , POSTAGE WILL BE PAID BY ADDRESSEE , , , , ~ SOFTWARE PUBLICATIONS MR01-2/L 12 200 FOREST STREET 01752 MARLBOROUGH, MA I , , , , , I , , , , I " I , , -- - - - - - - Do Not Tear - Fold Here and Tape --------------------------------------------,, , , , , , , , A , , , , , ,(I) , .5 ,.....:I ,~ ,0 ,0 I:::: ,~ ,.2 ,< '= 'u , , , ~ UPDATE NOTICE TOPS-10 LINK Reference Manual AD-0988D-T1 January 1985 Insert this Update Notice in the TOPS-10 LINK Reference Manual to maintain an up-to-date record of changes to the manual. The instructions for inserting this update start on the next page. © Digital Equipment Corporation 1985. All Rights Reserved. ~DmDD~D wore INSTRUCTIONS AD-0988D-T1 The following list of page numbers specifies which pages are to be placed in the TOPS-10 LINK Reference Manual as replacements for, or additions to, current pages. [Title page Copyright page [3-59 3-60 [5-21 5-22 [Entire Contents [3-67 3-68 [Entire Chapter 6 [3-49 3-50 [5-9 5-10 [Entire Appendix A [Entire Index KEEP THIS UPDATE NOTICE IN YOUR MANUAL TO MAINTAIN AN UP-TO-DATE RECORD OF CHANGES. TYPE AND IDENTIFICATION OF DOCUMENTATION CHANGES. Five types of changes are used to update documents contained in the TOPS-10 software manuals. Change symbols and notations are used to specify where, when, and why alterations were made to each update page. The five types of update changes and the manner in which each is identified are described in the following table. The Following Symbols and/or Notations Identify the Following Types of Update Changes 1. Change bar in outside margin; version number and change date printed at bottom of page. 1. Changes were required by a new version of the software being described. 2. Change bar in outside margin; change date printed at bottom of page. 2. 3. Change date printed at bottom of page. 3. Changes were made for editorial purposes but use of the software is not affected. 4. Bullet (e) in outside margin; version number and change date printed at bottom of page. 4. Data was deleted to comply with a new version of the software being described. 5. 5. Data was deleted to either clarify or correct the eXisting material. Bullet (e) in outside margin; change date printed at bottom of page. Changes were required to either clarify or correct the existing material. UPDATE NOTICE TOPS-10 LINK Reference Manual AO-09880-T2 April 1986 Insert this Update Notice in the TOPS-10 LINK Reference Manual to maintain an up-to-date record of changes to the manual. Changed Information The changed pages contained in this update package reflect the changes to LlNK-10 from Version 5.1 to Version 6.0. The instructions for inserting this update start on the next page. © Digital Equipment Corporation 1986. ~D~D[J~D All Rights Reserved. wore INSTRUCTIONS AO-09880-T2 The following list of page numbers specifies which pages are to be placed in the TOPS-10 LINK Reference Manual as replacements for, or additions to, current pages. Title Page Copyright Page 3-61 3-62 A-40.1 A-40.6 Entire Contents 3-67 3-70 A-45 A-69 1-3 1-4 3-75 3-76 Entire Appendix B 3-7 3-12.2 Entire Chapter 4 Entire Appendix C 3-21 3-22 Entire Chapter 6 Entire Index 3-53 3-54.2 A-13 A-14 KEEP THIS UPDATE NOTICE IN YOUR MANUAL TO MAINTAIN AN UP-TO-DATE RECORD OF CHANGES. TYPE AND IDENTIFICATION OF DOCUMENTATION CHANGES. Five types of changes are used to update documents contained in the TOPS-1 0 software manuals. Change symbols and notations are used to specify where, when, and why alterations were made to each update page. The five types of update changes and the manner in which each is identified are described in the following table. The Following Symbols and/or Notations Identify the Following Types of Update Changes 1. Change bar in outside margin; version number and change date printed at bottom of page. 1. Changes were required by a new version of the software being described. 2. Change bar in outside margin; change date printed at bottom of page. 2. Changes were required to either clarify or correct the existing material. 3. Change date printed at bottom of page. 3. Changes were made for editorial purposes but use of the software is not affected. 4. Bullet (e) in outside margin; version number and change date printed at bottom of page. 4. Data was deleted to comply with a new version of the software being described. 5. Bullet (e) in outside margin; change date printed at bottom of page. 5. Data was deleted to either clarify or correct the existing material. April 1986
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies