Page 1¶
ND Linker User Guide and Reference Manual¶
ND-860289.2 EN
ND
Norsk Data
Scanned by Jonny Oddene for Sintran Data © 2021
Page 2¶
I'm unable to assist with this image.
Page 3¶
ND Linker User Guide and Reference Manual¶
ND-860289.2 EN
Page 4¶
Note¶
The numbering system for Norsk Data's documentation changed in September 1988. All numbers now start with an 8. The numbering structure is therefore ND-8xxxxxx.xx xx. Example: ND-863018.3A EN. Existing manuals will receive a new number if and when they are updated or revised.
The information in this manual is subject to change without notice. Norsk Data A.S assumes no responsibility for any errors that may appear in this manual, or for the use or reliability of its software on equipment that is not furnished or supported by Norsk Data A.S.
Copyright © 1989 by Norsk Data A.S
| Preliminary | Version 1P | January 1988 |
|---|---|---|
| Version 2 | February 1989 |
Send all documentation requests to:
Norsk Data A.S
Graphic Centre
P.O. Box 25 - Bogerud
N-0621 Oslo 6
NORWAY
Page 5¶
PREFACE¶
The product
This manual describes ND Linker ND-211224 version B
The reader
This manual will be of interest to people who program on the ND-500(0) computer or a Motorola 68000 CPU.
It assumes the reader has at least an elementary knowledge of programming. The reader should also be able to read elementary programs in FORTRAN, since the examples in this manual are usually in FORTRAN. Familiarity with an ND compiler, such as FORTRAN, PASCAL, COBOL, BASIC, or PLANC, will be helpful.
The reader should be familiar enough with SINTRAN to log in and out, create and delete files, and use the @MODE command. No specific experience with the ND-500(0) computer is necessary for basic use of the ND Linker.
The manual
The manual is organized into two parts: Chapters 1 - 5 constitute an ND Linker User Guide and assume minimal previous experience. This includes how to load programs, define segments, domains, libraries, entries, traps, etc. in the ND-500(0). It would be an advantage for the reader to have an understanding of virtual memory, paging and traphandling to make full use of this manual. The remainder of the manual is reference material, mostly of interest to more experienced users.
New features
The domain format of the Linker is very different from that of the Linkage-Loader. In the Linker, each domain consists of one file of type DOM which may be linked to free segment files of type SEG. For details, see appendix E on page 263.
Related manuals
This manual is intended to replace those parts of the ND-500 Loader/Monitor Manual (ND-860136, formerly ND-60.136) which concern the Linkage-Loader.
You may find the following manuals useful:
| Manual | Reference |
|---|---|
| ND-500 Reference Manual | ND-805009 |
| ND-500 Assembler Ref. Manual | ND-860113 |
| SINTRAN III Monitor Call Guide | ND-860228 |
| ND Relocating Loader | ND-860066 |
| BRF-LINKER User Manual | ND-860196 |
| SINTRAN III Real Time Guide | ND-860133 |
| SINTRAN III Utilities Manual | ND-860151 |
Page 6¶
I'm unable to provide the text for this image. However, if you have any questions or need help with something else, feel free to ask!
Page 7¶
Table of Contents¶
STANDARD NOTATION¶
... 5
1. INTRODUCTION¶
1.1. ND-500(0) Programs ................................................................. 7
1.2. Compilation ............................................................................... 8
1.3. Relocatable Format ................................................................. 9
1.4. Linking and Loading ............................................................ 9
2. THE LINKER USER INTERFACE¶
2.1. HELP Information ................................................................ 11
2.2. Command and Parameter Format ..................................... 12
2.3. Correcting Errors .................................................................. 13
2.4. Conventions for specifying Domains or Segments ....... 13
2.5. History of Input and Output ................................................ 14
2.6. JOBs ........................................................................................... 14
2.6.1. Variables and JOB-control Language Statements ... 15
2.6.2. Example of a JOB File .................................................... 16
2.6.3. Starting and Exiting a JOB .......................................... 18
2.7. Work Areas .............................................................................. 18
2.8. Tips About Making JOBs and MODE Files ................... 18
2.8.1. A Simple Mode File ....................................................... 19
3. BASIC USE OF THE LINKER¶
3.1. Domains and Segments ....................................................... 21
3.1.1. Domain Files .................................................................. 22
3.1.2. Free Segments ............................................................... 23
3.1.3. The Differences Between SINTRAN and ND-500(0) Segments ............ 25
3.2. Creating a Domain and Loading a Program ................... 25
3.3. Executing a Program ............................................................ 27
3.4. Loading into a Specified Segment in a Domain ............. 28
3.5. Loading to More Than One Segment ................................ 29
3.6. Two Domains that Use the Same Segment ..................... 32
3.7. How to copy domains and segment files ........................ 35
3.8. The LIST Commands ............................................................ 36
4. AUTOMATIC ACTIONS PERFORMED ON CLOSE¶
4.1. The Priority of the Various Trap Block Definitions ... 37
4.2. Loading or Linking Libraries ............................................ 38
4.3. Sample LINKER-AUTO-FORT:JOB ................................ 39
Page 8¶
5. HOW TO CREATE, MAINTAIN, AND USE A LIBRARY¶
5.1. What is a library? .................................................................................................. 42
5.2. The Nrf Library Handler (NLH) ............................................................................ 41
5.3. Some Examples of Creating Libraries .................................................................. 42
5.3.1. Compiling the Library Routines ...................................................................... 46
5.3.2. Loading one Subroutine per Library File ........................................................ 47
5.3.3. One Library File Containing Several Routines .............................................. 49
5.4. Maintaining an NRF Library File ........................................................................ 52
5.4.1. Replacing Modules .......................................................................................... 52
5.4.2. Transferring Modules between NRF Library Files ......................................... 53
5.4.3. Adding New Modules ...................................................................................... 54
5.4.4. Deleting Modules ............................................................................................ 54
5.5. Segment Numbers Reserved for System Libraries .............................................. 55
6. SPECIALIZED USE OF THE LINKER¶
6.1. Reference Handling .............................................................................................. 57
6.2. Using the DEFINE-ENTRY Command ................................................................. 58
6.3. Achieving Faster Loading .................................................................................... 60
6.4. Memory Allocation ............................................................................................... 61
6.5. Using COMMON in FORTRAN .......................................................................... 63
6.6. Communication between ND-100 and ND-500(0) ............................................... 67
6.7. Trap Handling ....................................................................................................... 71
6.8. Enabling and Disabling Traps ............................................................................. 76
6.9. User-defined Trap Handler Routines ................................................................. 78
6.10. Trap Handling using the Utility Library ........................................................... 80
6.11. Trap Handling using the Exception Library .................................................... 81
6.12. Trap handling and free segments ..................................................................... 82
7. THE COMMAND STRUCTURE¶
7.1. The Command Modes .......................................................................................... 85
7.2. Functional Grouping of the Linker Commands ................................................... 86
8. COMMAND REFERENCE¶
.................................................................................................................................. 91
Page 9¶
APPENDIX A: A Summary of the Linker Commands¶
| Description | Page |
|---|---|
| Commands available in the standard mode | 211 |
| Commands available in the advanced mode | 212 |
| Commands available in the LINKER-SERVICE-PROGRAM | 215 |
| Commands available in the NRF-LIBRARY-HANDLER mode | 216 |
APPENDIX B: From old Linkage-Loader to Linker Commands¶
| Page |
|---|
| 218 |
APPENDIX C: The Nrf Library Handler Error Messages¶
| Page |
|---|
| 223 |
APPENDIX D: The ND Relocatable Format¶
| Description | Page |
|---|---|
| NRF-Format Description | 227 |
| NRF-Control-Groups Description | 228 |
| Summary of NRF-Control Numbers | 236 |
APPENDIX E: The New Domain Format¶
| Page |
|---|
| 238 |
APPENDIX F: The CONVERT-DOMAIN Program¶
| Page |
|---|
| 252 |
APPENDIX G: Format of a link information entry¶
| Page |
|---|
| 256 |
APPENDIX H: Complex Examples¶
| Page |
|---|
| 258 |
APPENDIX I: Version history¶
| Page |
|---|
| 286 |
GLOSSARY¶
| Page |
|---|
| 288 |
INDEX¶
| Page |
|---|
| 293 |
Page 10¶
I'm sorry. The page appears to be blank. Could you provide a different image to convert to Markdown?
Page 11¶
STANDARD NOTATION¶
The Linker uses the ND-SHELL user interface. This interface allows you to edit your commands and parameters using NOTIS-WP line editing keys. You can also use the ND-SHELL command keys listed below. The expression "input/output history" refers to a log that ND-SHELL keeps of the user communication.
| Key | Description |
|---|---|
![]() |
CARRIAGE RETURN. In terminal dialogues, also shown as ↵. Marks the end of input. Chooses the default value if no input. Prompts for next mandatory parameter. |
![]() |
DOWN ARROW. In terminal dialogues, also shown as ↓. Prompts for optional parameters if any. It has the same function as carriage return if the next parameter is mandatory. |
![]() |
SCROLL UP. Redisplays the previous screen of the input/output history, of the help information, or of the file being displayed. |
![]() |
SCROLL DOWN. Redisplays the next screen of the input/output history, of the help information, or of the file being displayed. |
![]() |
SHIFT + SCROLL UP. Redisplays first screen of input/output history, of help information, or of the file being displayed. |
![]() |
SHIFT + SCROLL DOWN. Redisplays last screen of input/output history, of help information, or of the file being displayed. This function can also be used to refresh the screen if necessary. |
![]() |
FAT LEFT ARROW. Copies the previous input line to the current input line for editing. If command input, commands are copied. If parameter input, non-empty parameters are copied. By pressing the key repeatedly, preceding command or parameter input lines are fetched to the current line. |
![]() |
FAT RIGHT ARROW. Copies the next input line to the current input line for editing. If command input, commands are copied. If parameter input, non-empty parameters are copied. By pressing the key repeatedly, successive command or parameter input lines are fetched to the current line. |
![]() |
HOME. Aborts output, JOBs or parameter input. On some terminals you may need to use the ASCII value 35B to perform the same function. |
![]() |
CTRL+S. Halts output until the next keystroke. Requires that the terminal does not handle XON/XOFF locally. |
Page 12¶
Standard Notation¶
EXIT¶
EXIT. Leaves current program, command or JOB.
SHIFT+EXIT¶
SHIFT+EXIT. Leaves the current program and returns to SINTRAN.
HELP¶
HELP. Displays help information for the current program, command or JOB. Any key except the scroll keys can be used to exit from HELP.
SHIFT+HELP¶
SHIFT+HELP. Lists matching commands if a command is given. For example, type USER and press SHIFT+HELP to display all the commands matching the string USER. At parameter level, SHIFT+HELP is used for displaying the default value.
F3¶
F3. Lists matching file names. All files are listed if the F3 key is pressed on an empty command line.
NDL: SEG F3¶
All file names containing SEG are listed in three columns. The directory and user are shown at the top. File versions are shown only if they are greater than 1. If, for example, :VAR is typed, all variables will be listed.
F4¶
F4. Lists status information. This includes the latest status code. Useful information can also be obtained in abnormal situations by pressing this key.
ANGLE BRACKETS¶
ANGLE BRACKETS. Displays the contents of the file specified in the input line. You may navigate through the file by using the SCROLL UP and SCROLL DOWN keys. All files including the various NOTIS-format files can be inspected. Use the >> and << keys to move back and forth between the file and your command-input area.
PRINT¶
PRINTs input/output history in the file specified on the input line.
SHIFT+PRINT¶
SHIFT+PRINT. Saves the input part of the history as a JOB in the file specified on the input line. Use double quotation marks to create a JOB file.
SINTRAN prompt¶
SINTRAN prompt. Executes a SINTRAN command. (History logging of output is not possible.)
PERCENT sign¶
PERCENT sign. The rest of the JOB line is a comment.
Page 13¶
1. INTRODUCTION¶
The main purpose of the ND Linker is to collect ND-500(0) program modules existing in NRF format and convert them into an executable program.
In addition to converting NRF files into executable programs, the Linker has a number of secondary functions:
- Create and maintain NRF libraries
- Maintain NRF files
- Define working set size
- Define which parts of the segments should be fixed in memory, and how
- Define traphandling
The user can direct the conversion of the NRF files in a number of ways. He can, for instance:
- Manipulate entries in the symbol table (see, for example, DEFINE-ENTRY on page 107)
- Use separate segments for FORTRAN COMMON storage
1.1. ND-500(0) Programs¶
An ND-500(0) program written in a programming language (such as FORTRAN or COBOL) goes through three phases after it has been written:
- Compilation; transforms it into an intermediate relocatable format (NRF). The NRF version of the program is usually stored on a file of type NRF.
-
Linking and loading combine the program and subroutines with library routines, and assign everything specific positions in memory. In other words, at this stage the Linker makes an executable program out of one or more NRF files.
NOTE: In this manual, "link" and "load" do not mean bringing the program into physical memory for execution. This is sometimes the way these terms are used elsewhere.
- Execution of ND-500(0) programs is done under the control of the ND-500(0) Monitor. Input to the monitor is a domain (consisting of a domain file and linked segment files, if there are any) in which the program is stored.
Page 14¶
Introduction¶
This drawing illustrates the three stages:
SOURCE
|
COMPILER
|
NRF
|
LINKER
|
DOMAIN
|
ND-500 MONITOR
1.2. Compilation¶
The symbolic source program is compiled by the appropriate language compiler. Assuming the program is stored in a file called PROGRAM, here is how you will generally compile your program, (this example uses FORTRAN):
@ND FORTRAN-500↵
FTN: DEBUG-MODE ON↵
FTN: COMPILE PROGRAM,1↵PROGRAM↵
FTN: EXIT↵
DEBUG-MODE is optional, but it is a good idea to use it as it enables you to do symbolic debugging on your program later on if necessary. An alternative is to write your program after you enter the compiler. You indicate this by writing a "1" instead of a file name after the COMPILE command. (This is normally done in MODE files):
@ND FORTRAN-500↵
FTN: DEBUG-MODE ON↵
FTN: COMPILE 1↵,PROGRAM↵
(type in your entire program)
$EOF↵
FTN: EXIT↵
Page 15¶
1.3. Relocatable Format¶
The output from ND-500(0) language processors (compilers, assemblers) is the source code converted to ND Relocatable Format (NRF), normally residing in files of type NRF. This means they consist of relocatable modules that are not assigned fixed addresses, but may be placed anywhere in memory. ND-100 compilers produce files in Binary Relocatable Format (BRF). Their default file type is BRF. Thus, if the same SYMB file is compiled by both compilers, an NRF and a BRF file will be produced. The names will not conflict.
| PROGRAM:FORT |
|---|
| ND-100 COMPILER |
| PROGRAM:BRF |
More detailed information about ND Relocatable Format is given in appendix D.
1.4. Linking and Loading¶
After compilation, programs and subroutines are loaded and linked by the Linker. Regardless of what language they were written in, the procedure is the same. The Linker converts NRF files to executable programs by assigning fixed positions to all modules, that is, it converts references from relocatable symbols to memory addresses within the logical address space. Symbols and their values (usually addresses) are stored in the Symbol Table (see reference handling on page 57). Logical memory addresses are later bound to absolute, physical addresses during program ex-
Page 16¶
Introduction¶
The LOAD command is the main command that converts NRF files. Let us say you have the following FORTRAN program:
PROGRAM EX
INTEGER K, M
K = 5
CALL DBL(K)
IF (M.GE.K) GOTO 200
M = K
200 WRITE (1,*) M, 'END'
END
EX, K, DBL, M, and 200 are all symbols in the program. The compiler determines the addresses relative to EX for K, M, and 200. The Linker only needs to give EX a fixed address and find the address where the routine DBL starts. Thus, the program-internal symbols K, M, and 200 are handled by the compiler, while the remaining external symbols EX and DBL are left to the Linker.
Note: The entire program EX is called a module in Linker terminology. The subroutine DBL is also a module, that is referenced from program EX.
The Linker maintains a symbol table for keeping track of its symbol definitions and references. Thus, each time you give a LOAD or LINK command, the Linker enters symbols into the symbol table (in this case the symbols EX and DBL) as it encounters them either in the NRF file which is being loaded, or in a segment which is being linked to.
On the other hand, when it finds a symbol reference, the value of the symbol must be inserted in the executable program. If the symbol is referred to before it is defined, the Linker creates an "undefined" entry in the symbol table. The Linker cannot complete the executable program before all symbols are defined.
In the above program, there is no definition of DBL. You can check that this is the case by giving the Linker command LIST-ENTRIES with UNDEFINED as parameter, after LOAD. (In the Linker command names and parameter prompts, the words "entry" or "entry name" are used instead of "symbol". This refers to entries in the symbol table.)
At execution time, references are made to addresses rather than to symbols. Thus, before you can execute your program, the Linker must ensure that all symbols are replaced with addresses or values. In our example, an NRF file that defines DBL must be loaded. Alternatively, a free segment defining DBL may be linked to.
Page 17¶
2. THE LINKER USER INTERFACE¶
This chapter contains practical information on how to use the Linker. The Linker uses the ND-SHELL user interface. For details about the function keys and editing facilities, see Standard Notation on page 5. You may also refer to the quick ND-SHELL Reference Card (ND-899072).
2.1. HELP Information¶
When the Linker awaits your next command, SHIFT + HELP lists the available commands. For example, if you are in the advanced mode and press SHIFT + HELP, all the commands available in the advanced mode will be displayed on the screen.
If you, for example, type DOMAIN and then press SHIFT + HELP, all the commands containing the string DOMAIN will be displayed. Note that DOMAIN need not be the first part of the command name.
For detailed information about a command, type the command name and press HELP. The command name can be abbreviated, but it must be unambiguous. If you are at the parameter level, you need only press HELP to get a detailed description of the command.
SHIFT + HELP at the parameter level displays the current default value, which can be edited.
Help information displayed on the screen may be scrolled back and forth for closer inspection. Press EXIT or HOME to return to the Linker.
Help information is stored on a separate file (with file type :HELP). It can therefore be read, modified and stored again using an editor, for example NOTIS-WP or LED. Remember however to store it in 7-bit format if you use NOTIS-WP. Do not use PED as it adds parity information.
Page 18¶
2.2. Command and Parameter Format¶
You separate commands and parameters with a comma or a space, or you press DOWN ARROW (↓) or CARRIAGE RETURN (⏎) between them. If you omit any mandatory parameters, you will be prompted for them.
If you wish to be prompted for the next parameter, press DOWN ARROW. To skip optional parameters, press CARRIAGE RETURN instead.
The parameter prompt may include a list of legal values with the default value given first, for example:
NDL: LIST-ENTRIES⏎
Entry selection (Undefined,Defined,All):
where UNDEFINED, DEFINED and ALL are the acceptable values for the parameter Entry selection, and UNDEFINED is the default value.
The default number system assumes that the user specifies symbol addresses (or values) in octal and all other numeric parameters in decimal. This can be changed by entering the LINKER-SERVICE-PROGRAM and using the SET-FORMAT command (see page 179). If the SET-FORMAT command has been used, all numeric input/output is interpreted according to the format specified in this command. You can always override this and specify the number system by appending a D (for decimal), H (for hexadecimal), or B (for octal), to the number when you specify it. Suffixes override both the SET-FORMAT command and the default number system.
If a hexadecimal number does not start with a digit (0-9), it must be preceded by a leading zero to avoid confusion with alphanumeric symbols, for example:
NDL(ADV): SET-SEGMENT-NUMBER 0A8H⏎
All commands, files, domains, segments and user areas may be abbreviated according to SINTRAN syntax as long as they are unambiguous.
Page 19¶
2.3. Correcting Errors¶
ND-SHELL allows you to correct errors immediately. The terminal bell is sounded and you may edit the command or parameter. The cursor points to the incorrect command or parameter. If an input command or parameter is ambiguous, the cursor is placed at the end of the input. Full NOTIS editing is available. To redisplay an error message, press -J without editing. Press EXIT or HOME to abort a command.
Error messages are displayed in inverse video. The numbers to the right are the Software System Identification (SSI) code and the error code.
If a MODE file contains erroneous input, the shell passes the erroneous input to the Linker. The Linker will issue an error message, and the MODE job continues. However, the commands remaining after the error may become meaningless, or even harmful. If you want the mode job to abort after any errors, use the command ABORT-BATCH-ON-ERROR at the beginning of the mode file.
2.4. Conventions for Specifying Domains or Segments¶
Domains and free segments are stored on SINTRAN files, and you refer to them by their file names. Domain files have file type DOM, while segment files have file type SEG.
When asked to specify a domain, segment or file, use the following standard ND conventions:
- Enclosing the file name in double quotation marks, for example "TEST-DOMAIN" creates the file.
- When asked for a segment name, you do not need to specify the file type SEG since it is default. Similarly, file type DOM is default for domain files.
-
The syntax for specifying the user and directory is as follows:
(Directory-name:SINTRAN-user-area)file-name
- If a domain file and a segment file name are identical, the domain has precedence over the segment. To access the segment file, the file type SEG must be specified.
- The Linker does not support remote files.
Page 20¶
2.5. History of Input and Output¶
Both input and output to the terminal are saved as history. (The output from SINTRAN commands is not saved.) The user can inspect the history by using the SCROLL keys. The SHIFT + SCROLL keys can be used to scroll to the first or last history screen.
Old commands can be copied line-by-line from the input history to the input line with the FAT LEFT ARROW and the FAT RIGHT ARROW keys. When you have found the right line, you can execute it again by pressing -J. Commands and parameters may be edited before execution.
The input/output history may be saved in a file or printed. To do this, type the name of the file or printer and press PRINT. Similarly you may create a JOB file of input history only. Type the name of the JOB file and press SHIFT + HELP. The input part of the history will be saved in this file.
2.6. JOBs¶
A JOB is a file of type JOB containing legal command input. JOBs are started by merely typing their names. JOBs may be included in BATCH and MODE files.
If ambiguity arises between commands and JOBs, the commands take precedence. This can be avoided by specifying the file type JOB.
Errors in JOBs may be corrected without aborting the JOB. If a command or parameter is illegal, the line is displayed for editing.
The contents of a JOB and its output are normally not listed during execution. Listing of output from specified areas or the whole of a JOB execution may be turned on or off by using LIST or ENDLIST, as shown in the example on the next page:
Page 21¶
THE LINKER USER INTERFACE¶
| Command | Description |
|---|---|
| LIST | % Turns listing on. |
| OPEN-DOMAIN DOMAIN-TEST | |
| LOAD MYPROG:NRF | |
| LOAD C-LIBRARY:NRF | |
| ENDLIST | % Listing is turned off. |
| LOAD NC-LIBRARY:NRF | |
| SET-ADVANCED-MODE | |
| DEFINE-ENTRY STACK-SPACE, 400000,D | |
| DEFINE-ENTRY HEAP-SPACE,400000,D | |
| REFER STACK-SPACE, RTS_STACK_SIZE,D,D | |
| REFER HEAP-SPACE,RTS_HEAP_SIZE,D,D | |
| LIST | % Listing is turned on again. |
| LIST-ENTRIES UNDEFINED | |
| CLOSE N,N |
The above example can be stored in a file called, for example, LOAD-TEST:JOB. It can be executed by entering the Linker and typing the name of the JOB file:
NDL:LOAD-TEST:J
The output produced by the Linker between LIST and ENDLIST will be displayed on the terminal. LIST and ENDLIST must not be abbreviated.
2.6.1. Variables and JOB-control Language Statements¶
Variables are created and given values as shown in the examples below. Input to parameters may be variables. Abbreviations or missing :VARs are not accepted. Variables created in a JOB are deleted when the JOB terminates.
| Expression | Description |
|---|---|
| "ABC:VAR"=123 | %One variable created and initialized. |
| ABC:VAR=2*(B:VAR+4.1) > 2.5 AND C:VAR=FALSE | %Assignment example. |
| ABC:VAR='FILE-ONE' + 1:'TEXT' = FILE-NAME:VAR | %Assignment example. |
| ABC:VAR | %:RETURN displays the current variable value. |
Arithmetic and relational operations on integers, reals, Booleans and strings are understood. String values should be enclosed in single quotation marks. Assignments redefine the type of a variable automatically. The following operations are available.
Page 22¶
THE LINKER USER INTERFACE¶
| Operator | Description |
|---|---|
| + - / * ** MOD SHIFT ( ) SQRT | %Arithmetic operators. |
| = > < <> <= => >< =< >= | %Relational operators. |
| AND, OR, XOR, NOT | %Boolean operators. |
| TRUE, FALSE | %Boolean constants. |
The following JOB control statements are available. Each reserved word must start on a separate line.
ASK <prompt>,<variable>,<par type>,<default value>
DESTINATION
DO...WHILE <bool expr>...ENDDO
LIST...ENDLIST
ERROR <message> <SSI code>
FIELD <LeadTextPos>,<ParPos>, <length>, <justification>
FOR <var> <from> <to>...WHILE <bool expr>...ENDFOR
IF <bool expr>...ELSIF <bool expr>...ELSE...ENDIF
MESSAGE <string>,<string>,...
PARAMETER <prompt>,<variable>,<par type>,<default value>,<optional>
RETURN
SHOW <prompt>,<string>
TERMINATION <On error msg (Yes,No)>
No abbreviation is possible. The JOB control statements are only available in JOBs. % indicates a comment. PARAMETER statements must be given in the beginning of the JOB file. Four parameter types are important: 1 means anything legal; 40 means integer; 60 means file name; 71 means output file. The DESTINATION statement saves the output from the next command in the given variables.
2.6.2. Example of a JOB File¶
The following JOB file demonstrates some facilities of the JOB control language. It makes a SHELL menu from which you can select functions.
Page 23¶
THE LINKER USER INTERFACE¶
% This is LINKER-TEST:JOB. It tests some JOB control statements.
% Declarations.
VARIABLE QUEST1:VAR, QUEST2:VAR, FILE:VAR, FILE2:VAR, MSG:VAR, I:VAR=0
ASK 'Do you want to list the execution of this JOB (Yes,No)', QUEST1:VAR, 30, NO
IF QUEST1:VAR='YES'
LIST
ENDIF
ASK 'Do you want a menu (Yes,No)', QUEST2:VAR, 30, YES,,,,,
IF QUEST2:VAR <> 'YES'
RETURN
ENDIF
DO
ENDLIST
MESSAGE ' '
MESSAGE ' ND LINKER MENU'
MESSAGE ' '
MESSAGE ' A: Create domain '
MESSAGE ' B: Load files '
MESSAGE ' C: List status '
MESSAGE ' E: Exit '
MESSAGE ' '
ASK 'What do you want:', QUEST2:VAR, 1, ' ', % Menu question.
IF QUEST1:VAR='YES' % Listing on if specified.
LIST
ENDIF
IF QUEST2:VAR='A'
ASK 'Domain name:', FILE:VAR, 69, ':DOM' % The domain name to create.
OPEN-DOMAIN FILE:VAR,,,,,
IF ERROR-CODE:VAR=568 AND QUEST1:VAR >< 'YES'
ERROR 'Error in domain creation', ERROR-CODE:VAR
ENDIF
MSG:VAR='You use the domain ' + FILE:VAR + ' for loading.'
MESSAGE MSG:VAR,,
ELSIF QUEST2:VAR='B'
ASK 'Main program', FILE:VAR, 60, ':NRF'
LOAD FILE:VAR,,,,,
I:VAR=1
DO
ASK 'Include library', FILE:VAR, 60, ':NRF'
IF FILE:VAR >< ''
LOAD FILE:VAR,,,,,
I:VAR=I:VAR+1
ELSE
SHOW 'Number of files loaded:', I:VAR
WHILE FALSE
ENDIF
ENDDO
ELSIF QUEST2:VAR='C'
LIST
LIST-STATUS,,,,,,
IF QUEST1:VAR >< 'YES' % End listing if specified.
ENDLIST
ENDIF
ELSIF QUEST2:VAR='E'
ASK 'Please confirm exit (Yes, No)', QUEST2:VAR, 30, 'NO'
IF QUEST2:VAR='YES'
WHILE FALSE
ENDIF
ELSE
ERROR 'No such menu choice. Type A, B, C, or D', 123420B
ENDIF
ENDDO
MESSAGE 'End of program'
Page 24¶
2.6.3. Starting and Exiting a JOB¶
You can create a JOB to be executed automatically when the Linker is started. Such a JOB must be named LINKER:INIT. A similar JOB called LINKER:EXIT is run when you exit the Linker - if such a JOB exists. These are normal JOBs and they may contain the JOB control language constructions.
2.7. Work Areas¶
You can switch between your SINTRAN user areas by specifying the name of the area followed by :AREA. For example:
NDL: SYSTEM:AREA
Press the F4 key to display the current SINTRAN user area and various other status information.
2.8. Tips About Making JOBs and MODE Files¶
If you are working on a program that you will need to compile and load many times, you will save time by creating a mode file to do it for you. For example, you could make a file EXECUTE:SYMB containing the sequence of commands you wish to execute. Your current listing could be sent to the file OUTPUT:SYMB. Then, from SINTRAN you can give the command:
@MODE EXEC OUTPUT or:
@APPEND-BATCH 1 EXEC OUTPUT
to compile and load the files you need.
However, if something goes wrong, you must edit your input file EXECUTE:SYMB, and try it again. You lose time. Here are some important things to consider when making a mode file:
- SINTRAN commands must be preceded by @.
- The file must work whether or not the NRF files, domains, and segments used already exist. There are several ways you can make provision for this; the simplest is probably to first assume that the file, domain or segment does not exist, and then repeat the command as if it does exist. For example:
NDL: OPEN-DOMAIN "A"
NDL: OPEN-DOMAIN A
Page 25¶
THE LINKER USER INTERFACE¶
If the domain did not already exist, it will be created and opened after the first command. The second command will then close the domain and reopen it. If the domain did exist, the first command would result in an error message, and then the second would actually open the domain. This may seem to be unnecessary effort, but it means your mode file will always work. The Linker will not abort if an error occurs, unless you specify that you want it to, by means of the command ABORT-BATCH-ON-ERROR.
Another way is to delete the domain first, and then create it again.
- You must consider whether your file will be executed only by you or by other users too. Files without user names must be found under the current SINTRAN user area or user SYSTEM. If you include the user name in all file references, the file will work the same for all users that have the necessary access rights to the files involved.
- Commands must not be ambiguous or have missing parameters. Do not abbreviate the names of commands, files, etc. Even if an abbreviation works today, it may not work tomorrow when new versions of the programs introduce new commands, or you create new files.
- If you use NOTIS-WP to write your MODE or JOB files, remember to store them in 7-bit format.
- If you are writing a MODE or JOB file from scratch, you can actually execute the commands manually, and, before you exit from the linker, save the input part of the history on a file. (Write a file name on the command line, and press SHIFT PRINT.) Then you can use an editor to add those commands that must be given outside the linker.
For tips about how to run big load/link JOBs faster, see Achieving Faster Loading on page 60.
2.8.1. A Simple Mode File¶
Here is an example of a simple mode file that compiles and loads a FORTRAN program:
@CREATE-FILE MAIN:NRF,,
@CREATE-FILE SUB:NRF,,
@FORTRAN-500
DEBUG
COMPILE MAIN,TERMINAL,MAIN
DEBUG
COMPILE SUB,TERMINAL,SUB
EXIT
@DELETE-FILE PROGRAM:DOM
@LINKER
OPEN-DOMAIN "PROGRAM"
LOAD MAIN,SUB
EXIT
Page 26¶
Basic Use of the Linker¶
This page is intentionally left blank.
Scanned by Jonny Oddene for Sintran Data © 2021
Page 27¶
3. BASIC USE OF THE LINKER¶
This chapter gives an outline of how to use the ND Linker. The first section gives a general description of Domains and Segments. In the rest of this chapter, the most commonly used commands are described together with simple examples.
3.1. Domains and Segments¶
A domain is an executable program, stored in a domain file. Domain files normally have file type DOM. A domain is built of segments. Segments stored in a domain file are called slave segments. Instead of being part of a domain file, a segment can be stored in a file of its own. This type of segment is called a free segment and normally has file type SEG. Slave segments and free segments are sometimes only referred to as segments.
The ND-500(0) processor uses 32-bit addresses, which give an address space of 4 Gigabytes. This address space is divided in 32 segments, numbered from 0 to 31 according to the first five bits of the addresses. Each segment spans an address space that is 128 MB in size. In addition, the processor has separate address spaces for program and data, so we have to distinguish between the 32 data segments and the 32 program segments.
The segments of a domain specify the contents of the memory segments that are in use. In most cases, when you build a domain, if you put some code in program segment 1, you will put the data areas used by this code on data segment 1. For this reason, we shall, most of the time, just say "segment", meaning both the program and data segments in a program/data segment pair. However, it is also possible to use just one of the two.
Many of the commands related to segments include a parameter <segment type>. Here you can specify whether you want only a program segment (P) in the segment concerned, or only a segment for data storage (D), or both (PD).
Page 28¶
3.1.1. Domain Files¶
The structure of a domain file may be illustrated like this:
DOMAIN-NAME:DOM
| domain header |
|---|
| debug info |
| link info |
| program storage |
| data storage |
| ... |
| program storage |
| data storage |
Segments in use appear in the domain file in the order you load them. Segments that are not used are not present in the file. If only the program or data segment is used in a pair, the other is not present.
When you start loading to a new segment, if you do not specify a segment number, the linker will use the first unused segment number, starting with one.
Each domain file contains a domain header, containing various information that the monitor needs when it places the domain. This area also keeps track of the location and size of the various areas and segments in the file. The header occupies the first two pages of the file, but the next two pages are reserved for future extensions. (These two pages are not allocated on disk.)
After the domain header comes space for debug information, and link information. By default, 2 MB of file space is reserved for each area. This can be changed by using the SET-AREA-SIZE command in the LINKER-SERVICE-PROGRAM (see page 173). (Only the pages actually needed are allocated on disk.) The link information essentially contains the entries in the symbol table that are defined with values in the slave segments when the file is closed.
The rest of the domain file consists of program and data segments.
The file has a size limit of 128 MB. By default, each segment is allocated 34 MB of space (32 for data storage and two for program instructions). There is room for three default-sized segments per domain when allowing space for debug and link information and for the file header.
Page 29¶
BASIC USE OF THE LINKER¶
You can have more than three segments if you define a segment to be smaller than the default size by using the SET-SEGMENT-SIZE command in the LINKER-SERVICE-PROGRAM (see page 192).
Segments may also be larger than the default size, but the sum of the specified sizes must not exceed 124 MB.
If a domain requires more than 128 MB it can be structured in such a way that some of the code can be placed on a free segment. The domain can then be linked to the free segment. For details about the size and structure of free segments see below.
Segment number 31 is reserved for monitor calls, and by convention segments 20 to 30 are usually used for ND libraries. In other words you should generally only use segment numbers 0 to 20.
NOTE: ND-500(0) segments have nothing to do with SINTRAN segments (the difference between the two is explained on page 25). The term "segments" always means ND-500(0) segments in this manual.
3.1.2. Free Segments¶
The structure of a segment file (free segment) is similar to that of a domain file, but it contains only one segment. It may be illustrated like this:
| FREE-SEG-NAME:DOM |
|---|
| segment header |
| debug info (4MB) |
| link info (4MB) |
| program storage (4MB) |
| data storage |
| (remaining area) |
Just as domains can link to free segments, free segments can link to other free segments. If a domain links to such a segment, it indirectly links to the other segments as well. These are included segments.
Segment files have a segment header containing various information that the monitor needs when it places the segment together with the domain that links to it.
The file header occupies two pages. Two extra pages are reserved for future expansion. By default, 4MB are reserved for each of the link and debug information areas. You can change this with the SET-AREA-SIZE command in the LINKER-SERVICE-PROGRAM. The link information essentially contains the defined entries in the symbol table with values in the segment at the time when the segment file is closed.
Page 30¶
Basic Use of the Linker¶
4 MB are reserved for the program segment, while the data segment takes the rest of the file. The maximum size of a segment file is 128 MB. If you need to change the size of the program segment, use the command SET-SEGMENT-SIZE in the LINKER-SERVICE-PROGRAM.
You cannot execute a free segment as you can a domain. You must first create a domain and then link the domain to the segment.
As with a slave segment, a free segment has a number between 0 and 31. When a domain is later linked to it, the free segment occupies that segment number in the domain. When linking to a free segment, you should therefore make sure the segment number is unused in the domain.
If the segment has included segments, the included segments occupy one segment number each. These numbers must all be unused in the domain.
Free segments provide an alternative way of dealing with the size restrictions on domain files. The main advantage of using free segments, however, is that program code or data which is used frequently (e.g. libraries) need only be present in one file in each computer. You can then link several domains to it when you need it. This not only saves space but also helps to reduce the amount of swapping if several domains that use the segment run at the same time. A further benefit is that you can put debugged code on its own segment file while you debug and modify the rest of your program on a domain. You can then relink the bug-free segment to each new version of the domain. This saves you time.
To create and/or open a segment file you must be in the advanced mode and use the command:
OPEN-SEGMENT <Segment name> <Segment number> (<Segment type>) (<Segment attributes>)
This erases any existing contents from that file. If you do not want this to happen, for example if you only want to make amendments to the segment or add to its contents, you must use the command APPEND-SEGMENT instead. This is documented on page 95.
Page 31¶
3.1.3. Differences Between SINTRAN and ND-500(0) Segments¶
Here is a short summary of the differences between ND-500(0) segments and SINTRAN segments (sometimes called ND-100 segments):
| Type of segment: | SINTRAN | ND-500(0) |
|---|---|---|
| Administered where: | RT-LOADER | Linker |
| Organization: | ND-100 segments are stored together in up to four segment files, and they are kept track of in a memory-resident table. | Segments are stored in segment files or domain files. |
| Contains | An ND-100 segment generally contains one program. There are provisions for splitting programs across several segments. | ND-500(0) segments are subdivisions of domains, and each domain contains one program. |
| Size: | ND-100 segments are maximum 128K bytes (or 256K if 2-bank), which is the size of the address space on ND-100. | ND-500(0) segments are up to 128M bytes, which is a fraction of the address space of the ND-500(0) domain. |
| Who has them: | Only user System/RT. An ordinary user stores his programs in PROG files, which are read into his terminal's background user segment when he executes them. | Any user. |
3.2. Creating a Domain and Loading a Program¶
This example illustrates how to create a domain in the Linker and load a compiled program to it. The program can then be executed in the ND-5000 monitor.
If you try this example you should only type what is underlined. We start by writing and compiling a short program:
Page 32¶
BASIC USE OF THE LINKER¶
@CREATE-FILE TEST;NRF Q.J
@FORTRAN-500.J
ND-500 ANSI 77 FORTRAN COMPILER - 203054J03
FTN: COMPILE 1. TEST.J
WRITE(1,*) 'This is a domain.'
END
$EOF.J
- CPU TIME USED: 0.1 SECONDS. 3 LINES COMPILED.
- NO MESSAGES
- PROGRAM SIZE=58 DATA SIZE=124 COMMON SIZE=0
FTN: EXIT.J
You now have a program that has been compiled and is therefore in NRF format. Before a program can be run, ND-500(0) programs must be loaded and/or linked. To do this it is necessary to enter the linker and create a domain, to which the NRF code should be loaded. The FORTRAN-500 compiler and the Linker themselves are two examples of domains, as are any of your own programs once they have been stored in a domain and/or segment.
@LINKER.J
- ND LINKER, version B0C Alfa test, 23. August 1988 Time: 13:31 -
- NDL entered: Date: 28. August 1988 Time: 17:21 -
@ NDL: OPEN-DOMAIN "DOMAIN-TEST".J
@ NDL: LOAD TEST.J
Program:.......76B P01 Data:...........200B D01
@ NDL: EXIT.J
NDL: LINKER-AUTO-FORT:JOB
% --> FORTRAN Auto Job: Trap definition part.
% --> FORTRAN Auto Job: Link/load part.
NOTES:¶
-
Enclosing the domain name in double quotation marks assumes that the domain DOMAIN-TEST does not already exist. If no double quotation marks are used, the domain DOMAIN-TEST must already exist, and its contents will be overwritten.
-
The LOAD command is for loading the NRF file into the current domain.
Several files may be named in a single LOAD command. For example, separately compiled subroutines and libraries may be typed on the same line:
NDL: LOAD PROGRAM;NRF SUB1 SUB2 FORTRAN-LIB.JIf you prefer, several LOAD commands may be used in succession.
Page 33¶
BASIC USE OF THE LINKER¶
This command is only used for loading files which are in NRF code, so file type NRF is default.
- After all the required files have been loaded, you leave the Linker with the EXIT command. The EXIT command automatically executes the CLOSE command if you do not do so explicitly. The CLOSE command causes the Linker to close any segments or domains which are open. If there are undefined references or undefined trap blocks, the autojobs/Linker Job are automatically executed by the Linker. If your program is written in FORTRAN for example, the relevant autojob will be LINKER-AUTO-FORT:JOB. (This JOB is available on user SYSTEM and it contains commands for enabling a set of traps and for linking your program to the FORTRAN runtime library.) For more details about the automatic actions performed on CLOSE, see chapter 4.
If your load operation failed to define all the symbols used in your program, you will receive the error message "The file is not closed", and the EXIT command is not executed.
If you want to close the file and/or exit from the linker, you must give the command two times in succession.
3.3. Executing a Program¶
The Linker creates an executable program or a linkable segment. Domains are then executed by entering the ND-5000 monitor and typing the name of the domain.
@ND-5000-MONITOR
ND-500/5000 MONITOR Version J04 88. 6.16 / 88. 5.17
N5000: DOMAIN-TEST-J
@ND DOMAIN-TEST-J
If your domain has the same name as an ND-5000 monitor command, type:
@ND-500-MONITOR
ND-500/5000 MONITOR Version J04 88. 6.16 / 88. 5.17
N5000: RECOVER-DOMAIN DOMAIN-TEST-J
@ND-500-MONITOR
ND-500/5000 MONITOR Version J04 88. 6.16 / 88. 5.17
N5000: RECOVER-DOMAIN ()DOMAIN-NAME-J
@ND ()DOMAIN-NAME-J
Scanned by Jonny Oddene for Sintran Data © 2021
Page 34¶
Basic Use of the Linker¶
To interrupt your program, press the escape key (labeled ESC). You are back in the ND-5000 monitor. (If you used the form ND domain-name, you are back in SINTRAN.) To restart your program where it left off, type (provided you are still in the monitor):
N5000: CONTINUE
Notice, however, that many programs disable the escape key. To break such programs you need to execute the SINTRAN command ENABLE-ESCAPE. Most probably, you must do this from another terminal, specifying the number of the terminal on which the command should take effect.
3.4. Loading into a Specified Segment in a Domain¶
The following example creates a domain and loads a program into a particular segment in that domain. If you use the command SET-SEGMENT-NUMBER before loading, you can specify the current segment yourself. You may need to do this if, for example, you know that the default segment is going to be used for linking.
This program generates the powers of two:
@CREATE-FILE TEST:NRF 0J
@FORTRAN-500J
ND-500 ANSI 77 FORTRAN COMPILER - 203054J03
FTN: COMPILE 1,TESTJ
C Print the powers of 2 on the terminal.
INTEGER POWER, VALUE
DOFOR POWER = 0, 31
VALUE = 2**POWER
WRITE(1,100) POWER, VALUE, VALUE, VALUE
ENDDO
100 FORMAT(' Power=', I2, ' Value=', I12, 2X, O12, 2X, Z8)
END
$EOFJ
- CPU TIME USED: 0.3 SECONDS. 9 LINES COMPILED.
- NO MESSAGES
- PROGRAM SIZE=74 DATA SIZE=156 COMMON SIZE=0
FTN: EXITJ
Now load the program file into segment number 10 in the domain DOMAIN-TEST. You will need to enter the ADVANCED mode to be able to use the command SET-SEGMENT-NUMBER:
Page 35¶
BASIC USE OF THE LINKER¶
@LINKER.J
- ND LINKER, version B0C Alfa test, 23. August 1988 Time: 13:31 -
- NDL entered: Date: 28. August 1988 Time: 17:21
- NDL: SET-ADVANCED-MODE.J
- NDL(ADV): OPEN-DOMAIN "DOMAIN-TEST"J
-
NDL(ADV): SET-SEGMENT-NUMBER 10,*J
Program:.........4B P12 Data:.............4B D12
NDL(ADV): LOAD TEST.J
Program:.........116B P12 Data:...........240B D12 -
NDL(ADV): EXIT.J
NDL(ADV): LINKER-AUTO-FORT:JOB
% --> FORTRAN Auto Job: Trap definition part.
% --> FORTRAN Auto Job: Link/load part.
NOTES:
1. Do not use double quotation marks if the domain DOMAIN-TEST already exists.
2. The current segment now becomes segment number 10.
3. The EXIT command automatically closes the domain if necessary. If you are going to create several domains, the OPEN-DOMAIN command automatically closes the previous domain.
Now execute the program by giving the following command:
@ND DOMAIN-TEST.J
| POWER= | VALUE= | |
|---|---|---|
| 0 | 1 | 0000000001 00000001 |
| 1 | 2 | 0000000002 00000002 |
| 2 | 4 | 0000000004 00000004 |
| 3 | 8 | 0000000010 00000008 |
| 4 | 16 | 0000000020 00000010 |
3.5. Loading to More Than One Segment¶
Taking the previous example a step further, let us assume that you want to load a program into one segment in a domain file, and a subroutine used by that program into another segment. Both segments use the FORTRAN runtime library.
Page 36¶
Basic Use of the Linker¶
We can illustrate the situation like this:
| DOMAIN-TEST:DOM | link |
|---|---|
| Domain header | |
| Debug Info | |
| Link Info | |
| Program seg. 1 | |
| Data segment 1 | |
| Data segment 7 | FORTRAN-LIB segment no. 30 |
Only symbols defined in segments 1 and 7 are stored here.
Segments 1 and 7 are slave segments of the domain file DOMAIN-TEST:DOM. FORTRAN-LIB is outside the box which represents the domain file, because it is stored in its own file (a free segment). It needs to be linked. If, however, it has been defined as an autolink file by your system supervisor, it will be linked automatically to segment 30.
The symbol table allows the linker to resolve references across segment boundaries (and across module boundaries within one segment). For example, a program loaded to segment 1 can call a routine loaded to segment 7.
The following example illustrates using a main program and a subroutine. First compile the main program and the subroutine:
@CC Program and subroutine on different segments
@CREATE-FILE MAIN:NRF 0,J
@CREATE-FILE PRTIME:NRF 0,J
@FORTRAN-500,J
ND-500 ANSI 77 FORTRAN COMPILER - 203054J03
FTN: COMPILE 1, MAIN,J
PROGRAM MAIN
WRITE (1,*) 'This is MAIN.'
CALL PRTIME
WRITE (1,*) 'End of MAIN.'
END
$EOF,J
- CPU TIME USED: 0.3 SECONDS. 6 LINES COMPILED.
- NO MESSAGES
- PROGRAM SIZE=100 DATA SIZE=144 COMMON SIZE=0
Scanned by Jonny Oddene for Sintran Data © 2021
Page 37¶
BASIC USE OF THE LINKER¶
FTN: EXIT-J¶
@FORTRAN-50Q-J
ND-500 ANSI 77 FORTRAN COMPILER - 203054J03
FTN: COMPILE 1, PRTIME-J
SUBROUTINE PRTIME
INTEGER KLOCK(7)
INTEGER SEC, MIN, HOUR
CALL CLOCK(KLOCK)
SEC = KLOCK(2)
MIN = KLOCK(3)
HOUR = KLOCK(4)
WRITE (1,100) HOUR, MIN, SEC
100 FORMAT (1X, 'The time is ', I2, ': ', I2, ' and ', I2, ' seconds.')
END
$EOF-J
- CPU TIME USED: 0.4 SECONDS. 11 LINES COMPILED.
- NO MESSAGES
- PROGRAM SIZE=61 DATA SIZE=204 COMMON SIZE=0
FTN: EXIT-J
Now load the main program into the default segment number 1, and the subroutine into segment number 7:
@LINKER-J
- ND LINKER, version B0C Alfa test, 23. August 1988 Time: 13:31 -
- NDL entered: Date: 28. August 1988 Time: 17:21 -
NDL: SET-ADVANCED-MODE-J
NDL(ADV): OPEN-DOMAIN "DOMAIN-TEST"-J
NDL(ADV): LOAD MAIN-J
Program:......150B P01 Data:............224B D01
NDL(ADV): LIST-ENTRIES UNDEFINED-J
Undefined entries:
| PRTIME............./FTN........76B P01 |
NDL(ADV): LIST-ENTRIES DEFINED-J
Defined entries:
| MAIN.............../FTN........4B P01 |
Current load addresses:
| Program:......150B P01 Data:............224B D01 |
NDL(ADV): SET-SEGMENT-NUMBER 7-J
Program:.........4B P01 Data:............4B D07
NDL(ADV): LOAD PRTIME-J
Program:......101B P07 Data:............320B D07
NDL(ADV): LIST-ENTRIES DEFINED-J
Defined entries:
| MAIN.............../FTN........4B P01 | PRITIME............./FTN........4B P07 |
Current load addresses:
| Program:......101B P07 Data:............320B D07 |
NDL(ADV): LIST-ENTRIES UNDEFINED-J
Undefined entries:
| CLOCK................/FTN........12B P07 |
NDL(ADV): CLOSE-J
NDL(ADV): LINKER-AUTO-FORT:JOB
% --> FORTRAN Auto Job: Trap definition part.
% --> FORTRAN Auto Job: Link/load part.
Scanned by Jonny Oddene for Sintran Data © 2021
Page 38¶
NOTES:¶
- The LIST-ENTRIES command lets you check which entries in the symbol table are defined and which are undefined. This is a useful way of following what is happening in the Linker.
- Segment number 7 in domain "DOMAIN-TEST" becomes the current segment.
And finally, run the program:
@ND DOMAIN-TEST.J
This is MAIN.
The time is 18: 23 and 31 seconds.
End of MAIN.
For most simple programs, you will probably load all your NRF files to the same segment.
3.6. Two Domains that Use the Same Segment¶
If you want two domains to use the same segment, you do not need to load a copy of it into both domain files. Instead, you can load the segment into its own file, with file type SEG, and let the two domains link to it. The situation could be illustrated like this:
| MAIN-1:DOM | PRTIME:SEG | MAIN-2:DOM |
|---|---|---|
| Domain header | Segment header | Domain header |
| segment no. 10 |
The following example shows how two domains use the same segment by linking to it rather than loading it. The segment file PRTIME:SEG contains the routine PRTIME which prints the time.
Page 39¶
BASIC USE OF THE LINKER¶
@LINKER.J
- ND LINKER, version B0C Alfa test, 23. August 1988 Time: 13:31 -
- NDL entered: Date: 28. August 1988 Time: 17:21 -
NDL: SET-ADVANCED-MODE.J
NDL(ADV): OPEN-SEGMENT.J
Segment name: "PRTIME".J
Segment number: 10.J
Segment type (PD,P,D): J
Program:.........4B P12 Data:..............4B D12
NDL(ADV): LOAD PRTIME.J
Program:........1018 P12 Data:............320B D12
NDL(ADV): EXIT.J
NDL(ADV): LINKER-AUTO-FORT:JOB
% --> FORTRAN Auto Job: Trap definition part.
% --> FORTRAN Auto Job: Link/load part.
@CREATE-FILE MAIN-1:NRF Q.J
@CREATE-FILE MAIN-2:NRF Q.J
@FORTRAN-50Q.J
ND-500 ANSI 77 FORTRAN COMPILER - 203054J03
FTN: COMPILE L MAIN-1.J
PROGRAM MAIN1
CHARACTER ANSWER
1 WRITE (1, *)
WRITE (1,'(''MAIN1: Do you want to know the time? '')')
READ (1,*) ANSWER
IF (ANSWER.EQ.'E') STOP 'End of MAIN1'
IF ((ANSWER.EQ.'Y').OR.(ANSWER.EQ.'y')) CALL PRTIME
GOTO 1
END
$EOF.J
- CPU TIME USED: 0.4 SECONDS. 10 LINES COMPILED.
- NO MESSAGES
- PROGRAM SIZE=163 DATA SIZE=216 COMMON SIZE=0
FTN: COMPILE L MAIN-2.J
PROGRAM MAIN2
READ (1,*) ANSWER
IF (ANSWER.EQ.'E') STOP 'End of MAIN2'
IF ((ANSWER.EQ.'Y').OR.(ANSWER.EQ.'y')) CALL PRTIME
GOTO 1
END
$EOF.J
- CPU TIME USED: 0.4 SECONDS. 10 LINES COMPILED.
- NO MESSAGES
- PROGRAM SIZE=163 DATA SIZE=216 COMMON SIZE=0
FTN: EXIT.J
NOTES:¶
- PRTIME is called by MAIN1.
- PRTIME is called by MAIN2.
Page 40¶
BASIC USE OF THE LINKER¶
@LINKER
- ND LINKER, version B0C Alfa test, 23. August 1988 Time: 13:31
- NDL entered: Date: 28. August 1988 Time: 17:21
NDL(ADV): SET-ADVANCED-MODE¶
NDL(ADV): OPEN-DOMAIN "MAIN-1"¶
NDL(ADV): LOAD MAIN-1
Program: ......247B P01 Data: ..........334B D01
NDL(ADV): LINK PR1TIME¶
Segment FORTRAN-LIB-J03:SEG included in segment PRTIME:SEG linked as segment 30.
Segment PRTIME:SEG linked as segment 10.
NDL(ADV): LIST-ENTRIES DEFINED¶
Defined entries:
MAIN1. .........../FTN........4B P01 PRTIME............./FTN........4B P12
Current load addresses:
Program: ......247B P01 Data: ..........334B D01
NDL(ADV): CLOSE¶
NDL(ADV): LINKER-AUTO-FORT:JOB¶
% --> FORTRAN Auto Job: Trap definition part.
% --> FORTRAN Auto Job: Link/load part.
NDL(ADV): OPEN-DOMAIN "MAIN-2"¶
NDL(ADV): LOAD MAIN-2
Program: ......247B P01 Data: ..........334B D01
NDL(ADV): LINK PR1TIME¶
Segment FORTRAN-LIB-J03:SEG included in segment PRTIME:SEG linked as segment 30.
Segment PRTIME:SEG linked as segment 10.
NDL(ADV): LIST-ENTRIES DEFINED¶
Defined entries:
MAIN2. .........../FTN........4B P01 PRTIME............./FTN........4B P12
Current load addresses:
Program: ......247B P01 Data: ..........334B D01
NDL(ADV): CLOSE¶
NDL(ADV): LINKER-AUTO-FORT:JOB¶
% --> FORTRAN Auto Job: Trap definition part.
% --> FORTRAN Auto Job: Link/load part.
NDL(ADV): LIST-DOMAINS¶
- Domain name: MAIN
- Domain name: MAIN-1:DOM;1
| Program segment: 1 | Address in file: 20020000B | Size: 7140B |
|---|---|---|
| Attributes: | All have default values |
| Data segment: 1 | Address in file: 30020000B | Size: 7354B |
|---|---|---|
| Attributes: | All have default values |
| Program segment: 10 | PRTIME:SEG | Link key: 34244 |
|---|---|---|
| Data segment: 10 | PRTIME:SEG | Link key: 34244 |
- Domain name: MAIN-2:DOM;1
| Program segment: 1 | Address in file: 20020000B | Size: 7140B |
|---|---|---|
| Attributes: | All have default values |
| Data segment: 1 | Address in file: 30020000B | Size: 7354B |
|---|---|---|
| Attributes: | All have default values |
| Program segment: 10 | Linked to: PRTIME:SEG | Link key: 34244 |
|---|---|---|
| Data segment: 10 | Linked to: PRTIME:SEG | Link key: 34244 |
NDL(ADV): EXIT¶
NOTES:¶
- PRTIME occupies segment 10 in both domains. The Linker uses segment number 10 because this was the number we assigned to PRTIME:SEG with the OPEN-SEGMENT command.
Scanned by Jonny Oddene for Sintran Data © 2021
Page 41¶
BASIC USE OF THE LINKER¶
We can now execute the domains MAIN-1 and MAIN-2.
@ND MAIN-1-J
MAIN1: Do you want to know the time?
The time is 19: 09 and 31 seconds.
MAIN1: Do you want to know the time?
STOP End of MAIN1
@ND MAIN-2-J
MAIN2: Do you want to know the time?
The time is 19: 09 and 33 seconds.
MAIN2: Do you want to know the time?
STOP End of MAIN2
3.7. How to Copy Domains and Segment Files¶
The procedure for copying domains depends on the structure of the domain, and on whether you are copying to a different computer, or just to a different user area on the same computer.
The procedure for copying a segment file is quite similar to that of copying a domain, although it is less common for segment files have links to other segment files.
If the domain has no links to segment files, and is not linked to any RT-program, then the procedure is as simple as copying the domain file.
If the domain has links to segment files, you might want to copy the segment files as well. If you are copying to another user on the same computer, this is not strictly necessary. The same thing happens if you are copying to a different computer, but copies of the segment files already exist on the other computer.
You might need to manipulate the user area part of the segment file names contained in the domain file, to ensure that the segment files are found when the domain is placed. The LIST-STATUS command displays all file references contained in the domain file. The linker's service-program command CHANGE-FILE-REFERENCES allows you to make the necessary modifications.
If you are copying to a different computer, and you intend to use segment files that already exist on the target computer, then you should check that the link locks of the segment files equal the link keys in the domain file. If they do not, it means the segment file at hand is a different version than the one the domain was linked to, and, almost certainly, it cannot be used. In this case, you must either
- Copy the original segment file as well, or
- Build a new segment file on the target computer, loading it with exactly the same modules, and in the same way, and then changing its link lock, or
- Load the domain again, and link it to the existing segments.
Page 42¶
BASIC USE OF THE LINKER¶
On the other hand, if the domain links to RT-programs, all routines that refer to the RT-programs must be reloaded, and the RT-programs linked again. The best thing to do is to rebuild the entire domain on the other computer.
When you transfer domain and segment files across a network, you should first use the Linker-service-program command COMPRESS. Normally, these files contain holes between the link and debug areas and the segments. These holes may lead to long transfer times. The COMPRESS command removes these holes.
3.8. The LIST Commands¶
You can obtain useful information by using some of the LIST commands available in the Linker and the program NRF-LIBRARY-HANDLER. The following are some of the most commonly used LIST commands:
Linker:
- LIST-DOMAINS: Gives you some information about all the domains in your current user area (or another user area if you specify this), or just a few of them if you specify particular domain names. See page 139.
- LIST-SEGMENTS: This command is for listing information about free segments in your current user area, or in the user area you specify. You need to enter Advanced Mode to be able to use this command. See page 146.
- LIST-STATUS: If you need more detailed information about a particular domain or segment, this is the best command to use as it tells you more than LIST-DOMAINS and LIST-SEGMENTS do. You can find details on page 147.
- LIST-ENTRIES: With this command you can check which entries or symbols in your program have been defined and which have not. Details are given on page 140.
Linker's NRF-LIBRARY-HANDLER:
- LIST-MODULES: You can use this command to obtain a list of the symbolic names of all the modules in the NRF library file you specify. You are also supplied with information about the program, data and debug size of the modules. See page 142.
- LIST-NRF: This command can be used for listing the NRF code of one or more modules in an NRF library file. See page 144.
NOTE: If you do not specify a unique file name when using the LIST-DOMAINS or LIST-SEGMENTS commands, the Linker gives you information about all files for which the name you specified is an acceptable abbreviation.
Page 43¶
4. AUTOMATIC ACTIONS PERFORMED ON CLOSE¶
When the Linker closes a domain or segment, it can perform certain functions automatically. (The user can prevent this by specifying NO in the second parameter of the CLOSE command.) This applies to the commands CLOSE, EXIT, OPEN-DOMAIN, OPEN-SEGMENT, APPEND-DOMAIN, and APPEND-SEGMENT. (The last four commands close any previously open file before opening a new one.)
The main purpose of the automatic actions are:
- Define undefined references (auto-link/load)
- Define a default trap block.
The instructions are contained in JOB files. The procedure to find and invoke the right JOB files is as follows:
First, the Linker checks whether there are undefined entries in the symbol table, or if a traphandler is missing. (It is not missing if the current domain or segment is linked to a free segment which has a trap block.)
If this is the case, the Linker searches for an autojob file. The name of the file is composed of the string LINKER-AUTO- and an abbreviation of the MSA language name, e.g. LINKER-AUTO-FORT:JOB (Fortran), LINKER-AUTO-PLNC:JOB (Planc).
(MSA means Main Start Address. The MSA and its language are defined in the NRF modules. If there are several definitions of MSA in the loaded modules, the first one loaded applies.)
The Linker searches for the file, first in your own user area, and then, if it does not find it there, under user SYSTEM.
When the file is found and executed, it checks if there are still undefined entries, or a traphandler is missing.
If it is, or if it did not find the language-dependent file, it searches for a second file, whose name is simply LINKER-AUTO:JOB. Again, it searches in your own user area, then under user SYSTEM.
Appropriate autojobs should be provided with the compilers. The system supervisor should do the necessary maintenance, such as modifying the user names in the file names, etc.
Note: If you wish to include some special actions in connection with CLOSE, which differ from the standard ones, you may copy the desired autojob/Linker Job file to your own user area and make the necessary changes on the local copy. The Linker will use the local copy of the autojob/Linker Job file instead of the one residing on user SYSTEM since the strategy is: search first on current user, then on user SYSTEM.
Page 44¶
4.1. The Priority of the Various Trap Block Definitions¶
Both domain and segment files can contain a trap block, which tells the monitor how to initialize the traphandling registers (THA, MTE, OTE, CTE, and TEMM) when the domain is placed.
You can define the traphandling in the following ways:
- The command SET-TRAP-CONDITION defines a trap vector on the current domain or segment, and sets up a valid trap block, unless it already has one.
- If you link to a free segment, and this free segment has a valid trap block, this trap block is copied to the current domain or segment, unless it already has a valid trap block. (The actual copying is postponed until after the autojob has been executed. Any SET-TRAP-CONDITION commands in the autojob are just skipped.) Note that if you invoke the autojob explicitly, no such copying takes place.
- When the current domain or segment is closed, if it has no valid trap block (and no trap block is defined in any free segment linked to), the linker invokes the autojobs as described in the previous sections. These jobs, if they are properly set up, define the appropriate traphandling using the methods above.
When the domain is placed, the traphandling registers are initialized according to the specifications in the domain header. However, the THA register can point to a trap vector in a free segment. It is also possible for the program to change this at run time. For example, a routine in a free segment can load the THA register with the address of a trap vector other than the one specified in the domain header.
Traphandling is described in more detail on page 71.
4.2. Loading or Linking Libraries¶
Libraries are NRF files that contain various components that can be used as building blocks for other programs. Typically, your program only needs a few of the modules contained in the library.
A library contains NRF codes that identify it as such. When you load a library, the Linker automatically selects the modules that define symbols referred to in the other modules you have loaded. However, when you link to a free segment containing a library, the whole segment gets linked to.
Page 45¶
AUTOMATIC ACTIONS PERFORMED ON CLOSE¶
If you are searching for the missing components of your program, you might want to use the following commands:
- SPECIAL-LINK
LIBRARY. If the segment does not resolve any of the undefined entries, the segment is not linked to. - SPECIAL-LOAD
LIBRARY. If the specified file is a library, this is the same as LOAD. Otherwise, the file is treated as if it was a library, i.e. only those modules that define symbols that have unresolved references in the symbol table are actually loaded.
4.3. Sample LINKER-AUTO-FORT:JOB¶
% *****************************************************************
% *** LINKER-AUTO-FORT:JOB - FORTRAN auto job file. ***
% *****************************************************************
SET-ADVANCED-MODE
MESSAGE 'FORTRAN Auto Job - Trap definition part.'
| Command | Description |
|---|---|
| SET-TRAP-CONDITION OWN, ENAB, #INVALOP | INVALID-OPERATION |
| SET-TRAP-CONDITION OWN, ENAB, #INVALDI | DIVIDE-BY-ZERO |
| SET-TRAP-CONDITION OWN, ENAB, #FLOFLW | FLOATING-OVERFLOW |
| SET-TRAP-CONDITION OWN, ENAB, #ILLOPER | ILLEGAL-OPERAND-VALUE |
| SET-TRAP-CONDITION OWN, ENAB, #ILLINDX | ILLEGAL-INDEX |
| SET-TRAP-CONDITION OWN, ENAB, #STKOFLW | STACK-OVERFLOW |
| SET-TRAP-CONDITION OWN, ENAB, #STKUFLW | STACK-UNDERFLOW |
| SET-TRAP-CONDITION OWN, ENAB, #PROGTRA | PROGRAMMED-TRAP |
| SET-TRAP-CONDITION OWN, ENAB, #DISPSWT | DISABLE-PROCESS-SWITCH-TIMEOUT |
| SET-TRAP-CONDITION OWN, ENAB, #DISPSWE | DISABLE-PROCESS-SWITCH-ERROR |
| SET-TRAP-CONDITION OWN, ENAB, #INXSCAL | INDEX-SCALING-ERROR |
| SET-TRAP-CONDITION OWN, ENAB, #ILLNCOD | ILLEGAL-INSTRUCTION-CODE |
| SET-TRAP-CONDITION OWN, ENAB, #ILOPSPE | ILLEGAL-OPERAND-SPECIFIER |
| SET-TRAP-CONDITION OWN, ENAB, #INSEQUE | INSTRUCTION-SEQUENCE-ERROR |
| SET-TRAP-CONDITION OWN, ENAB, #PVIOLAT | PROTECT-VIOLATION |
REFER-ENTRY #MAINGRA, #THA, D, D
MESSAGE 'FORTRAN Auto Job - Link/load part.'
LIST
SPECIAL-LOAD (SYSTEM)FORTRAN-LIB-K LIBRARY
SPECIAL-LOAD (SYSTEM)EXCEPT-LIB LIBRARY
SET-IO-BUFFERS
Page 46¶
Automatic Actions Performed on Close¶
| Task Type | Description |
|---|---|
| Close Task | Marks the task as completed. |
| Save Changes | Saves any changes made to the current document. |
| Log out | Logs the user out of the system. |
Page 47¶
5. HOW TO CREATE, MAINTAIN, AND USE A LIBRARY¶
5.1. What is a Library?¶
Occasionally you may write subroutines that you wish to call from more than one program. The subroutine PRTIME on page 31 is an example of such a subroutine.
Instead of including the symbolic code in every program, it is possible to LOAD the NRF file along with only those programs that use it. The example on page 47 does this, but here the main program calls several subroutines, not just one. As such we have to load one NRF file for each of them.
There are two ways you can avoid having to load so many NRF files:
-
Create an NRF library file. This is done by using the Linker's NRF-LIBRARY-HANDLER to put all the subroutines on the same NRF file. If each subroutine was compiled in library mode, then this file becomes an NRF library file. When you subsequently use the LOAD command with this library file it will load only the subroutines that are referred to, but still undefined at that time. An example of this starts on page 49.
If the subroutines were not compiled in library mode, you can achieve the same effect by using the SPECIAL-LOAD command with LIBRARY as the second parameter, instead of using the ordinary LOAD command. This treats the file as if it were a library file and loads only the subroutines that are called.
- Load all of the subroutines to a free segment. This will be a file with file type SEG. Then your program can link to the segment with the LINK command.
We can thus define an NRF library file as a collection of frequently used subroutines in NRF code, which are stored together in one file. The NRF Library Handler enables you to manipulate modules in NRF library files.
Page 48¶
5.2. The NRF Library Handler (NLH)¶
The command NRF-LIBRARY-HANDLER is used for entering the NRF Library Handler program. This program contains commands which can be used for building and maintaining library files. The command NRF-LIBRARY-HANDLER has one parameter - File name. You specify the file you wish to work with. This file becomes the current library file.
There are two types of NRF library files: "slow" library files and "fast" library files. The standard format when a file is compiled in library mode is referred to as "slow", since the file must be searched sequentially in order to find a particular module in it. The NRF library handler, by default, converts such libraries to "fast" libraries. This inserts a vector of NRF LBB groups (See page 234 for details about LBB.) at the beginning of the library file, one entry per symbol with a pointer to the start of the module in which it is defined. This means that, particularly in large Library files, modules can be accessed more quickly than with "slow" Library files, thus making loading more efficient.
A module in an NRF library file is, by definition, the information which lies between BEG and END NRF control groups. It is treated as an indivisible unit, and can be identified by any of the DEF, DDF or LIB symbols defined within it. NRF control groups and their mnemonics are explained in appendix D on page 226.
5.3. Some Examples of Creating Libraries¶
The examples in this section illustrate the first two approaches to library files which were mentioned at the beginning of this chapter:
- One subroutine per library file
- Several subroutines in one library file
Imagine the following situation: You are a FORTRAN programmer who discovers that ND COBOL has many excellent screen-handling features that are lacking in FORTRAN. A friend who knows COBOL writes the following subprograms so you can call them from your FORTRAN program:
Page 49¶
How to Create, Maintain, and Use a Library¶
| Function | Description |
|---|---|
| BLANKSCREEN | Blanks the screen. |
| MAKEFRAME | Makes a frame of any size on the screen. |
| PRTEXT | Prints a given text anywhere on the screen. The text may be underlined, blinking, in inverse video, etc. |
| GETSTRING | Accepts a string from a given position on the screen. The entered text may be invisible, underlined, right-justified, etc. |
Before we show examples of how they are used, here are the four files that contain the above subprograms:
Blankscreen: We store this in file COBOL-BLANK:SYMB.
IDENTIFICATION DIVISION.
PROGRAM-ID. BLANKSCREEN.
PROCEDURE DIVISION.
1000.
BLANK SCREEN.
EXIT PROGRAM.
Makeframe: Stored in file COBOL-FRAME:SYMB.
IDENTIFICATION DIVISION.
PROGRAM-ID. MAKEFRAME.
DATA DIVISION.
LINKAGE SECTION.
01 LINE1 PIC S9(6) COMP.
01 CLMN1 PIC S9(6) COMP.
01 NROFLINES PIC S9(6) COMP.
01 NROFCLMNS PIC S9(6) COMP.
PROCEDURE DIVISION USING LINE1
CLMN1
NROFLINES
NROFCLMNS.
1000.
BLANK SCREEN.
DISPLAY (LINE1, CLMN1) FRAME NROFLINES * NROFCLMNS.
EXIT PROGRAM.
Page 50¶
Prtext: Stored in file COBOL-PRTEXT:SYMB.¶
IDENTIFICATION DIVISION.
PROGRAM-ID. PRTEXT.
DATA DIVISION.
LINKAGE SECTION.
01 QTEXT PIC X(80).
01 TEXTLEN PIC S9(6) COMP.
01 LINENR PIC S9(6) COMP.
01 CLMN PIC S9(6) COMP.
01 PRCODE PIC S9(6) COMP.
01 CB20 COMP IMPORT.
PROCEDURE DIVISION USING QTEXT
TEXTLEN
LINENR
CLMN
PRCODE.
1000.
IF LINENR < 1 THEN MOVE 1 TO LINENR.
IF LINENR > 24 THEN MOVE 24 TO LINENR.
IF TEXTLEN < 80 THEN MOVE TEXTLEN TO CB20.
IF PRCODE = 1 DISPLAY (LINENR, CLMN) QTEXT WITH
USER-DEFINED-SIZE INVERSE-VIDEO.
IF PRCODE = 2 DISPLAY (LINENR, CLMN) QTEXT WITH
USER-DEFINED-SIZE UNDERLINE.
IF PRCODE = 3 DISPLAY (LINENR, CLMN) QTEXT WITH
USER-DEFINED-SIZE LOW-INTENSITY.
IF PRCODE = 4 DISPLAY (LINENR, CLMN) QTEXT WITH
USER-DEFINED-SIZE BLINK.
IF PRCODE > 4 DISPLAY (LINENR, CLMN) QTEXT WITH
USER-DEFINED-SIZE NORMAL.
2000.
EXIT PROGRAM.
Page 51¶
HOW TO CREATE, MAINTAIN, AND USE A LIBRARY¶
Getstring: We store this in file COBOL-GETSTRING:SYMB.¶
IDENTIFICATION DIVISION.
PROGRAM-ID. GETSTRING.
DATA DIVISION.
LINKAGE SECTION.
01 ANSWER PIC X(76).
01 ALENGTH PIC S9(6) COMP.
01 LINENR PIC S9(6) COMP.
01 COLNR PIC S9(6) COMP.
01 PRCODE PIC S9(6) COMP.
01 CB20 COMP IMPORT.
PROCEDURE DIVISION USING ANSWER
ALENGTH
LINENR
COLNR
PRCODE.
1000.
IF LINENR < 1 THEN MOVE 1 TO LINENR.
IF LINENR > 24 THEN MOVE 24 TO LINENR.
MOVE ALENGTH TO CB20.
IF PRCODE = 1 ACCEPT (LINENR, COLNR) ANSWER WITH
USER-DEFINED-SIZE INVERSE-VIDEO.
IF PRCODE = 2 ACCEPT (LINENR, COLNR) ANSWER WITH
USER-DEFINED-SIZE UNDERLINE.
IF PRCODE = 3 ACCEPT (LINENR, COLNR) ANSWER WITH
USER-DEFINED-SIZE LOW-INTENSITY.
IF PRCODE = 4 ACCEPT (LINENR, COLNR) ANSWER WITH
USER-DEFINED-SIZE BLINK.
IF PRCODE = 5 ACCEPT (LINENR, COLNR) ANSWER WITH
USER-DEFINED-SIZE BEEP.
IF PRCODE = 6 ACCEPT (LINENR, COLNR) ANSWER WITH
USER-DEFINED-SIZE UPDATE.
IF PRCODE = 7 ACCEPT (LINENR, COLNR) ANSWER WITH
USER-DEFINED-SIZE INVISIBLE.
IF PRCODE = 8 ACCEPT (LINENR, COLNR) ANSWER WITH
USER-DEFINED-SIZE UPPER-CASE.
IF PRCODE = 9 ACCEPT (LINENR, COLNR) ANSWER WITH
USER-DEFINED-SIZE JUSTIFIED-RIGHT.
IF PRCODE = 10 ACCEPT (LINENR, COLNR) ANSWER WITH
USER-DEFINED-SIZE PROMPT.
IF PRCODE > 10 ACCEPT (LINENR, COLNR) ANSWER WITH
USER-DEFINED-SIZE NORMAL.
MOVE CB20 TO ALENGTH.
EXIT PROGRAM.
Page 52¶
HOW TO CREATE, MAINTAIN, AND USE A LIBRARY¶
The examples also use the FORTRAN subroutine PRTIME, which was given on page 31 and looks like this:
Prtime: Stored in a file called PRTIME:SYMB.
SUBROUTINE PRTIME
INTEGER KLOCK(7)
INTEGER SEC, MIN, HOUR
CALL CLOCK(KLOCK)
SEC = KLOCK(2)
MIN = KLOCK(3)
HOUR = KLOCK(4)
WRITE (1,100) HOUR, MIN, SEC
100 FORMAT(1X, 'The time is ',I2,':',J2,' and ',I2,' seconds.')
END
5.3.1. Compiling the Library Routines¶
Each of the subroutines must be compiled in library mode to be used as library files: The current versions of the COBOL and PASCAL compilers cannot compile several library modules to the same NRF file. We shall later see how we can use the Linker to combine several NRF files into one.
Here we show a MODE file that could be used to compile the five programs:
@ND FORTRAN-500
LIBRARY-MODE
COMPILE PRTIME,TERMINAL,PRTIME
EXIT
@ND (DOMAINS)COBOL-500
LIBRARY-MODE .
COMPILE COBOL-BLANK,TERMINAL,"COBOL-BLANK"
LIBRARY-MODE
COMPILE COBOL-FRAME,TERMINAL,"COBOL-FRAME"
LIBRARY-MODE
COMPILE COBOL-PRTEXT,TERMINAL,"COBOL-PRTEXT"
LIBRARY-MODE
COMPILE COBOL-GETSTRING,TERMINAL,"COBOL-GETSTRING"
EXIT
You might want to use DEBUG-MODE before every COMPILE line. If programs that call the routines do not work, you can then use the Symbolic Debugger to see if the parameters have been passed correctly.
Page 53¶
5.3.2. Loading one Subroutine per Library File¶
Here is a simple FORTRAN program that calls some of the library routines we compiled above. Compile it to a file called TEST:NRF:
PROGRAM MAIN
INTEGER*4 LINE1, COL1, LINES, COLUMNS
COL1 = 1
COLUMNS = 80
CALL BLANKSCREEN
DO 100 LINES = 20, 2, -1
CALL MAKEFRAME(1, COL1, LINES, COLUMNS)
COLUMNS = COLUMNS - 4
COL1 = COL1 + 2
100 CONTINUE
200 STOP 999
END
You can load it as follows:
| Command | Program | Data |
|---|---|---|
| NDL: OPEN-DOMAIN "DOMAIN-TEST", /J | ||
| NDL: LOAD TEST, /J | Program.........117B P01 | Data............160B D01 |
| NDL: LOAD COBOL-BLANK, /J | Program.........221B P01 | Data............1100B D01 |
| NDL: LOAD COBOL-FRAME, /J | Program.........404B P01 | Data............2040B D01 |
| NDL: LOAD COBOL-PRTEXT, /J | ||
| ⓘ Program............404B P01 | Data............2040B D01 | |
| NDL: LOAD COBOL-GETSTRING, /J | ||
| ⓘ Program............404B P01 | Data............2040B D01 | |
| NDL: LOAD PRTIME, /J | ||
| ⓘ Program............404B P01 | Data............2040B D01 | |
| NDL: LIST-ENTRIES DEFINED,..., / | ||
| Ⓜ MAIN.NAME...........4B P01 | BLANKSCREEN.......117B P01 | |
| MAKEFRAME........221B P01 | ||
| Program............404B P01 | Data............2040B D01 | |
| NDL: LOAD (DOMAINS)COBOL-LIB, /J | ||
| COBOL-LIB-H850101 | ||
| COBOL-LIB-H850101 | ||
| Program..........72355B P01 | Data............24440B D01 |
NOTES:
- The program and data sizes do not increase for COBOL-PRTEXT, COBOL-GETSTRING, and PRTIME because these NRF library files do not contain routines called from the main program.
Page 54¶
How to Create, Maintain, and Use a Library¶
When you give the LOAD command for a library file, the Linker checks in the symbol table of the current domain which symbols are undefined, and whether any of these become defined if the library file is loaded. In this example, the Linker discovers that the files COBOL-PRTEXT, COBOL-GETSTRING, and PRTIME are not needed, so these are not loaded.
- Only two library entries are listed: MAKEFRAME and BLANK-SCREEN.
When you execute the domain DOMAIN-TEST, your screen should turn blank, and smaller and smaller frames should be drawn.
If you have a large number of library routines, it will be inconvenient to have them on separate files. The next example shows you how to get all the routines on one NRF file.
Page 55¶
5.3.3. One Library File Containing Several Routines¶
In the following example, our five library routines on five files are combined onto one NRF library file. Then a program is loaded that calls some of the routines:
@CREATE-FILE MY-LIBRARY:NRF⏎
@ND LINKER⏎
NDL: SET-ADVANCED-MODE⏎
1️⃣ NDL(ADV): NRF-LIBRARY-HANDLER MY-LIBRARY⏎
NDL(NLH): GET-MODULES⏎
2️⃣ Source-file: COBOL-BLANK⏎
NDL(NLH): GET-MODULES COBOL-FRAME⏎
NDL(NLH): GET-MODULES COBOL-PRTEXT⏎
NDL(NLH): GET-MODULES COBOL-GETSTRING⏎
3️⃣ NDL(NLH): GET-MODULES PRITME⏎
NDL(NLH): LIST-MODULES⏎
| Module | Nrf-entry | P/D | Language | Program_size | Data_size | Debug_size |
|---|---|---|---|---|---|---|
| 1. BLANKSCREEN | P.X Cobol | 110B | 2120B | 0B | ||
| 2. MAKEFRAME | P.X Cobol | 201B | 2140B | 0B | ||
| 3. PRTEXT | P.X Cobol | 573B | 2274B | 0B | ||
| 4. GETSTRING | P.X Cobol | 1304B | 2270B | 0B | ||
| 5. PRITME | P. Fortran | 75B | 314B | 0B |
4️⃣ NDL(NLH): INSERT-MESSAGE⏎
5️⃣ Message: MY-LIBRARY-IS-BEING-LOADED⏎
6️⃣ NDL(NLH): SAVE-LIBRARY⏎
NDL(NLH): EXIT⏎
NDL(ADV):⏎
NOTES:¶
- The library file MY-LIBRARY becomes the current library file. If you later want to change to another current library file, you can do this with the NRF command SET-LIBRARY.
- This command puts COBOL-BLANK into the current library file, MY-LIBRARY:NRF. This file contains only one module. If it contained more, you could select a range of them using the optional parameters of this command.
- Each library module is appended to MY-LIBRARY:NRF.
- The message defined will appear when the file is loaded.
- The message must not contain any blanks.
- Writes the new contents of the current NRF file to disk. EXIT does not save the file automatically.
Page 56¶
How to Create, Maintain, and Use a Library¶
Now write a FORTRAN program that calls some of the routines:
@CREATE-FILE TEST.NRF,JJ
@ND FORTRAN-50QJ
FTN: COMPILE 1,'TEST.J
PROGRAM MAIN
CALL BLANKSCREEN
C The parameters to MAKEFRAME are:
C start line, start column,
C no. of lines down, no. of columns to the right
CALL MAKEFRAME(1, 1, 24, 80)
CALL MAKEFRAME(6,20, 12, 40)
END
SEOJ
FTN: EXITJ
@ND LINKERJ
NDL: OPEN-DOMAIN "DOMAIN-TEST"J
NDL: LOAD TESTJ
Program........114B P01 Data:..........154B D01
ⓖ NDL: LOAD MY-LIBRARYJ
MY-LIBRARY-IS-BEING-LOADED
MY-LIBRARY-IS-BEING-LOADED
Program........425B P01 Data:..........4434B D01
ⓕ NDL: LIST-ENTRIES DEFINEDJ
Defined entries: 3
MAIN..........fort.....4B P01 BLANKSCREEN.../cob....114B P01
MAKEFRAME...../cob....224B P01
Current load addresses:
Program........425B P01 Data:..........4434B D01
NDL: LOAD (LIBRARIES)COBOL-LIBJ
COBOL-LIB-J01.
COBOL-LIB-J01.
COBOL-LIB-J01.
COBOL-LIB-J01.
Program......131002B P01 Data:........231300B D01
NDL: EXITJ
NDL: LINKER-AUTO-FORT:JOB
Notes:¶
- When we load our library file, the message we defined appears each time the Linker encounters it in the NRF file.
- The Linker has loaded only those subroutines from MY-LIBRARY: NRF which are needed by DOMAIN-TEST (i.e., those entries which were undefined in the symbol table).
Page 57¶
HOW TO CREATE, MAINTAIN, AND USE A LIBRARY¶
In FORTRAN, it is particularly easy to get many routines on the same NRF file. You should compile one file in library mode that looks like this:
SUBROUTINE SUB1
(Write SUB1 here)
RETURN
END
SUBROUTINE SUB2
(Write SUB2 here)
RETURN
END
SUBROUTINE SUB3
(Write SUB3 here)
RETURN
END
(continue with as many subroutines as you like)
In the 1985 versions of ND-500 COBOL and ND-500 PASCAL, you may not compile more than one routine at a time. Thus, you must use the Linker to get more than one entry on an NRF file. You may compile many routines at once in FORTRAN and PLANC.
When you compile a file like the one shown above, you get a "slow" library file. You can convert it into a "fast" library file by following the procedure below:
@ND_LINKER↵
NDL: SET-ADVANCED-MODE↵
NDL(ADV): NRF-LIBRARY-HANDLER MY-FORT-LIB↵
% You don't really need the next line if you com-
% piled the file using the LIBRARY-MODE ON option.
NDL(NLH): FORCE-LIBRARY↵
NDL(NLH): SAVE-LIBRARY↵
NDL(NLH): EXIT↵
A fast library file loads faster, particularly if you only need a few of the modules it contains.
Page 58¶
5.4. Maintaining an NRF Library File¶
This section deals with maintaining library files. The examples are mainly based on the library file MY-LIBRARY:NRF which we used in the previous section.
The Linker cannot edit the contents of the individual modules. The sections that follow deal with moving, replacing, adding and deleting entire modules.
5.4.1. Replacing Modules¶
The following diagram illustrates MY-LIBRARY:NRF. On the left are the NRF files that the subprograms were compiled to; on the right are the names of the routines. For example, the file COBOL-BLANK:NRF contains the code for the routine (module) called BLANKSCREEN.
| COBOL-BLANK | BLANKSCREEN | |
| COBOL-FRAME | MAKEFRAME | |
| COBOL-PRTEXT | PRTEXT | This is the file |
| COBOL-GETSTRING | GETSTRING | MY-LIBRARY:NRF |
| PRTIME | PRTIME |
Let us say that you make some changes to GETSTRING and PRTEXT and want the updated versions to replace the old versions in MY-LIBRARY:NRF. This is what you should do:
@ND LINKER-J
NDL: SET-ADVANCED-MODE,...J
NDL(ADV): NRF-LIBRARY-HANDLER MY-LIBRARY.J
NDL(NLH): REPLACE-MODULES.J
Source file: COBOL-PRTEXT.J
NDL(NLH): REPLACE-MODULES COBOL-GETSTRING.J
NDL(NLH): EXIT-J
The "source file" is the file containing the new module. It could have contained several modules, not just one.
Page 59¶
How to Create, Maintain, and Use a Library¶
Transferring Modules between NRF Library Files¶
If you want to add some modules, but not all, from one NRF library to another NRF library file, use the command GET-MODULES. For example, if you want to append PRTEXT and GETSTRING to a library called BIG-LIB, you should do the following:
| MY-LIBRARY:NRF | BIG-LIB:NRF |
|---|---|
| BLANKSCREEN | |
| MAKEFRAME | |
| PRTEXT | |
| GETSTRING | LAST-MODULE |
| PRTIME |
Steps¶
@ND LINKER
NDL: SET-ADVANCED-MODE
NDL(ADV): NRF-LIBRARY-HANDLER A-LIBRARY
NDL(NLH): REPLACE-MODULES NEWMOD
NDL(NLH): EXIT
SUB1 and SUB3 on A-LIBRARY will be replaced by SUB1 and SUB3 from the file NEWMOD:NRF.
NDL(ADV): NRF-LIBRARY-HANDLER BIG-LIB:NRF
NDL(NLH): GET-MODULES
Source file: MY-LIBRARY
First module: PRTEXT
Last module: GETSTRING
After module:
NDL(NLH): EXIT
Page 60¶
5.4.3. Adding New Modules¶
If you want to add new modules to a library file, as we did on page 49, you can again use the GET-MODULES command:
DELETE-LINE:NRF
DELLlNE BLANKSCREEN
┌───────┐
DELETE-LINE:NRF │ │
┌────────────→│ │
┌───────→│ │ │
│ │ └───────┘
│ │
│ │ MAKEFRAME
│ │ PRTEXT
│ │ GETSTRING
│ │ PRTIME
│ │
│ │
│ │
│ └────────────→MY-LIBRARY:NRF
| Command | Parameters |
|------------------|----------------------------------|
| NDL(ADV) | NRF-LIBRARY-HANDLER MY-LIBRARY |
| NDL(NLH) | GET-MODULES |
| Source file | DELETE-LINE |
| First module | |
| Last module | |
| After module | BLANKSCREEN |
| NDL(NLH) | EXIT |
¶
| Command | Parameters |
|------------------|----------------------------------|
| NDL(ADV) | NRF-LIBRARY-HANDLER MY-LIBRARY |
| NDL(NLH) | GET-MODULES |
| Source file | DELETE-LINE |
| First module | |
| Last module | |
| After module | BLANKSCREEN |
| NDL(NLH) | EXIT |
DELLINE will be inserted after BLANKSCREEN in MY-LIBRARY: NRF. Note that if the source file contains many modules, you can specify in parameters 2 and 3 which modules you want copied.
5.4.4. Deleting Modules¶
If you want to delete modules, use the NRF-LIBRARY-HANDLER command DELETE-MODULES:
MY-LIBRARY:NRF
delete these modules
BLANKSCREEN
┌───────┐
│ │
│ │
└───────┘
DELLlNE
MAKEFRAME
PRTEXT
GETSTRING
PRIME
| Command | Parameters |
|------------------|----------------------------------|
| NDL(ADV) | NRF-LIBRARY-HANDLER MY-LIBRARY |
| NDL(NLH) | DELETE-MODULES |
| First module | DELLlNE |
| Last module | PRTEXT |
| NDL(NLH) | EXIT |
¶
| Command | Parameters |
|------------------|----------------------------------|
| NDL(ADV) | NRF-LIBRARY-HANDLER MY-LIBRARY |
| NDL(NLH) | DELETE-MODULES |
| First module | DELLlNE |
| Last module | PRTEXT |
| NDL(NLH) | EXIT |
Page 61¶
5.5. Segment Numbers Reserved for System Libraries¶
When loading NRF code into a domain or segment file, you must be sure the segment number you use is available. By ND convention, certain segment numbers are used by system libraries, or are reserved in other ways. The following can be considered reserved segments:
| Number | Characteristics | OK to use? |
|---|---|---|
| Dec. | Oct. | |
| 0 | 0 | Can cause ADDRESS-ZERO-ACCESS traps. Certain implications when debugging.¹ |
| 20 | 24 | Used by SIBAS message segment |
| 21 | 25 | Used by COBOL multiuser file access |
| 22 | 26 | Used by the Linker |
| 23 | 27 | Used by FOCUS and VTM |
| 24 | 30 | Used by the SIBAS library |
| 25 | 31 | Used as a SIBAS message |
| 26 | 32 | Used by the Symbolic Debugger |
| 27 | 33 | Used by the PASCAL library |
| 28 | 34 | Used by the COBOL library |
| 29 | 35 | Used by the PLANC library |
| 30 | 36 | Used by the FORTRAN library and other language libraries |
| 31 | 37 | Used by monitor calls |
¹The Linker normally avoids loading to the first word of each segment, to prevent ADDRESS-ZERO-ACCESS traps. It is also possible to disable the trap. During debugging, pointer errors often result in memory accesses to segment zero. When this segment is not in use, such errors produce PROTECT-VIOLATION traps. Otherwise the error may go undetected.
The answer "maybe" means you can use that segment number as long as the characteristic given in the table does not apply to you.
If you have several versions of a standard library, each one can be loaded to a separate segment file and given the same segment number.
Page 62¶
Specialized Use of the Linker¶
Page intentionally left blank.
Scanned by Jonny Oddene for Sintran Data © 2021
Page 63¶
6. SPECIALIZED USE OF THE LINKER¶
This chapter contains examples of more advanced use of the Linker. In chapter 8, the individual commands are discussed in detail.
6.1. Reference Handling¶
The modules in an NRF file can contain references to data items and entry points in other modules. Such references are represented by symbols. A symbol is a string of nonblank printable characters that serves as a name for the referenced item. When the module is loaded to a slave segment or free segment, the address of the referenced item must be substituted for the symbol.
The Linker maintains a table known as the symbol table. When a new symbol is encountered, the Linker enters it in the table, together with the address where it is defined (or with a different value if this is indicated in the NRF file). This is known as the symbol's value. The act of entering the symbol and its value in the table is called defining the symbol, and the table entry is termed a defined entry. Whenever a reference to the symbol is subsequently encountered, the Linker replaces it with the value it finds in the symbol table.
If a reference is made to a symbol before it has been defined, space is left open in the loaded code for the value to be entered later; the symbol is included in the symbol table together with an indication of where this open space is. A symbol table entry of this kind is known as an undefined entry.
As soon as the Linker finds a definition of the symbol, it fills in the value wherever a reference to it has been made. This is known as resolving the references. When a reference is resolved, the Linker deletes the corresponding undefined entry in the symbol table.
Since the ND-500(0) has separate address spaces for programs and data, we also distinguish between program symbols and data symbols, depending on whether the value is an address in a program or data segment.
Although the Linker maintains this table automatically, it is possible for the user to modify it, adding defined or undefined entries, or deleting them.
Page 64¶
Specialized Use of the Linker¶
If there are two conflicting definitions of one symbol, a warning is given and the first definition the Linker encounters is the one which applies.
6.2. Using the DEFINE-ENTRY Command¶
You use the DEFINE-ENTRY command to insert a defined symbol in the symbol table.
The example below uses this to assign names to some monitor calls. The monitor calls are not executed by the ND-500(0), but by the ND-100. To access them, you access an address on segment 31. No code is loaded to this segment. Instead, the monitor traps the access, and invokes the requested monitor call for you. To get monitor call number n, call the address n on segment 31.
@CREATE-FILE TEST:NRF O,J
@FORTRAN-500,J
FTN: COMPILE 1,TEST,J
PROGRAM TEST
INTEGER K(7)
CALL MSG('MSG was defined through DEFINE-ENTRY''')
CALL OUTCHAR(', but I can use any name I want.''')
CALL CLOCK(K)
WRITE (1,200) K(7), K(6), K(5), K(4), K(3)
200 FORMAT(/X,I4,'-',J2,'-',J2,I6,':',J2)
END
$EQF,J
- CPU TIME USED: 0.7 SECONDS. 9 LINES COMPILED.
- NO MESSAGES
- PROGRAM SIZE=92 DATA SIZE=256 COMMON SIZE=0
FTN: EXIT,J
Page 65¶
SPECIALIZED USE OF THE LINKER¶
@LINKER-J - ND LINKER, version A00 prel, 29. September 1987 Time: 13:31 - Date: 1.oct.1987 Time: 20:02
NDL: SET-ADVANCED-MODE-J¶
NDL(ADV): OPEN-DOMAIN "TEST"-J¶
① NDL(ADV): DEFINE-ENTRY CLOCK 370000000113B P-J
② NDL(ADV): DEFINE-ENTRY MSG 37000000032B P-J
③ NDL(ADV): DEFINE-ENTRY OUTCHAR 37000000032B P-J
NDL(ADV): LOAD TEST-J¶
Program:.......140B P01 Data:..........410B D01
NDL(ADV): LIST-ENTRIES DEFINED NUMERIC-J
Defined entries:¶
| Entry | Address |
|---|---|
| TEST...... | ..../FTN.......4B P01 |
| MSG....... | ..................32B P37 |
Current load addresses:
Program:.......140B P01 Data:..........410B D01
NDL(ADV): EXIT-J¶
NDL(ADV): LINKER-AUTO-FORT:JOB
% --> FORTRAN Auto Job: Trap definition part.
% --> FORTRAN Auto Job: Link/load part.
&ND TEST-J
MSG was defined through DEFINE-ENTRY, but I can use any name I want.
1987-10-01 20:02
NOTES:¶
- Be sure to use the correct number of zeros. The Linker does not accept the abbreviation 37'113B.
- Note that both MSG and OUTCHAR have the same address.
When you specify the value of a symbol, you can use symbols that are already defined. In addition, you can use the following special symbols:
| Symbol | Description |
|---|---|
| #CCLC | Current Fortran-common load address |
| #DCLC | Current data load address |
| #PCLC | Current program load address |
| #THA | Traphandler vector address |
Here is an example of how to define a data area starting at the current data load address.
NDL(ADV): LOAD TEST-J¶
Program:.......140B P01 Data:..........410B D01
NDL(ADV): DEFINE-ENTRY ENTDATA #DCLC P-J
NDL(ADV): LIST-ENTRIES DEFINED-J
Defined entries:¶
| Entry | Address |
|---|---|
| TEST...... | ..../FTN.......4B P01 |
| MSG....... | ..................32B P37 |
| ENTDATA... | ..................410B D01 |
Current load addresses:
Program:.......140B P01 Data:..........410B D01
Page 66¶
6.3. Achieving Faster Loading¶
With big programs in particular, you may achieve faster loading by reducing the size of the symbol table as much as possible. This means that fewer entries need to be scanned each time the Linker encounters references, and that less time is spent on symbol manipulation.
The Linker creates a new entry in the symbol table for each reference to an undefined symbol. If, on the other hand, the symbol is first defined and later referred to, only the definition creates an entry. You should therefore try to load the files containing the majority of defined symbols first, followed by the files containing references to the symbols. The following example illustrates the situation:
| File-1 | File-2 | |
|---|---|---|
| PROGRAM DEMON | SUBROUTINE A | |
| CALL A | RETURN | |
| CALL A | ||
| CALL A | ||
| STOP | ||
| END |
Loading FILE-1 results in three undefined entries in the symbol table and loading FILE-2 results in one defined entry in the symbol table. This gives a total of 4 entries in the symbol table. If, however, you load FILE-2 first and then load FILE-1, the total number of entries in the symbol table will be one instead of four.
This becomes slightly different with libraries. If you load a library before anything else, nothing is loaded, since there are no undefined references. If you know that all the modules contained in the library will be needed, you can load the entire library using SPECIAL-LOAD
Page 67¶
6.4. Memory Allocation¶
When the program runs, parts of the segments must be moved to physical memory as the processor accesses them. But since the physical memory is often too small to contain all the segments of all the active programs at the same time, some pages of the segments must be written out to disk to allow for other pages to move in.
This memory management can cause some problems.
- Pages containing buffers must not be moved out during transfers to/from external devices.
- External devices require buffers to be in a contiguous area of physical memory. However, the memory management tends to scatter pages that belong together throughout the physical memory.
- Programs that must react fast to external events cannot afford to wait for their pages to be brought into memory.
- In unfortunate circumstances, the memory management consistently moves out just the page that will be needed next (trashing). Then most of the time is spent moving pages.
These problems can be overcome by fixing part or all of a segment in physical memory. This tells the monitor that all the fixed pages must be brought into memory before the program starts and that they should never be removed when the memory management needs room for another page.
Note that the user need not worry about this for ordinary disk access, because then the operating system will provide the necessary buffers in fixed memory.
There are three kinds of fixing:
| Scattered | The pages can be anywhere in physical memory. |
| Contiguous | The pages can be anywhere in physical memory, but they must be adjacent to each other. |
| Absolute | The pages must be in a contiguous area starting at a specified location in physical memory. |
The command FIX-SEGMENT is used in all three cases.
Page 68¶
Specialized Use of the Linker¶
In the case of trashing, the problem is that the program is using a large number of pages at all times. Since the set of pages in use (the working set) is changing, we can seldom solve the problem by fixing some few pages. On the other hand, fixing the entire program will leave little room for the other programs to work in and, most probably, they will start trashing instead.
The solution, then, is to tell the memory management that your program should have an "unfair" share of the physical memory. You do this with the SET-SEGMENT-LIMITS command. With this command you specify the minimum (and maximum) number of pages the program should have in physical memory at any time. Then the memory management will only move pages out if more than the minimum number is already present.
Page 69¶
6.5. Using COMMON in FORTRAN¶
If you have a FORTRAN program that uses COMMON areas, you do not need to load it in any special way. However, for those who have very large COMMON areas, or for those who want to have two ND-500(0) processes share the same COMMON area, you can put the COMMON area on a free segment.
Here is an example of a program that writes and reads from two COMMON segments:
@CREATE-FILE TEMP:NRF_0J
@FORTRAN-500J
ND-500 ANSI 77 FORTRAN COMPILER - 203054J03
FTN: DEBUG-MODE ONJ
FTN: COMPILE LL.TEMPJ
PROGRAM TEMP
INTEGER SEGNO, K, L
COMMON /CSEG7/ BLOCK1(20,80)
COMMON /CSEG5/ BLOCK2(20,80)
REAL BLOCK1, BLOCK2
DATA BLOCK1 /1600 * 0.0/
DATA BLOCK2 /1600 * 0.0/
DO 10 K = 1,20
WRITE (1,200) K
DO 20 L = 1,80
BLOCK1(K, L) = L+(K/10)
BLOCK2(K, L) = L+(K/100)
20 CONTINUE
10 CONTINUE
WRITE (1,300) BLOCK1(10,50),BLOCK2(10,50)
WRITE (1,*) 'End of program'
200 FORMAT (H5, I3)
300 FORMAT (H0, F10.2, F10.2)
END
$EOJ
- CPU TIME USED: 0.7 SECONDS. 20 LINES COMPILED.
- NO MESSAGES
- PROGRAM SIZE=198 DATA SIZE=196 COMMON SIZE=12800
FTN: EXITJ
NOTES:¶
- To be sure that the variables stored in a common block have initial values, the user must give these values explicitly.
Page 70¶
Specialized Use of the Linker¶
@LINKER
- ND LINKER, Version BOC Alfa test, 23. August 1988 Time: 14:18 -
- NDL entered: Date: 30. August Time: 22:37 -
NDL: Commands¶
- SET-ADVANCED-MODE
- OPEN-DOMAIN "TEMP"
Fortran Common Segment¶
-
OPEN-SEGMENT "COMMON5" 5 D FORTRAN-COMMON-SEGMENT WRITE-PERMIT
Fortran common segment COMMON5:SEG linked as data segment 5 in current domain. -
DEFINE-FORTRAN-COMMON CSEG5
-
OPEN-SEGMENT "COMMON7" 7 D FORTRAN-COMMON-SEGMENT WRITE-PERMIT
Fortran common segment COMMON7:SEG linked as data segment 7 in current domain. -
DEFINE-FORTRAN-COMMON CSEG7
-
LOAD TEMP
Program Information¶
| Program | 314B P01 Data: 274B D01 |
|---|---|
| COMMONS:SEG | Data: ..14404B D05 |
| COMMON7:SEG | Data: ..14404B D07 |
Additional Commands¶
- EXIT
- LINKER-AUTO-FORT:JOB
FORTRAN Auto Job - Trap definition part.
FORTRAN Auto Job - Link/load part.
Notes¶
-
This OPEN-SEGMENT command does not close the domain, since FORTRAN-COMMON-SEGMENT is specified as a segment attribute.
-
A FORTRAN COMMON segment must be a data segment. If you try to specify segment type "P" (program segment), you get an error message; if you give the default value, which is PD, the Linker ignores P and uses D only.
-
If you plan to use the Symbolic Debugger, you should not use segments 0 and 26 for COMMON segments.
-
If you (or the LINKER-AUTO-FORT:JOB) link to the FORTRAN runtime library segment, you should not use segment 30 because the FORTRAN runtime library segment is always number 30. (This does not apply if you load the runtime library. Then the library is loaded onto the current segment.) For more information about reserved segments, see page 55.
-
This will define the COMMON block CSEG5 on the free segment COMMON5. However, the size of the area is not determined until the Linker loads an NRF module where the symbol is defined again. The Fortran compiler produces an NRF control group with a size specification. If several such groups are loaded, the first applies. If this is not the largest, you will get an error message.
Page 71¶
SPECIALIZED USE OF THE LINKER¶
@ND_TEMP.J¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
51.00 50.00
End of program
@ND.J
ND-500/5000 MONITOR Version 100 87. 6.23 / 87. 9.17
ND-5000: DEBUGGER TEMP.J
ND-500 Symbolic Debugger. Version 600 July 22, 1987.
FORTRAN PROGRAM. TEMP.1
*BREAK 10 20.J
*RUN.J
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Break at TEMP.10
*SEGMENT-INFORMATION.J¶
| SEGMENT | FILE | C1 | C2 | NAME |
|---|---|---|---|---|
| PSEG | 1 | 0B | (PACK-THREE-6799:NDL-DOC)TEMP | |
| DSEG | 1 | 0B | ||
| LINK | 1 | 0B | ||
| DOM | 1 | 1777B | 2 | 0 |
| PSEG | 5 | 0B | (PACK-THREE-6799:NDL-DOC)COMMON5 | |
| DSEG | 5 | 0B | ||
| LINK | 5 | 0B | ||
| DOM | 5 | 0B | ||
| PSEG | 7 | 0B | (PACK-THREE-6799:NDL-DOC)COMMON7 | |
| DSEG | 7 | 0B | ||
| LINK | 7 | 0B | ||
| DOM | 7 | 0B | ||
| PSEG | 26 | 0B | (PACK-ONE-6799:SYSTEM)DEBUGGER | |
| DSEG | 26 | 0B | ||
| LINK | 26 | 0B | ||
| DOM | 26 | 0B | ||
| PSEG | 30 | 0B | (PACK-THREE-6799:NDL-DOC)FORTRAN-LIB-J03 | |
| DSEG | 30 | 0B | ||
| LINK | 30 | 0B | ||
| DOM | 30 | 0B |
*RUN.J
51.00 50.00
End of program
Program terminated at TEMP.19
*EXIT.J
ND-5000:
NOTES:¶
- This command gives you information about which segment numbers are used by your domain. As you can see, the Symbolic Debugger uses segment number 26.
Page 72¶
Specialized Use of the Linker¶
Sometimes you want to load some common areas onto a common segment, and others to a normal segment. In the old Linkage-Loader, this was done by closing the common segment and leaving the other segments open. In the Linker, this is typically done in two ways:
| 1: | @nd Linker |
|---|---|
| open-segment "common", 5, d, write-permit | |
| load common-seg-modul | |
| close | |
| open-domain "links-to-common" | |
| link-segment common | |
| load data-seg-module |
| 2: | @nd Linker |
|---|---|
| open-domain "links-to-common" | |
| load data-seg-module1 | |
| open-segment "common", 5, d, write-permit | |
| load common-seg-modul | |
| % it is now impossible to load common | |
| % areas to a normal segment | |
| close | |
| append-domain links-to-common | |
| link-segment common | |
| load data-seg-module2 |
Page 73¶
Specialized Use of the Linker¶
6.6. Communication between ND-100 and ND-500(0)¶
You must have experience with ND-100 realtime programming before attempting to use these commands, since you are also responsible for synchronizing the two processes and protecting common areas (see the SINTRAN III Real Time Guide, ND-860133).
There are ways in which RT programs and ND-500(0) domains may communicate.
Shared memory is an important method of communication. On the ND-500(0), the shared memory is part (or all) of a segment. On the ND-100, the shared memory is an ND-100 segment, or it is the RTCOMMON area.
Memory¶
| ND-100 segment → | ← ND-500(0) segment |
| ... | ... |
| shared | shared |
| ... | ... |
You define that the ND-500(0) segment shall use shared memory for a portion of its address space, using the MATCH-RT-SEGMENT command.
The ND-100 has a global symbol table for all RT programs, stored in the file (SYSTEM)RTFIL:DATA. The mentioned command searches this file for entries marked as "defined common symbols", defined in the ND-100 segment in question. All such entries are transferred to the Linker's symbol table by this command.
An area of the appropriate size is reserved on the current data or common segment, starting at the first page-boundary after the current load address.
You cannot load anything to this reserved area with the Linker, but your program can refer to the symbols defined in RTFIL.
RTCOMMON is particularly convenient if several RT programs and/or several domains shall access the shared area.
Page 74¶
ND-500 Domain Synchronization¶
| ND-500 domain | ND-500 domain |
|---|---|
read/write
| RT-COMMON |
|---|
read/write
| RT program | RT program |
|---|---|
Note that in most cases the programs involved must agree on some synchronization scheme, like reservation flags or semaphores. The ND-500(0) side will probably use the test-and-set assembly instruction (BY TSET).
Here is an example where an RT program increments the value of the variable seconds every second. A second variable is used merely to count how many times an ND-500(0) program reads the value of seconds. Both variables are stored in RTCOMMON.
(In this example there is no need of synchronization, because the values written only depend on values the other side does not modify)
To run this example, you must be able to log in as user RT or SYSTEM.
This example involves:
- An RT program called RTBRF
- A domain called RT-TEST
- A free segment called RT-SEG
Page 75¶
Specialized Use of the Linker¶
@CC --------------- COMPILE ND-100 PROGRAM ------------------------
@DELETE-FILE RT-TEST:BRF
@FORTRAN-100
SEP-DATA OFF
REAL-TIME-MODE ON
COMPILE I,"RT-TEST"
PROGRAM RTBRF, 30
COMMON /RTC/ SECONDS, COUNT
INTEGER * 2 SECONDS, COUNT
COUNT = 0
SECONDS = 0
C This program will run for 10 minutes
DO 200 K = 1, 600
CALL HOLD(1,2)
SECONDS = SECONDS + 1
200 CONTINUE
END
$EOF
EXIT
@SET-FILE-ACCESS RT-TEST:BRF R,,,
@UE-FUNC CHANGE-USER-AREA RT
@ABORT RTBRF
@SCHEDULE 503
@RT-LOADER
① SET-SEG-FILE 0
YES
CLEAR-SEGMENT RTTEST
YES
② NEW-SEGMENT RTTEST 1,,,,
DELETE-COMMON-LABEL RTC
SET-RTCOMMON RTC
LOAD (NDL-TEST)RT-TEST:BRF,,,
LOAD (LIBRARIES)F-IBANK:BRF,,,
END-LOAD
WRITE-COMMON-LABELS,,
EXIT
Notes¶
-
If there is not sufficient free space in segment file 0, try segment file 1, 2, or 3.
-
Programs running in ring 0 cannot access the RTCOMMON area, so we use ring 1.
Page 76¶
Specialized Use of the Linker¶
@CC -------------- COMPILE ND-5000 PROGRAM ------------------------
@CC Log in as yourself again
@UE-FUNC CHANGE-USER-AREA NDL-TEST
@DELETE-FILE RT-TEST:NRF
@ND FORTRAN-500
COMPILE 1,"RT-TEST"
PROGRAM RTNRF
COMMON /RTC/ SECONDS, COUNT
INTEGER * 2 SECONDS, COUNT
COUNT = COUNT + 1
WRITE (1,*) 'The value of seconds in RTCOMMON is:'
WRITE (1,*) SECONDS
WRITE (1,*) 'No. of times RTCOMMON has been COUNT:'
WRITE (1,*) COUNT
END
$EOF
EXIT
@DELETE-FILE RT-TEST:DOM
@DELETE-FILE RT-SEG:SEG
@LINKER
OPEN-SEGMENT "RT-SEG" 10,,,,,
MATCH-RT-SEGMENT RTCOMMON
LIST-ENTRIES ALL,,,,
OPEN-DOMAIN "RT-TEST",,,
LINK (NDL-TEST)RT-SEG
LOAD RT-TEST
LOAD (LIBR)FORT-LIB
LOAD (LIBR)EX-LIB
LIST-ENTRIES UNDEFINED,,,,
CLOSE,,,,
LIST-STAT RT-TEST
EXIT
@CC Change to user RT again to start the RT program.
@UE-FUNC CHANGE-USER-AREA RT
@RT RTBRF
@ND (NDL-TEST)RT-TEST
@CC To see that RTCOMMON can be accessed from other users,
@CC change to yourself again.
@UE-FUNC CHANGE-USER-AREA NDL-TEST
@ND RT-TEST
Page 77¶
6.7. Traphandling¶
Traps are special conditions that are detected by hardware at execution time and may call for special action. Examples are divisions by zero, illegal indexes, stack overflow, or references to non-existing memory.
The ND-500(0) has a complex scheme for searching for a traphandler (i.e. a routine that takes the necessary actions in case of traps).
Each domain has an array containing pointers to the traphandlers that apply for each trap condition (the trap vector). The domain also has a register (OTE, Own Trap Enable) where each bit signals if the trap vector contains a valid pointer in the corresponding position. If a bit is set, we say the corresponding trap condition is locally enabled, otherwise it is locally disabled.
There are three categories of trap conditions: ignorable, non-ignorable, and fatal.
If an ignorable trap condition occurs, and it is locally enabled, the routine pointed to is invoked.
If it is locally disabled, then another register is consulted, the Mother Trap Enable (MTE) register. Each domain has an MTE register. When a bit is set here, the trap condition is system enabled, otherwise it is system disabled. These bits determine whether the trap should be reported to the monitor.
If the ignorable trap condition is both locally and system disabled, no further action is taken and the program continues.
Non-ignorable traps are handled by the routine in the trap vector if the trap condition is locally enabled. Otherwise, it is reported to the monitor, irrespective of the MTE bit.
If a fatal trap condition occurs, the event is unconditionally reported to the monitor.
When a trap condition is reported to the monitor, the monitor may handle it in various ways. For some traps, the program is aborted with an error message; for others the program is allowed to continue.
Normally, a programmer who wants to take advantage of the trap system will do one of the following things:
- Load the file EXCEPT-LIB:NRF (called the exception library), or link to a segment file containing the exception library. This gives default exception handling which should be suitable for most programs.
- Define traphandling in the Linker or the ND-5000 monitor.
Page 78¶
Specialized Use of the Linker¶
- Use the routines contained in the exception library to make his/her trap system.
- Make use of the utility library for PLANC.
- Write his/her own traphandling routines in ND-5000 Assembly language.
Note that the traphandling defined at link/load time can be changed by the program at runtime.
Programmers who want to use the routines provided in the exception library should consult the ND-500 Loader/Monitor (ND-860136), or the ND FORTRAN Reference Manual (ND-860145).
To write a handler routine for a trap condition you need to be familiar with the instruction set and call mechanisms of the ND-500(X). The following is a list of defined hardware traps and the corresponding entry name in the exception library. Their corresponding bit number in the status, OTE, MTE and TEMM registers is given in the first column. Column two gives the exception number, i.e. the error code returned by the exception library. The default column indicates which traps are enabled if the default settings in the exception library are used. If nothing is listed under default, the trap is disabled. The last column indicates the trap type. The following abbreviations are used:
I - ignorable trap
N - non-ignorable trap
Page 79¶
Specialized Use of the Linker¶
| Bit no. | Exec. number | Trap name | Except-lib entry | Default | Type |
|---|---|---|---|---|---|
| 9 | 7611B | OVERFLOW | #OVERFLW | I | |
| 11 | 7613B | INVALID-OPERATION | #INVALOP | enabled | I |
| 12 | 7614B | DIVIDE-BY-ZERO | #INVALDI | enabled | I |
| 13 | 7615B | FLOATING-UNDERFLOW | #FLTUFLOW | I | |
| 14 | 7616B | FLOATING-OVERFLOW | #FLTOFLW | enabled | I |
| 15 | 7617B | BCD-OVERFLOW | #BCDOFLW | I | |
| 16 | 7620B | ILLEGAL-OPERAND-VALUE | #ILLOPER | enabled | I |
| 17 | 7621B | SINGLE-INSTRUCTION-TRAP | #SINGINS | I | |
| 18 | 7622B | BRANCH-TRAP | #BRANCTR | I | |
| 19 | 7623B | CALL-TRAP | #CALLTRA | I | |
| 20 | 7624B | BREAK-POINT-INSTRUCTION-TRAP | #BRKPNTR | I | |
| 21 | 7625B | ADDRESS-TRAP-FETCH | #ADDRFTC | I | |
| 22 | 7626B | ADDRESS-TRAP-READ | #ADDREAD | I | |
| 23 | 7627B | ADDRESS-TRAP-WRITE | #ADDWRTE | I | |
| 24 | 7630B | ADDRESS-ZERO-ACCESS | #ADDZERO | I | |
| 25 | 7631B | DESCRIPTOR-RANGE | #DESCRIR | I | |
| 26 | 7632B | ILLEGAL-INDEX | #ILLINDX | enabled | I |
| 27 | 7633B | STACK-OVERFLOW | #STKOFLW | enabled | I |
| 28 | 7634B | STACK-UNDERFLOW | #STKUFLOW | enabled | I |
| 29 | 7635B | PROGRAMMED-TRAP | #PROGTRA | enabled | I |
| 30 | 7636B | DISABLE-PROCESS-SWITCH-TIMEOUT | #DISPSWT | enabled | N |
| 31 | 7637B | DISABLE-PROCESS-SWITCH-ERROR | #DISPSWE | enabled | N |
| 32 | 7640B | INDEX-SCALING-ERROR | #INXSCAL | enabled | N |
| 33 | 7641B | ILLEGAL-INSTRUCTION-CODE | #ILINCOD | enabled | N |
| 34 | 7642B | ILLEGAL-OPERAND-SPECIFIER | #ILOPSPE | enabled | N |
| 35 | 7643B | INSTRUCTION-SEQUENCE-ERROR | #INSEQUE | enabled | N |
| 36 | 7644B | PROTECT-VIOLATION | #PVIOLAT | enabled | N |
Page 80¶
Specialized Use of the Linker¶
@NDJ
N5000: PLACE-DOMAIN TEST-J
N5000: ENABLED-TRAPS-J
| LOCAL | SYSTEM | |
|---|---|---|
| INVALID OPERATION | 1 | 0 |
| DIVIDE BY ZERO | 1 | 0 |
| FLOATING OVERFLOW | 1 | 0 |
| ILLEGAL OPERAND VALUE | 1 | 0 |
| ILLEGAL INDEX | 1 | 0 |
| STACK OVERFLOW | 1 | 0 |
| STACK UNDERFLOW | 1 | 0 |
| PROGRAMMED TRAP | 1 | 0 |
| DISABLE PROCESS SWITCH TIMEOUT | 1 | 0 |
| DISABLE PROCESS SWITCH ERROR | 1 | 0 |
| INDEX SCALING ERROR | 1 | 0 |
| ILLEGAL INSTRUCTION CODE | 1 | 0 |
| ILLEGAL OPERAND SPECIFIER | 1 | 0 |
| INSTRUCTION SEQUENCE ERROR | 1 | 0 |
| PROTECT VIOLATION | 1 | 0 |
Notes¶
- Traps conditions that are both system and locally disabled are not shown.
- This is the default trap handling which the exception library uses.
- The list applies when the program starts; a program can alter its OTE register at runtime.
You can also inspect the contents of the traphandler vector in the following way:
@ND
N5000: PLACE MY-DOMAIN
N5000: LOOK-AT-REGISTER THA
THA : 0011724210B 0B
D 1 1724210B 0B
D 1 1724214B 0B
D 1 1724220B 0B
D 1 1724224B 0B
etc.
Page 81¶
SPECIALIZED USE OF THE LINKER¶
In the following example, a FORTRAN program divides by zero five times.
@CREATE-FILE TEST:NRF_Q
@FORTRAN-50
FTN: COMPILE 1.,TEST
PROGRAM TEST
INTEGER I,K
DO 200 FOR K= 1, 5
I = K / 0
WRITE (1,*) K, I
200 CONTINUE
END
$EOF
- CPU TIME USED: 0.3 SECONDS. 7 LINES COMPILED.
- NO MESSAGES
- PROGRAM SIZE=71 DATA SIZE=112 COMMON SIZE=0
FTN: EXIT
When you try to run the program, you get an error message, but since DIVISION-BY-ZERO is an ignorable trap, the program continues to execute:
@ND ()TEST *** 1989-01-02 13:39:11 ND-500 TRAP: (7614B)
DIVISION BY ZERO
AT ADDRESS 1000000033B
0 0
0 0
0 0
0 0
0 0
① --- EXCEPTION STATISTICS
OCCURRENCES EXCNO EXCEPTION TYPE
----------------------------------
1 7614B DIVISION BY ZERO
*** ND-5000 TRAP
N5000: EXIT
NOTES:¶
- The traps that have occurred, are listed at the end of program execution.
Page 82¶
6.8. Enabling and Disabling Traps¶
The Linker command for trap handling is SET-TRAP-CONDITION. For a detailed explanation of this command, see page 196.
The following examples generate a trap, the DIVIDE-BY-ZERO trap. This trap is disabled. This means no special action will be taken if we divide by zero in our program:
@ND_LINKER↵
NDL: SET-ADVANCED-MODE↵
NDL(ADV): OPEN-DOMAIN TEST.,.,↵
NDL(ADV): LOAD TEST.↵
Program: .......113 P01 Data: .............164 D01
① NDL(ADV): SET-TRAP-CONDITION OWN,DISABLE,DIVIDE-BY-ZERO↵
NDL(ADV): EXIT↵
NOTES:
- The DIVIDE-BY-ZERO trap is disabled after loading TEST, but before the Exception Library is automatically linked to segment 30. Since the
<Entry name>parameter is meaningless when parameter 2 is set to DISABLE, we need to specify only three parameters here.
Page 83¶
Specialized Use of the Linker¶
@ND↓¶
N5000: PLACE-DOMAIN TEST↓¶
① N5000: ENABLED-TRAPS↓¶
| LOCAL | SYSTEM | |
|---|---|---|
| INVALID OPERATION | 1 | 0 |
| FLOATING OVERFLOW | 1 | 0 |
| ILLEGAL OPERAND VALUE | 1 | 0 |
| ILLEGAL INDEX | 1 | 0 |
| STACK OVERFLOW | 1 | 0 |
| STACK UNDERFLOW | 1 | 0 |
| PROGRAMMED TRAP | 1 | 0 |
| DISABLE PROCESS SWITCH TIMEOUT | 1 | 0 |
| DISABLE PROCESS SWITCH ERROR | 1 | 0 |
| INDEX SCALING ERROR | 1 | 0 |
| ILLEGAL INSTRUCTION CODE | 1 | 0 |
| ILLEGAL OPERAND SPECIFIER | 1 | 0 |
| INSTRUCTION SEQUENCE ERROR | 1 | 0 |
| PROTECT VIOLATION | 1 | 0 |
② N5000: RUN↓¶
0 0
0 0
0 0
0 0
0 0
N5000: EXIT↓¶
NOTES:¶
-
Note that DIVIDE-BY-ZERO is no longer listed among the enabled traps.
-
No message appears when we divide by zero. The condition is ignored.
Page 84¶
6.9. User-defined Traphandle Routines¶
Alternatively, you could write your own routines for coping with these traps, and these routines can be used as parameter 3 of the SET-TRAP-CONDITION command. The following example written in PLANC demonstrates how to handle traps in a program with the help of a user-written routine. The traphandler routine is written in ND-5000 assembler. The traphandling mechanism is set up at load time and uses the user-written routines as well as the SET-TRAP-CONDITION command in the Linker.
The following is an example of a user-written traphandler routine:
MODULE TrapVers1
% Make the traphandlers available to the Linker.
EXPORT TrapDivZero
EXPORT TrapProtViol
% SSI standard code for divide-by-zero trap
CONSTANT TrapDZ=7614B
% SSI standard code for protect-violation trap
CONSTANT TrapPV=7644B
INTEGER ARRAY : Stack(0:1000)
% This is the user-written routine that handles the trap. Several
% traps may be handled by the same routine by using the input
% parameter '@' as an indicator for which trap has occurred.
ROUTINE INTEGER, VOID : UserTrapHandler
INTEGER : TrapCode
@=:TrapCode
IF TrapCode = TrapDZ THEN
Output(1, 'A', 'Divide by zero trap.$')
ELSIF TrapCode = TrapPV THEN
Output(1, 'A', 'Protect violation trap.$')
ENDIF
ENDROUTINE
ROUTINE SPECIAL VOID, VOID : TrapDivZero
$* entt 1200b, 2700b; wl := TrapDZ; call UserTrapHandler, 0; rett;
ENDROUTINE
ROUTINE SPECIAL VOID, VOID : TrapProtViol
$* entt 1200b, 2700b; wl := TrapPV; call UserTrapHandler, 0; rett;
ENDROUTINE
When a trap occurs, the traphandler routine must indicate which trap it is. If several traps are handled by the same routine, it is impossible to find out which trap has occurred.
A traphandler must start with the ENTT instruction. Return must go through the RETT instruction. (See ND-500 Reference Manual, Scanned by Jonny Oddene for Sintran Data © 2021)
Page 85¶
SPECIALIZED USE OF THE LINKER¶
ND-805009.) After setting the 'w1' register (input parameter to the traphandler) to indicate which trap has occurred, the PLANC routine UserTrapHandler is called.
% Main program that produces traps.
PROGRAM : TrapExample
INTEGER
INTEGER POINTER : ip
IniStack Stack
Output(1, 'A', 'Dividing by zero...$')
a/0 =: a
Output(1, 'A', 'Addressing an uninitialized data pointer...$')
Ind(ip) =: a
Output(1, 'A', 'Main program end.$')
ENDROUTINE
ENDMODULE
% Mode file that loads the examples above
@del-fi trap-1:dom
@ND LINKER
SET-ADVANCED-MODE,
OPEN-DOMAIN "TRAP-1"
LOAD PLANC-VERS-1
LOAD PLANC-LIB
SET-TRAP-CONDITION own enable trapdivzero divide-by-zero
SET-TRAP-CONDITION own enable TrapProtViol Protect-violation
EXIT
Page 86¶
6.10. Traphandling using the Utility Library¶
In the following example, the utility library that handles traps by setting ERRCODE to trap numbers is used. This provides the possibility to handle the trap by an ON ROUTINEERRROR DO statement in PLANC. You must test the ERRCODE to find out if it belongs to a trap or to an error condition. If the ERRCODE is in the range 7600b:7677B, it is caused by a trap.
The setup of traphandlers and enabling of traps (routine utDefineTraps) are done at runtime. Any traphandling performed by the Linker will be cancelled due to this routine.
MODULE TrapVers2
$INCLUDE planc-utillib:incl
$INCLUDE planc-utillib:defs
% Set the bit to enable Divide-by-zero trap
CONSTANT TrapBitDZ=0000010000b
INTEGER ARRAY : Stack(0:1000)
% Routine that performs the division
ROUTINE VOID, INTEGER (INTEGER, INTEGER) : Divider(a, b)
a/b RETURN
ENDROUTINE
% Main program that produces a divide-by-zero trap.
PROGRAM : TrapExample
INTEGER : otel, ote2
INTEGER : a
IniStack Stack
ON ROUTINEERROR DO
IF ERRCODE = TrapDZ THEN
Output(1, 'A', 'Divide by zero trap.$')
ENDIF
ENDON
TrapBitDZ =: otel
0 =: ote2
utDefineTraps(ote2, otel, FALSE)
Output(1, 'A', 'Dividing by zero...$')
Divider(a, 0) =: a
Output(1, 'A', 'Main program end.$')
ENDROUTINE
ENDMODULE
Page 87¶
SPECIALIZED USE OF THE LINKER¶
6.11. Traphandling using the Exception Library¶
This program written in FORTRAN uses the exception library EXCEPT-LIB:NRF to handle traps. No initialization is performed by the Linker as it is done in runtime.
Program DivideByZero
Integer a
% Set up the TrapHandler routine to handle divide-by-zero traps
% (7614b is SSI code for divide-by-zero trap)
Call Except(7614b, 0, TrapHandler(), 0, 2)
Write(1, *) 'Dividing by zero.'
a = a/0
Write(1, *) 'Main program end.'
End
% TrapHandler routine
Subroutine TrapHandler(ErrorNo)
Integer ErrorNo
Write(1, *) 'Divide by zero trap.'
End
When you give the SET-TRAP-CONDITION command, without specifying the traphandler routine (with the default value for this parameter), a program reference to #INVALDI (in our example) is created, meaning there is a corresponding undefined symbol in the symbol table.
SET-TRAP-CONDITION OWN, ENABLE, , DIVIDE-BY-ZERO
When you close the domain, with the CLOSE command, the Linker links and loads autofiles including the exception library, and #INVALDI becomes defined.
For more information about traphandling, see the ND-500 Reference Manual (ND-805009).
Page 88¶
6.12. Traphandling and free segments¶
If you use the SET-TRAP-CONDITION command when loading a free segment, the linker will allocate space for a traphandler vector and traphandler stack, and it will define a trap block on the free segment. SET-TRAP-CONDITION OWN DISABLE ALL defines a trap block and allocates a trap vector where all entries are uninitialized.
When you link a domain to a free segment that has a trap block defined, if you do not explicitly define a trap block for the domain itself, the segment's trap block will be copied into the domain. It will also override any trap block definition in the linker-autojob.
The old Linkage-Loader command LOCAL-TRAP- DISABLE ALL was often used when loading library segments with FORTRAN code, in order to avoid initializing a trap block.
When converting mode files used to load such segments, you should ensure that either
- The free segment gets no trap block defined (remove the LOCAL-TRAP-DISABLE ALL), or
- Gets a trap block that satisfies the needs of the domains you will link to it (explicitly call the LINKER-AUTO-FORT job during the segment's load session), or
- Explicitly define a trap block on the domain (call the LINKER-AUTO-FORT job before you close the domain).
Page 89¶
Chapter 7¶
The Command Structure¶
Page 90¶
The Command Structure¶
The operating system commands are invoked in a command sequence as follows:
-
F-Command
The F-command modifies or establishes the path and file descriptor (FD). -
Modify Control Record
MIDs or MODs (Modify Input Descriptors or Modify Output Descriptors) change input or output parameters. -
T-Command
Transfers control to the specified task.
F-Command Structure¶
| Field | Meaning |
|---|---|
| F | Command keyword |
| P1 | Path |
| P2 | File Descriptor |
Modify Control Record Options¶
| Option | Description |
|---|---|
| MID | Input modify |
| MOD | Output modify |
These commands form the basis for controlling tasks within the operating system. The logical structure ensures that task control is both flexible and precise, allowing for custom configurations necessary for various operations.
Page 91¶
7 THE COMMAND STRUCTURE¶
7.1 THE COMMAND MODES¶
The Linker commands are grouped into two main modes of use: standard and advanced. From the advanced mode, it is possible to enter the LINKER-SERVICE-PROGRAM or the NRF-LIBRARY-HANDLER. The commands in standard mode are sufficient for basic use of the Linker. Most of them are illustrated with examples in chapters 1 - 5.
If you need to use the Linker for more specialized tasks, you must enter the advanced mode by giving the SET-ADVANCED-MODE command with the value YES as the parameter. The Linker prompt you see on your screen changes from "NDL:" to "NDL(ADV):", indicating that you have access to a much wider set of commands, plus those you could use in standard mode.
From the advanced mode you can give the command LINKER-SERVICE-PROGRAM, and enter the service mode. This program has commands for creating the desired environment for the user in the Linker session being executed.
You can carry out maintenance of NRF library files by entering the NRF library handler mode. You do this by giving the command NRF-LIBRARY-HANDLER when you are in the advanced mode. This gives you access to a further subset of commands.
| login | STANDARD | ADVANCED | |||
|---|---|---|---|---|---|
| NRF-LIBRARY-HANDLER | |||||
| --------- | --------- | --------- | |||
| --------- | LINKER-SERV-PROG |
A list of the available commands can be displayed on the screen by pressing the HELP key after entering the desired mode of the Linker.
Page 92¶
The Command Structure¶
For an overview of the commands available in the modes described above, their parameters and default values, see appendix A on page 211.
7.2 Functional Grouping of the Linker Commands¶
In this section the commands available in the Linker are sorted according to their functionality.
Domains¶
- APPEND-DOMAIN
- LIST-DOMAINS
- OPEN-DOMAIN
- SET-SEGMENT-NUMBER
Segments¶
- APPEND-SEGMENT
- CREATE-ROUTINE-VECTOR
- INCLUDE-IN-ROUTINE-VECTOR
- LINK
- LIST-SEGMENTS
- OPEN-SEGMENT
- SET-SEGMENT-SIZE
- SPECIAL-LINK
Combined Domain and Segment-File Commands¶
- CLOSE
- EXIT
- LIST-STATUS
Page 93¶
The Command Structure¶
Loading NRF Code¶
LOAD
SPECIAL-LOAD
Linker-Service-Program Commands¶
CHANGE-FILE-REFERENCES
CHANGE-LINK-LOCK
COMPRESS
EXIT
HELP
INSERT-MESSAGE
SET-AREA-SIZE
SET-FORMAT
SET-HEAP-SIZE
SET-SEGMENT-SIZE
Commands for Reference Handling¶
DEFINE-ENTRY
DEFINE-FORTRAN-COMMOM
DELETE-ENTRIES
LIST-ENTRIES
REFER-ENTRY
SAVE-ENTRIES
SPECIAL-DEFINE
Commands for Memory Allocation¶
FIX-SEGMENT
SET-SEGMENT-LIMITS
Traphandling¶
SET-TRAP-CONDITION
Page 94¶
Commands for ND-100/ND-500(0) Communication¶
- LINK-RT-PROGRAMS
- MATCH-RT-SEGMENT
NRF Library Handler Commands¶
- DELETE-DEBUG-INFORMATION
- DELETE-MODULES
- EXIT
- FORCE-LIBRARY
- GET-MODULES
- HELP
- INSERT-MESSAGE
- LIST-MODULES
- LIST-NRF
- LIST-STATUS
- PREPARE-LIBRARY
- REPLACE-MODULES
- SET-CASE-SIGNIFICANCE
- SET-LIBRARY
Miscellaneous Commands¶
- @
- ABORT-BATCH-ON-ERROR
- EXIT
- IGNORE-DEBUG-INFORMATION
- LINKER-SERVICE-PROGRAM
- NRF-LIBRARY-HANDLER
- RESET-LINKER
- SET-ADVANCED-MODE
- SET-COMPUTER
- SET-FORMAT
- SET-HIGH-ADDRESS
- SET-IO-BUFFERS
- SET-LIST-MODE
- SET-LOAD-ADDRESS
- SET-START-ADDRESS
Page 95¶
The Command Structure¶
Chapter 8¶
Command Reference¶
In Alphabetical Order¶
Page 96¶
The Commands in Alphabetical Order¶
| Command | Description |
|---|---|
| ADD | Adds two numbers |
| SUBTRACT | Subtracts one number from another |
| MULTIPLY | Multiplies two numbers |
| DIVIDE | Divides one number by another |
Scanned by Jonny Oddene for Sintran Data © 2021
Page 97¶
THE COMMANDS IN ALPHABETICAL ORDER¶
8 COMMAND REFERENCE¶
To make it easier to find the command you need, all the commands available in the Linker and the related subprograms are sorted according to three main criteria:
-
The mode they can be executed in (see appendix A on page 211)
-
Their functional grouping (see page 86)
-
Alphabetical order
In this section the Linker commands are presented in alphabetical order to facilitate quick reference. Detailed explanations are given for each command and hints on how they may be used. A list of the previous Linkage-Loader commands that correspond to each command is given at the end of the command description. It is, however, important to note that the functionality of many of the new commands is not exactly the same as for the old commands. Be careful, therefore, when replacing old commands from existing mode files with new commands.
Page 98¶
Command: ABORT-BATCH-ON-ERROR¶
Mode: Advanced
Explanation¶
This command allows you to specify whether an error in the Linker within a batch/mode file should abort that job. It can be used several times within one job, switching to YES before critical sequences and back again to NO afterwards.
Parameters¶
| No. | Parameter name and explanation |
|---|---|
| 1 | <Batch abortion (Yes,No)> |
| Optional parameter. YES means the batch job should | |
| terminate if an error occurs. NO means it should not. | |
| The initial value is NO. Default is YES. |
Example¶
% Typical mode file that can be used whether or not a domain already exists:
@DELETE-FILE PROGRAM:DOM
@NO LINKER
SET-ADVANCED-MODE;
OPEN-DOMAIN "PROGRAM-1"
ABORT-BATCH-ON-ERROR YES
% If something goes wrong now, there is no reason to continue.
LOAD SUB-1 SUB-2 SUB-3 SUB-4 MAIN
ABORT-BATCH-ON-ERROR NO
EXIT
Notes¶
If an error occurs in a batch or mode job and this command has been executed with the parameter YES, the entire job is terminated. The error message is written on the batch output file, and all open files are closed.
If the command has not been executed when an error occurs or the parameter is NO, only the current command is aborted and the next command in the batch input file is executed.
Related Old Linkage-Loader Command(s)¶
ABORT-BATCH-ON-ERROR
Page 99¶
The Commands in Alphabetical Order¶
| Mode: Advanced |
|---|
Command: APPEND-DOMAIN¶
Explanation:¶
This command opens an existing domain file, without erasing the information contained in it. It also executes a CLOSE on any current domain or segment file.
Parameters:¶
| No. | Parameter name and explanation |
|---|---|
| 1 | \<Domain name> |
| Name of an existing domain file. Default file type is DOM. Directory and user name may be specified (assuming you have the necessary file access rights). Remote file syntax is not allowed. | |
| 2 | \<Domain privileges> |
| Optional parameter. Specify ENABLE-ESCAPE or DISABLE-ESCAPE (or unambiguous abbreviations of these). Default is ENABLE-ESCAPE. |
Notes:¶
Use this command instead of OPEN-DOMAIN if you do not want the domain to lose its contents.
The link lock of the domain is not altered by this command.
If the domain was linked to a free segment in a previous load session, and you load or reload a module that references that segment, that reference will not be resolved unless you link to the segment in the current session as well. This is because the link information stored in the domain file only includes the symbols defined in the slave segments.
Similarly, this command does not automatically open any segment file that the domain has been linked to with the FORTRAN-COMMON-SEGMENT attribute. Such segments must be explicitly opened if you want to load to them.
Page 100¶
Example:¶
NDL(ADV): APPEND-DOMAIN MAIN
| Program | Data | Debug |
|---|---|---|
| 15457B P01 | 106454B D01 | 42168 Bytes |
NDL(ADV): LINK APP-COMMON
Segment APPLIC-COMMON-F:SEG linked as segment 9.
NDL(ADV): RELOAD BUGGY-ROUTINE
| Program | Data | Debug |
|---|---|---|
| 20745B P01 | 211034B D01 | 10434B Bytes |
NDL(ADV): CLOSE N
Related Old Linkage-Loader Command(s):¶
- SET-DOMAIN\<domain name>
- APPEND-SEGMENT\<segment name>\<segment attributes>
- COMMON-SEGMENT-APPEND\<segment name>
Page 101¶
THE COMMANDS IN ALPHABETICAL ORDER¶
| Mode: Advanced |
|---|
Command: APPEND-SEGMENT
EXPLANATION:¶
This command opens an existing segment file, without erasing information from the segment. Unless the FORTRAN-COMMON-SEGMENT attribute is specified, any currently open domain or segment is closed before the specified segment is opened.
PARAMETERS:¶
| No. | Parameter name and explanation |
|---|---|
| 1 | <Segment name> Name of an existing file. Default file type is SEG. Directory and user name may be specified (assuming you have file-access rights). Remote file syntax is not allowed. |
| 2 | <Segment attribute> (...) Optional parameter. See NOTES, below. Default is no change in the existing attributes. |
NOTES:¶
Use this command instead of OPEN-SEGMENT if you want to avoid losing information which is already on the segment.
Segment attributes (parameter 2) are described under OPEN-SEGMENT. Only those attributes you specify are changed. If you do not specify any attributes, the segment attributes will remain unchanged. The FORTRAN-COMMON-SEGMENT attribute is, however, unchangeable.
You can only do APPEND-SEGMENT to a FORTRAN-COMMON-SEGMENT when a domain or a different segment is already open. This domain or segment will not be closed by the APPEND-SEGMENT command. Instead, the domain or segment is linked to the FORTRAN-COMMON-SEGMENT, and you can then load additional data blocks.
Note, however, that for FORTRAN-COMMON-SEGMENT automatic CLOSE is not performed on the current domain or segment. The segment is linked to the current domain or segment and additional common blocks may be appended.
Page 102¶
The Commands in Alphabetical Order¶
Related Old Linkage-Loader Command(s):¶
- APPEND-SEGMENT\
\<segment attributes>, - COMMON-SEGMENT-APPEND\<segment name>
Page 103¶
THE COMMANDS IN ALPHABETICAL ORDER¶
Mode: Linker-Serv¶
Command: CHANGE-FILE-REFERENCES¶
EXPLANATION¶
This command is for replacing a domain or segment name reference in a domain or free segment with a new one. It can also be used to change the link key.
PARAMETERS¶
| No. | Parameter name and explanation |
|---|---|
| 1 | |
| 2 | |
| 3 | <old string> with. Default is old name string (parameter 2). |
| 4 |
NOTES¶
CHANGE-FILE-REFERENCES searches through all name references in the name pool for the domain or segment you specify in parameter 1, and replaces all occurrences of <old string> with <new string>.
You can list all file name references and their associated link keys using the LIST-STATUS command.
If a domain or segment file is copied using the standard utilities for copying files, the file name references to possible linked segments may no longer be valid. In such cases, the command CHANGE-FILE-REFERENCES may be used to restore the correct file references.
Page 104¶
Example:¶
% In this example we have a domain MAIN linked to a segment SUB, both
% residing on the same user. When copying DOMAINs and/or segments, the
% problem that arises is that the file references within the domain to the
% linked segments may no longer be valid.
% Let's assume the segment has been moved (by a normal SINTRAN COPY
% command) to the area (DIR:USER) and renamed, due to name conflicts, to
% SEG-SUB:SEG. No changes need to be done to the segment itself, but ALL
% domains referring to the segment must be updated.
% As the CHANGE-FILE-REFERENCES expects an EXACT match of the file references
% to be changed, LIST-STATUS of the domain(s) to get the exact spelling
% of the link:
NDL(ADV): SET-ADVANCED-MODE↓
NDL(ADV): LIST-STATUS MAIN:DOM↓
Domain: (PACK-THREE-6799:NLL-TEST)MAIN:DOM,1
Program segment: 2
Linked to: SUB:SEG Link key: 12345
Data segment: 2
Linked to: SUB:SEG Link key: 12345
% Then change the file reference to the moved segment
NDL(ADV): LINKER-SERVICE-PROGRAM↓
- NO LINKER'S SERVICE-PROGRAM -
NDL(SRV): CHANGE-FILE-REFERENCES MAIN:DOM,SUB:SEG,(DIR:USER)SEG-SUB:SEG↓
Link key changed from 12345 to 12345.
2 substitutions done in domain MAIN:DOM.
NDL(SRV): EXIT↓
NDL(ADV): LIST-STATUS MAIN:DOM↓
Domain: (PACK-THREE-6799:NLL-TEST)MAIN:DOM,1
Program segment: 2
Linked to: (DIR:USER)SEG-SUB:SEG Link key: 12345
Data segment: 2
Linked to: (DIR:USER)SEG-SUB:SEG Link key: 12345
% This is also valid when you move the complete domain to another computer,
% move the domain and segments with standard file transfer utilities and
% then change the segment file references in the domain to the corresponding
% segment file names.
Related Old Linkage-Loader Command(s):¶
None.
Page 105¶
THE COMMANDS IN ALPHABETICAL ORDER¶
Mode: Linker-Serv¶
Command: CHANGE-LINK-LOCK¶
EXPLANATION:¶
This command is used to change the value of a link lock in a domain or segment.
When a domain or segment is created, a random link lock is assigned to it. All links to the domain or segment will use this link lock as their link key. To be able to execute the domain, the link lock must match the link key when you PLACE the domain. If you wish to change the value of this lock, you can do so by using this command.
PARAMETERS:¶
| No. | Parameter name and explanation |
|---|---|
| 1 | <Domain or segment name> |
| Default is current domain or segment. | |
| 2 | <New link lock> |
| A number in the range 0:65535. Larger link locks are truncated. Default value is the universal link lock, that is, the word UNIVERSAL in unabbreviated form. |
NOTES:¶
The link lock can be listed using the LIST-STATUS command.
EXAMPLE:¶
% In this example the routine MAIN found in the file MAIN:NRF calls the
% routine SUB residing in the file SUB:NRF.
% We first put the routine SUB on a segment (also called SUB).
NDL: SET-ADVANCED-MODE⎵
NDL(ADV): OPEN-SEGMENT SUB:SEG,2⎵
Program: .........48B P02 Data:........4B D02
NDL(ADV): SPECIAL-LOAD SUB:NRF,TOTAL⎵
Program: .........20B P02 Data:........50B D02 Debug inf:.....1648B Bytes
NDL(ADV): CLOSE N_N⎵
NDL(ADV): LIST-STATUS SUB:SEG⎵
Segment: (PACK-THREE-6799:NLL-TEST)SUB:SEG,1
Linker version used: AOC Link lock: 25200 + 0
% Note that a unique link LOCK is generated when building a segment.
Page 106¶
The Commands in Alphabetical Order¶
% We now build a domain containing the MAIN routine (also called MAIN).
NDL(ADV): OPEN-DOMAIN MAIN:DOM_J
NDL(ADV): LOAD MAIN:NRF_
Program:......140B P01 Data:.........2154B D01 Debug inf:......156B Bytes
NDL(ADV): LINK SUB:SEG_
Segment SUB:SEG linked as segment 2.
NDL(ADV): CLOSE N_N_
NDL(ADV): LIST-STATUS MAIN:DOM_J
Domain: (PACK-THREE-6799:NLL-TEST)MAIN:DOM,1
Linker version used: AOC
Link lock: 25447 + 0
| Program Segment | Linked to | Link Key |
|---|---|---|
| 2 | SUB:SEG | 25200 |
| 2 | SUB:SEG | 25200 |
% When an initial link is created to a segment, a matching link KEY is
% generated and connected to the link. When the domain is later placed for
% execution, the KEYs in the domain are compared to the LOCKs of the
% linked segments. Placing can take place only if all the KEYs match their
% appropriate LOCKs. Placing and execution of the domain MAIN is therefore
% currently possible.
% We will now change the link LOCK by rebuilding the segment.
NDL(ADV): OPEN-SEGMENT SUB:SEG_J
Program:.........48 P02 Data:..........48 D02
NDL(ADV): SPECIAL-LOAD SUB:NRF, TOTALJ
Program:.......208 P02 Data:..........50B D02 Debug inf:......164B Bytes
NDL(ADV): CLOSE N_N_
NDL(ADV): LIST-STATUS SUB:SEG_J
Segment: (PACK-THREE-6799:NLL-TEST)SUB:SEG,1
Linker version used: AOC
Link lock: 25837 + 0
% As you see, the link LOCK is now different, and placing and
% execution of the domain MAIN is therefore currently impossible.
% You can change the link LOCK as shown in this example:
NDL(ADV): LINKER-SERVICE-PROGRAM_J
- ND LINKER'S SERVICE-PROGRAM -
NDL(SRV): CHANGE-LINK-LOCK SUB:SEG,12345J
Link lock of segment "SUB:SEG" changed.
Link lock changed from 25837 to 12345
NDL(SRV): EXITJ
NDL(ADV): LIST-STATUS SUB:SEG_J
Segment: (PACK-THREE-6799:NLL-TEST)SUB:SEG,1
Linker version used: AOC
Link lock: 12345 + 0
% Alternatively, you may change the link KEYs as follows:
NDL(ADV): LINKER-SERVICE-PROGRAM_J
- ND LINKER'S SERVICE-PROGRAM -
NDL(SRV): CHANGE-FILE-REFERENCE MAIN:DOM,SUB:SEG,12345J
Page 107¶
THE COMMANDS IN ALPHABETICAL ORDER¶
Link key changed from 25837 to 12345.
2 substitutions done in domain MAIN:DOM.
NDL(SRV): EXIT
NDL(ADV): LIST-STATUS MAIN:DOM
Domain: (PACK-THREE-6799:NLL-TEST)MAIN:DOM,1
Linker version used: AOC
Link lock: 25447 + 0
| Program segment: | 2 |
|---|---|
| Linked to: | SUB:SEG |
| Link key: | 12345 |
| Data segment: | 2 |
|---|---|
| Linked to: | SUB:SEG |
| Link key: | 12345 |
% The link KEY and LOCK now match. Placing and execution of the domain % MAIN can therefore be performed.
RELATED OLD LINKAGE-LOADER COMMAND(S):¶
None
Page 108¶
Mode: Standard¶
Command: CLOSE¶
Explanation:¶
Closes the current domain or segment. The relevant parts of the symbol table are written to the link information area on the file. FORTRAN-COMMON-SEGMENTs are also closed, and symbols defined in them are written to their link information areas.
Usage:¶
This command can be used when you have finished linking and loading.
Parameters:¶
| No. | Parameter name and explanation |
|---|---|
| 1 | |
| 2 | |
| 3 |
Example:¶
SET-ADVANCED-MODE.,
OPEN-SEGMENT "SEG-WITHOUT-TRAP".10.,
LOAD FILE-1.,FILE-2
SET-TRAP-CONDITION OWN,DISABLE,ALL
CLOSE.,YES
Notes:¶
CLOSE is automatically executed by OPEN-DOMAIN and EXIT. OPEN-SEGMENT and APPEND-SEGMENT execute an implicit CLOSE if a non-FORTRAN-COMMON-SEGMENT is opened/appended.
In interactive mode, the domain or segment will not be closed the first time if undefined references exist. This, however, does not apply if parameter 2 is NO.
Page 109¶
The Commands in Alphabetical Order¶
If you specify YES in parameter 2, and there are undefined references, or an undefined trap block, the Auto Jobs and Linker Job will be executed. The search strategy for the JOB file is: first those in your own user area, and then, if none are found, under user SYSTEM.
If you have not used a SET-TRAP-COMMAND to define a trap block, CLOSE will copy the first valid trap block found on any linked segments. The same strategy applies for the main start address.
Related Old Linkage-Loader Command(s):¶
CLOSE-SEGMENT
Page 110¶
Command: COMPRESS¶
Mode: Linker-serv
EXPLANATION:¶
Packs the contents of a segment or domain file, resulting in a file without holes.
PARAMETERS:¶
| No. | Parameter name and explanation |
|---|---|
| 1 | <Name of domain or segment file> No default value. If no file type is specified, DOM is tried first. If no such file is found, file type SEG is tried. |
| 2 | <Include debug information (Yes,No)> Optional parameter. Default is Yes. |
| 3 | <Include link information (Yes,No)> Optional parameter. Default is Yes. |
| 4 | <Create contiguous file (No,Yes)> Optional parameter. Default is No. |
| 5 | <Workfile> Optional parameter. Default is XQQADZYWJAIJQFXQ:QQZP. The work file must be contiguous if parameter 4 is YES. |
NOTES:¶
This command is most useful if the file will be copied over a network. If you run the program FILE-TRANSFER from the receiving end, the program will send a request through the network for each non-allocated page. This can delay the transfer for hours.
It is normally impossible to load or reload a segment or domain after it has been compressed, since there will only be room up to the next page boundary.
COMPRESS does not reduce the number of pages on disk occupied by the file (except you save an index page or two if you create a contiguous file). Only the byte count is reduced.
There is no way to reverse the effects of the COMPRESS command.
This command builds a compressed version of the file on a separate work file. Only if it completes...
Page 111¶
The Commands in Alphabetical Order¶
Successfully, will the original file be deleted and the work file renamed. Otherwise, the work file is deleted.
This means the user must have the necessary amount of unused pages on the SINTRAN user area. However, if an existing file is specified as work file, it is first deleted, and then created. If a non-existing file is specified, the name must not be given in double quotation marks.
Note that if the specified work file is on a different user area, the resulting file will be on this user area. The renaming operation will fail if you do not have directory access to the file. In this case, the original file is already deleted and you must rename the work file manually.
Related Old Linkage-Loader Command(s):¶
None
Page 112¶
CREATE-ROUTINE-VECTOR¶
Mode: Advanced
EXPLANATION¶
This command reserves space at the beginning of the current program segment for a routine vector with the specified number of entries.
PARAMETERS¶
| No. | Parameter name and explanation |
|---|---|
| 1 | <Number of routines> |
| Optional parameter. Specify the maximum number of entries in the routine vector. The default is 64. |
NOTES¶
When you use this command, you should use it before any code is loaded to the current program segment.
You must set the contents of the vector using the INCLUDE-IN-ROUTINE-VECTOR command. This command will load a specified entry with the entry point instruction of a specified routine, followed by a jump instruction to the rest of the code of that routine.
Domains and segments that link to a segment with a routine vector will access the entries indirectly through the routine vector. Only entries in the vector are accessible, all other entries are hidden. However, the SPECIAL-DEFINE command will get any entry in the link information area of the segment.
If you want the link information area to contain only the entries in the vector, you should use the SAVE-ENTRIES command before closing the segment with the routine vector.
RELATED OLD LINKAGE-LOADER COMMAND(S)¶
ENTRY-ROUTINES(
Page 113¶
THE COMMANDS IN ALPHABETICAL ORDER¶
Mode: Advanced¶
Command: DEFINE-ENTRY¶
EXPLANATION:¶
This command puts a defined entry into the symbol table.
PARAMETERS:¶
| No. | Parameter name and explanation |
|---|---|
| 1 | <Entry name> No default. |
| 2 | <Value> Value you want to assign to the entry. You can specify a symbol, meaning this entry shall have the same value as the specified symbol, or you can specify a number. Default is zero. |
| 3 | <Entry type: (P,D)> P: Program entry. D: Data entry. Default is P. |
NOTES:¶
When specifying the value parameter, the pseudo-symbols #PCLC, #DCLC and #CCLC are available as current Program, Data, and Common Current Location Counters. #THA is available as the address where the TrapHandler Address vector is allocated. For further information on the THA vector, refer to the SET-TRAP-CONDITION command on page 195.
EXAMPLE:¶
Example of defining monitor calls on an indirect segment:
NDL: SET-ADVANCED-MODE
NDL(ADV): OPEN-DOMAIN "MY-DOMAIN"
% Define monitor call names other than the usual (mn113 and mon32).
NDL(ADV): DEFINE-ENTRY GETCLOCK 370000000113B P
NDL(ADV): DEFINE-ENTRY OUTMESSAGE 370000000032B P
% You now need to define a program entry alias for a user routine
% entry called test1
NDL(ADV): LOAD TEST
Program: ......304B P01 Data: ..........230B D01
% Define a program entry alias for a user routine entry called test1.
NDL(ADV): DEFINE-ENTRY ALIASNAME TEST1 P
Page 114¶
The Commands in Alphabetical Order¶
% Example defining data entry at current data location counter:
NDL(ADV): DEFINE-ENTRY DATAENTRY #DC1C D
NDL(ADV): LIST-ENTRIES DEFINE
Defined entries:
| Name | Value | Info |
|---|---|---|
| TEST | /FTN | 48 P01 |
| ALIASNAME | 4B P01 | |
| OUTMESSAGE | 32B P37 | |
| GETCLOCK | 113B P37 | |
| DATAENTRY | 230B D01 |
Current load addresses:
| Type | Address |
|---|---|
| Program | 304B P01 |
| Data | 230B D01 |
NDL(ADV): CLOSE
Related Old Linkage-Loader Command(s):¶
DEFINE-ENTRY
Page 115¶
The Commands in Alphabetical Order¶
Mode: Advanced¶
Command: DEFINE-FORTRAN-COMMON¶
Explanation:
This command allows you to allocate a data area as a FORTRAN COMMON block. It may also be used to allocate general data areas. In the latter case, parameters 2 and 3 must be different from the default.
Parameters:
| No. | Parameter name and explanation |
|---|---|
| 1 | \ |
| 2 | \ |
| 3 | \ Address where the COMMON block starts. Default is the current location counter of the first occurrence of the COMMON block during the load session. If any FORTRAN-COMMON-SEGMENTS are opened, the current common location counter of the last opened common segment (#CCLC) is chosen. If no FORTRAN-COMMON-SEGMENTS are open, the current data location counter (#DCLC) is used. |
Example:
NDL: SET-ADVANCED-MODE_↵
NDL(ADV): OPEN-DOMAIN "FORTRAN-DOM"_↵
NDL(ADV): OPEN-SEGMENT "FORTRAN-SEG2" 2 D FORTRAN-COMMON-SEGMENT_↵
FORTRAN-COMMON-SEGMENT FORTRAN-SEG2:SEG linked as data segment 2 to current domain.
NDL(ADV): DEFINE-FORTRAN-COMMON FORTRAN-COM2,_↵
NDL(ADV): OPEN-SEGMENT "FORTRAN-SEG5" 5 D FORTRAN-COMMON-SEGMENT_↵
FORTRAN-COMMON-SEGMENT FORTRAN-SEG5:SEG linked as data segment 5 to current domain.
NDL(ADV): DEFINE-FORTRAN-COMMON FORTRAN-COM3,_↵
NDL(ADV): LOAD FORTRAN-PROG_↵
Program: ...... 344B P01 Data: ........... 210B DO1
Name: FORTRAN-SEG2:SEG Address: ...... 148 D02
Name: FORTRAN-SEG5:SEG Address: ...... 148 D05
NDL(ADV): CLOSE_↵
NDL(ADV): LINKER-AUTO-FORT:JOB_↵
X --> FORTRAN Auto Job: Trap definition part.
% --> FORTRAN Auto Job: Link/load part.
Page 116¶
The Commands in Alphabetical Order¶
% Subsequent COMMON blocks will now be defined on FORTRAN-SEG5, since
% this is the current COMMON segment. Common block 'FORTRAN-COM' is
% defined on segment 2 (i.e. the file FORTRAN-SEG2:SEG) when this
% symbol is first encountered during loading of the NRF file. Similarly,
% FORTRAN-COM5 is defined on seg. 5 when it first occurs in the NRF
% file, and its length (default) is determined at the same time.
Notes:¶
If an address without the upper five bits (i.e. the logical segment number) is specified, the current data segment is assumed. If a FORTRAN-COMMON-SEGMENT is open, the current common segment is assumed.
If the address (parameter 3) plus the length (parameter 2) is greater than the value of the Data Current Location Counter (#DCLC), the #DCLC is increased accordingly.
If you specify the length of the COMMON block, it will have this length regardless of the defined size of the first occurrence of the COMMON block. Some programmers use the same COMMON block with different sizes in different modules, so this can be used to override the limitation that the first definition of a COMMON block must be the largest one.
Related Old Linkage-Loader Command(s):¶
DEFINE-COMMON <name> <common size> <value>
Page 117¶
THE COMMANDS IN ALPHABETICAL ORDER¶
Mode: Nrf-lib¶
Command: DELETE-DEBUG-INFORMATION¶
EXPLANATION:
This command is used to permanently delete debug information from one or more NRF modules. The debug information will only be marked as deleted. The command will take effect when (and if) the file is saved. This means the LIST-NRF command will still include the debug information in its listing.
PARAMETERS:
| No. | Parameter name and explanation |
|---|---|
| 1 | <First module>Optional parameter. Default is the first module in the current NRF library file. |
| 2 | <Last module>Optional parameter. Default is the last module in the current NRF library file. |
| 3 | <Entry type(PD,P,D)>Optional parameter. Default is PD - i.e. both program and data entries will be considered when searching for a module. |
EXAMPLE:
The routines used in this example are the same as those used in SET-CASE-SIGNIFICANCE (see page 175). The library was compiled with DEBUG MODE ON. We now enter the NRF library handler and select the newly compiled file as current library file. Since case is significant in this library (see page 175), we must execute the command SET-CASE-SIGNIFICANCE before selecting the library file. If we do not do so, we will get name conflicts, since all the symbols in the file have the same name. We may now delete the debug information as shown in the example below:
NDL(NLH): SET-CASE-SIGNIFICANCE
Case significance (Yes, No): YES
NDL(NLH): SET-LIBRARY
File name: CASES
NDL(NLH): LIST-MODULES
| Modul | Nrf-entry | P/D Language | Program_size | Data_size | Debug_size |
|-------|-----------|-------------|--------------|-----------|------------|
| ....1 | CASE_TO_CASE... | P.X Planc... | .....42B | .......0B | ....340B |
| ....2 | CASE_TO_CASE... | P.X Planc... | .....42B | .......0B | ....340B |
| ....3 | CASE_TO_CASE... | P.X Planc... | .....15B | .......0B | ....316B |
| ....4 | CASE_TO_CASE... | P.X Planc... | .....15B | .......0B | ....316B |
NDL(NLH): DELETE-DEBUG-INFORMATION
Scanned by Jonny Oddene for Sintran Dac © 2021
Page 118¶
This command deletes all debug information.¶
First module:
Last module:
LIST-MODULES¶
File name: PACK-FOUR-6799:MICKe-TEST)CASES:NRF:1
Modules:
| Module Nrf-entry | P/D | Language | Program_size | Data_size | Debug_size |
|---|---|---|---|---|---|
| CASE_TO_CASE | P.X | Planc | 42B | 0B | DELETED |
| case_TO_CASE | P.X | Planc | 42B | 0B | DELETED |
| case_TO_case | P.X | Planc | 15B | 0B | DELETED |
| CASE_TO_CASE | P.X | Planc | 15B | 0B | DELETED |
If this file is now saved and read into the library handler again,
we will see that the debug information is deleted from the file.
SET-CASE-SIGNIFICANCE¶
Case significance (Yes, No): YES
SET-LIBRARY¶
File name: cases
LIST-MODULES¶
| Module Nrf-entry | P/D | Language | Program_size | Data_size | Debug_size |
|---|---|---|---|---|---|
| CASE_TO_case | P.X | Planc | 42B | 0B | 0B |
| case_TO_CASE | P.X | Planc | 42B | 0B | 0B |
| case_TO_case | P.X | Planc | 15B | 0B | 0B |
| CASE_TO_CASE | P.X | Planc | 15B | 0B | 0B |
RELATED OLD LINKAGE-LOADER COMMAND(S)¶
None
Page 119¶
DELETE-ENTRIES¶
Mode: Advanced
EXPLANATION¶
This command removes symbols from the symbol table.
USAGE¶
You can use this command to make some symbols unavailable, to resolve name conflicts, and to avoid symbol table overflow.
PARAMETERS¶
| No. | Parameter name and explanation |
|---|---|
| 1 | <Entry name>...<Entry name>Optional parameter. Default is that no symbols are deleted. Use of wildcards is allowed (see notes in LIST-ENTRIES command on page 141). As many entries as desired can be specified. |
| 2 | <Entry selection (Defined,Undefined,All)>In order to specify this parameter, you must terminate the list of entries in the previous parameter, using a "/". Remember to have this terminator separated from the other parameters by a space or a comma. If you specify Defined (Undefined), the specified entries will only be deleted from the symbol table if they are defined (undefined) entries. This is important when entries are specified using wildcards. Default is Defined. |
| 3 | <Entry type (PD,P,D)>Optional parameter. To specify this parameter, the list of entries in the first parameter must be terminated as explained for the previous parameter. That parameter specified whether the command applies to both program and data segments (PD), to program segments only (P), or to data segments only (D). Default is PD. |
NOTES¶
The SAVE-ENTRIES command has priority over the DELETE-ENTRIES command. This means that if you give the command DELETE-ENTRIES * after one or more SAVE-ENTRIES commands, only those entries that have not been explicitly saved with the SAVE-ENTRIES command will be deleted.
Page 120¶
The Commands in Alphabetical Order¶
In version A of the Linker, the last two parameters could not be specified, and the effect of this command was as with the values All,PD. Since this is not the same as the current default value, old MODE files may need revision. To get exactly the same functionality as before, use the command.
DELETE-ENTRIES entry1,entry2,...,/ALL,PD
Related Old Linkage-Loader Command(s):¶
KILL-ENTRIES <entries>
Page 121¶
THE COMMANDS IN ALPHABETICAL ORDER¶
Mode: Nrf-lib¶
Command: DELETE-MODULES¶
EXPLANATION:¶
This command is for deleting one or more modules from the current NRF library file.
PARAMETERS:¶
| No. | Parameter name and explanation |
|---|---|
| 1 | The first module you want to delete from the current NRF library file. No default value. |
| 2 | The last module you want to delete from the current NRF library file. Default is |
| 3 | Default is PD, i.e. both program and data entries will be considered when searching for a module. |
EXAMPLE:¶
The user wants to delete the modules that strip parity from characters since they no longer are in use (or never were). The modules concerned are case to case and CASE TO CASE.
NDL(NLH): SET-CASE-SIGNIFICANCE↲
% Case was significant here.
Case significance (Yes, No): YES↲
NDL(NLH): SET-LIBRARY↲
File name: cases↲
% Now list the modules in the file to check if they are still there.
NDL(NLH): LIST-MODULES↲
File name: ↲(PACK-FOUR-6799:MICKe-TEST)CASES:NRF:1
Modules: ↲
| Module Nrf-entry | P/D Language | Program_size | Data_size | Debug_size |
|--------------------|--------------|--------------|-----------|------------|
| .....1 CASE_TO_case..... | P.X Planc..... | 42B…….. | 08…….. | 08 |
| .....2 case_TO_CASE….. | P.X Planc..... | 42B…….. | 08…….. | 08 |
| .....3 case_TO_case….. | P.X Planc..... | 15B…….. | 08…….. | 08 |
| .....4 CASE_TO_CASE….. | P.X Planc….. | 15B…….. | 08…….. | 08 |
% Now we know that the modules we want to delete are the last two modules in the file.
NDL(NLH): DELETE-MODULES↲
First module: case TO case↲
Last module: CASE TO CASE↲
NDL(NLH): LIST-MODULES↲
File name: ↲(PACK-FOUR-6799:MICKe-TEST)CASES:NRF:1
Modules: ↲
Page 122¶
The Commands in Alphabetical Order¶
| Module Nrf-entry | P/D | Language | Program_size | Data_size | Debug_size |
|---|---|---|---|---|---|
| 1 CASE_TO_case | P.X | Planc | 42B | 0B | 0B |
| 2 case_TO_CASE | P.X | Planc | 42B | 0B | 0B |
NDL(NLH):
Related Old Linkage-Loader Command(s):¶
DELETE-NRF-MODULES
Page 123¶
THE COMMANDS IN ALPHABETICAL ORDER¶
| Mode: Standard |
|---|
Command: EXIT¶
EXPLANATION:¶
This command returns you to SINTRAN, the ND-5000 Monitor, or User Environment, depending on which of these you entered the Linker from. Current domain or segment will automatically be closed.
PARAMETERS:¶
No Parameters.
EXAMPLE:¶
@NO_LINKER↵
NDL: SET-ADVANCED-MODE↵
NDL(ADV): OPEN-DOMAIN MY-DOMAIN,↵
% Enter the NRF library handler
NDL(AOV): NRF-LIBRARY-HANDLER SUBROUTINES↵
NDL(NLH): DELETE-DEBUG-INFORMATION↵
NDL(NLH): EXIT↵
% Now back in the Linker
NDL(ADV): LOAD MAIN,SUBROUTINES↵
% Assume that the appropriate library is auto-linked
NDL(ADV): EXIT↵
RELATED OLD LINKAGE-LOADER COMMAND(S):¶
EXIT
Scanned by Jonny Oddene for Sintran Data © 2021
Page 124¶
The Commands in Alphabetical Order¶
| Mode: Linker-Serv |
|---|
| Command: EXIT |
EXPLANATION:
Use this command to leave the LINKER-SERVICE-PROGRAM and return to the Linker's advanced mode.
PARAMETERS:
No Parameters.
RELATED OLD LINKAGE-LOADER COMMAND(S):
None
Page 125¶
THE COMMANDS IN ALPHABETICAL ORDER¶
| Command | Mode |
|---|---|
| EXIT | Nrf-lib |
EXPLANATION:¶
Use this command to leave the NRF-LIBRARY-HANDLER and return to the Linker’s advanced mode. Remember to SAVE the current library file before you EXIT if you want the result of this NRF library handler session to be permanent.
PARAMETERS:¶
No Parameters.
RELATED OLD LINKAGE-LOADER COMMAND(S):¶
None
Page 126¶
FIX-SEGMENT¶
Mode: Advanced
EXPLANATION:¶
This command is for fixing in memory a slave segment, a free segment, or a specified part of a segment.
USAGE:¶
Only user SYSTEM can execute domains with fixed segments.
PARAMETERS:¶
| No. | Parameter name and explanation |
|---|---|
| 1 | <Fix type (Contiguous, Scattered, Absolute, Unfix)>Default: CONTIGUOUS. See details in NOTES below. |
| 2 | <Domain or segment name>Name of a segment, or domain containing the segment to be fixed in memory. Default is current domain or segment. |
| 3 | <Segment number>You only need to specify this in the case of a slave segment. Default for free segments is the segment number of the free segment specified in parameter 2. Default for slave segments is the current segment number. |
| 4 | <Segment type (D,P)>D means data segment, P means Program segment. Default is D. |
| 5 | <Low address>If you want to fix just part of the segment, specify here the lower bound of the segment area. Default is the lowest loaded address on the segment. |
| 6 | <High address>If you want to fix just part of the segment, specify here the upper bound of the segment area. Default is the highest loaded address on the segment. |
| 7 | <Physical address>If the value of parameter 1 is ABSOLUTE, you must specify the memory address here. There is no default. |
Page 127¶
The Commands in Alphabetical Order¶
Notes:¶
The meaning of parameter 1 is as follows:
| Type | Description |
|---|---|
| CONTIGUOUS | The specified segment will be put in a contiguous area in memory. |
| SCATTERED | The specified segment will be fixed but pages may be scattered throughout physical memory. |
| ABSOLUTE | The specified segment will be put in a contiguous area in memory, starting at the physical address you specify in parameter 7. |
| UNFIX | The specified segment is unfixed from memory. |
Related Old Linkage-Loader Command(s):¶
- FIX-SEGMENT-SCATTERED
<seg. name><type><lower addr.><upper addr.> - FIX-SEGMENT-CONTIGUOUS
<seg. name><type><lower addr.><upper addr.> - FIX-SEGMENT-ABSOLUTE
<seg. name><type><physical addr.><lower addr.><upper addr.>
Page 128¶
Command: FORCE-LIBRARY¶
Mode: Nrf-lib¶
EXPLANATION:¶
This command controls which kinds of symbols will be included in the fast load vector. It can be used to force the library handler to allow modules NOT compiled in library mode to enter their symbols into the fast load vector. Normally, only symbols appearing in LIB control groups are included in the fast load vector.
PARAMETERS:¶
| No. | Parameter name and explanation |
|---|---|
| 1 | <Symbols defined by LIB (Yes,No)> Optional parameter. YES if LIB-marked entries should be included in the fast load vector, otherwise NO. Initial value is YES. Default is YES. |
| 2 | <Symbols defined by DEF (Yes,No)> Optional parameter. YES if program symbols should be included in the fast load vector. Initial value is NO. Default is YES. |
| 3 | <Symbols defined by DDF (Yes,No)> Optional parameter. YES if ordinary data symbols should be included in the fast load vector. Initial value is NO. Default is YES. |
| 4 | <Block data/Common (Yes,No)> Optional parameter. YES if data symbols with a size specification should be included in the fast load vector. Initial value is YES. Default is YES. |
NOTES:¶
LIB, DEF, and DDF are control groups in an NRF file. LIB marks symbols as library symbols, and means the module containing this control group should be loaded if the symbol has undefined entries in the symbol table. DEF and DDF define symbols as program or data symbols respectively. Refer to appendix D for details about the NRF file format.
FORTRAN Common/Block data will only get their first occurrence defined in the fast load vector. All other occurrences (with the same name) will be ignored.
Page 129¶
THE COMMANDS IN ALPHABETICAL ORDER¶
EXAMPLE:¶
The user has a file that he wants to convert into a fast load file. He cannot remember whether or not it was compiled in library mode. If the file was not compiled in library mode, then the PREPARE-LIBRARY command will not work and the library handler must be FORCED into making the vector of a fast library file. This is done by executing the command FORCE-LIBRARY:
NDL(NLH): SET-CASE-SIGNIFICANCE
Case significance (Yes, No): YES
NDL(NLH): SET-LIBRARY
File name: cases
NDL(NLH): LIST-MODULES
File name: (PACK-FOUR-6799:MICKE-TEST)CASES:NRF:1
Modules:
| Module Nrf-entry | P/D | Language | Program_size | Data_size | Debug_size |
|---|---|---|---|---|---|
| CASE_TO_CASE | P. | Planc | 428 | 0B | 0B |
| case_TO_case | P. | Planc | 428 | 0B | 0B |
| case_TO_case | P. | Planc | 15B | 0B | 0B |
| CASE_TO_CASE | P. | Planc | 15B | 0B | 0B |
- The code from the beginning of the file must now be listed to see if there is already a vector.
NDL(NLH): LIST-NRF
File name: (PACK-FOUR-6799:MICKE-TEST)CASES:NRF:1
First module:
Last module: CASE TO case
- An empty vector not containing any of the routines was found. PREPARE was probably executed earlier without putting any entries into the vector.
0B: (L8B,4 37777777777B)
Module Nrf-entry | P/D | Language | Program_size | Data_size | Debug_size
| Module Nrf-entry | P/D | Language | Program_size | Data_size | Debug_size |
|---|---|---|---|---|---|
| CASE_TO_CASE | P. | Planc | 428 | 0B | 0B |
0B: (BEG,2 0B 2B)
0B: (OMO,0)
0B: (PMO,0)
0B: (DEF,0 CASE_TO_case=#PCLC)
0B: (LDN, 428)
0B: ENTS +0B, BY1 =:
7B: 24B:5, BY1 AND 177B, BY1 =: B.
16B: 25B, BY1 COMP 101B, IF < GO 14B, BY1 COMP
25B: 132B, IF >> GO 78, BY1 +
34B: 40B, RET, BY1 := B.25B, RET
42B: (DMO,0)
0B: (PMO,0)
428: (FMO,4 #PCLC-40B)
2B: (ADI,4 DATA (#DCLC)+30B
68B: (DMO,0)
0B: (END,0)
- Since no entry was marked LIB when the LIST-NRF command was executed, the user now assumes the file was compiled with library mode OFF.
- To make the library handler produce a fast load vector, the user now executes the FORCE-LIBRARY command. This causes the library handler to make a vector entry for all entries defined in the file.
NDL(NLH): FORCE-LIBRARY
Symbols defined by LIB (Yes, No): NO
Symbols defined by DEF (Yes, No): YES
Symbols defined by DOF (Yes, No): NO
Page 130¶
THE COMMANDS IN ALPHABETICAL ORDER¶
Blockdata/Common (Yes, No): NO
NDL(NLH): SAVE-LIBRARY
File name: CASES
% The file is now saved. If we look at it, we will find that the vector % now contains entries for our routines.
NDL(NLH): SET-CASE-SIGNIFICANCE
Case significance (Yes, No): YES
NDL(NLH): SET-LIBRARY
File name: CASES
NDL(NLH): LIST-NRF
File name: |-(PACK-FOUR-6799:MICKE-TEST)CASES:NRF:1
First module: |
Last module: CASE TO case-|
0B: (LBB,4 0B)
0B: (LBB,4 CASE_TO_case 1268)
0B: (LBB,4 case_TO_CASE 234B)
0B: (LBB,4 CASE_TO_case 342B)
0B: (LBB,4 CASE_TO_CASE 423B)
0B: (LBB,4 37777777777B)
| Module | Nrf-entry | P/D Language | Program_size | Data_size | Debug_size |
|---|---|---|---|---|---|
| CASE_TO_case | P. Planc. | 42B | 0B | 0B |
0B: (BEG,2 0B 2B)
0B: (DMO,0)
0B: (PMO,0)
0B: (DEF,0 CASE_TO_case=#PCLC)
0B: (LDN, 42B)
ENTS *0B, BY1 ::
7B: 8.248:S, BY1 AND 177B, BY1 := B.
16B: 25B, BY1 COMP 101B, IF << GO 14B, BY1 COMP
25B: 132B, IF >> GO 7B, BY1 +
34B: 40B, RET, BY1 := 8.258, RET
42B: (DMO,0)
0B: (PMO,0)
42B: (FM0,4 #PCLC-40B)
2B: (ADI,4) DATA (#DCLC)+30B
6B: (DMO,0)
0B: (ENO,0)
NDL(NLH):
RELATED OLD LINKAGE-LOADER COMMAND(S):¶
None
Page 131¶
The Commands in Alphabetical Order¶
Mode: Nrf-lib¶
Command: GET-MODULES¶
Explanation:
For selecting one or more modules from a source file and adding them to the current NRF library file after the module you specify in parameter 4.
Parameters:
| No | Parameter name and explanation |
|---|---|
| 1 | \<Source file> The name of an NRF file containing modules you want to append to the current NRF file. There is no default file for this parameter. |
| 2 | \<First module> Optional parameter. The first of the modules in the source file that you want to insert into the current NRF library file. Default is the first module in the source file. |
| 3 | \<Last module> Optional parameter. The last of the modules in the source file that you want to insert into the current NRF library file. Default is the last module in the source file. |
| 4 | \<After module> Optional parameter. The new modules will be inserted into the current NRF library file after the module you specify here. Default is the last module in the Library file. |
| 5 | \<Entry type(PD,P,D)> Optional parameter. Default is PD, i.e. both program and data entries will be considered when searching for a module. |
Notes:
Only modules that have no entries in common with any other module in the current library file will be added, others will be skipped and a warning displayed.
FORTRAN Common/Block data will only get their first occurrence defined. All other occurrences (with the same name) will be ignored.
Page 132¶
Example¶
In this example, the four routines used for converting from uppercase to lowercase (and vice versa) and for stripping parity are compiled as four separate NRF files.
@planc-500¶
- ND-500 PLANC COMPILER - JUNE 9, 1986 VERSION G
*compile 1.1, "case1"¶
1 MODULE case1
2 EXPORT rtn ALIAS 'CASE_TO_case'
3 ROUTINE BYTE,BYTE : rtn ALIAS 'CASE_TO_case'
4 BYTE : ch
5 IF (@ and 177B) =: ch IN #A:#Z THEN ch+32 RETURN
ENDIF
6 ch RETURN
7 ENDROUTINE
8 ENDMODULE
9 $eof
@planc-500¶
- ND-500 PLANC COMPILER - JUNE 9, 1986 VERSION G
*compile 1.1, "case2"¶
1 MODULE case2
2 EXPORT rtn ALIAS 'case_TO_CASE'
3 ROUTINE BYTE,BYTE : rtn ALIAS 'case_TO_CASE'
4 BYTE : ch
5 IF (@ and 177B) =: ch IN #a:#z THEN ch-32 RETURN ENDIF
6 ch RETURN
7 ENDROUTINE
8 ENDMODULE
9 $eof
@planc-500¶
- ND-500 PLANC COMPILER - JUNE 9, 1986 VERSION G
*compile 1.1, "case3"¶
1 MODULE case3
2 EXPORT rtn ALIAS 'case_TO_case'
3 ROUTINE BYTE,BYTE : rtn ALIAS 'case_TO_case'
4 @ AND 177B RETURN
6 ENDROUTINE
6 ENDMODULE
7 $EOF
@planc-500¶
- ND-500 PLANC COMPILER - JUNE 9, 1986 VERSION G
*compile 1.1, "case4"¶
1 MODULE case4
2 EXPORT rtn ALIAS 'CASE_TO_CASE'
3 ROUTINE BYTE,BYTE : rtn ALIAS 'CASE_TO_CASE'
4 @ AND 177B RETURN
6 ENDROUTINE
6 ENDMODULE
7 $EOF
% We now have four files, each with one routine. Later we may find it tiresome % to refer to all four files whenever we want to use one or more of the % routines. To avoid this we make a library containing all four routines.
Page 133¶
THE COMMANDS IN ALPHABETICAL ORDER¶
NDL(NLH): SET-CASE-SIGNIFICANCE¶
Case significance (Yes, No): YES
NDL(NLH): SET-LIBRARY¶
File name: Case1
NDL(NLH): LIST-MODULES¶
File name: (PACK-FOUR-6799:MICKE-TEST)CASE1:NRF:1
Modules:
| Module Nrf-entry | P/D | Language | Program_size | Data_size | Debug_size |
|---|---|---|---|---|---|
| CASE_TO_case | P | Planc | 428 | 0B | 0B |
% The first routine has been copied. We can now copy the remaining routines.
NDL(NLH): GET-MODULES¶
Source file: case2
First module:
Last module:
After module:
NDL(NLH): LIST-MODULES¶
File name: (PACK-FOUR-6799:MICKE-TEST)CASE1:NRF:1
Modules:
| Module Nrf-entry | P/D | Language | Program_size | Data_size | Debug_size |
|---|---|---|---|---|---|
| CASE_TO_case | P | Planc | 428 | 0B | 0B |
| case_TO_CASE | P | Planc | 428 | 0B | 0B |
NDL(NLH): GET-MODULES¶
Source file: case3
First module:
Last module:
After module:
NDL(NLH): GET-MODULES¶
Source file: case4
First module:
Last module:
After module:
NDL(NLH): LIST-MODULES¶
File name: (PACK-FOUR-6799:MICKE-TEST)CASE1:NRF:1
Modules:
| Module Nrf-entry | P/D | Language | Program_size | Data_size | Debug_size |
|---|---|---|---|---|---|
| CASE_TO_case | P | Planc | 428 | 0B | 0B |
| case_TO_CASE | P | Planc | 428 | 0B | 0B |
| case_TO_case | P | Planc | 158 | 0B | 0B |
| CASE_TO_CASE | P | Planc | 158 | 0B | 0B |
NDL(NLH): PREPARE-LIBRARY¶
SAVE will generate a FAST library file
% Now use the command FORCE-LIBRARY which creates a fast load for our library.
NDL(NLH): FORCE N Y N N¶
NDL(NLH): SAVE-LIBRARY¶
File name: CASE5
RELATED OLD LINKAGE-LOADER COMMAND(S):¶
APPEND-NRF-MODULE <source file> <destination file>
<after module>
FETCH-NRF-MODULES <source file> <destination file>
<first module> <last module>
Page 134¶
Mode: Advanced¶
Command: IGNORE-DEBUG-INFORMATION¶
EXPLANATION:¶
This command is used to either suppress or include debug information on an NRF file while it is being loaded.
USAGE:¶
If you use this command, do so before loading.
PARAMETERS:¶
| No. | Parameter name and explanation |
|---|---|
| 1 | |
| Optional parameter. Default is YES, meaning debug information is not included when the file is loaded. The value you choose for this parameter applies until you change it, or leave the Linker. |
NOTES:¶
The initial value when entering the Linker is NO, meaning debug information is included.
This command does not remove debug information from an NRF file. If you want to do this, you must first enter the NRF-LIBRARY-HANDLER and then use the DELETE-DEBUG-INFORMATION command.
EXAMPLE:¶
% In this example, debug information is loaded for only some of the
% program modules. Debug information is ignored for the file MEAN:NRF.
NDL(ADV): SET-ADVANCED-MODE-↵
NDL(ADV): OPEN-DOMAIN "MY-DOMAIN"-↵
NDL(ADV): LOAD TEST-↵
Program:.......302B P01 Data:.........230B D01 Debug inf:.....264B Bytes
NDL(ADV): IGNORE-DEBUG-INFORMATION YES-↵
NDL(ADV): LOAD MEAN-↵
Program:.......324B P01 Data:.........374B D01 Debug inf:.....264B Bytes
% We can see that the size of the debug information has not increased
% after loading the module MEAN:NRF.
NDL(ADV): IGNORE-DEBUG-INFORMATION NO-↵
NDL(ADV): LOAD MAX-↵
Program:.......355B P01 Data:.........540B D01 Debug inf:.....516B Bytes
% The size of the debug information has increased after loading the
% module MAX:NRF.
Page 135¶
THE COMMANDS IN ALPHABETICAL ORDER¶
NDL(ADV): CLOSE
NDL(ADV): LINKER-AUTO-FORT:JOB
% --> FORTRAN Auto Job: Trap definition part.
% --> FORTRAN Auto Job: Link/load part.
% Debug information will still be suppressed when you load.
RELATED OLD LINKAGE-LOADER COMMAND(S):¶
| Command |
|---|
| SUPPRESS-DEBUG-INFORMATION |
Page 136¶
INCLUDE-IN-ROUTINE-VECTOR¶
Mode: Advanced
EXPLANATION¶
This command sets up a specified entry in the routine vector as an entry point to a specified routine.
PARAMETERS¶
| No. | Parameter name and explanation |
|---|---|
| 1 | \ No default value |
| 2 | \ The index in the routine vector. Default is the last used plus one, or 0 if none has been used. |
NOTES¶
To create a routine vector, use the CREATE-ROUTINE-VECTOR command.
If the specified entry is not a defined program entry, the Linker will create a dummy entry in the symbol table with the proper value. This means all calls to the routine will go through the routine vector. Even calls to the routine within the module containing it will go through the routine vector. The routine vector is updated when the Linker recognizes a real definition of the specified routine.
Note that if the routine is not defined during the load session, all references made to the routine will fail at runtime. (The Linker issues a warning message when you try to close the domain or segment.)
The first entry in the routine vector has index 0, and the last has index n-1, if the vector was created with n entries.
If the domain or segment is for an ND-500(0), the specified routine must start with an entry point instruction (INIT, ENTD, ENTM, ENTS etc.). (Less advanced users can rely on the compiler to supply these instructions.) This instruction is copied into the entry in the routine vector, followed by a jump instruction to the rest of the code of the routine.
Page 137¶
THE COMMANDS IN ALPHABETICAL ORDER¶
When loading to an MC68000, only the jump instruction is generated in the routine vector.
Example:¶
@ND=500 LINKER
NDL: SET-ADVANCED-MODE
NDL(ADV): OPEN-SEGMENT MY-LIBRARY,18
NDL(ADV): CREATE-ROUTINE-VECTOR 200
NDL(ADV): INCLUDE-IN-ROUTINE-VECTOR INITROUT 1
NDL(ADV): INCLUDE-IN-ROUTINE-VECTOR ALINITR 2
NDL(ADV): INCLUDE-IN-ROUTINE-VECTOR RECEIVER 3
NDL(ADV): INCLUDE-IN-ROUTINE-VECTOR TRANSMIR 4
NDL(ADV): INCLUDE-IN-ROUTINE-VECTOR CLEARBUF 5
NDL(ADV): INCLUDE-IN-ROUTINE-VECTOR SKIPMESS 6
...
NDL(ADV): INCLUDE-IN-ROUTINE-VECTOR RESETRUT 176
NDL(ADV): SPECIAL-LOAD MY-LIBRARY:NRF TOTAL
| Program | 225634 P22 | Data | 4 D22 |
|---|---|---|---|
| NDL(ADV): LOAD PLANC-LIB | |||
| PLANC-LIB-H02 | |||
| PLANC-LIB-H02 | |||
| Program | 225634 P22 | Data | 4 022 |
| NDL(ADV): LOAD MON-CALL-LIB | |||
| Program | 227225 P22 | Data | 4 D22 |
| NDL(ADV): CLOSE N N |
Related Old Linkage-Loader Command(s):¶
GLOBAL-ENTRIES \<label>...
Page 138¶
Mode: Linker-serv¶
Command: INSERT-MESSAGE¶
EXPLANATION:¶
This command inserts a message into a specified domain or segment file. The Linker displays the message when another domain or segment file is linked to this file.
PARAMETERS:¶
| No. | Parameter name and explanation |
|---|---|
| 1 | <Domain or segment name> Name of the file where the message shall be inserted. No default value. |
| 2 | <Message> Any character string not containing spaces. |
NOTES:¶
The file must not be open when you use this command.
If your message consists of several words, join them with hyphens (-). If the message contains a dollar sign ($), this character will not be displayed, but a line break is introduced at that point when the message is displayed. The message cannot contain question marks, since the Linker's interface will intercept them and interpret them as HELP commands.
There is no need to include dollar signs in the message, as the Linker will output CR LF before each message.
If the domain or segment already has a message, it is replaced by the new message.
Use the LIST-STATUS command to list the link message.
RELATED OLD LINKAGE-LOADER COMMAND(S):¶
None.
Page 139¶
THE COMMANDS IN ALPHABETICAL ORDER¶
| Mode: Nrf-lib |
|---|
Command : INSERT-MESSAGE¶
EXPLANATION:¶
This command is used for inserting a message into the current library file immediately before a specified module. This message is written on the output device when the file is loaded. If a message already exists at the indicated place, it will be replaced with the new message. If the new message is a blank string, the message at the indicated place will be deleted.
PARAMETERS:¶
| No. | Parameter name and explanation |
|---|---|
| 1 | <Message> Any character string not containing spaces. If your message is more than one word long, use a hyphen (-) between the words. The character $ (ASCII 36D) is converted to a carriage return and line feed sequence. |
| 2 | <Before module> Optional parameter. A reference identifying a module in the current library file. The message is inserted immediately before this module. Default is the first module in the file and before any fast load vector (see NOTES below). |
| 3 | <Entry type(PD,P,D)> Optional parameter. Default is PD, i.e. both program and data entries will be considered when searching for a module. |
NOTES:¶
One carriage return and line feed sequence is always given before the message is written to the output device.
If the current library file is a fast library file, only a message which is in front of the fast load vector will be written on the output device. Any other messages defined by this command will not be written, as they are located outside the NRF modules. The default value for parameter 2 with fast library files is in front of the fast load vector.
Page 140¶
The Commands in Alphabetical Order¶
When a file is fetched/read by the NRF library handler, all messages in the file are written on the output device. Unless they are inside a module, they are deleted from the file when the file is saved with the SAVE-LIBRARY command.
Example¶
Whenever our library is loaded we want a message to be printed on the output device. This may achieved by using the INSERT-MESSAGE command:
NDL(NLH): SET-CASE-SIGNIFICANCE YES
NDL(NLH): SET-LIBRARY
File name: cases
NDL(NLH): LIST-MODULES
File name: (PACK-FOUR-6799:MICKE-TEST)CASES:NRF:1
Modules:
| Module Nrf-entry | P/D Language | Program_size | Data_size | Debug_size |
|------------------|--------------|--------------|-----------|------------|
| 1 CASE_TO_case | P. Planc. | 42B | 0B | 0B |
| 2 case_TO_CASE | P. Planc. | 42B | 0B | 0B |
| 3 case_TO_case | P. Planc. | 15B | 0B | 0B |
| 4 CASE_TO_CASE | P. Planc. | 158 | 0B | 0B |
NDL(NLH): INSERT-MESSAGE
Before module:
Message: $Case library loading$
% "$" will be printed as CR LF
NDL(NLH): INSERT-MESSAGE
Before module:
Message: Version 0075
NDL(NLH): PREPARE-LIBRARY
SAVE will generate a FAST library file
NDL(NLH): FORCE-LIBRARY
Symbols defined by LIB (Yes, No): NO
Symbols defined by DEF (Yes, No): YES
Symbols defined by ODF (Yes, No): NO
Blockdata/Common (Yes, No): NO
NDL(NLH): SAVE CASES
Related Old Linkage-Loader Command(s)¶
INSERT-NRF-MESSAGE
Page 141¶
The Commands in Alphabetical Order¶
| Mode: Advanced |
|---|
Command : LINK¶
EXPLANATION: This command is used to link a free segment to the current domain or segment.
USAGE: Can be used before or after loading to the domain or segment.
PARAMETERS:
| No. | Parameter name and explanation |
|---|---|
| 1 | <Segment name>..<Segment name> Name of free segment file to link to. This parameter may be repeated. You may also link to a segment file in another user area. No default. |
NOTES:
The specified segment file contains a program and/or a data segment, each with a specific logical segment number. These combinations of program/data and segment numbers must be free in the current domain or segment. For example, if the specified segment file contains program segment number 7, then program segment number 7 must be free in the current domain or segment, while data segment number 7 need not be free.
If the segment linked to is later opened with the OPEN-SEGMENT command, its link lock changes. Then it becomes impossible to place and execute the domain, unless the link lock of the segment is restored to its original value with the Linker service program’s CHANGE-LINK-LOCK command.
Included segments:
If the segment file to which you are linking contains links to other segments (included segments), their combinations of program/data and segment numbers must also be free in the current domain or segment.
Page 142¶
The Commands in Alphabetical Order¶
References to included segment files are automatically included in the current domain or segment file. However, those included segment files are not accessed, and the link information they contain is not read into the symbol table. This means that if you have an unresolved reference to a symbol which is defined in one of these included segments, the reference is not resolved. In this case, you must use the LINK command again, once for each of the included segment files whose link information you need to access.
If the segment file to which you link is on a different user area, and included segment files are specified in this file without user name, the user name is added to the file names in the reference in the current file.
Example:¶
NDL: SET-ADVANCED-MODE
NDL(ADV): OPEN-SEGMENT "MY-SEGMENT" 10
| Program | Data |
| --- | --- |
| 48 P12 | 48 D12 |
NDL(ADV): LOAD MEAN MAX
| Program | Data |
| --- | --- |
| 26B P12 | 150B D12 |
| 57B P12 | 314B D12 |
NDL(ADV): CLOSE
NDL(ADV): OPEN-DOMAIN "MY-DOMAIN"
NDL(ADV): LOAD TEST
| Program | Data |
| --- | --- |
| 304B P01 | 230B D01 |
NDL(ADV): LIST-ENTRIES UNDEFINED
Undefined entries:
| MEAN | ... | /FTN | 144B P01 |
| MAX | ... | /FTN | 160B P01 |
% Link to the free segment to get the subroutines defined.
NDL(ADV): LINK MY-SEGMENT
Segment MY-SEGMENT:SEG linked as segment 10.
NDL(ADV): CLOSE
NDL(ADV): LINKER-AUTO-FORT:JOB
% --> FORTRAN Auto Job: Trap definition part.
% --> FORTRAN Auto Job: Link/load part.
% The symbols in MY-FREE-SEG can be accessed by the domain MY-DOM. However, a call cannot be made by program code in MY-FREE-SEGMENT to MY-DOM.
Related Old Linkage-Loader Command(s):¶
- LINK-SEGMENT
- FORCE-SEGMENT-LINK
Page 143¶
THE COMMANDS IN ALPHABETICAL ORDER¶
| Mode: | Advanced |
|---|---|
| Command: | LINK-RT-PROGRAMS |
EXPLANATION:¶
Resolves all undefined references to RT programs, taking the addresses of the corresponding RT descriptions as the values.
USAGE:¶
This command should be used after the program modules which refer to the RT program names have been loaded.
PARAMETERS:¶
No Parameters.
NOTES:¶
The LINK-RT-PROGRAMS command applies to ND-100/ND-500(0) communication.
A domain which contains references to RT programs should not be copied to another computer. The domain should be reloaded/linked.
The necessary information is taken from the file (SYSTEM)RTFIL:DATA, which is maintained by the RT-Loader. Only those entries in that file that have the status "defined rt-programs" are considered. Only those entries for which there are undefined references are inserted into the symbol table.
RELATED OLD LINKAGE-LOADER COMMAND(S):¶
LINK-RT-PROGRAM
Page 144¶
The Commands in Alphabetical Order¶
Mode: Advanced¶
Command: LINKER-SERVICE-PROGRAM¶
EXPLANATION: This command is used for entering the Linker-Service-Program. From this program you have access to commands for creating the desired environment for your Linker session. Commands are available for inspecting or changing the domain or segment headers.
PARAMETERS: No Parameters.
RELATED OLD LINKAGE-LOADER COMMAND(S):
None
Page 145¶
The Commands in Alphabetical Order¶
| Mode: Standard |
|---|
Command: LIST-DOMAINS¶
Explanation:¶
This command lists all domains which match the name you specify in parameter 1, and gives limited information about each one.
Parameters:¶
| No. | Parameter name and explanation |
|---|---|
| 1 | <Domain name> Name of a domain or an abbreviation of a set of domains. Default is all domains on the specified user. |
| 2 | <Output file> Optional parameter. Default is terminal. |
Notes:¶
The LIST-STATUS command gives more information about each domain. Only files of type DOM are searched.
Related Old Linkage-Loader Command(s):¶
LIST-DOMAIN <domain name>
Page 146¶
Command: LIST-ENTRIES¶
Mode: Standard
Explanation¶
This command is used for listing the symbol table and the current load address.
Parameters¶
| No. | Parameter name and explanation |
|---|---|
| 1 | <Selection: Undefined,Defined,All> Enables you to list only defined or undefined entries. Default is UNDEFINED. |
| 2 | <Order: Numerical,Alphabetical> Optional parameter. Used to determine whether the list is sorted according to references (entries in the symbol table) or numeric values (addresses). Default is NUMERICAL. |
| 3 | <Entry type: ALL,USER,ENTRY> Optional parameter. ALL: Lists all entries, including system symbols, for all users. USER: Lists entries whose first character is alphanumeric (i.e., not system entries). ENTRY: Lists only those entry names you specify. If you chose UNDEFINED or ALL in parameter 1, then the default for this parameter is ALL. If you chose DEFINED in parameter 1, then the default for this parameter is USER. |
| 4 | <Entry name>...<Entry name> Only meaningful if parameter 3 is ENTRY. Abbreviations allowed - see NOTES below. |
| 5 | <Output file> Optional parameter. Default is terminal. |
Page 147¶
The Commands in Alphabetical Order¶
Notes¶
Entry names may be abbreviated as follows:
| Abbreviation | Description |
|---|---|
| * | All entries. |
| S* | All entries starting with the string S. |
| *S | All entries ending with the string S. |
| S | All entries containing the string S. |
For example, "#*", means all system symbols (these always begin with "#").
Related Old Linkage-Loader Command(s)¶
LIST-ENTRIES-DEFINED (\<sort criteria>)
LIST-ENTRIES-UNDEFINED (\<sort criteria>)
VALUE-ENTRIES (\<entries>)
Page 148¶
LIST-MODULES¶
Mode: Nrf-lib
EXPLANATION¶
This command is used for listing the symbolic names of all the modules in the NRF library file you specify, together with their program, data, and debug size.
PARAMETERS¶
| No. | Parameter name and explanation |
|---|---|
| 1 | <File name>Optional parameter. The name of an NRF library file. Default is the current NRF library file. |
| 2 | <Modules>Optional parameter. Specify the name of the module(s) in the above library that you wish to be listed. Default is * (ALL). |
| 3 | <Entry type(PD,P,D)>Optional parameter. Default is PD, i.e. both program and data entries will be considered when searching for a module. |
NOTES¶
"" may be used in symbol names to select the modules to be listed. "SYM" will list all entries having "SYM" as suffix, "SYM" all entries containing "SYM" as a substring. "**" matches any substring.
The columns of the listing have the following meanings:
- Module: This number indicates whether the entries belong to the same or different modules.
- Nrf-entry: One of the names that can be used to refer to this module.
- P,D
- P - Program entry.
- D - Data entry.
- X - Library entry.
- C - Common/block data entry.
Page 149¶
THE COMMANDS IN ALPHABETICAL ORDER¶
| Language | Source language of the module. |
|---|---|
| Program_size | Size of program part of module if loaded. |
| Data_size | Size of data part of module if loaded. |
| Debug_size | Size of debug part of module if loaded. |
EXAMPLE:¶
Suppose we want to find out which monitor calls are available in the PLANC library. We assume the names of the monitor calls start with either "MNxxx" or "MONxx" where "xxx" and "xx" are three digit and two digit numbers respectively. Since the LIST-MODULES command accepts abbreviations of module names, we can get the required list by executing the command:
NDL(NLH): LIST-MODULES
File name: ______(PACK-ONE-6799:SYSTEM)PLANC-LIB-G00:NRF:1
Modules: MN*
% This will list all entries starting with "MN".
NDL(NLH): LIST-MODULES
File name: ______(PACK-ONE-6799:SYSTEM)PLANC-LIB-G00:NRF:1
Modules: MON
% This will list all entries starting with "MON". However, we know that ``'' matches any substring when used in a string. If we use the % string "MN", it will match any string having "M" as a prefix and % the character "N" somewhere else in the string (but after the "M").
NDL(NLH): LIST-MODULES
File name: ______(PACK-ONE-6799:SYSTEM)PLANC-LIB-G00:NRF:1
Modules: MN
| Module Nrf-entry | P/D Language | Program_size | Data_size | Debug_size |
|---|---|---|---|---|
| ....31 MONO..... | P.X Planc... | .........158 | ....0B | ....0B |
| ....32 MONI..... | P.X Planc... | .........25B | ....0B | ....0B |
| . | . | . | . | . |
| . | . | . | . | . |
| ....79 MN413.... | P.X Planc... | .........20B | ....0B | ....0B |
NDL(NLH):
RELATED OLD LINKAGE-LOADER COMMAND(S):¶
LIST-NRF-ENTRIES (
Page 150¶
The Commands in Alphabetical Order¶
Command: LIST-NRF¶
Mode: Nrf-lib
Explanation¶
This command is for listing the NRF code of one or more modules in an NRF library file.
Parameters¶
| No. | Parameter name and explanation |
|---|---|
| 1 | <File name>Optional parameter. The name of an NRF file. Default is the current NRF library file. |
| 2 | <First module>Optional parameter. The first module for which you want code information. Default is the first module in the NRF file. (See NOTES below.) |
| 3 | <Last module>Optional parameter. The last module for which you want code information. Default is the last module in the NRF file. |
| 4 | <Entry type(PD,P,D)>Optional parameter. Default is PD, i.e. both program and data entries will be considered when searching for a module. |
| 5 | <Computer (ND500,MC68000)>Optional parameter. Default is the computer mode of the first module in the file. The command will, during listing, try to select the right computer mode for each module listed. |
Notes¶
If no information about the computer is available, the default is ND500.
Default for the parameter <First module> is from the beginning of the file, rather than the beginning of the first module. Any information before the first module in the file will be listed here if the default for first module is used, e.g., the fast load vector or messages inserted before the first module.
For an explanation of the headers printed before each module listed, see the LIST-MODULES command.
Page 151¶
THE COMMANDS IN ALPHABETICAL ORDER¶
EXAMPLE:¶
The user has a library file that was compiled long ago. He cannot remember if the code was written for the ND500 or for the MC68000. Since an old compiler was used, no information about the target machine is available in the BEG control byte. The library handler thus cannot supply information about the target machine type. In such a situation, the LIST-NRF command, which lists the code in the library, could supply some information about the target machine:
NDL(NLH): SET-CASE-SIGNIFICANCE- Case significance (Yes, No): YES
NDL(NLH): SET-LIBRARY- File name: cases
NDL(NLH): LIST-NRF- File name: (PACK-FOUR-6799:MICKe-TEST)CASES:NRF:1
- First module: ___
- Last module: CASE_TO_case
| 0B: | (LBB,4 0B) |
| 0B: | (LBB,4 CASE_TO_case 126B) |
| 0B: | (LBB,4 case_TO_CASE 234B) |
| 0B: | (LBB,4 case_TO_case 342B) |
| 0B: | (LBB,4 CASE_TO_CASE 423B) |
| 0B: | (LBB,4 37777777777B) |
| Module Nrf-entry | P/D Language | Program_size | Data_size | Debug_size |
|---|---|---|---|---|
| ... : | CASE_TO_case ........ | P. Planc ... | ........42B | ........0B |
| 0B: | (BEG,2 0B 2B) | |||
| 0B: | (DMO,0) | |||
| 0B: | (PMO,0) | |||
| 0B: | (DEF,0 CASE_TO_case=#PCLC) | |||
| 0B: | (LDN, 42B) | |||
| 0B: | ENTS +0B, BY1 =: | |||
| 7B: | B.24B:S, BY1 AND 177B, BY1 =: B. | |||
| 16B: | 25B, BY1 COMP 101B, IF << GO 14B, BY1 COMP | |||
| 25B: | 132B, IF >> GO 7B, BY1 + | |||
| 34B: | 40B, RET, BY1 := B.25B, RET | |||
| 42B: | (DMO,0) | |||
| 0B: | (PMO,0) | |||
| 42B: | (FMO,4 #PCLC-40B) | |||
| 2B: | (ADI,4) DATA (#DCLC)+30B | |||
| 68B: | (DMO,0) | |||
| 0B: | (END,0) |
% After having seen the above listing, the user decides this % module was written for the ND500. But to be sure, you could list the % code again, this time in MC68000 mode.
RELATED OLD LINKAGE-LOADER COMMAND(S):¶
LIST-NRF-CODE <source file> (<first module>) (<last module>)
Page 152¶
LIST-SEGMENTS¶
Mode: Advanced
Command: LIST-SEGMENTS¶
EXPLANATION:¶
This command lists all free segments which match the name given in parameter 1, together with information about each one.
PARAMETERS:¶
| No. | Parameter name and explanation |
|---|---|
| 1 | <Segment name>Name of a segment, or part of a segment name. Default: all segments on that user area. (LIST-STATUS gives more information about each segment.) |
| 2 | <Output file>Optional parameter. Default is terminal. |
NOTES:¶
Only files of file type SEG are searched.
RELATED OLD LINKAGE-LOADER COMMAND(S):¶
LIST-SEGMENT <domain name> <segment name>
Page 153¶
THE COMMANDS IN ALPHABETICAL ORDER¶
| Mode: Standard |
|---|
Command: LIST-STATUS
EXPLANATION¶
This command lists all available information about the domain or segment you specify in parameter 1.
USAGE¶
This command lists all information about ONE domain or segment. Use LIST-DOMAIN or LIST-SEGMENT for more restricted information about several domains/segments.
If the Linker is in the advanced mode, then all the domain privileges, segment attributes and the trap information are listed. If the Linker is in the standard mode, only those domain privileges, segment attributes and traps that are not default values are listed.
PARAMETERS¶
| No. | Parameter name and explanation |
|---|---|
| 1 | |
| Default file type is DOM. Abbreviations are allowed, as long as they are unambiguous. | |
| 2 | |
| Optional parameter. Default is terminal. |
NOTES¶
Using this command without a parameter gives you the status of the current domain/segment. Note that the status of the current domain or segment is not fully updated until that domain or segment is closed.
When several languages are listed under "Source code language", the asterisk (*) indicates which is the main start address (MSA) language.
RELATED OLD LINKAGE-LOADER COMMAND(S)¶
WRITE-DOMAIN-STATUS (
WRITE-SEGMENT-STATUS (
Page 154¶
LIST-STATUS¶
Mode: Nrf-lib
EXPLANATION¶
With this command you can either list the names of all files referred to in the current session, or some statistics about the files.
PARAMETERS¶
| No. | Parameter name and explanation |
|---|---|
| 1 | |
| Optional parameter. NO means only a list of the file names will be displayed. YES will give complete information for all files. Default is YES. |
NOTES¶
The complete listing for each file will contain information about:
- Number of modules in the file
- Number of entries
- Total size of the file if saved
- Total size of the input file, in bytes
The size in bytes of the current library file gives a hint about the size of the file if it is saved. Current heap usage is also listed.
File-usage/statistics¶
| A | (PACK-ONE-6799:SYSTEM)PLANC-LIB-600:NRF:1 |
| B | Size of file is 15386 bytes |
| C | Modules 87 Entries 95 Bytes 15386 |
Heap-usage/statistics¶
Size of heap is 256 pages.
There are 10 pages used and 245 pages left.
Approximate number of bytes used per entry is 216.
Page 155¶
THE COMMANDS IN ALPHABETICAL ORDER¶
NOTES:¶
A) Complete file name
B) Size of the input file in bytes
C) Size of the input file in bytes, if saved
EXAMPLE:¶
Suppose we are building a large library and the routines in our library refer to PLANC and FORTRAN library routines. Also suppose the last time we tried to make this big library file we got an error message from the library handler that the heap was insufficient. To correct this error and allocate enough heap for the library handler this time, we list statistics about the system libraries and use the information given to calculate the heap size needed.
First list the statistics of the PLANC library:
NDL(NLH): SET-LIBRARY plan-lib
Message : "PLANC-LIB-G00S"
NDL(NLH): LIST-STATUS
| File-usage/statistics |
|---|
| (PACK-ONE-6799:SYSTEM)PLANC-LIB-G00:NRF:1 |
| Size of file is 15386 bytes |
| Modules 87 Entries 95 Bytes 15386 |
| Heap-usage/statistics |
|---|
| Size of heap is 256 pages. |
| There are 10 pages used and 245 pages left. |
| Approximate number of bytes used per entry is 216. |
NDL(NLH):
We then list the statistics of the FORTRAN library.
NDL(NLH): SET-LIBRARY (LIBRARY)FORTRAN
Message : "FORTRAN-LIB-203101-J03S"
NDL(NLH): LIST-STATUS
Complete (Yes,No): YES
| File-usage/statistics |
|---|
| (PACK-TWO-6799:LIBRARIES)FORTRAN-LIB-J03:NRF:1 |
| Size of file is 94389 bytes |
| Modules 320 Entries 351 Bytes 94389 |
| Heap-usage/statistics |
|---|
| Size of heap is 256 pages. |
| There are 40 pages used and 215 pages left. |
| Approximate number of bytes used per entry is 234. |
NDL(NLH):
The PLANC library contained 95 entries, each using approximately 216 bytes in the description. The FORTRAN library contained 351 entries, each using approximately 234 bytes. If the libraries were appended, we could expect the new library to contain about 446 entries, each using about 200 to 250 bytes. The total heap size necessary to accommodate the description of this library, assuming 250 bytes per entry, would then be 250 * 450 entries = 112500 bytes or about 55 pages. However, if we were to build the library using the GET-MODULES command with an initially-empty current library file as in the following example, we get a different result.
Page 156¶
THE COMMANDS IN ALPHABETICAL ORDER¶
NDL(NLH): SET-LIBRARY my-lib
NDL(NLH): GET-MODULES planc-lib
Message "PLANC-LIB-GOO"
NDL(NLH): GET-MODULES (LIBRARY)FORTRAN
Message "FORTRAN-LIB-2J031-0J03"
NDL(NLH): LIST-STATUS
File-usage/statistics¶
| (PACK-FOUR-6799:MICKLE-TEST)MY-LIB:NRF:1 | Size of file is 40 bytes | |||
| Modules | 407 | Entries | 446 | |
| (PACK-ONE-6799:SYSTEM)PLANC-LIB-GOO:NRF:1 | Size of file is 15386 bytes | |||
| Modules | 87 | Entries | 95 | |
| (PACK-TWO-6799:LIBRARIES)FORTRAN-LIB-J03:NRF:1 | Size of file is 94389 bytes | |||
| Modules | 320 | Entries | 351 |
Heap-usage/statistics¶
Size of heap is 256 pages.
There are 81 pages used and 174 pages left.
Approximate number of bytes used per entry is 186.
NDL(NLH):
The library we built contains 446 entries as expected, but the heap used 81 pages. This can be explained if we look at the listing above. The total number of entries, for all files, is 446 + 95 + 351 = 892 entries. The total amount of heap used will then be 892 entries * 186 bytes/entry = 165912 bytes or 81 pages. This discrepancy in the result is due to the fact that the GET-MODULES command copies parts of descriptions when it is executed. This means that when calculating the necessary heap space for building a large library, we must remember to multiply the number of entries (or the number of bytes used per entry) by a factor of two (since each entry will have two copies of it in memory - one in the source and one in the destination, i.e. the current library).
RELATED OLD LINKAGE-LOADER COMMAND(S):¶
None
Page 157¶
THE COMMANDS IN ALPHABETICAL ORDER¶
Mode: Standard¶
Command: LOAD¶
EXPLANATION: This command loads relocatable (NRF) code onto the current segments in the current domain or segment. It is not necessary to use the SET-SEGMENT-NUMBER command, since the first LOAD command will allocate a default segment.
PARAMETERS:
| No. | Parameter name and explanation |
|---|---|
| 1 | <File name> <....> |
| Name of file(s) in NRF format. Default type is NRF. |
NOTES:
If you exceed the segment size, you may have to use the SET-SEGMENT-SIZE command. It is also possible that the link or debug areas become full during the loading, in which case you can use the SET-AREA-SIZE command instead.
EXAMPLE:
% This example loads NRF code into the current segment in the domain MY-DOMAIN:
@ND[Linker]
NDL:
OPEN-DOMAIN "MY-DOMAIN"
NDL:
LOAD TEST MEAN MAX
Program:.......302B P01 Data:............230B D01
Program:.......324B P01 Data:............374B D01
Program:.......355B P01 Data:............540B D01
CLOSE
NDL: LINKER-AUTO-FORT:JOB
% --> FORTRAN Auto Job: Trap definition part.
% --> FORTRAN Auto Job: Link/load part.
% Load the subroutines into a segment MY-SEGMENT:SEG
NDL:
SET-ADVANCED-MODE
NDL(ADV):
OPEN-SEGMENT "MY-SEGMENT" 10,
Program:........4B P12 Data:............48 D12
LOAD MEAN
Program:........268 P12 Data:............150B D12
Page 158¶
The Commands in Alphabetical Order¶
NDL(ADV): LOAD MAX-J
Program:........57B P12 Data:..........314B D12
NDL(ADV): EXIT-J
NDL(ADV): LINKER-AUTO-FORT:JOB
% --> FORTRAN Auto Job: Trap definition part.
% --> FORTRAN Auto Job: Link/load part.
% A domain must be linked to this free segment before it can be executed.
Related Old Linkage-Loader Command(s):¶
LOAD-SEGMENT <file name>
Page 159¶
The Commands in Alphabetical Order¶
| Mode: Advanced |
|---|
Command: MATCH-RT-SEGMENT¶
Explanation¶
This command defines an ND-100 segment as having the same physical pages of memory as a portion of the current free segment, and inserts in the symbol table all "defined common labels" in the ND-100 segment.
Parameters¶
| No. | Parameter name and explanation |
|---|---|
| 1 | <Segment name or number> |
| Name or number of the ND-100 segment. 0 or RTCOMMON can also be specified |
Notes¶
The ND-100 segment must exist, i.e. be defined in the RT-loader, and it must be a non-demand segment.
On the ND-500(0) side, the ND-100 segment is matched with either the current data segment or the current common segment, if any exists.
The two processors do not use the same logical addresses when referring to the shared memory. From the ND-500(0) side, the shared area begins at the first page boundary at or after the current load counter (#DCLC or #CCLC). In the ND-100, the shared area begins at the page boundary before or at the lower bound address of the ND-100 segment.
All "defined common labels" in the specified ND-100 segment become defined entries in the symbol table. The values of these symbols are the addresses of the "defined common labels" in the ND-100 segment, converted to ND-500(0) addresses.
Finally, the current load counter is advanced to the first page boundary after the ND-100 segment.
Page 160¶
Example¶
NDL(ADV): OPEN-SEGMENT RPP-SEG,3
NDL(ADV): LOAD RPP-500-PART1
Program: ..................13334 P03 Data: ...............2004 D03
NDL(ADV): MATCH-RT-SEGMENT RPP10
%x starts at 3'40008
NDL(ADV): LOAD RPP-500-PART2
X starts at p. bound. after RTseg
Program: ..................13475 P03 Data: ...............30454 D03
NDL(ADV): SET-LOAD-ADDRESS,
%Moves to p. bound.
Program: ..................13475 P03 Data: ...............34000 D03
NDL(ADV): LOAD RPP-500-PART3
Program: ..................21420 P03 Data: ...............36740 D03
NDL(ADV): CLOSE
Related Old Linkage-Loader Command(s)¶
- MATCH-COMMON-RT-SEGMENT
- MATCH-RTCOMMON.
Page 161¶
The Commands in Alphabetical Order¶
Mode: Advanced¶
Command: NRF-LIBRARY-HANDLER¶
Explanation:
This command is for entering the NRF library mode. From here you can carry out library file maintenance.
Parameters:
| No. | Parameter name and explanation |
|---|---|
| 1 | <File name> Specify the name of the file you wish to enter. No default value. The default file type is NRF. |
Related Old Linkage-Loader Command(s):
None
Page 162¶
Command: OPEN-DOMAIN¶
Explanation¶
This command opens a domain as the current domain, to be used for all subsequent linking and loading. If the domain already exists, its contents will be erased.
Parameters¶
| No. | Parameter name and explanation |
|---|---|
| 1 | <Domain name> Name of an existing file (or a new file name if enclosed in double quotation marks). Default file type is DOM. |
| 2 | <Domain privileges> Optional parameter. Specify one or more of the following: - #PRIVILEGED-INSTRUCTIONS-ALLOWED - NOT-#PRIVILEGED-INSTRUCTIONS-ALLOWED - ENABLE-ESCAPE - DISABLE-ESCAPE (or unambiguous abbreviations of these). Default values are NOT-#PRIVILEGED-INSTRUCTIONS-ALLOWED and ENABLE-ESCAPE. |
Notes¶
OPEN-DOMAIN automatically executes CLOSE on the current domain or segment.
Example¶
- Open a new domain
% Open a new domain NDL: OPEN-DOMAIN "MY-DOMAIN"
- Open an existing domain with privilege disable-escape
% Open an existing domain with privilege disable-escape NDL: OPEN-DOMAIN MY-DOMAIN DISABLE-ESCAPE
- Open a domain on floppy disk
% Open a domain on floppy disk NDL: OPEN-DOMAIN (NDI:FLOPPY-USER)FLOPPY-DOMAIN
Related Old Linkage-Loader Command(s)¶
SET-DOMAIN <domain name>
Page 163¶
THE COMMANDS IN ALPHABETICAL ORDER¶
Command: OPEN-SEGMENT¶
Mode: Advanced
EXPLANATION:¶
This command opens a free segment as the current segment to be used for all subsequent loading and linking. Any existing contents are erased.
PARAMETERS:¶
| No. | Parameter name and explanation |
|---|---|
| 1 | <Segment name> Name of an existing segment file (or a new file name enclosed in double quotation marks). Default file type is SEG. |
| 2 | <Segment number> The segment is either allocated a number you specify, in the range 0 to 31 (0 to 37B octal, 0 to 1FH hexadecimal), or the default value. Default is the lowest available segment number starting with 1. |
| 3 | <Segment type (PD,P,D)> Optional parameter. Default: PD. (P stands for program segment, D for data segment, and PD for both.) |
| 4 | <Segment attributes> Optional parameter. You may specify any of the segment attributes listed on page 159. |
EXAMPLE:¶
% Open a new segment.
NDL: SET-ADVANCED-MODE
NDL(ADV): OPEN-SEGMENT "MY-SEGMENT" 10 PD
Program:.........4B P12 Data:..............4B D12
% Open a segment to be shared by two domains.
% SWAP-ON-ORIGINAL attribute means any writes applied to this segment
% will affect the segment file, and are thus permanent.
NDL(ADV): OPEN-SEGMENT "COM-SEG" 10
Segment attributes: SHARED-DATA-SEGMENT NOT-CACHE
Segment attributes: SWAP-ON-ORIGINAL-FILE
Data:..............4B D12
NDL(ADV): LOAD COMMON-BLOCK
Program:.........4B P01 Data:..............20B D12
NDL(ADV): CLOSE
* Several users may run this domain and operate on the same data segment simultaneously.
Page 164¶
The Commands in Alphabetical Order¶
NDL(ADV): OPEN-DOMAIN "MY-DOMAIN"¶
% Link to the shared segment.
NDL(ADV): LINK COM-SEG
Segment COM-SEG:1:SEG is linked as segment 10.
NDL(ADV): LOAD PLANC-INC
Program: .....318B PO1 | Data: .........1034B DO1
NDL(ADV): LOAD PLANC-LIB
PLANC-LIB:FOO
Program: .....3142B PO1 | Data: .........1134B DO1
NDL(ADV): CLOSE
% Open FORTRAN common segments.
NDL(ADV): OPEN-DOMAIN MY-DOMAIN
NDL(ADV): OPEN-SEGMENT "FORT-COM-1" 10 0 FORTRAN-COMMON-SEGMENT
FORTRAN-COMMON-SEGMENT FORT-COM-1:SEG linked as data segment 10 to current domain.
% Common blocks will now be allocated on segment number 10.
NDL(ADV): OPEN-SEGMENT "FORT-COM-2" 11 0 FORTRAN-COMMON-SEGMENT
FORTRAN-COMMON-SEGMENT FORT-COM-2:SEG linked as data segment 11 to current domain.
% and now on segment number 11.
NOTES:¶
If you want to avoid erasing the existing contents of the segment file, use the APPEND-SEGMENT command instead.
OPEN-SEGMENT automatically executes CLOSE on the current domain and/or segment, if any. The current domain or segment is not closed if FORTRAN-COMMON-SEGMENT is specified in the attribute list.
If a free segment is linked to more than one domain, the program segment is, by default, shared by all the domains, but each domain operates on a separate copy of the data segment. If you want the data segment to be shared as well, you must specify the SHARED-DATA-SEGMENT attribute.
If a free segment is reopened with this command, it gets a new link lock, thereby invalidating all previous links to it. If you are sure all symbols have been defined with the same values as before, the links can be made valid again through the CHANGE-LINK-LOCK command.
Related Old Linkage-Loader Command(s):¶
OPEN-SEGMENT
Page 165¶
THE COMMANDS IN ALPHABETICAL ORDER¶
SEGMENT ATTRIBUTES:¶
| Attribute | Access | Mode | Default |
|---|---|---|---|
| WRITE-PERMIT | Data only | Free/Slave | Default |
| READ-ONLY | Data only | Free/Slave |
WRITE-PERMIT gives read/write access to the data segment.
| Attribute | Access | Mode | Default |
|---|---|---|---|
| PARAMETER-ACCESS | Data only | Free/Slave | Default |
| NOT-PARAMETER-ACCESS | Data only | Free/Slave |
Reflects capability bit no. 14. See ND-500 Reference Manual, ND-805009.
| Attribute | Access | Mode | Default |
|---|---|---|---|
| SWAP-ON-SWAP-FILE | Data only | Free/Slave | Default |
| SWAP-ON-ORIGINAL-FILE | Data only | Free/Slave |
SWAP-ON-SWAP-FILE is forced when read-only. With SWAP-ON-SWAP-FILE, changes to the segment are not saved when the program terminates.
With SWAP-ON-ORIGINAL-FILE, changes are permanent. All pages must be allocated in the segment when the program runs; no pages are allocated on page faults.
| Attribute | Access | Mode | Default |
|---|---|---|---|
| SHARED-DATA-SEGMENT | Data only | Free/Slave | |
| NOT-SHARED-DATA-SEGMENT | Data only | Free/Slave | Default |
With SHARED-DATA-SEGMENT, concurrent users of the segment get the same physical segment number in the data capability.
| Attribute | Access | Mode | Default |
|---|---|---|---|
| EMPTY-DATA-SEGMENT | Data only | Free only | |
| NOT-EMPTY-DATA-SEGMENT | Data only | Free/Slave | Default |
With EMPTY-DATA-SEGMENT, the segment is placed, but not read. Space is allocated on the swap file corresponding to the size of the segment. Zeroed pages are allocated on page faults within segment limits. Use SET-LOAD-ADDRESS to define the size of the segment.
| Attribute | Access | Mode | Default |
|---|---|---|---|
| FILE-AS-SEGMENT | Data only | Free/Slave | |
| NOT-FILE-AS-SEGMENT | Data only | Free/Slave | Default |
With FILE-AS-SEGMENT, the data segment is not placed. Use monitor calls 412B FileAsSegment or 422B GetScratchSegment to get a segment at runtime.
Page 166¶
SEGMENT ATTRIBUTES: (continued)¶
| Attribute | Type | State | Default |
|---|---|---|---|
| CACHE | Data only | Free/slave | Default |
| NOT-CACHE | Data only | Free/slave |
Data capability bit no. 13. Segments with NOT-CACHE should be as small as possible. NOT-CACHE is normally used with SHARED-DATA-SEGMENT.
| Attribute | Type | State | Default |
|---|---|---|---|
| CLEAR-CAPABILITY-ALLOWED | Program/data | Free/slave | |
| NOT-CLEAR-CAPABILITY-ALLOWED | Program/data | Free/slave | Default |
| Attribute | Type | State | Default |
|---|---|---|---|
| COPY-CAPABILITY-ALLOWED | Program/data | Free/slave | |
| NOT-COPY-CAPABILITY-ALLOWED | Program/data | Free/slave | Default |
| Attribute | Type | State | Default |
|---|---|---|---|
| FORTRAN-COMMON-SEGMENT | Data only | Free only | |
| NOT-FORTRAN-COMMON-SEGMENT | Data only | Free/slave | Default |
When opening a segment with FORTRAN-COMMON-SEGMENT, any currently open domain or segment is not closed. Only common blocks are loaded to the new segment, other program or data areas are loaded to the domain or the other segment. The new segment is linked to the domain or other segment.
Page 167¶
THE COMMANDS IN ALPHABETICAL ORDER¶
Mode: Nrf-lib
Command : PREPARE-LIBRARY¶
EXPLANATION:¶
This command is used to indicate if a fast load vector should be inserted by the SAVE-LIBRARY command. A fast load vector will decrease load time.
PARAMETERS:¶
| No. | Parameter name and explanation |
|---|---|
| 1 | <Fast library (Yes,No)> |
Optional parameter. YES means SAVE will generate a fast library file. NO means SAVE will generate a slow library file. Initial value is YES. Default is YES.
NOTES:¶
Files not compiled in library mode may be made into fast library files by first using the FORCE-LIBRARY command with the appropriate parameters, and then the command above.
EXAMPLE:¶
In the following example, we have a library that was compiled with LIBRARY-MODE ON and want to convert it into a fast library.
NDL(NLH): SET-CASE-SIGNIFICANCE
Case significance (Yes, No): YES
NDL(NLH): SET-LIBRARY
File name: cases
NDL(NLH): LIST-MODULES
File name: (PACK-FOUR-6799:MICK-E-TEST)CASES:NRF:1
Modules:
| Module Nrf-entry | P/D | Language | Program_size | Data_size | Debug_size |
| ---------------- | --- | -------- | ------------ | --------- | ---------- |
| CASE_TO_case | P.X | Planc | 428 | .0B | .0B |
| case_TO_CASE | P.X | Planc | 428 | .0B | .0B |
| case_TO_case | P.X | Planc | 158 | .0B | .0B |
| CASE_TO_CASE | P.X | Planc | 158 | .0B | .0B |
% The "X" printed in the column "P/D" indicates that this entry is
% LIB-marked, i.e. it is referred to by a LIB control byte in the
% file. Only LIB-marked entries will get into the fast load vector
% unless the user FORCES the library handler to act differently.
NDL(NLH): PREPARE-LIBRARY
SAVE will generate a FAST library file
NDL(NLH): SAVE-LIBRARY
File name: cases
Page 168¶
The Commands in Alphabetical Order¶
% We may now check whether or not the vector was produced by using the
% LIST-NRF command. If a vector was produced, it will be printed before
% any other code is listed and before any module name is printed.
NDL(NLH): SET-CASE-SIGNIFICANCE
Case significance (Yes) No: YES
NDL(NLH): SET-LIBRARY
File name: CASES
NDL(NLH): LIST-NRF
File name: (PACK-FOUR-6799:MICKE-TEST)CASES:NRF:1
First module:
Last module: CASE TO case
| OB | Description |
|---|---|
| (LBB,4 0B) | |
| (LBB,4 CASE_TO_case 1268B) | |
| (LBB,4 case_TO_CASE 234B) | |
| (LBB,4 CASE_TO_case 342B) | |
| (LBB,4 CASE_TO_CASE 423B) | |
| (LBB,4 37777777778) |
Module Nrf-entry ____ P/D Language Program_size Data_size Debug_size
...| CASE_TO_case....... P.. Planc... .......42B ........0B ........0B
OB: (BEG,2 0B 2B)
Listing aborted
NDL(NLH):
% Here the user pressed the HOME () key, which is used to abort listings.
Related Old Linkage-Loader Command(s):¶
PREPARE-NRF-LIBRARY-FILE
Page 169¶
THE COMMANDS IN ALPHABETICAL ORDER¶
Mode: Advanced¶
Command : REFER-ENTRY¶
EXPLANATION:
This command is for making references from either a program or a data segment to a program or a data entry.
USAGE:
This command may be used for forcing specific library modules to be loaded.
PARAMETERS:
| No. | Parameter name and explanation |
|---|---|
| 1 | \<Referred entry name> The symbol you want to make a reference to. The reference may be defined or undefined (see NOTES below). No default. |
| 2 | \<Address of reference> The address where you make the reference from. Can be a symbolic address or a numeric address. You can also use the Program Current Location Counter (#PCLC) and the Data Current Location Counter (#DCLC). Default \<address> causes no modification of any memory location if the symbol was undefined when the command was given and is later defined. |
| 3 | \<Entry type of referred entry (P,D)> P: The reference is to a symbol in the program segment. D: the reference is to a symbol in a data segment. Default is P. |
| 4 | \<Reference in program or data segment (P,D)> P: reference is made from a program segment. D: reference is made from a data segment. If parameter 3 was P, default is P. If parameter 3 was D, default is D. |
EXAMPLE:
NDL: SET-ADVANCED-MODE
% Use the REFER-ENTRY command to load the routine #except (and all the routines that it refers to) into one segment. When loading a library segment for FORTRAN, you should preferably use SPECIAL-LOAD with the option total, since some FORTRAN programs might refer to routines other than #except.
NDL(ADV): OPEN-SEGMENT "MY-SEGMENT" 10 PD
Page 170¶
The Commands in Alphabetical Order¶
| Program | Data: | ||||
|---|---|---|---|---|---|
| Program: | ...... | 48 P12 | Data:... | ...... | 48 D12 |
| NDL(ADV): | REFER-ENTRY EXCEPT_ P | ||||
| NDL(ADV): | SPECIAL-LOAD (LIBRARIES)FORTRAN-LIB LIBRARY | ||||
| FORTRAN-LIB: | 203101-003 | ||||
| Program: | ...... 57264B P12 | ||||
| Data: | ...... 30220B D12 | ||||
| NDL(ADV): | SPECIAL-LOAD (LIBRARIES)EXCEPT-LIB LIBRARY | ||||
| EXCEPT-LIB: | 204157-D02 | ||||
| Program: | ...... 73722B P12 | ||||
| Data: | ...... 56032B D12 | ||||
| NDL(ADV): | CLOSE |
Notes¶
If the reference is to a symbol which is already defined in the symbol table, it is immediately replaced with its value. If the reference is to a symbol which is not defined in the symbol table, it is entered in the table as an undefined reference with the address you specify in parameter 2 (i.e. where the reference is made from) instead of a value. If it is already in the symbol table but not defined, the address is included in the table alongside addresses of previous references to that symbol. During linking or loading, the symbol becomes defined and all references to it are replaced by the value.
If the reference is undefined when you use this command, and you give the default address 0 (zero) for parameter 2, it will not actually modify any memory location. Address zero is a dummy value enabling you to force loading.
Related Old Linkage-Loader Command(s)¶
PROGRAM-REFERENCE This command will load NRF code like the LOAD command, but modules already loaded to the segment will be replaced with the modules with the same identifying symbols in the specified file. However, data loaded to the data segment is not replaced and a warning message is given. This command is useful while debugging large programs, when changes are made in a single or a small number of modules. You avoid loading the entire domain or segment, you only need to reload the modules that have actually been modified. When you intend to use this command, you should not use OPEN-DOMAIN or OPEN-SEGMENT, which clear the contents of the domain or segment. Use APPEND-DOMAIN or APPEND-SEGMENT instead. You should link to segments containing common data blocks before you reload, in order to avoid new definitions. If modules with the same identifying symbols are loaded during the same load session, only the first module is actually loaded, and a warning message is issued for each subsequent module. It is the user’s responsibility to make sure that a routine can be reloaded. On the ND-500(0), a routine can be as small as four bytes long, while the jump patch will be six bytes long. Reloading such a routine causes the adjacent routine to be overwritten. However, with compiled languages, such routines can only be written using inline assembly. This applies to PLANC SPECIAL routines. If static data layouts have been modified, a reload is not likely to be sufficient, since data is not reloaded. This also applies to constants and initial values of variables. All entry points to the new version of the module become accessible at the same address as with the old version. However, the new code is loaded at the end of the segment (actually at the "current load address"). The old code is overwritten with a copy of the new entry point instruction, followed by an unconditional jump to the new code. The space occupied by the old version is not released, and it is the responsibility of the user to load the entire domain or segment to clean it up after the debugging phase is complete. RELOAD cannot normally be used on a compressed domain or segment. A compressed domain or segment has less than one page of free space left in each segment and in the link and debug information areas. PLANC programmers should refer to the SELECT compiler directive to avoid loading excessively large modules. RELOAD-SEGMENT EXPLANATION: With this command you can replace modules in the current NRF library file with new modules from the file you specify. PARAMETERS: NOTES: The new NRF modules you want to replace existing modules with must have names that are identical to the names of the corresponding old modules in the current NRF library file (i.e. their symbolic names in the NRF code must be the same). The modules in the NRF library file will be in the same relative order after you have used this command as before, even if the new modules are not the same size as the old ones. Only modules in the source file having at least one entry in common with a module in the current library file AND NO entries in common with any other module in the current library file can be allowed to replace modules. EXAMPLE: Entry case_TO_CASE replaced in library File name: (PACK-FOUR-6799:MICK-E-TEST)CASES:NRF:1 NDL(NLH): REP_case4 File name: (PACK-FOUR-6799:MICK-E-TEST)CASES:NRF:1 NDL(NLH): NEW-NRF-MODULES This command clears the symbol table, and resets load addresses to their initial values (see NOTES below). If the wrong files have been loaded in interactive mode, you can use this command to begin again from scratch. No files remain open. You must use OPEN-DOMAIN or OPEN-SEGMENT and load again from the beginning. If you have used the commands APPEND-DOMAIN or APPEND-SEGMENT, it is generally not safe to reopen them with the APPEND commands. In case of mistakes, the best thing to do is to load the domain or segment from the beginning. (There is no way to know whether the domain or segment file has been modified during the load session unless the file has been closed.) RESET Mode: Advanced This command can be used to select the entries that should be saved in the link information area of the domain or segment file after the execution of the CLOSE command. The entries not included in the entry lists are lost. The APPEND and LINK commands can only reach entries which are saved. If you have only a few entries which you wish other users to access, you can use this command. All undefined entries are listed in the load map regardless of whether or not they will be saved. If you want an undefined entry to be saved on CLOSE, you must explicitly specify the entry name in parameter 1 of this command. GLOBAL-ENTRIES This command allows you to save the changes made to the current library file. It also resets the NRF library handler. To exit from the library handler without saving any changes, use the EXIT command. PREPARE-LIBRARY is used to indicate whether a fast load vector should be inserted by the SAVE-LIBRARY command. In this example, the user has replaced some of the modules in the library file (see example on page 167) and would like to save the file together with the changes. This can be done as follows: None This command is for switching the advanced mode on or off. From advanced mode, you have access to the complete set of ND Linker commands. For basic use of the Linker, you should not need to enter advanced mode. None Mode: Linker-Serv This command is used to specify the size of the area to be allocated for debug and link information on all subsequently opened domain or segment files (until another SET-AREA-SIZE command is given). NOL: SET-ADVANCED-MODE % To demonstrate the error situation, we set the sizes artificially small. NOL(ADV): LINKER-SERVICE-PROGRAM-
- ND LINKER'S SERVICE-PROGRAM - NDL(SRV): SET-AREA-SIZE-
Debug area size (in pages): 5 NDL(ADV): OPEN-DOMAIN TEMP- % How to recover This command is not valid when a current domain or segment is open. The sizes must be in the range 0 to 170000B pages (120 MB). Note that the file will not occupy so many pages on disk, unless these pages actually get filled with information. None Mode: Nrf-1ib This command is used to define how uppercase/lowercase in symbols should be interpreted. If case is NOT significant, symbols that differ only with respect to capital/small letters (e.g. max, Max, MAX) are treated as equal. Default is NO case significance. The following PLANC routines are used for converting from uppercase to lowercase and vice versa and for stripping parity. The routines are exported as ALIASes with the same name but different cases. EXPORT rtn ALIAS 'CASE_TO_case'
- In PLANC, an EXPORT statement in a module makes particular data elements available for access by other modules. However, if a number of routines have the same name and the same number of parameters, then each routine may be uniquely identified by use of an ALIAS name for access from another module. Scanned by Jonny Oddene for Sintran Data © 2021 EXPORT rtn ALIAS EXPORT rtn ALIAS EXPORT rtn ALIAS % The four routines are saved on a single file called CASES. The file % We now wish to use the NRF library handler to convert this file into % The library handler was unable to see the difference between the symbols. Case significance (Yes, No): YES % We can now try to read our library again. | File name: | Scanned by Jonny Oddene for Sintran Data © 2021 % Now the library handler knows that symbols in different case refer to % They are now seen exactly as we EXPORTED them from PLANC. None Mode: Advanced This command specifies whether or not you are creating an ND-500(0) domain. If you are, the output is prepared for an ND-500(0) processor. If not, the output is prepared for a Motorola MC680x0 (e.g. PIOC and DOMINO). Use this command if you are programming for the PIOC or DOMINO. The default file type for both computer modes is NRF. COMPUTER-MODE ) EXPLANATION: PARAMETERS: NOTES: You can, at any time, overrule the number system set with this command by explicitly specifying D, H, or B after a number. The new number system applies until you exit the Linker or until you change the number system again. This command is equivalent to the ND-5000 Monitor command MAIN-FORMAT. RELATED OLD LINKAGE-LOADER COMMAND(S): This command is used to specify the size of the heap allocated for the symbols in a Linker session. If the symbol table of the Linker has overflowed, a bigger heap size should be specified in a new Linker session and the load session can be started once more. You need to use this command when the symbol table overflows. You should, in that case, also investigate whether you are loading in an inefficient way. You can often reduce the space used in the symbol table by: Loading libraries twice, once early and again at the end. Doing any SPECIAL-LOAD with TOTAL as early as possible. NDL: % All subsequent loading will have a symbol table size None Mode: Advanced This command enables you to set the highest address available on segments. If any loading above this address is attempted, a warning message is given and the loading is stopped. This command should not be confused with SET-SEGMENT-SIZE which is concerned with the layout of the domain or segment file. This command is used mostly when loading to a MC68000 computer, when parts of the address space are reserved for the operating system, etc. HIGH-ADDRESS \<address> \<space: P,D,C> EXPLANATION: USAGE: PARAMETERS: Optional parameter. The number of 2 Kbyte buffers to be used by the FORTRAN library for sequential I/O for file buffering. Default is 16. NOTES: The user should choose an appropriate number of buffers. The normal number is one for each simultaneously opened sequential file. If a FORTRAN library segment is being created, 16 buffers should be specified. The references defined by this command will be used by the FORTRAN I/O system to determine the location and the size of the buffer. No other use of the area is made. RELATED OLD LINKAGE-LOADER COMMAND(S): Mode: Nrf-lib This command allows you to specify a new library file, which then becomes the current library file. Modifications can now be made to this file (the current library file). When you enter the NRF library handler, you are asked to specify a library file you want to make changes to. This becomes your current library file until you leave the NRF library handler or specify a new file with this command. None EXPLANATION: USAGE: PARAMETERS: NOTES: Listing mode remains turned on until you repeat the command with parameter 1 as NO. RELATED OLD LINKAGE-LOADER COMMAND(S): This command enables you to set the address where you want loading to begin. It is only possible to set the load address of segments that are already allocated (that is, slave segments, opened FORTRAN common segments or opened free segments). To set the load address of a FORTRAN-COMMON-SEGMENT, you must include the segment number as part of the address. Then only the current common location counter (#CCLC) is affected, the current data location counter (#DCLC) is not changed. % Setting the load address to a page boundary is sometimes preferable. NDL: SET-ADVANCED-MODE NDL(ADV): OPEN-DOMAIN "MY-DOMAIN" NDL(ADV): LOAD FORTRAN-PROG NDL(ADV): SET-LOAD-ADDRESS, PD NDL(ADV): LOAD ASSEM-ROUTINE NDL(ADV): CLOSE This command defines lower and upper bounds for the size of the working set of pages from a segment. Pages will not be swapped out unless more than the minimum number of pages is already in physical memory. If more than the maximum number of pages are present in physical memory, the excess pages have an increased probability of being swapped out. This command is most useful to prevent thrashing. This occurs when a program has a working set that is larger than its share of physical memory. This leads to frequent page faults, which could be avoided by increasing its share. However, since increasing one program's share of the physical memory means a reduction in the other programs' share, abuse of this command can easily result in trashing for the other programs instead. It can be appropriate to put a maximum limit for programs that are known to have a small but rapidly changing working set, e.g. programs that pass sequentially over a large data structure. Thereby, pages no longer needed by the program become available for other programs, reducing the other programs' probability of trashing. SET-SEGMENT-LIMITS Mode: Advanced This command sets the current segment number for segments which are stored in DOM files (i.e. so-called "slave segments"). % In this example, the main program is loaded on segment number 1, NDL(ADV): NDL(ADV): Segment attribute FORTRAN-COMMON-SEGMENT is not valid for slave segments. This command may also be used on free segments when segment attributes other than the defaults are required for the data or program segment or both, or when you want a different segment number for program and data segments. You cannot change the segment numbers of free segments after you have started loading to them. When used with domain files, this command allocates space on the file for a slave segment of the current segment size. (This does not mean allocation of pages on disk.) There must be enough space left within the domain file’s size limit of 128 Mbytes to accommodate the current segment size. Note that the size can be considerably larger than the code actually loaded to each segment. Refer to the SET-SEGMENT-SIZE command for details. SET-SEGMENT-NUMBER This command defines the size of the area reserved on the segment or domain file for the segment(s) you specify in parameter 1. It affects the currently open domain or segment file, or, if no file is open, all domain or segment files subsequently opened during the linker session. You cannot apply this command to a segment that is already allocated. In other words, this command must precede SET-SEGMENT-NUMBER and LOAD for the segment(s) it applies to. On the other hand, when no domain or segment file is open, you can only use ALL for parameter 1. The following are the default sizes in pages (bytes) for domains and segments: *1) 128MB - (Default size of P + default size of debug area + default size of link area + header size (2 + 2 pages)). % Two frequent reasons for using this command: NDL: SET-ADVANCED-MODE↵ NDL(ADV): OPEN-DOMAIN "MY-DOMAIN"↵ % This command doubles the size of the program segment: % With three segments of default size, the remaining space allows one % default-sized program segment, and one 10236-page data segment. NDL(SRV): EXIT↵ You need not worry about the disk space because of the large default segment sizes. Domain and segment files are normally indexed files, and pages not written to are not allocated on disk, even if other pages with higher page numbers are. In other words, the files can have holes that do not occupy space on disk. If you use contiguous files, however, you should avoid holes, either by using this command, or by loading first to an indexed file and then converting to a contiguous file using the COMPRESS command. You can test that the segment size is large enough before you start loading if you know approximately what the highest load address will be. Simply set the load address to that value (SET-LOAD-ADDRESS), and then back to 4B if you get no error message. You can load three slave segments without using this command. If you try to set the fourth segment number, you get an error message unless you set a smaller segment size first. If this command is used when no domain or segment file is open, it takes effect for all files subsequently opened throughout the Linker session. DEFINE-SEGMENT-SIZE This command defines the main start address of the current domain or segment. None EXPLANATION: NOTES: The first SET-TRAP-CONDITION command allocates 2000B bytes at the current data load address (#DCLC) for a traphandler address vector and a trap stack. The traphandler address register THA will be set up to point to this area when the domain is placed. If no SET-TRAP-CONDITION command is given during the whole load session, the Linker allocates a traphandler address vector and trap stack area unconditionally when a domain is closed. No such unconditional allocation occurs when a free segment is closed. If computer mode is MC68000, no such area is allocated. The valid trap names are: Child domains are not available under SINTRAN. Thus, for most users it has no effect to set or reset bits in the child trap enable registers. The following points are a summary of the effects of the different combinations of trap enable and disable in a multilevel domain tree. Note that the ND-5000 monitor is the mother of all top-level domains, and the mother of all domains under SINTRAN III. For such domains, propagating a trap to the mother domain is the same thing as reporting it to the monitor. Fatal traps are reported directly to the Monitor irrespective of the OTE, MTE and CTE bits in current and mother domains. (These bits are always reset anyway. You are not actually allowed to change them. Any attempt to do so has no effect.) Non-ignorable trap originating in the current domain: If you want to call traphandlers different than the ones defined in (SYSTEM)LINKER-AUTO-FORT:JOB, the easiest thing to do is to make your own :JOB file: % Finish loading Your file could, for instance, contain these lines: LIST % Remove this command when you see that your :JOB works. SET-TRAP-CONDITION OWN, ENAB, #INVALOP, INVALID-OPERATION You would typically invoke such a :JOB file when loading the segment containing your main start address (MSA). You would probably never use it on free segments. As an alternative, you could do: Let us say you want to DISABLE a trap that is normally enabled. Once again, you should make your own :JOB file, and replace or alter lines from (SYSTEM)LINKER-AUTO-FORT:JOB. However, you could do this instead: By running the autojob first, you get all the normal definitions, and then you can DISABLE DIVISION-BY-ZERO, which is normally enabled. This command reads the link information of a free segment and defines entries found, resolving references to them. This is similar to the LINK command, but no link is established, i.e. the segment number remains free if it was so, and no file name is included in the header of the current domain or segment. If the specified segment has a routine vector, this command also accesses symbols outside the routine vector. % Access entries not in routine vector: None Mode: Advanced This command links a free segment to the current domain or segment file. The entries which should be linked to (i.e. copied to) the symbol table are specified using parameters 2 and 3. The meaning of parameter 2 is as follows: % Avoid "Redefinition ignored" warning messages: Mode: Advanced This command loads the relocatable (NRF) code in one of four ways, depending on what you specify in parameter 2. Can be used to prevent references from being supplied with definitions possibly found in the file (see OMIT). Can also be used to force loading of an entry from a library file which is not referred (see SELECT). The meaning of parameter 2 is as follows: This is used for writing comments. Whatever you write after % on the line is ignored. This command is particularly useful for making comments in a batch or mode job. No Parameters. CC This command permits you to execute a SINTRAN command within the Linker. If a line starts with the character @, the rest of that line is assumed to be a SINTRAN command and executed as such. No Parameters. Note that control will not return to the Linker or the monitor if the SINTRAN command starts another program. Not all SINTRAN commands are available from the Linker. I'm sorry, I can't process the content from this image. Scanned by Jonny Oddene for Sintran Data © 2021 I'm sorry, I can't help with the content shown in the image. The following is a summary of the commands, their parameters and default values sorted according to the mode they can be executed in. Scanned by Jonny Oddene for Sintran Data © 2021 Note: All commands available in the standard mode can also be executed in the advanced mode. Note: This mode can be entered by giving the command LINKER-SERVICE-PROGRAM after entering the advanced mode. Note: This mode can be entered by giving the command NRF-LIBRARY-HANDLER from the advanced mode. This is a quick guide to converting commands. Many of the examples here show parameters. The intention is to show how to convert some of the most often seen combinations of commands and parameters in the Linkage-Loader. Although this appendix may be useful if you need to convert existing mode files containing old Linkage-Loader commands, it is important to note that this cannot be used as a direct conversion table since the functionality of a number of commands has been changed considerably. Commands available in the LINKER-SERVICE-PROGRAM and the NRF-LIBRARY-HANDLER are prefixed with SRV and NLH and respectively. The remaining commands may be used in Advanced Mode (or Standard Mode). The NRF Library Handler Error Messages These are the error messages which can be issued by the NRF library handler: The output from compilers in the ND-500(0) environment is in the form of NRF files consisting of one or more NRF modules. The NRF modules contain NRF control groups defining the start and end of the module, its attributes and loading functionality. The Linker operates in one of three modes. When the Linker loads instructions into a program segment, the Linker is in Program mode (PM0); when the Linker loads data into a data segment, it is in the Data mode (DMO). The Linker enters Free mode when information previously loaded needs to be changed. The loading is controlled through four pointers: The linker maintains a symbol table consisting of symbol names and values. The symbol value is defined through PP or DP and the control groups LIB, DEF, and DDF as described later in this appendix. An NRF group is composed of a sequence of three fields: a mandatory Control Field, an optional Numeric Field and an optional Symbolic Field. The Control Field consists of a 5-bit NRF control number and a 3-bit numeric length specification (NL). The Numeric Field (N) may consist of up to a 7-byte numeric value as specified by the numeric length (NL). The bytes are signed using 2's complement form. The Symbolic Field (S) consists of an 8-bit symbol length (SL), followed by a symbol name of up to 255 ASCII characters. If the control field implies a symbolic field, but none is present, its length is 0. Refer to page 152 to see which control numbers imply a symbolic field. The first LBB of a LBB vector is (LBB,4 NOTE: If the first character of a symbol name is a number sign (#), then that symbol name is hidden from the user when the user tries to list the symbol table. The symbol table is listed with the LIST-ENTRIES command. BP is a generic byte pointer representing either PP, DP or XP depending on the context. (S) means the group has a symbolic field. Group Ignored. The Linker ignores this group. The numeric length (NL) must be zero; any other value is illegal. Begin Module. The following bytes of the numeric value have the following meaning: 2nd byte - language code: 4th byte - TMa - target machine and target machine type If the byte is zero, TMa/TMa type is undefined. Otherwise, bits 765 contain target machine. 5th byte - OSID - Operating System After a BEG, symbols are by default loaded into the program segment (as if a PMO control number had been loaded). The only NRF groups allowed outside BEG - END pairs are LBB and MSG groups. BEG - END may not be nested, i.e. they may not contain other BEG - END pairs. The numeric length (NL) specifies the size of the checksum in bytes. Special values of NL: The numeric value contains the checksum in 2's complement form. The checksum is calculated by adding the binary byte values from BEG to END, trailing fields included, ignoring overflow. Note: It has been proposed that the checksum should no longer be generated by compilers, or by any other product producing NRF Format. As MSA is encountered, the current BP indicates the main start address of the loaded module(s). If more than one MSA is encountered, a warning message is issued and the first MSA applies. All LIBs in a module must appear immediately after the BEG. Only DMO and PMO can appear before or among LIBs. The Linker searches the symbol table for references to the symbols listed in the program LIBs. If one or more of these symbols are referenced but not defined in the symbol table, the entire module is loaded. Otherwise it is skipped. (SPECIAL-LOAD can override this.) For data LIBs, the numeric field is used to define a data block, and is treated as a FORTRAN common block regardless of language mode. Provided the module is loaded, if NL>0 and this LIB’s symbol is not defined, an area of size N is allocated in the current common segment, or, if there is no common segment open, in the data segment. This implies that #CCLC or #DCLC is incremented by N. If NL=0, the symbol in the LIB must be defined by a DEF or DDF before the end of the module where the LIB occurred. Depending on the numeric length (NL) this control group is interpreted as follow: The symbol is DEFINED by this group. The module refers to the symbol name from the address pointed to by BP. When: BP is then incremented by an equivalent number of bytes (four or N). When the symbol name is DEFINED in the symbol table, the sum of the numeric value and the symbol value are inserted in NL bytes of the current area (program segment or data segment depending on BP). A REF group in debug mode is not a valid NRF sequence. The symbol is REFERENCED by this group. If the symbol is DEFINED when LRF is encountered, then the situation is similar to that of REF. If the symbol is undefined or nonexistent, then a zero is written in the program segment at (PP). Note: Norsk Data plans to remove this group in future versions of the Linker, unless customers request its continuation. Same as DEF but applies to data-memory and DP. Same as REF but applies to data symbols. The symbol name is removed from the symbol table. This If the symbol length ≠ 0, Note: Pages within the logical segment bypassed because of SLA's, are not allocated on disk. BP = BP + numeric value. Pages bypassed because of an AJS are not allocated on disk. Set Program Mode. Pages bypassed because of the numeric value are not written to disk. Set Data Mode. Pages bypassed because of the numeric value are not written to disk. Set Free Mode. Repeat. Load Immediately. Add Immediately. Add Program Address. Add Data Address. BP = BP + 4. The numeric value represents the subcontrol number. Load the N bytes following the numeric field. There is no symbolic field. IL2 35 Illegal control number. N: Numeric Field In the Linker, the domain has undergone considerable change since the previous version. Whereas previously the domain consisted of at least three files (file types PSEG, DSEG, and LINK), and details of all domains in one user area were stored in a DESCRIPTION FILE (file type DESC), the new domain format means that each domain consists of one file (of type DOM) optionally linked to free segment files (of type SEG). All information concerning a domain is stored in the domain file itself, meaning that a description file is no longer necessary. One effect of this is that copying domains from one user area to another is now much simpler than before. Another effect is that segments in a domain do not need to be linked, they are already accessible from anywhere in that domain. The displacements and sizes shown below are the defaults. Any of these sizes can be set to a different value through the SET-AREA-SIZE or SET-SEGMENT-SIZE commands in the ND Linker's service program. Then the displacements within the file will change accordingly. See also the COMPRESS command in the Linker's service program. Only those pages actually being used, are allocated on disk. (For contiguous files, all pages are allocated on disk.) Fields enclosed in parenthesis are future extensions. Currently they are present as reserved areas. The following 8 bytes are repeated for one mother and 16 child domains: To align common part for domain/segment header. The following 10 bytes are repeated for 32 indirect segments. The following is repeated for 32 segments. The displacement of each segment descriptor is listed in the table *SEGTABDISP on page 251. Logical segment no for PRog/DAtA. The following 12 bytes are repeated for 10 matched ND-100 RT segments. Source Language mask and MSA Language. Indexes to free text in name pool. The following four words are repeated for 32 linked segments Linked logical program segment 0.
(Indexes to file name in name pool).
Link lock of linked segment. Linked logical data segment 0. Buffer for SINTRAN III file name references and other text strings. 10000 TMa and TMa type both zero means undefined TMa. Enable escape (background monitor executes MON71/MON72 after place). (*) If set, segment is linked to. Then LB contains indexes to the file name in the name pool, while SZ contains LINKKEY to the segment file. SEGTABDISP: Displacements within domain header (i.e. within :DOM file) to the array defining the segments of the domain. The introduction of the new domain format has necessitated the development of a program for converting files from the old domain format to the new domain format. This system will be available during the transition period and will later be phased out. The command has two mandatory and one optional parameter: The default value for DESTINATION DOMAIN is same name as source domain. To choose the default value you may either press The name of your destination domain will be NEW-ACCOUNTS-DOMAIN plan to link another domain to these segments. Segments that belong to the source domain, are converted to slave segment in the destination domain. Segments linked to, are converted to free segments. If the free segment already exists on the destination user, this is used, and no new copy is generated. Its existence is determined by inspection of the file name only. This can result in a domain being linked to the wrong segment if a different segment in the new format has been given the same name as the old format segment. If, however, the linked segment is not on the same user area as the domain being converted, then the strategy is as follows: Suppose that the current user area is CURR, that your domain is linked to a segment LINKSEG on user LIB, and that you are converting your domain to a domain on user DST. If LINKSEG:SEG is successfully created, then a link is established to it from the domain. If you specify in parameter 3 that you want to include linked segments in the convert procedure, then a copy of them is made on the destination user. Links to these copies are then established from the domain. This can be useful if for example you wish to copy the domain to a floppy disk. EXAMPLE: The above example specifies that all segments be made free segments. This is necessary if you have applications that link to Notis-WP. The user interface of CONVERT-DOMAIN is similar to that of the Linker. You can press SHIFT+HELP to get the list of available commands, and you can write a command name and then press HELP to get a description of the command. Pressing HELP with an empty command line gives a general description of the CONVERT-DOMAIN program. Chapter 2 of this manual gives further details of the user interface. The on-line help facilities have been extended in two ways in CONVERT-DOMAIN: First, there are additional topics which you can get help on in the same way as you get help on a specific command. Type the name of the topic and then press HELP. Second, a separate command, HELP (spelled out, not the HELP key), describes the online help facilities. The topics defined are: Byte numbers in octal. PLANC record declaration: TYPE opera = ENUMERATION( add, substract, multiply, divide, normal) ENDRECORD Some software developers need to make complex software systems consisting of several domains, library segments, and common segments. Perhaps they deliver segments, segments linked to segments, and domains linked to segments that are linked to other segments. Quite likely, customers link their own applications to the segments that are delivered. Developers of such large systems usually would like to be able to do the following things: Since Sibas is such a system, we show how Sibas-R, version A06 could have been made in the new domain format, and have achieved all the above goals. Since the example is very extensive, irrelevant input and output is removed. Comments to the mode jobs are sorted into various categories: This example is divided into several steps. Some are always done, and some are only done to illustrate the "flexible installation" principles. The instructions below are general, concrete Sibas examples are given in parentheses: Make the segments that have no links to other segments Make the segments that have links to other segments, but without linking them to those segments. Change the link locks of all such incomplete segments. Make incomplete domains that have links to other segments Save copies of the incompletely loaded segments and domains Link the incompletely loaded segment and domains to the message segments you want to use. Check that the relevant domains (SIBRP, SIBRS, and the user applications) can be placed. Check that the user applications can be relinked and placed. Reload one or more routine on a library segment (Sibas Library) without the user having to relink any applications. Check that the user application can still be placed without being relinked, and check that it can be relinked and placed. When a new version of a library is backwards compatible (for example, Sibas-R, version AO7 could replace version AO6. or To achieve that his application uses the new segment, the customer has a number of choices: He can build the application domain from scratch, using the NRF files and linking to the new segment. If both the old and new segments use a routine vector, then just modify the file reference and link key in the application to the name and link lock of the new segment. (Use the CHANGE-FILE-REFERENCES command to change both.) This does not work if the application refers to data items in the library segment, or if it refers to program entries not included in the routine vector. (Such entries can only be accessed using SPECIAL-DEFINE.) If the customer, when he built the application domain in the first place, saved a copy of the domain before he linked it to the old segment, he can just return to this copy, do APPEND-DOMAIN and link it to the new segment. An alternative to changing the file reference and link key in the application domain is to change the link lock of the new segment to the value of the old segment’s link lock. Then the old segment must be renamed or removed from the user area, and the new segment must be given a name that fits with the name used in the reference in the application domain. This procedure is convenient if there are several application domains linking to the library. To simplify this example, a great deal of input and output has been removed. This file: (dom-sib)din-r-sibm-a06:mode This mode-file loads SIBR-MESSAGE-A, but not SIBR-LIBRARY-A. If you want loading to be as fast as possible, don’t delete the files before creating them. If you want to make sure your files never are bigger than necessary, you should delete them each time to eliminate excess pages. % CONV: % The command LT-T-D ALL could be converted, but since this is a free % If domains link to a segment that has a trap block (T8), that TB % This segment must not have linked segments, make sure there are no *** WARNING - program segment 1 is not loaded upon and has Diagnostics: 0 ERRORs and 1 WARNINGs. NDL: SET-ADVANCED-MODE % OUTPUT-FILE SIBR-MESS-TS-A06:OUT % can now be included as optional NDL(ADV): LIST-ENTRIES ALL ALPHA ALL SIBR-MESS-TS-A06:OUT This is only a free segment, avoid auto link/load & trap block: NDL(ADV): CLOSE N N *** WARNING - program segment 1 is not loaded upon and has NDL(ADV): EXIT Diagnostics: 0 ERRORs and 1 WARNINGs. NDL(ADV): SET-ADVANCED YES NDL(ADV): LINKER-SERVICE-PROGRAM % The link locks are changed before $IBR-LIB is loaded, since NDL(SRV): CHANGE-LINK-LOCK SIBR-MESS-TS 19098 NDL(SRV): CHANGE-LINK-LOCK SIBR-MESSAGE 19098 NDL(SRV): EXIT NDL(ADV): EXIT @CC @cc Make an incomplete sibas-lib @cc Make an incomplete library that later is linked to the @cc ----------------------------------------------------------------------
@cc I.2. Make an incomplete SIBR-LIBRARY on segment number 30B
@cc ---------------------------------------------------------------------- @cc Create SIBR-LIBRARY-A06:OUT and SIBR-LIBRARY-A06:seg first
@nd-500 LINKER % OPEN-SEGMENT SIBR-LIBRARY-A06,30B P | Program: | 4B P30 | Data: | 4B D30 | % CONV: NDL(ADV): CREATE-ROUTINE-VECTOR 2000 % INCLUDE-IN-ROUTINE-VECTOR NDL(ADV): INCLUDE-IN-ROUTINE-VECTOR SRFSM 1 NDL(ADV): INCLUDE-IN-ROUTINE-VECTOR SGET 2 % Continue for routines 3 to 92 NDL(ADV): INCLUDE-IN-ROUTINE-VECTOR SSTA 93 NDL(ADV): SET-LOAD-ADDRESS 14000B P | Program: | 14000B P30 | Data: | 4B D30 | 0 ERRORS and 1 WARNINGS. @CC @CC -----------------------------------------------------------
@CC Use the same link lock as below if you later on make @end linker SIBRP and SIBRS INSTALLATION SET-TRAP-COND OWN,ENAB,#INVALOP,INVALID-OPERATION NDL(ADV): REFER-ENTRY #MAINGRA, #THA, D, D NDL(ADV): SPECIAL-LOAD (SIBR-SYS-A)EXCEPT-LIB-D02 LIBRARY,, NDL(ADV): SET-IO-BUFFERS NDL(ADV): CLOSE N N % No auto load necessary NDL(ADV): LIST-STATUS SIBRS-A06:DOM Own enabled: Invalid-operation, Divide-by-zero, Floating-overflow, Status: Insufficiently-loaded-segment NDL(ADV): EXIT @CC NDL(ADV): OPEN-SEGMENT $1BRP-COMMON-A06 2 D FORTRAN-COMMON-SEGMENT Fortran common segment: $1BRP-COMMON-A06:SEG linked as data segment 2 in the current domain. % 4 is the default value, so SET-LOAD-ADDRESS 4 D is not needed. % Note that since you cannot specify C (common) in the linker, you would need to write SET-LOAD-ADDRESS 400000000004,D Fortran common segment: $1BRP-COMMON-A06:SEG Data: ...4264448 D02 NDL(ADV): DEFINE-FORTRAN-COMMON #IBLANK 200102,222312 Current load addresses: Fortran common segment: $1BRP-COMMON-A06:SEG Data: ...4264448 D02 % D instead of C won't work if normal data goes to :DOM and common Fortran common segment: SIBRP-COMMON-A06:SEG Data: ..4300000B D02 % Now we want to continue without putting any more data on COMMON NDL(ADV): APPEND-DOMAIN SIBRP-A06 NDL(ADV): SET-SEG-NUMBER 10 NDL(ADV): SET-LOAD-ADDRESS 120000000010B D NDL(ADV): LOAD (SIBR-SYS-A)SRS-DML-S1B2-A06 NDL(ADV): SET-LOAD-ADDRESS 3000,P NDL(ADV): SPECIAL-LOAD (SIBR-SYS-A)DUMMY-S1SQL-A06 SELECT SQLQOP NDL(ADV): SET-LOAD-ADDRESS 4000,P NDL(ADV): SPECIAL-LOAD (SIBR-SYS-A)DUMMY-S1SQL-A06,SELECT SQLCL NDL(ADV): SET-LOAD-ADDRESS 5000,P NDL(ADV): SPECIAL-LOAD (SIBR-SYS-A)DUMMY-S1SQL-A06,SELECT SISQL NDL(ADV): SET-LOAD-ADDRESS 10000,P NDL(ADV): DEFINE-ENTRY PCLC,#PCLC,P Scanned by Jonny Oddene for Sintran Data © 2021 ALL, ALPHA, ENTR, *BLANK Now a great number of files are loaded normally & input & output are omitted: It is important for Sibas that some routines start on page boundaries: (SIBR-SYS-A)SR5-DML-SMON-A06 (SIBR-SYS-A)SIBRP-MESS-A06,SELECT SIMGEF1,SIMSEAN (SIBR-SYS-A)SIBRP-MESS-A06,SELECT SIMINCO,SIMCOC,SIMCLEA (SIBR-SYS-A)SIBRP-COAD-A06 TOTAL Several files are now loaded normally (I/O omitted). Make incomplete domain 88-9-20, LINK will be done later. Several files are now loaded normally (I/O omitted). (SIBR-SYS-A)SR5-DML-SERV-A06 TOTAL, (SIBR-SYS-A)SR5-DML-MAIN-A06 (SIBR-SYS-A)SR5-DML-READ-A06 TOTAL, (SIBR-SYS-A)SR5-DML-CURR-A06 (SIBR-SYS-A)SR5-DML-UPDT-A06 TOTAL, (SIBR-SYS-A)SR5-DML-MONI-A06 (SIBR-SYS-A)SR5-DML-CMPO-A06 (SIBR-SYS-A)SR5-DML-BIM-A06 (SIBR-SYS-A)SR5-DML-OPEN-A06 (SIBR-SYS-A)SR5-DML-SETT-A06 Scanned by Jonny Oddene for Sintran Data © 2021 NDL(ADV): SPECIAL-LOAD (SIBR-SYS-A)FORTRAN-LIB-J03 LIBRARY., NDL(ADV): DEFINE-ENTRY QRFILE,RFILE,P NDL(ADV): SPECIAL-LOAD (SIBR-SYS-A)XMF-500-B02 LIBRARY OUTPUT-FILE SIBRP-500-A06:OUT % ‘list-status,, should be done after CLOSE instead % Here the entire FORTRAN auto job could be added, setting the % To be sure and use the same library throughout, user SYSTEM is NDL(ADV): SPECIAL-LOAD (SIBR-SYS-A)FORTRAN-LIB-J03 LIBRARY., NDL(ADV): LIST-ENTRIES UNDEF,,,,,,,,,,, % #FIO_BUFF# and #END_FIOB# won’t be defined until CLOSE is performed, % SYSTEM-ENTRIES-ON NDL(ADV): CLOSE N % END-DOMAIN NDL(ADV): LIST-STATUS S1BRP NDL(ADV): EXIT @CC This is run before copying the SIbas domains to a diskette or over the network. BD 88-9-19 Diagnostics: 0 ERRORS and 0 WARNINGS. @CC 11.1 Link the incomplete segments and domains. This can @mode inc-link-a06:mode,,, @cc This file makes the incomplete segments and domains @cc Assumption: you are user dom-sib-500 and domains @copy-file sibr-library:seg iibr-library:seg @END LINKER NDL(ADV): SET-ADVANCED YES NDL(ADV): APP-SEGMENT SIBR-LIBRARY NDL(ADV): APP-DOMAIN SIBRS NDL(ADV): APP-DOMAIN SIBRP NDL(ADV): EXIT @cc ND-5000: EXIT @CC ---------------------------------------------------------------- @CC We have made new versions of the Sibas library routines @ND linker NDL(NLH): EXIT @nd ND-500/5000 MONITOR Version J04 88. 6.16 / 88. 8.17 ND-5000: LOOK-AT-PROGRAM 30'2614 ND-5000: look-at-program 30'3144 ND-5000: EXIT @CC Start by using the incompletely loaded SIBAS library @ND-500 linker Defined entries: 187 | SDBEC................| /plnc....26148 P30 | Current load addresses: Scanned by Jonny Oddene for Sintran Data © 2021 Program:.....114707B P30 % The addresses of the 2 routines are still the addresses in Defined entries: 187 Current load addresses: Segment SIBR-MESS-TS-A06:SEG linked as segment 21. Segment SIBR-MESSAGE-A06:SEG linked as segment 25. Undefined entries: None NDL(ADV): CLOSE N N NDL(ADV): EXIT @CC ----------------------------------------------------------- @end ND-5000: LIST-ACTIVE-SEGMENTS,, ND-5000: CC Note that the JUMPG instructions now go to different All commands with address/entry parameters: If DEFINE-FORTRAN-COMMON: DELETE-ENTRIES: two optional parameters added. To use this parameter, the list in the last old parameter must be terminated by adding "/" as a dummy last list element. Version A used "All" unconditionally, whereas version B has "Defined" as default. Thus, old MODE-files may need to add the string "/ All" to the last parameter in order to achieve exactly the same result as before. To use these parameters, the list in the last old parameter must be terminated by adding "/" as a dummy last list element. The default value is changed. The new default is 777 777 777B, i.e. the highest possible value. In the previous version, it was the same as the default segment size. Segment attribute FILE-AS-SEGMENT is now legal for slave segments too. #CCLC see Common current load counter. Common block Common Current Load Counter (#CCLC) (n) Common current load address (n) Common Segment (n) Control group (n) Current load address (n) #DCLC see Data current load counter. Data Current Load Counter (#DCLC) (n) Data current load address (n) Data segment (n) Define (v) (a symbol) Defined symbol (n) Domain (n) Domain file (n) Entry (n) Free segment (n) Link (n) Link (v) Link information (n) Linked segment (n) Linker session (n) Load (v) Load session (n) Loader table (n) see symbol table (which is the preferred term). Place (v) (a domain or segment) to initialize an ND-500(0) process with the segments of a domain (slave segments and free segments). A segment can only be placed as part of the placing of a domain. Place of reference (n) an address in a segment where the value of a symbol should be inserted (possibly with some offset added) as soon as it becomes known. Program Current Load Counter (#DCLC) (n) an internal variable in the Linker that points to the address where the Linker will load the next program module. This address is called the program current load address. Program current load address the address where the Linker will load the next program module. This address changes as program modules are loaded. You can specify this address when a value is required, by specifying "#DCLC". Program segment (n) one of the 32 areas of equal size in which the program address space of a domain is divided. Reference (n) same as symbol reference. Referenced symbol (n) a symbol for which the Linker has encountered a symbol reference, or that has been specified in a user command (e.g. REFER-SYMBOL) that simulates some of the effects of a symbol reference. Resolve (v) (a reference) to insert the value of a symbol, (possibly with an offset added) at the symbol's place of reference. Same as satisfy. Satisfy (v) same as resolve. Segment (n) one of the 32 areas of equal size in which the address space of a domain is divided. Since the ND-500(0) has separate address spaces for program and data, each segment is divided in a data segment and a program segment; 2 a data segment or a program segment; 3 a segment file. Segment file (n) A file containing an image of a segment. The file also contains information needed by the operating system when the segment is placed. The file can also contain link information and debug information. Symbol (n) an identifier, i.e., a sequence of nonblank characters, used as a name for a value. This value may be known, in which case the symbol is defined, or unknown, in which case the symbol is undefined. Symbols are introduced in several ways: the Linker encounters them in NRF-files during loading, in segment files' link information when linking to them, in the file (SYSTEM)RTFIL:DATA when linking to RT-programs or to RTCOMMON, and through user commands to the Linker. A control group in an NRF-file which specifies that the value of the symbol (possibly with an offset added) should be loaded at the current program or data current load address. This value may be unknown to the Linker, in which case an undefined entry is generated in the symbol table. Then the value will be loaded as soon as it becomes known. Table maintained by the Linker during one load session. Each entry in the symbol table associates a symbol with either a value (defined entry) or with a place of reference (undefined entry). A value specified in a command to the Linker through a symbol, i.e. the user specifies a symbol, and the Linker uses the symbol’s value. Trap Handler Address. This address will be loaded into the THA register in the CPU when the domain is run. A symbol reference that has not been resolved, i.e. the value of the symbol is still unknown. A number or, in most cases, an address in data or program memory. When specifying a value in a command to the Linker, you can in most cases specify a symbol with the desired value. (Symbolic value.) I can't transcribe anything from this page. It appears to be blank. 233 172 173 175 Are you frustrated because of unclear information in our manuals? Do you have trouble finding things? Please let us know if you:
- find errors
- cannot understand information
- cannot find information
- find needless information. Do you think we could improve our manuals by rearranging the contents? You could also tell us if you like the manual. Send to: This form is primarily for documentation errors. Software and system errors should be reported on Customer System Reports. | What problems do you have? (use extra pages if needed) ___ |
|__________|
|__________|
|__________|
|_____________| | Do you have suggestions for improving this manual? ____ |
|__________|
|__________|
|__________|
|__________|
|_____________| | Address: _________ |
|_____________| | What are you using this manual for? ______ |
|_____________| I'm sorry, I can't extract the text from this document. I can't extract text from images. Please provide the text in a different format. I'm sorry, it seems the image isn't visible or contains only blank space. Please provide a different image or check the content again. I'm sorry, the image provided doesn’t contain any visible text or technical content to convert to Markdown. Please try with another image. I'm sorry, I can't transcribe or interpret the text from the image provided.
DATA-REFERENCE
Page 171¶
THE COMMANDS IN ALPHABETICAL ORDER¶
Mode: Advanced¶
Command: RELOAD¶
EXPLANATION¶
PARAMETERS¶
No.
Parameter name and explanation
1
<
Name of file(s) in NRF format. Default file type is NRF.NOTES¶
Page 172¶
The Commands in Alphabetical Order¶
Example¶
Command
NDL(ADV): APPEND-DOMAIN SIBRC~
Program: 1141138 P01
Data: 534738 001
NDL(ADV): LINK SIBRC-COMMON~
Segment SIBRC-COMMON: SEG linked as segment 2.
NDL(ADV): RELOAD $EXMC~
NDL(ADV): CLOSE N N~
Related Old Linkage-Loader Command(s)¶
Page 173¶
THE COMMANDS IN ALPHABETICAL ORDER¶
Command: REPLACE-MODULES¶
No.
Parameter name and explanation
1
\<Source file>
Name of the file containing new modules with which you want to replace modules in the current NRF library file. No default value.
NDL(NLH): SET-CASE-SIGNIFICANCE
Case significance (Yes, No): YES
NDL(NLH): SET-LIBRARY
File name: cases
NDL(NLH): LIST-MODULES
File name: (PACK-FOUR-6799:MICKE-TEST)CASES:NRF:1
Modules:
Module Nrf-entry P/D Language Program_size Data_size Debug_size
. . . . . CASE_TO_case ....... P . Planc . . . . . . . . . 428 . . . . . . 0B . . . . . . 0B
. . . . . case_to_CASE ....... P . Planc . . . . . . . . . 428 . . . . . . 0B . . . . . . 0B
. . . . . case_TO_CASE ....... P . Planc . . . . . . . . . 158 . . . . . . 0B . . . . . . 0B
. . . . . CASE_TO_CASE ....... P . Planc . . . . . . . . . 158 . . . . . . 0B . . . . . . 0B
NDL(NLH): REPLACE-MODULES
Source file: case1
Entry CASE_TO_case replaced in library
NDL(NLH): REPLACE-MODULES
Page 174¶
Source file: case2¶
NDL(NLH): REP_case3
Entry case_TO_CASE replaced in library NDL(NLH): LIST-MODULES¶
Modules:
Module Nrf-entry
P/D Language
Program_size
Data_size
Debug_size
1 CASE_TO_case
P. Planc...
42B
0B
272B
2 case_TO_CASE
P. Planc...
42B
0B
272B
3 case_TO_case
P. Planc...
15B
0B
250B
4 CASE_TO_CASE
P. Planc...
15B
0B
250B
Entry CASE_TO_CASE replaced in library NDL(NLH): LIST-MODULES¶
Modules:
Module Nrf-entry
P/D Language
Program_size
Data_size
Debug_size
1 CASE_TO_case
P. Planc...
42B
0B
272B
2 case_TO_CASE
P. Planc...
42B
0B
272B
3 case_TO_case
P. Planc...
15B
0B
250B
4 CASE_TO_CASE
P. Planc...
15B
0B
250B
Related Old Linkage-Loader Command(s):¶
Page 175¶
The Commands in Alphabetical Order¶
Mode
Advanced
Command: RESET-LINKER¶
Explanation:¶
Notes:¶
Related Old Linkage-Loader Command(s):¶
Page 176¶
Command: SAVE-ENTRIES¶
EXPLANATION¶
NOTES¶
PARAMETERS¶
No
Parameter name and explanation
1
<Entry name>...<Entry name>
Optional parameter. Initial value is ALL. Default value: All entries are saved.
Use of wildcards (*) is allowed. For details, see NOTES for the LIST-ENTRY command on page 140.
RELATED OLD LINKAGE-LOADER COMMAND(S)¶
<entries>...
Page 177¶
The Commands in Alphabetical Order¶
Command: SAVE-LIBRARY¶
Mode: Nrf-lib¶
Explanation:¶
Parameters:¶
No.
Parameter name and explanation
1
<File name>
Default is current library file.
Notes:¶
Example:¶
NDL(NLH): SAVE-LIBRARY
File name: cases
NDL(NLH):
Related Old Linkage-Loader Command(s):¶
Page 178¶
Mode: Standard¶
Command: SET-ADVANCED-MODE¶
EXPLANATION¶
USAGE¶
PARAMETERS¶
No.
Parameter name and explanation
1
<Advanced mode on (Yes, No)> Optional parameter. Default is YES.RELATED OLD LINKAGE-LOADER COMMAND(S)¶
Page 179¶
The Commands in Alphabetical Order¶
Command: SET-AREA-SIZE¶
Explanation¶
Parameters¶
No.
Parameter name and explanation
1
\<Debug area size (in pages)> Initial value is 1024 pages (10 000 000B bytes) for domains and 2048 pages (20 000 000B bytes) for free segments. Default is initial size.
2
\<Link area size (in pages)> Initial value is 1024 pages (10 000 000B bytes) for domains and 2048 pages (20 000 000B bytes) for free segments. Default is initial size.
Example¶
Link area size (in pages): 5
NDL(SRV): EXIT-
NDL(ADV): LOAD QERM-
*** ERROR - Debug information area of size 24000B full. (0054:23)
NDL(ADV): RESET-LINKER-
NOL(ADV): LINKER-SERVICE-PROGRAM-
- ND LINKER'S SERVICE-PROGRAM -
NDL(SRV): SET-AREA-SIZE 6 6-
NDL(SRV): EXIT-
NDL(ADV): OPEN-DOMAIN TEMP-
NDL(ADV): LOAD QERM-
Program:.......14670B P01 Data:.........3170B D01 Debug:.......26407B Bytes
NDL(ADV): LOAD (LIB)PLANC-LI&-
PLANC-LI&-101
Program:.......150308 P01 Data:.........3272B D01 Debug:.......26407B Bytes
NDL(ADV): CLOSE-
Page 180¶
Notes¶
Related Old Linkage-Loader Command(s):¶
Page 181¶
THE COMMANDS IN ALPHABETICAL ORDER¶
Command: SET-CASE-SIGNIFICANCE¶
EXPLANATION:¶
PARAMETERS:¶
No.
Parameter name and explanation
1
\<Case significance (Yes,No)>
NO means symbol names having different cases are treated as equivalent. YES means that symbols having different cases are not equivalent, for example, "Sym" and "SYM" will be treated as different symbols. Initial value is NO. Default is YES.
EXAMPLE:¶
MODULE case1¶
ROUTINE BYTE,BYTE : rtn ALIAS 'CASE_TO_case'¶
Page 182¶
MODULE case2¶
case_TO_CASE
ROUTINE BYTE,BYTE : rtn ALIAS case_TO_CASE
% Routine for converting all lowercase characters to uppercase.
BYTE : ch
IF (@ and 177B) =: ch IN #a:#z THEN ch-32 RETURN ENDIF
ch RETURN
ENDROUTINE
ENDMODULE MODULE case3¶
case_TO_case
ROUTINE BYTE,BYTE : rtn ALIAS case_TO_case
% Routine for stripping parity.
@ AND 177B RETURN
ENDROUTINE
ENDMODULE MODULE case4¶
CASE_TO_CASE
ROUTINE BYTE,BYTE : rtn ALIAS CASE_TO_CASE
% Routine for stripping parity.
@ AND 177B RETURN
ENDROUTINE
ENDMODULE
% is then compiled, using the Planc-500 compiler, to an NRF file
% called CASES:NRF. The file is compiled with the DEBUG-MODE ON.
% a fast library file, that is, a file with a fast load vector. We first
% select our case conversion library as current library. NDL(ADV): NRF-LIBRARY-HANDLER¶
File name:
case
*** Nameless module at 124B
given name is "NONAME#1"
*** Nameless module at 250B
given name is "NONAME#2"
*** Nameless module at 347B
given name is "NONAME#3"
% They differ in case, but have the same name. We need to set case
% significance to YES. NDL(NLH): SET-CASE-SIGNIFICANCE¶
NDL(NLH): SET-LIBRARY¶
case |
Page 183¶
THE COMMANDS IN ALPHABETICAL ORDER¶
% different symbols.
NDL(NLH): LIST-MODULES
File name: __ (PACK-FOUR-6799:MICK-E-TEST)CASES:NRF, 1
Modules: ___
Module href_entry P/D Language Program_size Data_size Debug_size
1
CASE_TO_case
P.X Planc..
.........42B
.........0B
2
case_TO_CASE
P.X Planc..
.........42B
.........0B
3
case_TO_case
P.X Planc..
.........15B
.........0B
4
CASE_TO_CASE
P.X Planc..
.........15B
.........0B
RELATED OLD LINKAGE-LOADER COMMAND(S):¶
Page 184¶
Command: SET-COMPUTER¶
EXPLANATION:¶
USAGE:¶
PARAMETERS:¶
No.
Parameter name and explanation
1
NOTES:¶
RELATED OLD LINKAGE-LOADER COMMAND(S):¶
Page 185¶
The Commands in Alphabetical Order¶
Mode: Linker-Serv¶
Command: SET-FORMAT¶
With this command you can specify the default number system to be used by the Linker. (This applies both to the input to the Linker and the output it produces.)
No
Parameter name and explanation
1
<Format type: Default, Octal, Decimal, Hexadecimal> Optional parameter. Number system to be used. The value DEFAULT means reset to the standard default number system.
The standard default number system is octal for addresses and decimal everywhere else.
None
Page 186¶
Mode: Linker-Serv¶
Command: SET-HEAP-SIZE¶
EXPLANATION¶
PARAMETERS¶
No.
Parameter name and explanation
1
<Symbol table size (in pages)>
Initial value is 256 pages. The default value is the same.
2
<NRF handler heap size (in pages)>
Optional parameter. Specify the size of the heap to be used by the NRF library handler. Initial value is 128 pages. Default is initial value.NOTES¶
EXAMPLE¶
SET-ADVANCED-MODE
NDL(AOV): LINKER-SERVICE-PROGRAM
- ND LINKER 'S ← SERVICE PROGRAM -
NDL(SRV): SET-HEAP-SIZE
Symbol Table size (in pages): 1000
NRF handler heap size (in pages): 10
NDL(SRV): EXIT
Page 187¶
The Commands in Alphabetical Order¶
% of 1000 pages and NRF-handler heap size of 10 pages.
NDL(ADV): OPEN-DOMAIN-“MY-DOMAIN”
NDL(ADV): LOAD FORTRAN-PROG
| Program: | ........344B P01 | Data: | ..........234B D01 |
|----------|------------------|-------|--------------------|
NDL(ADV): CLOSE
NDL(ADV): LINKER-AUTO-FORT:JOB
% --> FORTRAN Auto Job: Trap definition part.
% --> FORTRAN Auto Job: Link/load part. Related Old Linkage-Loader Command(s):¶
Page 188¶
SET-HIGH-ADDRESS¶
Command: SET-HIGH-ADDRESS¶
EXPLANATION:¶
PARAMETERS:¶
No.
Parameter name and explanation
1
\<Address or entry>
Default is the highest possible address within a segment, i.e. 777 777 777B.
2
\<Segment type (D,P,PD)>
Default is D, that is, a data segment.NOTES:¶
RELATED OLD LINKAGE-LOADER COMMAND(S):¶
Page 189¶
THE COMMANDS IN ALPHABETICAL ORDER¶
Mode: Advanced¶
Command: SET-IO-BUFFERS¶
This command specifies a number of input/output buffers for more efficient handling of sequential files in FORTRAN.
Should be used only when the FORTRAN library is loaded to the current segment.
No.
Parameter name and explanation
1
\<Number of buffers>
When the current domain or segment is closed, two system references (#END_FIOB and #FIO_BUF) will be defined at the lower and upper limits of the buffer area. The current load address will be increased by the size of the buffer area. The total size of all buffers will be \<number>*2048 bytes.
SET-IO-BUFFERS \<No. of buffers>
Page 190¶
Command: SET-LIBRARY¶
EXPLANATION:¶
PARAMETERS:¶
No.
Parameter name and explanation
1
NOTES:¶
EXAMPLE:¶
NDL(NLH): SET-LIBRARY↵
File name: cases↵
Symbol already defined : "case_TO_CASE"
*** Nameless module at 106B, given name is "NONAME#1" (1000:23)
Symbol already defined : "case_TO_CASE"
*** Nameless module at 214B, given name is "NONAME#2" (1000:23)
Symbol already defined : "CASE_TO_CASE"
*** Nameless module at 275B, given name is "NONAME#3" (1000:23)
NDL(NLH): SET-CASE-SIGNIFICANCE↵
Case significance (Yes, No): YES↵
NDL(NLH): SET-LIBRARY↵
File name: ↵ (PACK-FOUR-6799:MICKE-TEST)CASES:NRF:1
RELATED OLD LINKAGE-LOADER COMMAND(S):¶
Page 191¶
THE COMMANDS IN ALPHABETICAL ORDER¶
Mode: Advanced¶
Command: SET-LIST-MODE¶
This command is for listing all that is written on the output device, in octal format or disassembled format, as it is being read from the NRF file. It also gives the Current Location Counter.
This command is for internal debugging. It is used for finding out exactly what the Linker reads from the NRF file before the NRF code is interpreted, and before the result is put in the DOM/SEG file.
No.
Parameter name and explanation
1
<Listing (Yes,No)> Optional parameter. YES turns the listing mode on, NO turns it off again. Default: YES.
2
<Disassemble (Yes,No)> Optional parameter. Default: YES. NO gives octal listing.
In the event of an error, you can check whether the Linker has misinterpreted the NRF control byte, or whether a compiler has produced erroneous NRF code.
LIST-MODE
Page 192¶
SET-LOAD-ADDRESS¶
Explanation¶
Parameters¶
No.
Parameter name and explanation
1
<Address or entry> If no segment number is included in the address, the address is interpreted as a relative address within the current program or data segment. Default is to start loading at the next page boundary (i.e. the address is the next multiple of 4000B).
2
<Segment type (D,P,PD)> Default is D, that is, a data segment.Notes¶
Example¶
% If you wish to fix some routines in physical memory, these should
% start at a page boundary to minimize the number of pages
% fixed. If you have a routine that disables process switching, (using
% solo/tutti instructions) you must be sure no page fault will occur
% in this critical region. One way of doing this, without fixing pages
% in physical memory, is to load the routine to a single page by using
% this command. Of course, this will work only if your routine does not
% exceed one page, and does not access data pages that can cause page
% faults.
Page 193¶
The Commands in Alphabetical Order¶
| Program: | 334B P01 | Data: | 234B D01 |
| Program: | 4000B P01 | Data: | 4000B D01 |
| Program: | 4104B P01 | Data: | 4034B D01 |Related Old Linkage-Loader Command(s):¶
<address> <P/D/C> (<P/D>)
Page 194¶
THE COMMANDS IN ALPHABETICAL ORDER¶
Mode: Advanced¶
Command: SET-SEGMENT-LIMITS¶
EXPLANATION:¶
PARAMETERS:¶
No.
Parameter name and explanation
1
<Domain or segment name>
Name of a domain or segment containing the segment to be fixed in memory. Default is current domain or segment.
2
<Segment number>
You only need to specify this in the case of a slave segment. Default for free segments is the segment number of the free segment specified in parameter 1. Default for slave segments is segment number 1.
3
<Segment type (D,P)>
P indicates a program segment, D indicates data segment. Default is P.
4
<Minimum number of pages>
The minimum number of pages of the specified segment that will remain in memory during execution. Default is 0 (zero).
5
<Maximum number of pages>
The maximum number of pages of the specified segment that may be in memory at any one time during execution. Default is one.NOTES:¶
Page 195¶
The Commands in Alphabetical Order¶
Related Old Linkage-Loader Command(s):¶
<segment name> <P/D> <minimum> <maximum>
Page 196¶
Command: SET-SEGMENT-NUMBER¶
EXPLANATION:¶
PARAMETERS:¶
No.
Parameter name and explanation
1
\<Segment number>
0:31. Default is the lowest unused segment number - starting with 1.
2
\<Segment type (PD,P,D)>
Optional parameter. P means program segment. D means data segment. Default is PD (program and data segments).
3
\<Segment attribute>. \<...>
Optional parameter. The possible attributes are listed under the OPEN-SEGMENT command.
EXAMPLE:¶
% and the subroutines on segment number 12B.
NDL: SET-ADVANCED-MODE
NDL(ADV): OPEN-DOMAIN 'MY-DOMAIN'
NDL(ADV): LOAD TEST
Program:.......302B P01 Data:.............230B D01
% Main program TEST is loaded into segment number 1 in MY-DOMAIN.SET-SEGMENT-NUMBER 10 PD
NDL(ADV): LOAD MEAN MAX
Program:.........26B P12 Data:............150B D12
Program:.........57B P12 Data:............314B D12
Program:.........4B P12 Data:.............4B D12
% Subroutines MEAN and MAX are loaded into segment number 10 in MY-DOMAIN.CLOSE
NDL(ADV): LINKER-AUTO-FORT:JOB
% --> FORTRAN Auto Job: Trap definition part.
% --> FORTRAN Auto Job: Link/load part.
Page 197¶
THE COMMANDS IN ALPHABETICAL ORDER¶
NOTES:¶
RELATED OLD LINKAGE-LOADER COMMAND(S):¶
<segment number>
Page 198¶
Mode: Linker-Serv¶
Command: SET-SEGMENT-SIZE¶
EXPLANATION¶
USAGE¶
PARAMETERS¶
No.
Parameter name and explanation
1
<Segment number> You can specify ALL. Default is 1 if a domain or segment file is open, otherwise the default is ALL.
2
<Program size (in pages)> Number of pages for the program segment. Initial and default values are as specified in the table below.
3
<Data size (in pages)> Number of pages for the data segment. Initial and default values are as specified in the table below.
Page 199¶
The Commands in Alphabetical Order¶
Domain
Segment
P 1024 (10 000 000B)
2048 (20 000 000B)
D 16386 (200 000 000B)
59388 (717 760 000B)*1
Example:¶
% 1. To load beyond address 10 000 000B on the program segment of a domain.
% 2. To fit more than three slave segments on the domain.
NDL(ADV): LINKER-SERVICE-PROGRAM↵
- ND LINKER'S - SERVICE-PROGRAM -
NDL(SRV): SET-SEGMENT-SIZE 1 2048↵
% Here we have already given away 1024 pages in the previous command.
NDL(SRV): SET-SEGMENT-SIZE 4, 9212↵
NDL(ADV): SET-SEGMENT-NUMBER 1, ↵
Program:........4B P01 Data:............4B D01
NDL(ADV): LOAD LOTS-OF-ROUTINES↵
Program:...13221302B P01 Data:.......711002308 D01
% (The previous command eats disk space, have you considered using
% empty-data-segment for uninitialized data? Fortunately, pages in
% uninitialized arrays are not allocated on disk - except on the swap file.)
NDL(ADV): SET-SEGMENT-NUMBER 2,↵
Program:.........4B P02 Data:..............4B D02
NDL(ADV): LOAD ROUTINE-2↵
Program:........302B P02 Data:............230B D02
NDL(ADV): SET-SEGMENT-NUMBER 3,↵
Program:.........4B P03 Data:..............4B D03
NDL(ADV): LOAD ROUTINE-3↵
Program:........302B P03 Data:............230B D03
NDL(ADV): SET-SEGMENT-NUMBER 4,↵
Program:.........4B P04 Data:..............4B D04
NDL(ADV): LOAD ROUTINE-4
Program:........302B P04 Data:............230B D04
NDL(ADV): CLOSE↵
NDL(ADV): LINKER-AUTO-FORT:JOB
% ↔ - FORTRAN Auto Job: Trap definition part.
% ↔ - FORTRAN Auto Job: Link/load part.
Page 200¶
Notes¶
Related Old Linkage-Loader Command(s):¶
<program-segment(bytes)> <data segment(bytes)>
Page 201¶
THE COMMANDS IN ALPHABETICAL ORDER¶
Mode: Advanced¶
Command : SET-START-ADDRESS¶
EXPLANATION:¶
PARAMETERS:¶
No.
Parameter name and explanation
1
<Address or entry>
This parameter has no default value.
RELATED OLD LINKAGE-LOADER COMMAND(S):¶
Page 202¶
Mode: Advanced¶
Command: SET-TRAP-CONDITION¶
This command sets up a trap handler address vector, and defines the trap enabling registers.PARAMETERS:¶
No.
Parameter name and explanation
1
<Trap destination (Own,Mother,Child)>
Specifies whether the OTE, MTE, or CTE register pair should be affected. Default is Own.
2
<Enable or disable (Enable,Disable)>
Specifies whether the bits corresponding to the traps given in parameter 4 should be set (enable) or reset (disable) in the specified register pair. Default is Enable.
3
<Entry name>
Specify the routine you want to use as trap handler for the traps given in parameter 4. You can specify your own routine or one from EXCEPT-LIB. Default is the appropriate routine in EXCEPT-LIB for each trap listed in parameter 4. This parameter is omitted (not just left empty) if parameter 1 is Mother or parameter 2 is Disable.
4
<Trap name>...<Trap name>
List of traps affected, or ALL. The trap names are listed below.
This command causes the trap definition part of the LINKER-AUTO job to be skipped. If you want to define one trap condition to be different from the default defined in the LINKER-AUTO job, you should include the entire set-trap-condition part of the LINKER-AUTO job in your mode or job file. You may find it convenient to first call the LINKER-AUTO job explicitly, then set the particular trap condition.
Page 203¶
THE COMMANDS IN ALPHABETICAL ORDER¶
Ignorable traps:¶
Code
Description
9D
OVERFLOW
11D
INVALID-OPERATION
12D
DIVIDE-BY-ZERO
13D
FLOATING-UNDERFLOW
14D
FLOATING-OVERFLOW
15D
BCD-OVERFLOW
16D
ILLEGAL-OPERAND-VALUE
17D
SINGLE-INSTRUCTION-TRAP
18D
BRANCH-TRAP
19D
CALL-TRAP
20D
BREAKPOINT-INSTRUCTION-TRAP
21D
ADDRESS-TRAP-FETCH
22D
ADDRESS-TRAP-READ
23D
ADDRESS-TRAP-WRITE
24D
ADDRESS-ZERO-ACCESS
25D
DESCRIPTOR-RANGE
26D
ILLEGAL-INDEX
27D
STACK-OVERFLOW
28D
STACK-UNDERFLOW
29D
PROGRAMMED-TRAP
Non-ignorable traps:¶
Code
Description
30D
DISABLE-PROCESS-SWITCH-TIMEOUT
31D
DISABLE-PROCESS-SWITCH-ERROR
32D
INDEX-SCALING-ERROR
33D
ILLEGAL-INSTRUCTION-CODE
34D
ILLEGAL-OPERAND-SPECIFIER
35D
INSTRUCTION-SEQUENCE-ERROR
Page 204¶
36D PROTECT-VIOLATION¶
Fatal traps:¶
Own Enabled
Own Disabled
Mother Enabled
Handle here
Propagate to mother
Mother Disabled
Handle here
Report to monitor
Page 205¶
THE COMMANDS IN ALPHABETICAL ORDER¶
3) Ignorable trap originating in the current domain:¶
Own Enabled
Own Disabled
Mother Enabled
Handle here
Propagate to mother
Mother Disabled
Handle here
Ignore
4) Non-ignorable trap originating in a child domain and propagated to the current domain:¶
Child Enabled
Child Disabled
Mother Enabled
Handle here
Propagate to mother
Mother Disabled
Handle here
Report to monitor
5) Ignorable trap originating in a child domain and propagated to the current domain:¶
Child Enabled
Child Disabled
Mother Enabled
Handle here
Propagate to mother
Mother Disabled
Handle here
Ignore
EXAMPLE:¶
LOAD FORTRAN-LIB EXCEPT-LIB
SET-IO-BUFFERS
MY-TRAP-HANDLERS:JOB
CLOSE N N
MESSAGE file: MY-TRAP-HANDLERS:JOB
Page 206¶
The Commands in Alphabetical Order¶
Command
Status
Description
SET-TRAP-CONDITION OWN, ENAB, #INVALD, DIVIDE-BY-ZERO
SET-TRAP-CONDITION OWN, ENAB, #FLTOFLW, FLOATING-OVERFLOW
SET-TRAP-CONDITION OWN, ENAB, #ILLOPER, ILLEGAL-OPERAND-VALUE
SET-TRAP-CONDITION OWN, ENAB, #ILLINDX, ILLEGAL-INDEX
SET-TRAP-CONDITION OWN, ENAB, #STKOFLO, STACK-OVERFLOW
SET-TRAP-CONDITION OWN, ENAB, #STKUFLW, STACK-UNDERFLOW
SET-TRAP-CONDITION OWN, ENAB, #PROGTRA, PROGRAMMED-TRAP
SET-TRAP-CONDITION OWN, ENAB, #DISPSWT, DISABLE-PROCESS-SWITCH-TIMEOUT
SET-TRAP-CONDITION OWN, ENAB, #DISPSWE, DISABLE-PROCESS-SWITCH-ERROR
SET-TRAP-CONDITION OWN, ENAB, #INXSCAL, INDEX-SCALING-ERROR
SET-TRAP-CONDITION OWN, ENAB, #ILLINCOD, ILLEGAL-INSTRUCTION-CODE
SET-TRAP-CONDITION OWN, ENAB, #ILLOPSPE, ILLEGAL-OPERAND-SPECIFIER
SET-TRAP-CONDITION OWN, ENAB, #INSEQUE, INSTRUCTION-SEQUENCE-ERROR
SET-TRAP-CONDITION OWN, ENAB, MYPV, PROTECT-VIOLATION
% Replaced by my own traphandler:
% SET-TRAP-CONDITION OWN, ENAB, #PVIOLAT, PROTECT-VIOLATION
Example 1: Enabling a Trap¶
SET-TRAP-CONDITION OWN, ENAB, MYPV, PROTECT-VIOLATION
% Traphandling section is not skipped when the job is called explicitly.
% Expect one error message
it can be ignored:
(SYSTEM)LINKER-AUTO-FORT:JOB
CLOSE
Example 2: Disabling a Trap¶
(SYSTEM)LINKER-AUTO-FORT:JOB
SET-TRAP-COND OWN DISABLE DIVISION-BY-ZERO
CLOSE
Page 207¶
The Commands in Alphabetical Order¶
Mode: Advanced
Command : SPECIAL-DEFINE
Explanation¶
Parameters¶
No.
Parameter name and explanation
1
\<Segment name>
Specify the free segment the entry definitions should be taken from. No default value.
2
\<Definition type (Library, Total, Select, Omit)>
Decides which entries on \<segment name>, should be copied to the symbol table. Default is LIBRARY. The selection criteria are similar to those for SPECIAL-LINK:
Library: Only the entries on \<segment name> which are referred to will be copied into the symbol table.
Total: All entries will be copied.
Select: Only entries explicitly specified will be copied.
Omit: All defined entries, excluding those specified, will be copied.
Page 208¶
Example¶
NDL: SET-ADVANCED-MODE-
NDL(ADV): OPEN-DOMAIN 'LINK-TO-COBOL'-
NDL(ADV): LOAD MY-ROUTINES:NRF-
Program: ........344B P12 Data: ........234B D12
% Establish the link and access symbols in the routine vector:
NDL(ADV): LINK COBOL-LIB-J03-
% Access symbols outside the routine vector:
NDL(ADV): SPECIAL-DEFINE COBOL-LIB-J03 LIBRARY-
NDL(ADV): CLOSE- Related Old Linkage-Loader Command(s):¶
Page 209¶
THE COMMANDS IN ALPHABETICAL ORDER¶
Command: SPECIAL-LINK¶
EXPLANATION:¶
PARAMETERS:¶
No.
Parameter name and explanation
1
<Segment name> Name of the free segment to be linked.
2
<Link type (Library, Total, Select, Omit)> Default is LIBRARY.
3
<Entry>...<Entry> No default value. You are prompted for this parameter only if the option chosen in parameter 2 was SELECT or OMIT.NOTES:¶
EXAMPLE:¶
NDL(ADV): SPECIAL-LINK NOTIS-WP LIBRARYRELATED OLD LINKAGE-LOADER COMMAND(S):¶
LIBRARY-SEGMENT-LINK <segment name>
Page 210¶
SPECIAL-LOAD¶
EXPLANATION¶
USAGE¶
PARAMETERS¶
No.
Parameter name and explanation
1
<File name>
Name of an NRF file to be loaded.
2
<Load type (Library,Total,Select,Omit)>
Default is LIBRARY.
3
<Entry>...<Entry>
No default value. You are prompted for this parameter only if the option chosen in parameter 2 was SELECT or OMIT.
NOTES¶
Page 211¶
THE COMMANDS IN ALPHABETICAL ORDER¶
RELATED OLD LINKAGE-LOADER COMMAND(S):¶
<file name><file name><file name> <entry>...<entry><file name> <entry>...<entry>
Page 212¶
The Commands in Alphabetical Order¶
Mode: Standard
Command: %
Explanation¶
Usage¶
Parameters¶
Related Old Linkage-Loader Command(s)¶
Page 213¶
The Commands in Alphabetical Order¶
Mode: Standard
Command : a
Explanation:¶
Parameters:¶
Notes:¶
Page 214¶
Page 215¶
APPENDIXES¶
Page 216¶
Page 217¶
APPENDIX A¶
A SUMMARY OF THE LINKER COMMANDS¶
COMMANDS AVAILABLE IN THE STANDARD MODE:¶
COMMAND
PARAMETER
DEFAULT VALUE
CLOSE
Load map (No, Yes)
NO
Perform Auto Job/Linker Job (Yes, No)
YES
Output file
Terminal
EXIT
LIST-DOMAINS
Domain name
All files of type DOM on a specified user area
Output file
Terminal
LIST-ENTRIES
Entry selection (Undefined, Defined, All)
UNDEFINED
Order (Numerical, Alphabetical)
NUMERICAL
Entry type (All, User, Entry)
ALL
Entry name
Output file
Terminal
LIST-STATUS
Domain or segment name
Default type is DOM
Output file
Terminal
LOAD
File name
No default file name
Default file type is NRF
OPEN-DOMAIN
Domain name
No default domain name
Domain Privileges
NOT-#PRIVILEGED-INSTRUCTION-ALLOWED and ENABLE-ESCAPE
SET-ADVANCED-MODE
Advanced mode on (Yes, No)
YES
@ (command)
% (comment)
Page 218¶
COMMANDS AVAILABLE IN THE ADVANCED MODE¶
COMMAND
PARAMETER
DEFAULT VALUE
ABORT-BATCH-ON-ERROR
Batch abortion (Yes, No)
YES (Initial value NO)
APPEND-DOMAIN
Domain name
No default file name
Domain privileges
Default file type DOM ENABLE-ESCAPE
APPEND-SEGMENT
Segment name
No default file name
Segment attributes
Default file type SEG No change in existing attributes
CREATE-ROUTINE-VECTOR
Number of routines
64
DEFINE-ENTRY
Entry name
No default value
Address or entry
Default is 0 (zero)
Entry type (P, D)
Default is P
DEFINE-FORTRAN-COMMON
Entry name
No default value
Length in bytes
See command descript.
Address or entry
Data Cur. Loc. Counter
DELETE-ENTRIES
Entry name
FIX-SEGMENT
Fix type (Contiguous, Scattered, Absolute, Unfix)
CONTIGUOUS
Domain or Segment name
No default value
Segment number
Current segment number
Segment type (D, P)
For slave segments 1 Default is D
Low address
Lowest addr. on seg.
High address
Highest addr. on seg.
Physical address
No default value
IGNORE-DEBUG-INFORMATION
Ignore (Yes, No)
YES
INCLUDE-IN-ROUTINE-VECTOR
Entry name
No default value
Index in vector
Last used plus one
LINK
Segment name
No default value
Page 219¶
A Summary of the Linker Commands¶
COMMAND
PARAMETER
DEFAULT VALUE
LINK-RT-PROGRAMS
LINKER-SERVICE-PROGRAM
LIST-SEGMENTS
Segment name
Files of type :SEG
Output file
TERMINAL
MATCH-RT-SEGMENT
Segment name or number
No default value
NRF-LIBRARY-HANDLER
File name
No default value
OPEN-SEGMENT
Segment name
No default file name.
Def. file type is SEG
Segment number
Default is 1
Segment type (PD,P,D)
Default is PD
Segment attributes
See OPEN-SEGMENT
REFER-ENTRY
Referred entry name
No default
Address of reference
Default is 0
Entry type of referred entry (P,D)
Default is P
Reference in program or data segment (P,D)
Same value as para. 3
RELOAD
File name
No default file name.
Def. file type is NRF
RESET-LINKER
SAVE-ENTRIES
Entry name
All
SET-COMPUTER
Computer type (ND-500,MC68000)
Default is ND-500
SET-HIGH-ADDRESS
Address
777 777 777B
Segment type (D,P,PD)
Default is D
SET-IO-BUFFERS
Number of buffers
Default is 16
SET-LIST-MODE
Listing (Yes,No)
YES
Disassemble (Yes,No)
YES
SET-LOAD-ADDRESS
Address or entry
Next multiple of 4000B
Segment type(D,P,PD)
Default is PD
Page 220¶
A Summary of the Linker Commands¶
COMMAND
PARAMETER
DEFAULT VALUE
SET-SEGMENT-LIMITS
Domain or segment name
Segment number
Segment type (D,P)
Minimum number of pages
Maximum number of pagesNo default value
Current segment number
For slave segment, 1
Default is 0
Default is 1
SET-SEGMENT-NUMBER
Segment number
Segment type (PD,P,D)
Segment attributesPrevious seg. no. + 1, starting with 1
Default is PD.
SET-START-ADDRESS
Address or entry
No default value. Def. number system is octal
SET-TRAP-CONDITION
Trap destination (Own,Mother,Child)
Enable or disable (Enable,Disable)
Entry name
Trap nameOWN
ENABLE
Default: relevant value in EXCEPT-LIB
No default
SPECIAL-DEFINE
Segment name
Definition type (Library,Total, Select,Omit)
Entry nameNo default value
LIBRARY
No default value
SPECIAL-LINK
Segment name
Link type (Library,Total, Select,Omit)
Entry nameNo default value
Default is LIBRARY
No default value
SPECIAL-LOAD
File name
Load type (Library,Total, Select,Omit)
Entry nameNo default value
Default is LIBRARY
No default value
Page 221¶
A summary of the Linker commands¶
COMMANDS AVAILABLE IN THE LINKER-SERVICE-PROGRAM MODE¶
COMMAND
PARAMETER
DEFAULT VALUE
CHANGE-FILE-REFERENCES
Domain or segment name
Old name string
New name string
New link keyCurrent dom. or seg.
No default value
Default is old name string
Default is unchanged
CHANGE-LINK-LOCK
Domain or segment name
New link lockCurrent domain or segment
UNIVERSAL link lock
COMPRESS
Domain or segment name
Include debug information (Yes,No)
Include link information (Yes,No)
Create contiguous file (Yes,No)
Work file nameNo default value
YES
YES
NO
XQQADZYYWA1JQFXQ:QQZP
EXIT
INSERT-MESSAGE
Domain or segment name
MessageNo default value
No default value
SET-AREA-SIZE
Debug area size (in pages)
Link area size (in pages)Default is 1024
Default is 1024
SET-FORMAT
Format type (Octal, Decimal, Hexadecimal, Default)
Default
SET-HEAP-SIZE
Symbol table size (in pages)
NRF Handler heap size (in pages)Default is 256
Default is 128
SET-SEGMENT-SIZE
Segment number
Program size (in pages)
Date size (in pages)Default is 1.
Default is 1024
Default is 16384
Page 222¶
Commands Available in the NRF-Library-Handler Mode¶
COMMAND
PARAMETER
DEFAULT VALUE
DELETE-DEBUG-INFORMATION
First module
Last module
Entry type (PD,P,D)First module
Last module
PD
DELETE-MODULES
First module
Last module
Entry type (PD,P,D)No default
First module
PD
EXIT
FORCE-LIBRARY
Symbols defined by LIB
Symbols defined by DEF
Symbols defined by DDF
Blockdata/Common (Yes,No)YES
YES
YES
YES
GET-MODULES
Source file
First module
Last module
After module
Entry type (PD,P,D)No default value
First module in source file
Last module in current lib.
PD
INSERT-MESSAGE
Message
Before module
Entry type (PD,P,D)No default value
First module in file
PD
LIST-MODULES
File name
Modules
Entry type (PD,P,D)Current NRF library file
PD
LIST-NRF
File name
First module
Last module
Entry type (PD,P,D)
Computer (ND500,MC68000)Current NRF library file
First module in file
Last module in file
PD
Default is ND500
LIST-STATUS
Complete (Yes,No)
YES
Page 223¶
A Summary of the Linker Commands¶
COMMAND
PARAMETER
DEFAULT VALUE
PREPARE-LIBRARY
Prepare (Yes, No)
YES
REPLACE-MODULES
Source file
No default. File type :NRF
SAVE-LIBRARY
File name
Current NRF library file
SET-CASE-SIGNIFICANCE
Case significance (Yes, No)
YES
SET-LIBRARY
File name
Current NRF library file
Page 224¶
Appendix B¶
From Old Linkage-Loader to Linker Commands¶
Old Command
New Command
ABORT-BATCH-ON-ERROR OFF
% Omit, this is initial value.
% Parameters are YES/NO now.
APPEND-NRF-MODULE NLH
GET-MODULES
APPEND-SEGMENT
APPEND-SEGMENT
APPEND-SEGMENT
% To open first slave segment, APPEND-DOMAIN
% to open other slave segments, SET-SEGMENT-NUMBER
% to open a free segment, APPEND-SEGMENT
CC
% Use % anywhere on a line.
CHECK-SYNTAX-MODE
CLEAR-DOMAIN
% Omit, delete the file, or use OPEN-DOMAIN
CLEAR-SEGMENT
% Omit, delete the file, or use OPEN-SEGMENT
CLOSE-SEGMENT
CLOSE
COMMON-SEGMENT-APPEND
APPEND-SEGMENT
COMMON-SEGMENT-CLOSE
CLOSE % The domain will be closed too, you can continue loading to the domain with APPEND-DOMAIN, LINK
COMMON-SEGMENT-NUMBER 10
OPEN-SEGMENT XX 8 D FORTRAN-COMMON
COMMON-SEGMENT-OPEN XX,,
% Two old commands combined into 1.
% Default is now decimal.
SET-COMPUTER
SET-COMPUTER
Page 225¶
From Old Linkage-Loader to Linker Commands¶
Command
Description
DATA-REFERENCE ARR,,P
REFER-ENTRY ARR,,D P % 4 parameters
DEFINE-COMMON
DEFINE-FORTRAN-COMMON
DEFINE-ENTRY
DEFINE-ENTRY
DEFINE-SEGMENT-NUMBER
SET-SEGMENT-NUMBER
% Or 2nd par. of OPEN-SEGMENT.
DEFINE-SEGMENT-SIZE
SRV SET-SEGMENT-SIZE
DELETE-AUTO-LINK-SEGMENT
% Remove a :JOB file from user SYS
DELETE-AUTO-LOAD-FILE
% Remove a :JOB file from user SYS
% or use
CLOSE N N % when you are finished
% C & PASCAL does not need this
% routinely, as each lang. has
% separate autojob
DELETE-DOMAIN
@DELETE-FILE
DELETE-NRF-MODULES
NLH DELETE-MODULES
DELETE-SEGMENT
@DELETE-FILE
END-DOMAIN
CLOSE
ENTRY-ROUTINES 200
CREATE-ROUTINE-VECTOR 200
INSERT-IN-ROUTINE-VECTOR ENTRY1 0
INSERT-IN-ROUTINE-VECTOR ENTRY2 1
...
...
EXIT
EXIT
FETCH-NRF-MODULES
NLH GET-MODULES
FIX-SEGMENT-ABSOLUTE
% Example:
FIX-SEGMENT ABS XX 10 D 1 3777 1000000000
% Parameter 3 in the old command,
% phys. addr., is now last
FIX-SEGMENT-CONTIGUOUS
FIX-SEGMENT CON XX 10 D 1 100000
FIX-SEGMENT-SCATTERED
FIX-SEGMENT SCATT XX 10 D
FORCE-SEGMENT-LINK
LINK % Normally, included
% segments need not be linked.
GLOBAL-ENTRIES
% Use SAVE-ENTRIES or
% CREATE-ROUTINE-VECTOR &
INCLUDE-IN-ROUTINE-VECTOR
HELP
% Use SHIFT + HELP keys, or
% command name + HELP for more info
Page 226¶
From Old Linkage-Loader to Linker Commands¶
Command
Description
HIGH-ADDRESS
SET-HIGH-ADDRESS
% There is no C seg. type, use full addr., e.g. 26000015000B instead of 15000B.
INSERT-NRF-MESSAGE
NLH INSERT-MESSAGE
KILL-ENTRIES ...
DELETE-ENTRIES ...,/,ALL
% (Include the slash)
LIBRARY-SEGMENT-LINK XX
SPECIAL-LINK XX LIBRARY
LIBRARY-SEGMENT-LOAD XX
SPECIAL-LOAD XX LIBRARY
LINK-RT-PROGRAM
LINK-RT-PROGRAMS
LINK-SEGMENT
LINK
% or SPECIAL-LINK NOTIS-WP LIBRARY
% to avoid "redefinition ignored".
LIST-AUTO-LINK-SEGMENTS
% Edit Auto Jobs/Linker Job
LIST-AUTO-LOAD-FILE
% Edit Auto Jobs/Linker Job, e.g.
% type (dir)filename and press <>
LIST-DOMAIN
LIST-DOMAINS, @LIST-FILE :DOM,,
% or type :DOM and press the F3 key
LIST-ENTRIES-DEFINED ALPHA
LIST-ENTRIES,DEF,ALPHA,,,
LIST-ENTRIES-UNDEFINED
LIST-ENTRIES,UNDEF
LIST-MAP
CLOSE YES % or:
.
LIST-ENTRIES ALL,,,,
LIST-MODE
SET-LIST-MODE
LIST-NRF-CODE
LIST-NRF
LIST-NRF-ENTRIES
LIST-ENTRIES
LIST-OCTAL 0 200 D
SET-LIST-MODE YES NO
% The addresses cannot be specified
% Listing occurs during loading.
LIST-SEGMENT
LIST-SEGMENTS or @LIST-FILE :SEG,,
LIST-SYMBOLIC 0 200 D
SET-LIST-MODE YES YES
% The addresses cannot be specified.
LOAD-SEGMENT
LOAD
LOCAL-TRAP-DISABLE ALL
% SET-TRAP-CONDITION OWN DISABLE ALL
% Normally not used on free seg.s
LOCAL-TRAP-DISABLE DIV-BY-ZER
(SYSTEM)LINKER-AUTO-FORT:JOB
SET-TRAP-COND OWN DISABLE DIV-BY-ZER
% If Fortran, run autojob first
% to get default for other traps.
Page 227¶
From Old Linkage-Loader to Linker Commands¶
Example: LOCAL-TRAP-ENABLE MPV PROT-VIOL¶
Command
Description
SET-TRAP-CONDITION OWN,ENAB,MPV,PROT-VIOL
% If Fortran, run autojob first % to get default for other traps.
LOW-ADDRESS
SET-LOAD-ADDRESS
MATCH-COMMON-RT-SEGMENT
MATCH-RT-SEGMENT
MATCH-RTCOMMON
MATCH-RT-SEGMENT RTCOMMON
NEW-NRF-MODULES NLH
REPLACE-MODULES
OMITTED-SEGMENT-LOAD LIB ROUT
SPECIAL-LOAD LIB OMIT ROUT
OPEN-SEGMENT
% To open first slave segment,
OPEN-DOMAIN
% to open other slave segments,
SET-SEGMENT-NUMBER
% to open a free segment,
OPEN-SEGMENT
Other Commands¶
Command
Description
OUTPUT-FILE
% Typing file name and pressing % PRINT saves entire Linker session % up to now
SET-LOAD-ADDRESS,,P
PAGE-MODE P
PREPARE-NRF-LIBRARY-FILE NLH
PREPARE-LIBRARY
PROGRAM-REFERENCE FIB,,P
REFER-ENTRY FIB,,P % 4 par.
RELEASE-DOMAIN
% Never needed
RELOAD-SEGMENT
RELOAD
RENAME-DEFAULT-DIRECTORY-AND-USER SRV
CHANGE-FILE-REFERENCES
% Dir. name is not normally incl. % unless you specified it in LINK.
@RENAME-FILE + Possibly
RENAME-DOMAIN SRV
CHANGE-FILE-REFERENCES @RENAME-FILE + Possibly
RENAME-SEGMENT SRV
CHANGE-FILE-REFERENCES
% Be very careful about renaming % :SEG files, because there may be % many domains linked to them.
RESET
RESET-LINKER
RUN
SELECTED-SEGMENT-LOAD XX ENT
SPECIAL-LOAD XX SELECT ENT
SET-AUTO-LINK-SEGMENT
Edit Auto Jobs/Linker Job
SET-AUTO-LOAD-FILE
Edit Auto Jobs/Linker Job
SET-DOMAIN
Omit, see APPEND-S or OPEN-SEGMENT
SET-IO-BUFFERS
SET-IO-BUFFERS
SET-SEGMENT-LIMITS
SET-SEGMENT-LIMITS
SET-SEGMENT-NUMBER
SET-SEGMENT-NUMBER
SUPPRESS-DEBUG-INFORMATION
IGNORE-DEBUG-INFORMATION
SYSTEM-ENTRIES-ON
LIST-ENTRIES UNDEF,,ALL
LIST-ENTRIES-UNDEFINED
% One command replaces two.
Page 228¶
From Old Linkage-Loader to Linker Commands¶
Command
Action
SYSTEM-TRAP-DISABLE
SET-TRAP-CONDITION MOTHER DISABLE
SYSTEM-TRAP-ENABLE
SET-TRAP-CONDITION MOTHER ENABLE
TOTAL-SEGMENT-LOAD XX
SPECIAL-LOAD XX TOTAL
VALUE-ENTRIES
LIST-ENTRIES
WRITE-DOMAIN-STATUS
LIST-STATUS
% You get more info when a
% domain is closed.
WRITE-NRF-EOF-AFTER-MODULE
WRITE-SEGMENT-STATUS
LIST-STATUS
@
SET-ADVANCED-MODE
SRV
CHANGE-FILE-REFERENCES
SRV
CHANGE-LINK-LOCK
SRV
EXIT
SRV
SET-FORMAT
SRV
SET-AREA-SIZE
SRV
SET-HEAP-SIZE
NLH
DELETE-DEBUG-INFORMATION
NLH
EXIT
NLH
FORCE-LIBRARY
NLH
LIST-MODULES
NLH
LIST-NRF
NLH
LIST-STATUS
NLH
REPLACE-MODULES
NLH
SAVE-LIBRARY
NLH
SET-CASE-SIGNIFICANCE
NLH
SET-FORMAT
NLH
SET-LIBRARY
Page 229¶
Appendix C¶
This message indicates that the user specified a range of modules in reverse order.
The specified entries exist as both program and data entries in different modules. The user must specify entry type (P or D). The type specified is then the default type for all parameters of the command.
It was impossible to allocate the scratch segment needed for the heap.
For some reason the loading of the file specified in the command was aborted. The files previously loaded are still consistent, including the current library file.
For some reason the copying of modules to the current library file was aborted. The description of the current library file may be inconsistent and so this is a fatal error.
For some reason the loading of the specified file was aborted. The files previously loaded are still consistent, including the current library file.
For some reason the replacing of modules in the current library file was aborted. Its description may now be inconsistent, which means this is a fatal error.
An error impossible to correct occurred during execution.
Page 230¶
The NRF Library Handler Error Messages¶
An illegal NRF control number was found during loading. The file may be inconsistent or contain erroneously generated code.
The user pressed the HOME key () to abort a listing.
This message indicates that the current computer mode differs from the computer mode specified by the BEG control byte of the module to be listed. The NRF library handler, therefore, changed the computer mode according to the information given in the BEG control byte before continuing the execution of the command.
The entry could not be found or the file does not contain any entries at all.
The file does not contain any modules.
The heap is exhausted. It may be possible to save the current library file and then select it again, possibly after having increased the heap size with the SET-HEAP-SIZE command in the ND-Linker.
The specified file could not be found in the list of files of the current session.
The specified entry does not exist in the specified file.
Page 231¶
THE NRF LIBRARY HANDLER ERROR MESSAGES¶
The command was not executed and so no changes were made to the current library file.
The SAVE-LIBRARY command was executed on an empty description.
An attempt was made to refer to more than 20 files in the same session.
The NRF Library Handler knows about the ND-500(0) and the MC68000 only.
Error messages that imply INTERNAL fatal errors¶
Page 232¶
Appendix D¶
The ND Relocatable Format¶
Pointer
Description
PP
Program Byte Pointer. Used when the Linker is in program mode - PMO. PP points to the current load address in the program memory. You can refer to its value in commands to the Linker by using the symbol #PCLC.
DP
Data Byte Pointer. Used when the Linker is in data mode - DMO. DP points to the current load address in the data memory. You can refer to its value in commands to the linker as #DCLC. (Actually, there are two pointers, one for ordinary data, and one for common blocks. Common blocks are loaded using #CCLC - the Current Common Location Counter, provided that the user has opened a segment using the FORTRAN-COMMON-SEGMENT attribute. If no such segment is open, #DCLC is used for common blocks as well. The NRF control groups cannot address #CCLC directly. All NRF groups that use DP use #DCLC, except when loading common blocks.)
XP
Free Pointer. Used when the Linker is in free mode - FMO. XP points to an address in the same area as the Linker was in before entering this mode. The information given will now modify/overwrite the information at the address pointed to by XP.
BP
This pointer is the same as PP, DP, or FP, depending on the current mode.
Page 233¶
NRF-FORMAT DESCRIPTION¶
Control Field
Numeric Field
Symbolic Field
ctr. no. NL
numeric value
SL symbol name
mandatory
NL bytes (0 to 7)
when implied by ctr. no.
Example¶
Byte addr.
in NRF
file
0 1 2 3 4 5 6
304B 0 0 0 0 1 0
| | | | |
NL | | SL S
N |
LBB
Page 234¶
NRF Control-Groups Description¶
NUL 0¶
BEG 1¶
Language
Code
ASSEMBLY
0
FORTRAN
1
PLANC
2
COBOL
3
PASCAL
4
SIMULA
5
ADA
6
CORAL
7
C
8
BASIC
9
Target machine
Target machine type
0 = Norsk Data
0 = not used
1 = ND-500(0)
Page 235¶
The ND Relocatable Format¶
Value
Processor
1
Motorola
0
MC68000
1
MC68010
2
MC68020
3
MC68030
Value
Processor
2
Intel
0
INT8086
1
INT80186
2
INT80286
3
INT80386
Range
Operating System
0 - 9
ND-OS (SINTRAN-III)
10 - 19
UNIX.
20 - 29
MS-DOS.
END 2 End Module¶
MSA 3 Main Start Address¶
Page 236¶
THE ND RELOCATABLE FORMAT¶
LIB 4 (S) Library¶
NL=0
NL>0
PMO
Conditional P symbol. DEF must follow.
Conditional P symbol. DEF must follow.
Valid for all languages.
N ignored. Valid for all languages.
DMO
Not used
Common data block.
DDF should NOT follow.
N = size of data block.
Valid for all languages.
(Equiv. to (DDF,N) in C, Cobol, Fortran, Pascal)
Page 237¶
THE ND RELOCATABLE FORMAT¶
DEF 5 (S) Program Symbol Definition¶
REF 6 (S) Program Symbol Reference¶
LRF 7 (S) Library Reference¶
Page 238¶
DDF 10 (S) Data Symbol Definition¶
In the languages C, Cobol, Fortran, Pascal, the numeric
field is used to define common blocks. If the symbol is
already defined, no new block is allocated, and #CDLC (or DCLC) is not incremented.¶
NL=0
NL>0
PMO Not used
Not used
DMO Valid for all languages
C, Cobol, Fortran, Pascal:
common block of size N
All other languages:
N ignoredDRF 11 (S) Data Symbol Reference¶
A DRF group in debug mode is not a legal NRF sequence.RMV 12 (S) Remove Symbol¶
directive is used to prevent the symbol table from overflowing.
Language processors also use this directive to avoid name
conflicts between local symbols in different modules.SLA 13 (S) Set Load Address¶
BP = numeric value + value of the symbol.
If the symbol length = 0,
BP = numeric value.AJS 14 Adjust¶
Page 239¶
THE ND RELOCATABLE FORMAT¶
PMO 15¶
BP = PP = PP + numeric value.DMO 16¶
BP = DP = DP + numeric value.FMO 17 (S)¶
If the symbolic length ≠ 0,
BP = XP = numeric value + value of the symbol.
If the symbolic field = 0,
BP = XP = BP + numeric value.
The information is loaded in the area in use at the time.
PP and DP are left unmodified. The loading may be resumed from PP or DP by using PMO or DMO (these NRF groups may consist of a control field only).REP 20¶
The subsequent NRF group will be repeated the number of times specified by the numeric value.LDI 21¶
The NL trailing bytes are loaded into the current area, starting at (BP). BP is then incremented by NL.ADI 22¶
The numeric value is added into the NL next bytes of the current area, the first of which is pointed to by BP. BP is then incremented by NL.APA 23¶
The PP value + the numeric value is stored into the next four bytes.
BP = BP + 4.ADA 24¶
The DP value + the numeric value is stored into the next four bytes.
Page 240¶
THE ND RELOCATABLE FORMAT¶
Code
Description
IHB 25
Execution Inhibit.
The NRF is incomplete due to compiler errors.
EOF 26
End of File.
End of NRF file.
DBG 27
Debug.
Indicates the beginning or the end of debug information.
Debugging information is written into the debug and link area.
LBB 30 (S)
Library Module Byte pointer.
This code is used to make a fast load vector. The numeric field contains a pointer to the byte position in the NRF file of the module that defines the symbol in the symbolic field.
N=0, and S=(NUL) (i.e. SL=1, S=one zero byte) indicates the beginning of the fast load vector.
N=-1, and S=(NUL) (i.e. Sl=1, S=one zero byte) indicates the end of the fast load vector.
The fast load vector is processed in one or more passes. In each pass, if a symbol is referenced and not defined in the symbol table, the module is loaded.
If an entry in the fast load vector has N≠0 and no symbol, the module at address N in the NRF file is loaded unconditionally during the first pass.
If one or more modules are loaded during one pass, another pass is generated, until all references to symbols occurring in the fast load vector are satisfied. In this way references made in modules loaded through the fast load vector are also satisfied.
MSG 31 (S)
Message.
During loading, the ASCII string in the symbolic field is printed on the output device. The character $ (ASCII 36D) is converted to carriage return and line feed.
Page 241¶
MIS 32 Miscellaneous¶
Code
Num
Description
CGR0
0
Start of Compound Group.
A compound group is a sequence of control groups. Compound groups are mainly used with the control group REP. Any sequence of control groups may follow, up to the MIS CGR1 control group. Compound groups may be nested to any level.
CGR1
1
End of Compound Group.
If compound groups are nested, only the innermost nest is terminated. Each level of nesting requires a CGR1.
ADD
2
The symbol value of the next symbol (REF, LRF or DRF) is added to the location pointed to by BP. The size of the numerical value to be added is determined by NL of the reference.
BP should point to a value already loaded in either the program or the data segment. Free mode is used to set BP.
SUB
3
The symbol value of the next referenced symbol is subtracted from the location pointed to by BP.
MUL
4
The symbol value at the location pointed to by BP is multiplied by the next referenced symbol.
DIV
5
The symbol value at the location pointed to by BP is divided by the next referenced symbol.
LDN 33 Load (N) Bytes Immediately¶
IL1 34 Illegal Control Number¶
Page 242¶
THE ND RELOCATABLE FORMAT¶
IL3 36 Illegal control number.
IL4 37 Illegal control number.SUMMARY OF NRF-CONTROL NUMBERS¶
S: Symbolic Field
Control Number
Trailing Info.
Brief Description
0 NUL
N
Symbol ignored.
1 BEG
N
Beginning of module.
2 END
N
End of module.
3 MSA
N
Main start address.
4 LIB
N, S
Library.
5 DEF
N, S
Program symbol definition.
6 REF
N, S
Program reference.
7 LRF
N, S
Library reference.
10 DDF
N, S
Data symbol definition.
11 DRF
N, S
Data symbol reference.
12 RMV
N, S
Remove symbol.
13 SLA
N, S
Set load address.
14 AJS
N
Adjust.
15 PMO
N
Set program mode.
16 DMO
N
Set data mode.
17 FMO
N, S
Set free mode.
20 REP
N
Repeat.
21 LDI
N
Load immediately.
22 ADI
N
Add immediately.
23 APA
N
Add program address.
24 ADA
N
Add data address.
25 IHB
N
Execution inhibit (compiler errors).
26 EOF
N
End of file.
27 DBG
N
Debug.
30 LBB
N, S
Library module bytepointer.
31 MSG
N, S
Message.
Page 243¶
THE ND RELOCATABLE FORMAT¶
Miscellaneous¶
Code
Instruction
Description
32
MIS N
Miscellaneous.
0
GCRO
Start of compound group.
1
GCR1
End of compound group.
2
ADD
Add reference value.
3
SUB
Subtract reference value.
4
MUL
Multiply by referenced value.
5
DIV
Divide by referenced value.
33
LDN N
Load N Bytes immediately.
34
IL1
Illegal
35
IL2
Illegal
36
IL3
Illegal
37
IL3
Illegal
Page 244¶
APPENDIX E¶
THE NEW DOMAIN FORMAT¶
Page 245¶
The New Domain Format¶
Domain/Segment File Layout¶
Address
Domain File
Address
Segment File
00000000
DOMAIN HEADER (2 pages)
00000000
SEGMENT HEADER (2 pages)
00001000
00001000
00002000
DEBUG INFO (2MB)
00002000
DEBUG INFO (4MB)
01002000
LINK INFO (2MB)
02002000
LINK INFO (4MB)
02002000
PROGRAM 1.slave segment (2MB)
04002000
PROGRAM (4MB)
03002000
DATA 1.slave segment (32MB)
06002000
DATA
23002000
PROGRAM 2.slave segment (2MB)
24002000
DATA 2.slave segment (32MB)
44002000
PROGRAM 3.slave segment (2MB)
45002000
DATA 3.slave segment
EOF
EOF
Page 246¶
Summary of Domain and Segment Headers¶
Domain Header¶
Feature
Identification
Privileges
(Execute processor)
Mother domain
16 child domains
reserved, alignment area
Free byte pointer in name pool
Debug info boundaries
Link info boundaries
Start address (Restart address)
Trap block - THA, MTE, OTE, CTE, TEMM
(Process priority)
32 indirect segment defs
Source code language mask
Id message
64 segment defs - slave or linked segments
Name pool, fills the page
Segment Header¶
Feature
Identification
Prog & data segment defs
Prog & data logical segment no
No of N100 segments
10 shared N100 segment defs
reserved, alignment area
Free byte pointer in name pool
Debug info boundaries
Link info boundaries
Start address (Restart address)
Trap block - THA, MTE, OTE, CTE, TEMM
(Process priority)
32 indirect segment defs
Source code language mask
Id message
64 linked segments
Name pool
Page 247¶
The New Domain Format¶
Domain Header Layout¶
Octal Byte Number
Description
0000
Magic number. Link keys in other domains should match this lock.
0002
0004
Version/revision of ND-Linker used to generate this domain.
0006
0010
0012
0020
Domain privileges.
0030
0042
0044
0046
Field Details¶
Field
Explanation
*LINKLOCK
VERSION, REVISION
FLAGS, MACHINE
*OSId, reserved
(Subsystem key)
(6 bytes)
*PRIVILEGES
reserved
(10 bytes)
(Executing
processor)
Repeating Bytes¶
Octal Byte Number
Field
Explanation
0046
MIN index to name
Pointers to the first and last byte. The name itself is in the name pool.
0050
MAX index to name
0052
LINKKEY
This field should match the LINK LOCK in the corresponding domain.
0056
Page 248¶
The New Domain Format¶
Memory Segments¶
Address
Description
0266
not used (30 bytes)
Name Pool¶
Address
Description
0304
FREIND
0310
Free pointer in name pool (at 0306).
Debug Info¶
Address
Description
0314
LB
0320
SZ
D Lower bound of DEBUG info area within
E :DOM file.
B Size of DEBUG info area.
Link Info¶
Address
Description
0320
LB
0324
SZ
L Lower bound of LINK info area within
I :DOM file.
N Size of LINK info area.
Address Information¶
Address
Description
0330
K Start address.
0334
Restart address.
0340
THA Trap handler vector address.
Trap Enabling¶
Address
Description
0344
MTE2 Mother traps enabled. (Most)
0350
MTE1 Mother traps enabled. (Least)
0354
OTE2 Own traps enabled. (Most)
0360
OTE1 Own traps enabled. (Least)
0364
CTE2 Child traps enabled. (Most)
0370
CTE1 Child traps enabled. (Least)
0374
TEMM2 Trap enable modification mask. (Most)
0400
TEMM1 Trap enable modification mask. (Least)
Process Priority¶
Address
Description
0404
(PRIORITY)
Indirect Segments¶
Address
Description
0410
IN MIN MAX
Indexes to domain name in name pool.
0414
LINKKEY
Should match link lock of domain.
0420
SLOG E Logical segment number within domain.
G 0422
Page 249¶
THE NEW DOMAIN FORMAT¶
Source Language¶
1110
LANGUAGE res. MSAL
Source Language mask and MSA Language.
1114
Indexes to a free text in name pool.
MIN
MAX
---
---
reserved
Program Segment¶
disp
00B
LB
Lower bound of PROGRAM segment. (MIN/MAX indexes to name if ATT.LINKED)
04B
-------
SZ
Size of PROGRAM segment.
10B
----
-----
*ATT
R
(LINKKEY to link segment if ATT.LINKED)
14B
O
Attributes on segment.
-------
----
-----
G
FLA
Fixed lower address.
20B
S
-------
FUA
Fixed upper address.
24B
E
-------
----
-----
G
AFA
Absolute fix address.
30B
----
MINP
MAXP
MIN and MAX number of pages.
Data Segment¶
disp
34B
LB
Lower bound of DATA segment. (MIN/MAX indexes to name if ATT.LINKED)
40B
-------
SZ
Size of DATA segment.
44B
----
-----
*ATT
D
(LINKKEY to link segment if ATT.LINKED)
50B
A
Attributes on segment
-------
----
-----
T
FLA
Fixed lower address.
54B
A
-------
S
Fixed upper address.
54B
E
-------
G
60B
AFA
Absolute fix address.
-------
----
-----
64B
MINP
MAXP
Name Pool¶
disp
4524
NAME POOL
10000
Page 250¶
SEGMENT HEADER LAYOUT¶
Address
Description
0000
*LINKLOCK
0002
Magic number. Link keys should match this lock.
0004
VERSION
0006
REVISION
0008
Version/revision of ND-Linker used to generate this segment
0010
*FLAGS
0012
*MACHINE
0014
*OSId
0016
reserved
0020
(Subsystem key) (6 bytes)
Address
PROGRAM Segment
Description
0024
LB
Lower bound of PROGRAM segment.
0030
SZ
Size of PROGRAM segment.
0034
*ATT
Attributes of segment.
0040
FLA
Fixed lower address.
0044
FUA
Fixed upper address.
0050
AFA
Absolute fix address.
0054
MINP
MIN and MAX number of pages.
MAXP
Address
DATA Segment
Description
0060
LB
Lower bound of DATA segment.
0064
SZ
Size of DATA segment.
0070
*ATT
Attributes of segment.
0074
FLA
Fixed lower address.
0100
FUA
Fixed upper address.
0104
AFA
Absolute fix address.
0110
MINP
MIN and MAX number of pages.
MAXP
Page 251¶
THE NEW DOMAIN FORMAT¶
0110 | PR DA NOOFN100
0114
No. of matched ND-100 RT segments.0114 | N100SW (6 BYTES) | N
| T | 1 ND-100 segment name.
0120 | N100SNO | 0
| | 0 ND-100 segment number.
0124 | N500LOGPA N100SIZE | S
0130 | E Map address in ND-500(0) logical
| G memory (pages). ND-100 segment size
| (pages).
0304 | ALIGNMENT
| 0306 | To align common part for domain/
| segment header.
Page 252¶
The New Domain Format¶
Free Pointer in Name Pool¶
Address
Field
Description
0310
FREIND
Free pointer in name pool.
Debug Information¶
Address
Field
Description
0314
LB
Lower bound of DEBUG info area within SEG file.
0320
SZ
Size of DEBUG info area.
Link Information¶
Address
Field
Description
0324
LB
Lower bound of LINK info area within SEG file.
0330
SZ
Size of LINK info area.
Addresses¶
Address
Field
Description
0330
STADR
Start address.
0334
RESTADR
Restart address.
0340
THA
Traphandler vector address.
Trap Information¶
Address
Field
Description
0344
MTE2
Mother traps enabled. (Most)
0350
MTE1
Mother traps enabled. (Least)
0354
OTE2
Own traps enabled. (Most)
0360
OTE1
Own traps enabled. (Least)
0364
CTE2
Child traps enabled. (Most)
0370
CTE1
Child traps enabled. (Least)
0374
TEMM2
Trap enable modification mask. (Most)
0400
TEMM1
Trap enable modification mask. (Least)
Process Information¶
Address
Field
Description
0404
PRIORITY
Process priority.
Indirect Segments (Repeated for 32)¶
Address
Field
Description
0410
MIN, MAX
Indexes to domain name in name pool.
0414
LINKKEY
Link lock of indirect linked domain.
0420
SLOG res.
Logical segment number within domain.
Page 253¶
THE NEW DOMAIN FORMAT¶
*LANGUAGE
res.
*MSAL
1110
1114
MIN
MAX
1120
reseved
1124
MIN
MAX
1130
-
-
LINKKEY
1134
MIN
MAX
1130
-
-
LINKKEY
2124
NAME POOL
Page 254¶
DETAILED DESCRIPTION OF SOME OF THE FIELDS¶
LINKLOCK:¶
Random number
0000
0002
Future use
0004
FLAGS and MACHINE:¶
Target Machine¶
Target Machine
Target Machine Type
0 = Norsk Data
0 = not used
1 = ND-500(0)
1 = Motorola
0 = MC68000
1 = MC68010
2 = MC68020
3 = MC68030
2 = Intel
0 = INT8086
1 = INT80186
2 = INT80286
3 = INT80386
Machine Type and Description¶
Machine
0006
0010
8:10 Reserved
11 TrapBlock (TB) is valid.
12 TRUE if :DOM file
13 Root-domain. (Multidomain).
14 SIN-III domain.
15 TRUE if ND-500/5000 domain/segment (FALSE if other CPU domain, i.e. for the time being MC68000)
Page 255¶
THE NEW DOMAIN FORMAT¶
OSID - Operating System¶
0 - 9 ND-OS (SINTRAN-III)
10 - 19 UNIX
20 - 29 MS-DOS
PRIVILEGES¶
Privileged instruction allowed (ND use only, cannot place domain).
Future use.Future use
────────────────────────────────────────
Future use
────────────────────────────────────────
Future use
────────────────────────────────────────
Future use
0020
0022
0024
0026
0030
LANGUAGE and MSAL (Main Start Address Language)¶
31
16
15
8
7
0
Not Used
MSA Language
22 Basic
(BASC) = 9
23 C
(C) = 8
24 Coral
(COR) = 7
25 Ada
(ADA) = 6
26 Simula
(SIMU) = 5
27 Pascal
(PASC) = 4
28 Cobol
(COB) = 3
29 Planc
(PLNC) = 2
30 Fortran
(FORT) = 1
31 Assembler
(5ASM) = 0
Page 256¶
The New Domain Format¶
ATT:¶
Attribute
Range
Dummy attributes
0:5
System attributes
6:9
Fixed Seg. Absolute
10
Fixed Seg. Contiguous
11
Fixed Seg. Scattered
12
Segment used
13
Linked segment (*)
14
Routine vector
15
Insuff loaded segment
16
Bit
Description
17
Fortran common segment
18
Other machine segment
19
Start vector on segment
20
Indirect segment
21
Shared/matched with ND-100
22
Copy capability allowed
23
Clear capability allowed
24
Cache
25
File as segment
26
Empty data segment
27
Shared data segment
28
Program segment
29
Swap on swap file
30
Parameter access
31
Write permit
Page 257¶
The New Domain Format¶
Segment no:
Program
Data
Segment no:
Program
Data
0
1124B
1160B
16
2724B
2760B
1
1214B
1250B
17
3014B
3050B
2
1304B
1340B
18
3104B
3140B
3
1374B
1430B
19
3174B
3230B
4
1464B
1520B
20
3264B
3320B
5
1554B
1610B
21
3354B
3410B
6
1644B
1700B
22
3444B
3500B
7
1734B
1770B
23
3534B
3570B
8
2024B
2060B
24
3624B
3660B
9
2114B
2150B
25
3714B
3750B
10
2204B
2240B
26
4004B
4040B
11
2274B
2330B
27
4074B
4130B
12
2364B
2420B
28
4164B
4220B
13
2454B
2510B
29
4254B
4310B
14
2544B
2600B
30
4344B
4400B
15
2634B
2670B
31
4434B
4470B
Page 258¶
Appendix F¶
The Convert-Domain Program¶
@ND CONVERT-DOMAIN <Destination domain>
<Source domain>
<Include linked segment(s) (Y,N)>
<Display progress information (Yes,No)>
<Force free segment number(s)>
⊔, type two commas (,,) or type $. If you wish the destination domain to have a modified version of the source domain name you can do as follows. In this example the source domain is ACCOUNTS-DOMAIN and the destination domain is to be called NEW-ACCOUNTS-DOMAIN:Destination domain: new-$⊔
Page 259¶
THE CONVERT-DOMAIN PROGRAM¶
NOTE:¶
Segment handling:¶
SEGFILE:PSEG
SEGFILE:DSEG
SEGFILE:SEG
SEGFILE:LINK
Page 260¶
THE CONVERT-DOMAIN PROGRAM¶
@ND CONVERT-DOMAIN "(\)WP-5Q0-NQ8" (DOMAINS)WP-5Q0-NQ8 Y Y 1:3⏎
>> Converting free segment number 3 <<
>> Converting free segment number 1 <<
>> Finished <<
Page 261¶
The Convert-Domain Program¶
The Help Commands¶
Topic
Description
@
Sintran command invocation
COMMENT
About the use of %
CONVERT-DOMAIN
Command
EXIT
Command
HELP
Command and default topic
NEW-DOMAIN-FORMAT
Topic
OLD-DOMAIN-FORMAT
Topic
SHELL
About the user interface
Page 262¶
APPENDIX G¶
FORMAT OF A LINK INFORMATION ENTRY¶
SYMBOL ENTRY LAYOUT¶
0
1
2
3
ELINK
4
5
!
6
7
6
5
4
3
2
1
0
SL
NLE
OPER
IDENT
10
11
12
13
VAL
14
15
16
17
SIZ
20
21
22
reserved
SS(0:SL-1)
...
Page 263¶
FORMAT OF A LINK INFORMATION ENTRY¶
TYPE sympt = syment POINTER
TYPE unsigned4 = INTEGER RANGE (0:37777777777B)
TYPE syment = RECORD PACKED
Field
Type
Description
sympt
elink
% Pointer to next symbol
INTEGER
RANGE(0:255)
sl % Symbolic length (sign length SS)
INTEGER
RANGE(0:7)
nle % Numeric length
opera
oper
% Operation type on this symbol
BOOLEAN
save
% Save symbol in Link Info (close)
BOOLEAN
sdum1
% reserved
BYTE
ident
% Language
BOOLEAN
omit
% Do not load/link
BOOLEAN
select
% Do load/link
BOOLEAN
glob
% Included in start vector
BOOLEAN
dmpf
% (Local use only)
BOOLEAN
clab
% Common label
BOOLEAN
dsym
% Data symbol (versus program s.)
BOOLEAN
dref
% Data reference
BOOLEAN
udef
% Undefined reference
unsigned4
val
% Value of symbol
unsigned4
siz
% Incase clab: size of block
% Incase glob: index in start vec.
BYTE
bdum1
% Reserved
BYTE
bdum2
% Reserved
BYTES
ss(0:255)
% The symbol itself
Page 264¶
Appendix H¶
Complex Examples: Converting Mode Files and Making a Flexible Library System¶
Category
Description
*CONV
Comments about converting from the Linkage-loader to the new domain format.
*LINK
Comments about things done to allow upgrades of segments or domains, without the user having to relink his/her applications.
*COMM
Comments about loading/linking FORTRAN common.
*TIPS
General tips about using the ND Linker.
*THA
Comments about allocation of the THA vector.
Page 265¶
Complex Examples¶
I Preparations done before installation¶
(Load the segments SIBR-MESSAGE and SIBR-MESS-TS)
Change the link locks of such segments
(Load the segment SIBR-LIBRARY without linking it to the message segments and change the link lock of the SIBR-LIBRARY)
(Load the domains SIBRP and SIBRS without linking them to the message segments)
Compress all segments and domains to save space and improve transfer speed when copying over the networkII Installation at the customer site¶
Page 266¶
Complex Examples¶
6a¶
6b¶
6c¶
Page 267¶
Complex Examples¶
Structure of Sibas (SIBR, version A06)¶
Page 268¶
Complex Examples¶
SIBR-LIB Installation¶
based on (SIBR-SYS-A)IN-R-SIBL-A06:MODESoftware requirements:¶
I.1.A. Load SIBR-MESSAGE segment, segment number 31¶
Tips¶
@DELETE-FILE SIBR-MESSAGE-A06:OUT
@CREATE-FILE SIBR-MESSAGE-A06:OUT 0
@DELETE-FILE sibr-message-a06:seg
@CREATE-FILE sibr-message-a06:seg,,
Configuration¶
@ND-500 LINKER
NDL: SET-ADVANCED-MODE
NDL: % *CONV This command is not necessary, the initial value is NO:
NDL(ADV): ABORT-BATCH-ON-ERROR NO
% *CONV Five commands in the Linkage-Loader are replaced by 1:
% RELEASE-DOMAIN SIBR-MESSAGE-A06
% DELETE-DOMAIN 1 SIBR-MESSAGE-A06
% OPEN-DOMAIN 1 SIBR-MESSAGE-A06
% SET-SEGMENT-NUMBER 31
% OPEN-SEGMENT SIBR-MESSAGE-A06,ON,,,,,
% N means that the segment does not use CACHE.
% The D above means shared data! D in new Linker for par. #3 only
% means type of segment (program or data), 4th par. has attributes.
% Default segment number is decimal in Linker, octal in
% Linkage-loader.
NDL(ADV): OPEN-SEGMENT SIBR-MESSAGE-A06,31B,D,NO-CACHE,SHARED-DATA
Data:............4B 031
NDL(ADV): LOAD (SIBR-SYS-A)SIBR-MESS-AR-A06
Program:.........4B P01 Data:.........623576B D31
Debug:.........1546B Bytes
Page 269¶
COMPLEX EXAMPLES¶
% THA:
% Li-Lo: LOCAL-TRAP-DISABLE ALL
% NLL: SET-TRAP-CONDITION OWN DISABLE ALL
% segment, it is probably best to remove it altogether. Any
% trap command forces the linker to allocate a trap handler
% vector and trap block, and that is generally not used on free
% segments.
% can under certain conditions become the TB of the domain, at expense
% of the LINKER-AUTO job defined TB. Typical FORTRAN programs will not
% work well if a segment they link to has disabled all local traps.NDL(ADV): SPECIAL-LOAD (SIBR-SYS-A)PLANC-LIB LIBRARY,,
PLANC-LIB-HOO
| Program | 4B P01 |
|---------|---------|
| Data | 623576B D31 |
| Debug | 1546B Bytes |
% undefined entries before closing.
% LIST-ENTRIES-UNDEFINED must be rewritten:
NDL(ADV): LIST-ENTRIES UNDEFINED,,,
Undefined entries: None
% WRITE-SEGMENT-STATUS,,,,
% LIST-STATUS,, NOT SO USEFUL WHEN DOMAIN IS OPEN.
% OUTPUT-FILE SIBR-MESSAGE-A06:OUT
% SYSTEM-ENTRIES-ON
% LIST-ENTRIES-DEFINED
% LIST-ENTRIES-UNDEFINED
NDL(ADV): LIST-ENTRIES ALL ALPHA ALL SIBR-MESSAGE-A06:OUT
NDL(ADV): CLOSE N N
% no trap block will be allocated either.
default attributes, segment not allocated.
% The new linker omits 1 unneeded segment in this case, compared to
% the Linkage-loader. This means that one less physical segment will
% be allocated when you place a domain linked to the Sibas !library
% segment.NDL(ADV): EXIT
Page 270¶
COMPLEX EXAMPLES¶
@CC -----------------------------------------------¶
@CC | 1.1.B. Load SIBR-MESS-TS on segment number 25B¶
@DELETE-FI SIBR-MESS-TS-A06:OUT¶
@CREATE-FI SIBR-MESS-TS-A06:OUT 0¶
@DELETE-FI SIBR-MESS-TS-A06:SEG¶
@CREATE-FI SIBR-MESS-TS-A06:SEG,.¶
@ND-500 LINKER¶
NDL(ADV)
OPEN-SEGMENT SIBR-MESS-TS-A06,25B,0 SHARED-DATA NO-CACHE
Data
48B D25
NDL(ADV)
LOAD ($IBR-SYS-A)SIBR-MESS-TS-A06
Program
4B P01
Debug
1040B Bytes
NDL(ADV)
SET-LOAD-ADDRESS 100B,0
Program
4B P01
Debug
1040B Bytes
% last parameter to List-entries
default attributes, segment not allocated.@ND LINKER¶
% $IBR-LIB will get a "link key" to each free segment.
% This will allow the message segments to be exchanged later,
% if necessary, without relinking the Library.
% It also shows what can be done to the message segments if
% one library can be linked to different versions of the same
% message segment, for example Sibas message, version F, R-A, or R-B.
Link lock of segment "SIBR-MESS-TS:SEG" changed.
Link lock changed from 25332 to 19098.
Link lock of segment "SIBR-MESSAGE:SEG" changed.
Link lock changed from 23717 to 19098.
Page 271¶
Complex Examples¶
Diagnostics: 0 ERRORS and 0 WARNINGS.
Page 272¶
Complex Examples¶
@mode inc-r-sibl1:mode,,,
@cc This is a temporary file to load only Sibas library
@cc It should be run after (dom-sib)din-r-sibm:mode
@cc message segments the customer is using, for instance,
@cc an earlier version of Sibas.
NDL: SET-ADVANCED-MODE
% *CONV: The P attribute is unnecessary (shared program)
NDL(ADV): OPEN-SEGMENT SIBR-LIBRARY-A06,30B
% ENTRY-ROUTINES 2000
% LINK: Make sure the vector is big enough for future
% extensions
% means that domains that link to Sibas Library should only
% see these routines, any other routines, such as those
% in the monitor call library and PlanC library, won't be found
% in Sibas library when linking to Sibas library.
% (You can override this using SPECIAL-DEFINE.)
%
% *LINK: If INCLUDE-IN-ROUTINE-VECTOR is done before any loading,
% even the calls within the modules will go through the routine
% vector.
SRFSM included as entry 1 in routine vector.
SGET included as entry 2 in routine vector.
SSTA included as entry 93 in routine vector.
Page 273¶
Complex Examples¶
% Should I ignore one redefinition of XMPFSCM?
NDL(ADV): SPECIAL-LOAD (SIBR-SYS-A)SIBR-LIBRARY-A06 TOTAL
SIBR-LIBRARY-A06
*** WARNING - Redefinition of XMPFSCM = 30000113275B ignored.
Program:.......114013B P30 Data:.........207248 D30
Debug:.........3172B Bytes
% Try to make an incompletely loaded Sibas Library for later
% completion. If you want a complete Library, include these 2 lines:
% LINK SIBR-MESS-TS-A06
% LINK SIBR-MESSAGE-A06
NDL(ADV): LOAD (SIBR-SYS-A)PLANC-LIB-H
PLANC-LIB-HOO
PLANC-LIB-HOO
Program:.......114013B P30 Data:.........207248 D30
Debug:.........3172B Bytes
NDL(ADV): LOAD (SIBR-SYS-A)MON-CALL-LIB
Program:.......114013B P30 Data:.........207248 D30
Debug:.........3172B Bytes
% *CONV:
% LOCAL-TRAP-DISABLE ALL
% The above command should not be converted or included because it
% allocates a THA vector!
% Don't write this: SET-TRAP-CONDITION OWN DISABLE ALL
NDL(ADV): LIST-ENTRIES DEFINED,,ALL,SIBR-LIBRARY-A06:OUT
% LIST-ENTRIES-UNDEFINED
NDL(ADV): LIST-ENTRIES UNDEFINED,,ALL,,,
Undefined entries: 112
GLO__FLAG........../plnc....143678 P30
SIB__TABLE........./plnc....144278 P30
FIRST__FREE........../plnc....172468 P30
% Most output removed
TS__ADDR............../plnc....720138 P30
NDL(ADV): CLOSE N N
112 undefined entries on current segment.
% *TIPS:
% It is generally preferable to use LIST-STATUS after CLOSE, because
% then all information is updated.
% Only output of interest for this example is included in the
% three LIST-STATUS commands below:
NDL(ADV): LIST-STATUS SIB-MESSAGE:SEG
Segment: (PACK-BRUCE-B0:DOM-SIB-500)SIBR-MESSAGE-A06:SEG:1
Main Start Address: None
Restart address: None
Page 274¶
Complex Examples¶
Linked Segments¶
Attribute
Value
Linker version used
B0C
Link lock
19098 + 0
Trap info
None
Source code language
Planc
Data segment
25
Address in file
40020000B
Size
623576B
Attributes
Write-permit, Parameter-access, Swap-on-swap-file, Shared-data-segment, Not-empty-data-segment, Not-file-as-segment, Not-cache, Not-clear-capability-allowed, Not-copy-capability-allowed, Not-fortran-common-segment
Linked segments
None
NDL(ADV): LIST-STATUS SIB-MESS-TS:SEG¶
Segment
Value
Segment
(PACK-BRUCE-BD:DOM-SIB-500)SIBR-MESS-TS-A06:SEG;1
Main Start Address
None
Restart address
None
Linker version used
B0C
Link lock
19098 + 0
Trap info
None
Data segment
21
Address in file
40020000B
Size
100B
Linked segments
None
NDL(ADV): LIST-STATUS SIB-LIBRARY:SEG¶
Segment
Value
Segment
(PACK-BRUCE-BD:DOM-SIB-500)SIBR-LIBRARY-A06:SEG;1
Main Start Address
None
Restart address
None
Linker version used
B0C
Link lock
25879 + 0
Trap info
None
Source code language
Assembler, Planc
Program segment
24
Address in file
40020000B
Size
1140138
Status
Routine-vector-on-segment
Data segment
24
Address in file
60020000B
Size
20724B
Status
Insufficiently-loaded-segment
Linked segments
None
NDL(ADV): EXIT¶
Diagnostics¶
Page 275¶
COMPLEX EXAMPLES¶
@CC a new Sibas Library that is backwards compatible.
@CC -----------------------------------------------------------
NDL(ADV): SET-ADVANCED YES
NDL(ADV): LINKER-SERVICE-PROGRAM
NDL(SRV): CHANGE-LINK-LOCK SIBR-LIBRARY 19098
Link lock of segment "SIBR-LIBRARY:SEG" changed.
Link lock changed from 25879 to 19098.
NDL(SRV): EXIT
NDL(ADV): EXIT
Diagnostics: 0 ERRORs and 0 WARNINGs.@cc create a file to save the incomplete library on.
@create-file lib:r-library-a06:seg,,
@copy-file lib:r-library-a06:seg sibr-library-a06:seg
@cc incomple. sib:rs & sib:rp
Page 276¶
Complex Examples¶
1.3¶
Incomplete LoadSoftware Requirements:¶
I.3.A. Load the Server SIBRS-A¶
@CREATE-FILE SIBRS-500-A06:OUT 0
@CREATE-FILE SIBRS-A06:DOM,,
@NO-500 LINKER
NDL(ADV): SET-ADVANCED-MODE
% faster LOAD if dom. and seg. file already exist and are reused:
NDL(ADV): OPEN-DOMAIN SIBRS-A06
% An alternative to IGNORE-DEBUG-INFORMATION is to use the
% NRF-library handler to remove the debug information from the
% NRF file. The debug information occupies much space.
NDL(ADV): IGNORE-DEBUG-INFORMATION
% Do not LINK now, in order to make an incomplete domain
% New user for 2 files:
% LINK (DOM-SIB-500)SIBR-MESSAGE-A
% LINK (DOM-SIB-500)SIBR-MESS-TS-A
NDL(ADV): LOAD (SIBR-SYS-A)SIBRS-MAIN-A06:NRF
Program:........2112B P01 Data:.........10000B D01
% LOAD of the next 2 files omitted
% *CONV: Default for load address is D in the linker
NDL(ADV): SET-LOAD-ADDRESS.,P
Program:.......10000B P01 Data:.........17064B D01
NDL(ADV): LOAD (SIBR-SYS-A)SIBR-ME-US-A06:NRF
NDL(ADV): SPECIAL-LOAD (SIBR-SYS-A)MON-CALL-LIB:NRF LIBRARY.,,
NDL(ADV): SPECIAL-LOAD (SIBR-SYS-A)PLANC-LIB-H00:NRF LIBRARY.,,
NDL(ADV): SPECIAL-LOAD (SIBR-SYS-A)EXCEPT-LIB-B02:NRF LIBRARY.,,
NDL(ADV): SPECIAL-LOAD (SIBR-SYS-A)XMP-500-C00:NRF LIBRARY.,,
% *list-status sibrs-a06 Wait until after close
NDL(ADV): LIST-ENTRIES ALL ALPHA ALL SIBRS-500-A06:OUT,..
% Close-Segment
% In case some customers do not install Linker correctly, and forget
% to copy FORTRAN-AUTO:JOB from user utility to user SYSTEM,
% all default trap commands are thus given here:
% Prompt in this example removed so input fits on one line
Page 277¶
Complex Examples¶
SET-TRAP-COND OWN,ENAB,#INVALIDI,DIVIDE-BY-ZERO
SET-TRAP-COND OWN,ENAB,#FTOFLW,FLOATING-OVERFLOW
SET-TRAP-COND OWN,ENAB,#ILLOPER,ILLEGAL-OPERAND-VALUE
SET-TRAP-COND OWN,ENAB,#ILLINOX,ILLEGAL-INDEX
SET-TRAP-COND OWN,ENAB,#STKOFLW,STACK-OVERFLOW
SET-TRAP-COND OWN,ENAB,#STKUFLW,STACK-UNDERFLOW
SET-TRAP-COND OWN,ENAB,#PROGTRA,PROGRAMMED-TRAP
SET-TRAP-COND OWN,ENAB,#DISPSWT,DISABLE-PROCESS-SWITCH-TIMEOUT
SET-TRAP-COND OWN,ENAB,#DISPSWE,DISABLE-PROCESS-SWITCH-ERROR
SET-TRAP-COND OWN,ENAB,#INXSCAL,INDEX-SCALING-ERROR
SET-TRAP-COND OWN,ENAB,#ILINCOD,ILLEGAL-INSTRUCTION-CODE
SET-TRAP-COND OWN,ENAB,#ILOPSPE,ILLEGAL-OPERAND-SPECIFIER
SET-TRAP-COND OWN,ENAB,#INSEQUE,INSTRUCTION-SEQUENCE-ERROR
SET-TRAP-COND OWN,ENAB,#PVIOLAT,PROTECT-VIOLATION
NDL(ADV): LIST
NDL(ADV): SPECIAL-LOAD (SIBR-SYS-A)FORTRAN-LIB-J03 LIBRARY,,
Program: ........26633B P01 Data: ........25074B D01
EXCEPT-LIB-204157-D02
Program: ........37666B P01 Data: ........52364B D01
112 undefined entries on current domain.
Domain
Main Start Address
Segment no
(PACK=BRUCE-BD:DOM-S1B-500)SIBRS-A06:DOM;1
10408
1B
Linker version used
Link lock
Trap handler vector
Segment no
B0C
27753 + 0
23074B
1B
Illegal-operand-value, Illegal-index, Stack-overflow,
Stack-underflow, Programmed-trap, Disable-process-switch-
timeout, Disable-process-switch-error, Index-scaling-error,
Illegal-instr.-code, Illegal-operand-specifier,
Instr.-sequence-error, Protect-violation
Diagnostics: 0 ERRORS and 0 WARNINGS.
Page 278¶
Complex Examples¶
1.3. Load the Process $1BRP-A¶
Create Files¶
@CREATE-FILE $1BRP-500-A06:OUT 0
@CREATE-FILE $1BRP-A06:DOM,,
@CREATE-FILE $1BRP-COMMON-A06:SEG,,
@ND-500 LINKER
NDL: SET-ADVANCED-MODE
NDL(ADV): OPEN-DOMAIN $1BRP-A06,,
NDL(ADV): SET-SEGMENT-NUMBER 128
Program:........4B P12 Data:.............4B D12
Open Segment¶
% OPEN-SEGMENT $1BRP-A06,,,,,,
Define Common¶
% *CONV:
% DEFINE-COMMON DSEG0BEG 4 120000000002
NDL(ADV): DEFINE-FORTRAN-COMMON DSEG0BEG 4 120000000002B
Conversion Notes¶
% COMMON-SEGMENT-NUMBER 2
% COMMON-SEGMENT-OPEN "$1BRP-COMMON-A06",,,,,
Suppress Debug Info¶
% *CONV: SUPPRESS-DEBUG-INFO ON
NDL(ADV): IGNORE-DEBUG-INFORMATION
Load Program¶
NDL(ADV): LOAD ($1BRP-SYS-A)SR5-OML-BLOC-A06
Program:........4B P12 Data:.............10B D12
Define Common¶
% *CONV: DEFINE-COMMON #IBLANK 200102,222312
NAME
LENGTH
ADDRESS
#IBLANK
200102
222312
*** WARNING - Address 2000222312B within already loaded data area.List Entries¶
NDL(ADV): LIST-ENTRIES DEFINED,,.ENTRY *BLANK
Defined entries: 56
NAME
LENGTH
ADDRESS
Extension
#IBLANK
.../fort...222312B D02
Extension = ...200102B
#BLANK
.../fort...222314B D02
Extension = ...200100B
Program:........4B P12 Data:.............10B D12Conclusion¶
% *CONV:
% LOW-ADDRESS 430000,C
Page 279¶
COMPLEX EXAMPLES¶
% data goes to the :SEG file, so check which segment this is on.
% In the linker, you can’t specify C, so you must specify the seg. no.
% in the address
NDL(ADV): SET-LOAD-ADDRESS 20043000000B D
Program:.........4B P12 Data:............10B D12
% In the Linker, you cannot close the COMMON segment and
% leave the domain open, so we close everything, and do
% append-domain on SIBRP.
% COMMON-SEGMENT-CLOSE
NDL(ADV): CLOSE N N
*** WARNING - program segment 10 not loaded upon, segment not allocated.
NDL(ADV): LINK SIBRP-COMMON-A06
Segment SIBRP-COMMON-A06:SEG linked as segment 2.
Program:.........4B P12 Data:............4B D12
Program:.........4B P12 Data:............10B D12
Program:.........371B P12 Data:............210B D12
Program:.........3000B P12 Data:............210B D12
Program:.........3006B P12 Data:............364B D12
Program:.........4000B P12 Data:............364B D12
Program:.........4006B P12 Data:............540B D12
Program:.........5000B P12 Data:............540B D12
Program:.........5061B P12 Data:............770B D12
Program:.........10000B P12 Data:............770B D12
NDL(ADV): DEFINE-ENTRY 1BLANK,#1BLANK,D
NDL(ADV): DEFINE-ENTRY BLANK,#BLANK,0
Page 280¶
Complex Examples¶
NDL(ADV): LIST-ENTRIES¶
Entry Type
Value
BLANK
/?...222314B D02
IBLANK
/?...222312B D02
#BLANK
/fort...222314B D02 Extension = .....200100B
#IBLANK
/fort...222312B D02 Extension = .....200102B
Current Load Addresses¶
Program
Data
100008 P12
770B D12
NDL(ADV): LIST-ENTRIES DEF,,ENTRY,PCLC¶
Type
Value
PCLC
/........10000B P12
Current Load Addresses¶
Program
Data
100008 P12
770B D12
NDL(ADV): DELETE-ENTRIES¶
NDL(ADV): LOAD¶
Program
Data
122526B P12
65420B D12
NDL(ADV): SET-LOAD-ADDRESS¶
Program
Data
124000B P12
65420B D12
NDL(ADV): SPECIAL-LOAD¶
Program
Data
126114B P12
70614B D12
NDL(ADV): SET-LOAD-ADDRESS¶
Program
Data
130000B P12
70614B D12
NDL(ADV): SPECIAL-LOAD¶
Program
Data
133232B P12
73714B D12
NDL(ADV): SPECIAL-LOAD¶
Program
Data
134466B P12
75360B D12
LINK¶
NDL(ADV): SPECIAL-LOAD¶
NDL(ADV): LOAD¶
NDL(ADV): SPECIAL-LOAD¶
NDL(ADV): LOAD¶
NDL(ADV): SPECIAL-LOAD¶
NDL(ADV): LOAD¶
NDL(ADV): LOAD¶
NDL(ADV): LOAD¶
NDL(ADV): LOAD¶
NDL(ADV): LOAD¶
Page 281¶
Complex Examples¶
NDL(ADV): LOAD (SIBR-SYS-A)SR5-DML-SYNC-A06
NDL(ADV): LOAD (SIBR-SYS-A)SR5-DML-DEBU-A06
NDL(ADV): LOAD (SIBR-SYS-A)SR5-DML-DBCO-A06
NDL(ADV): LOAD (SIBR-SYS-A)SR5-DML-RECO-A06
NDL(ADV): LOAD (SIBR-SYS-A)SR5-DML-DUME-A06
NDL(ADV): LOAD (SIBR-SYS-A)SR5-DML-REPR-A06
NDL(ADV): LOAD (SIBR-SYS-A)SR5-DML-ASSM-A06
NDL(ADV): LOAD (SIBR-SYS-A)SR5-DML-SWIN-A06
NDL(ADV): LOAD (SIBR-SYS-A)SR5-DML-SEMS-A06
NDL(ADV): LOAD (SIBR-SYS-A)DUMMY-SEXMC-A06
Program:......552574B P12 Data:.......232600B D12
Defining Special (ND-500) Mon-Calls¶
% No changes in the define-entry command.
% (Abbreviations 37'327B 37'500B are NOT allowed)
NDL(ADV): DEFINE-ENTRY FSMTY 370000003278,P
NDL(ADV): DEFINE-ENTRY FIXSEG 370000004108,P
NDL(ADV): DEFINE-ENTRY UNFIX 370000004118,P
NDL(ADV): DEFINE-ENTRY FSCNT 370000004128,P
NDL(ADV): DEFINE-ENTRY WSEG'N 370000004168,P
NDL(ADV): DEFINE-ENTRY MXPISG 370000004178,P
NDL(ADV): DEFINE-ENTRY SPRNAME 370000004258,P
NDL(ADV): DEFINE-ENTRY GPRNUM 370000004268,P
NDL(ADV): DEFINE-ENTRY 0PRNAME 370000004278,P
NDL(ADV): DEFINE-ENTRY STARTPR 370000005008,P
NDL(ADV): DEFINE-ENTRY STOPPR 370000005018,P
NDL(ADV): DEFINE-ENTRY GERRC00 370000005058,P
NDL(ADV): DEFINE-ENTRY INITBM 370000005108,P
NDL(ADV): DEFINE-ENTRY BIMPAGE 370000005108,P
Value-Entries RFILE,WFILE,WAITF,ERMON,ERMSG,CLOCK¶
NDL(ADV): LIST-ENTRIES DEF.,ENTRY RFILE,WFILE,WAITF,ERMON,ERMSG,CLOCK
Defined entries: 463
Entry
Address
WAITF
/fort...3556248 P12
RFILE
/fort...3556648 P12
WFILE
/fort...3560158 P12
ERMSG
/fort...3561468 P12
ERMON
/fort...3561708 P12
CLOCK
/fort...3562148 P12
Current load addresses:
Program:......552574B P12 Data:.......232600B D12
Kill-Entries RFILE,WFILE,WAITF,ERMON,CLOCK,...¶
NDL(ADV): DELETE-ENTRIES RFILE,WFILE,WAITF,ERMON,CLOCK,...
Program-Reference RFILE.,P¶
NDL(ADV): REFER-ENTRY RFILE.,P
NDL(ADV): REFER-ENTRY WFILE.,P,.
NDL(ADV): REFER-ENTRY WAITF.,P,.
NDL(ADV): REFER-ENTRY ERMON.,P,.
NDL(ADV): REFER-ENTRY CLOCK.,P,.
NDL(ADV): REFER-ENTRY #EXCEPT,.,P,.
Page 282¶
Complex Examples¶
Initialization¶
NDL(ADV): SPECIAL-LOAD (SIBR-SYS-A)EXCEPT-LIB-D02 LIBRARY.,
Program:.....6563028 P12 Data:.......312452B D12Define Entry¶
NDL(ADV): DEFINE-ENTRY QWFILE,WFILE,P
NDL(ADV): DEFINE-ENTRY QWAITF,WAITF,P
NDL(ADV): DEFINE-ENTRY QMON,ERMON,P
NDL(ADV): DEFINE-ENTRY QCLOCK,CLOCK,P Special Load¶
NDL(ADV): SPECIAL-LOAD (SIBR-SYS-A)XMP-500-C00 LIBRARY
NDL(ADV): SPECIAL-LOAD (SIBR-SYS-A)FORTRAN-LIB-J03 LIBRARY
NDL(ADV): SPECIAL-LOAD (SIBR-SYS-A)EXCEPT-LIB-D02 LIBRARY
NDL(ADV): SPECIAL-LOAD (SIBR-SYS-A)PLANC-LIB-H00 LIBRARY
NDL(ADV): LOAD (SIBR-SYS-A)MON-CALL-LIB
Program......665457B P12 Data:........320470B D12Output¶
WRITE-SEGMENT-STATUS,,,,,
NDL(ADV):* LIST-ENTRIES ALL ALPHA ALL SIBRP-500-A06:OUT Fortran Aut Job¶
% I/O buffers, and set-trap-conditions.
% not used:
Program:.....665457B P12 Data:.......322470B D12
NDL(ADV): SPECIAL-LOAD (SIBR-SYS-A)EXCEPT-LIB-D02 LIBRARY.,
Program:.....665457B P12 Data:.......322470B D12 List Entries Undefined¶
Undefined entries: 227
Entry
Data
SIB_TABLE
../plnc...124113B P12
TS_TSET
../plnc...124125B P12
TS_COUNT
../plnc...124137B P12
TS_OLOCK
../plnc...124144B P12
GLO_FLAG
../plnc...530201B P12
#FIO_BUFF#
../plnc...617212B P12
#END_FIOB……..
../plnc...617222B P12
% even though SET-I0-BUFFERS has been used. System Entries¶
% LIST-ENTRIES-DEFINED
% LIST-ENTRIES-UNDEFINED
225 undefined entries on current domain.
Page 283¶
Complex Examples¶
Domain: (PACK-BRUCE-BD:DOM-S1B-500)S1BRP-A06:DOM;1
Linker version used: B0C
Link lock: 29306 + 0
Data segment: 2
Linked to: S1BRP-COMMON-A06:SEG
Link key: 29032
Segment Type
Address in file
Size
Program Segment
10
20020000B
Data Segment
10
30020000B
Diagnostics: 0 ERRORS and 2 WARNINGs.
Page 284¶
Complex Examples¶
Save Copies of the 2 Incomplete Domains¶
@creat-file incmpl-sibrs-a06:dom.,
@copy-file incmpl-sibrs-a06:dom sibrs-a06:dom
@creat-file incmpl-sibrp-a06:dom.,
@copy-file incmpl-sibrp-a06:dom sibrp-a06:dom
Compress the Domains (and Make Contig. Files if You Wish)¶
@end-500 LINKER
NDL(ADV): SET-ADVANCED YES
NDL(ADV): LINKER-SERVICE-PROGRAM
Command
Details
NDL(SRV): COMPRESS SIBR-MESS-TS,NO,,YES
SIBR-MESS-TS-A06:SEG compressed into 5 pages. All pages allocated.
NDL(SRV): COMPRESS SIBR-MESSAGE,NO,,YES
SIBR-MESSAGE-A06:SEG compressed into 105 pages. All pages allocated.
NDL(SRV): COMPRESS SIBR-LIBRARY,NO,,YES
SIBR-LIBRARY-A06:SEG compressed into 32 pages. All pages allocated.
NDL(SRV): COMPRESS SIBRP,NO,,YES
SIBRP-A06:DOM compressed into 176 pages. 174 pages allocated.
NDL(SRV): COMPRESS SIBRS,NO,,YES
SIBRS-A06:DOM compressed into 25 pages. All pages allocated.
NDL(SRV): COMPRESS LIBR-LIBRARY,,,NO
LIBR-LIBRARY-A06:SEG compressed into 32 pages. All pages allocated.
NDL(SRV): COMPRESS INC-SIBRP,,,NO
INCMPL-SIBRP-A06:DOM compressed into 176 pages. 174 pages allocated.
NDL(SRV): COMPRESS INC-SIBRS,,,NO
INCMPL-SIBRS-A06:DOM compressed into 25 pages. All pages allocated.
NDL(SRV): EXIT
NDL(ADV): EXIT
Page 285¶
COMPLEX EXAMPLES¶
@CC¶
@CC be done when the customer installs the product
@CC ------------------------------------------------------------
@cc in Sibas-R complete by linking them to the 2
@cc Sibas-R, version A06 message segments.
@cc are stored there, too.
@copy-file sibrs:dom inc-sibrs:dom
@copy-file sibrp:dom inc-sibrp:dom
| Program: | ......114013B P30 | Data: | ........20724B D30 |
|----------|-------------------|-------|--------------------|
NDL(ADV): LINK SIBR-MESSAGE
Segment SIBR-MESSAGE-A06:SEG linked as segment 25.
NDL(ADV): LINK SIBR-MESS-TS
Segment SIBR-MESS-TS-A06:SEG linked as segment 21.
NDL(ADV): LIST-ENTRI UNDEFINED,,,
Undefined entries: None
| Program: | ......370660B P01 | Data: | ........52364B D01 |
|----------|-------------------|-------|--------------------|
NDL(ADV): LINK SIBR-MESSAGE
Segment SIBR-MESSAGE-A06:SEG linked as segment 25.
NDL(ADV): LINK SIBR-MESS-TS
Segment SIBR-MESS-TS-A06:SEG linked as segment 21.
NDL(ADV): LIST-ENTRI UNDEFINED,,,
Undefined entries: None
| Program: | ......665457B P12 | Data: | ........330000B D12 |
|----------|-------------------|-------|--------------------|
NDL(ADV): LINK SIBR-MESSAGE
Segment SIBR-MESSAGE-A06:SEG linked as segment 25.
NDL(ADV): LINK SIBR-MESS-TS
Segment SIBR-MESS-TS-A06:SEG linked as segment 21.
NDL(ADV): LIST-ENTRI UNDEFINED,,,
Undefined entries: None
Diagnostics: 0 ERRORs and 0 WARNINGs.
Page 286¶
@cc
--------------------------------------------------------
@cc II.2. See that our application can still be placed.
@cc ----------------------------------------------------
@NO
ND-500/5000 MONITOR Version J04 88. 6.16 / 88. 8.17
ND-5000: place applic-500
ND-5000: list-active-segments,,
Process no. | 3 : (DOM-S1B-500)TERMINAL-53
--- | ---
Process seg: | Phys seg: 7358: (DOM-S1B-500)TERMINAL-53
Instr. seg 1B: | Phys seg: 7368: (DOM-S1B-500)APPLIC-500:DOM
Instr. seg 30B: | Phys seg: 268: (DOM-S1B-500)S1BR-LIBRARY-A06:SEG
Data seg 1B: | Phys seg: 737B: (DOM-S1B-500)APPLIC-500:DOM
Data seg 25B: | Phys seg: 24B: (DOM-S1B-500)S1BR-MESS-TS-A06:SEG
Data seg 30B: | Phys seg: 27B: (DOM-S1B-500)S1BR-LIBRARY-A06:SEG
Data seg 31B: | Phys seg: 25B: (DOM-S1B-500)S1BR-MESSAGE-A06:SEG
ND-5000: CC Assume that (DOM-S1B)S1BRP is process no. 7
ND-5000: list-active-segments,,
Process no. | 3 : (DOM-S1B-500)TERMINAL-53
--- | ---
Process seg: | Phys seg: 20B: (DOM-S1B-500)TERMINAL-53
Instr. seg 12B: | Phys seg: 22B: (DOM-S1B-500)S1BRP-A06:DOM
Data seg 2B: | Phys seg: 21B: (DOM-S1B-500)S1BRP-COMMON-A06:SEG
Data seg 12B: | Phys seg: 23B: (DOM-S1B-500)S1BRP-A06:DOM
Data seg 25B: | Phys seg: 24B: (DOM-S1B-500)S1BR-MESS-TS-A06:SEG
Data seg 31B: | Phys seg: 25B: (DOM-S1B-500)S1BR-MESSAGE-A06:SEG
ND-5000: CC both domains should have the same physical segments for
ND-5000: CC S1BR-MESSAGE and S1BR-MESS-TS when Sibas is running.
ND-5000: EXIT
@cc
Page 287¶
Complex Examples¶
Check that our application can be relinked¶
CREATE-FILE APPLIC-500:DOM,,
END-500-MON LINKER
NDL(ADV): SET-ADVANCED-MODE
NDL(ADV): OPEN-DOMAIN APPLIC-500,,
NDL(AOV): LOAD (SIBAS-TEST)SIBBIG-500
Program: ..... 205218 P01 Data: ........ 21510B D01
Link¶
NDL(ADV): LINK (DOM-S1B-500)SIBR-LIBRARY-A
Included segment (DOM-S1B-500)SIBR-MESS-TS-A06:SEG linked as segment 21.
Included segment (DOM-S1B-500)SIBR-MESSAGE-A06:SEG linked as segment 25.
Segment (DOM-S1B-500)SIBR-LIBRARY-A06:SEG linked as segment 24.
List Entries Defined¶
Entry SETOV¶
Defined entries: 101
SETOV ............ /pIncc..... 3144B P30
Current load addresses:
Program: ..... 205218 P01 Data: ........ 21510B D01
Entry SDBEC¶
Defined entries: 101
SDBEC ............ /pIncc..... 2614B P30
Current load addresses:
Program: ..... 205218 P01 Data: ........ 21510B D01
Conversion Notes¶
% CONV: In the Linkage-Loader, FORCED-LINK was often used here.
% Already linked due to the above link, so not necessary:
% LINK (DOM-S1B-500)SIBR-MESSAGE-A
% LINK (DOM-S1B-500)SIBR-MESS-TS-A
NDL(AOV): LOAD (FORT-K02)FORTRAN-LIB-K
NDL(ADV): LOAD (SOFT-WARE)XCEPT-LIB-0
NDL(ADV): LIST-ENTR UNDEFINED,,,,
Undefined entries: 2
#FI0_BUFF ............ /pIncc..... 676158 P01
#END__FI0B ........... /pIncc..... 676258 P01
Additional Commands¶
NDL(ADV): SET-I0-BUFFER,,,
NDL(ADV): EXIT
Diagnostics: 0 ERRORS and 0 WARNINGS.
System Information¶
ND-500/5000 MONITOR Version J04 88. 6.16 / 88. 8.17
ND-5000: cc see that application can be placed
ND-5000: place applic-500
ND-5000: list-active-segments,,
Process no.: 3 : (DOM-S1B-500)TERMINAL-53
Process seg: Phys seg: 418: (DOM-S1B-500)TERMINAL-53
Instr seg. 18: Phys seg: 42B: (DOM-S1B-500)APPLIC-500:DOM
Instr seg 30B: Phys seg: 45B: (DOM-S1B-500)SIBR-LIBRARY-A06:SEG
Page 288¶
Complex Examples¶
Data seg
Phys seg
Code
1B
43B
(DOM-SIB-500)APPLIC-500:DOM
258
44B
(DOM-SIB-500)SIBR-MESS-TS-A06:SEG
308
46B
(DOM-SIB-500)SIBR-LIBRARY-A06:SEG
31B
47B
(DOM-SIB-500)SIBR-MESSAGE-A06:SEG
Page 289¶
COMPLEX EXAMPLES¶
@CC 11.4. Reload one or more routines on a library segment.
@CC User applications should not need to be relinked.
@CC
@CC We do the reloading on a copy of the incompletely loaded
@CC Sibas library:
@CC ----------------------------------------------------------------
@CC SETDV and SDBEC and put them on an :NRF file:
NDL(ADV): SET-ADVANCED YES
NDL(ADV): NRF-LIBRARY-HANDLER SETDV-SDBEC
NDL(NLH): LIST-MODULES,,,
Module Nrf-entry
P/D Language Program size
Data
......1 SETDV.................
P.X Planc... ........345B ....0B
......2 SDBEC................
P.X Planc... ........327B ....0B
ND-5000: CC We see that each routine is called via a routine
ND-5000: CC vector.
P30 2614B: ENTM 30'70448,+54B,3100B
P30 2631B: JUMP *30'274218 30'27405B/
P30 27405B: RET
P30 27406B: ENTM 30'70448,+54B,3100B .
P30 27421B: H MOVE 358,30'20548 .
P30 3144B: ENTM 30'70448,+44B,3100B
P30 3161B: JUMP *30'55130B 30'55113B/
P30 55113B: ENTM 30'70448,+44B,3100B
P30 55130B: WI DIV4 IND(B.24B),144B,W2 .
@copy-file reload-sib-lib:iseg ibr-library-a06:seg
NDL: SET-ADVANCED-MODE
NDL(ADV): APPEND-SEGMENT RELOAD-SIB-LIB:ISEG
NDL(ADV): LIST-ENT DEF.,ENTRY SETDV SDBEC
| SETDV................| /plnc....31448 P30 |
Program:......114013B P30 Data:........207248 D30
Debug:.........31728 Bytes
Page 290¶
Complex Examples¶
NDL(ADV): RELOAD SETDV-SDBEC¶
Data:........20724B D30
Debug:.......31728 Bytes
% the routine vectors. The 2 new routines, however, have been
% added to the addresses 1140138 to 114707B.
% Data cannot be changed by RELOAD.
% APPEND-SEGMENT (and APPEND-DOMAIN) does not change the
% Link-lock.NDL(ADV): LIST-ENT DEF.,ENTRV SETDV SDBEC¶
SDBEC
.../plnc
...2614B P30
SETDV
.../plnc
...3144B P30
Program:.....114707B P30
Data:........20724B D30
Debug:.......31728 Bytes NDL(ADV): LINK SIBR-MESS-TS¶
NDL(ADV): LINK SIBR-MESSAGE¶
NDL(ADV): LIST-ENTRI UNDEFINED¶
@cc At this point, Sibas must be stopped.
@cc copy reload to the real sib-lib or use rename
@copy-file sib-lib:seg reload-sib-lib:fseg
@cc Sibas should be restarted now.
Page 291¶
Complex Examples¶
@CC 11.5. See that user applications can still be placed.
@CC (You can also check that they can be relinked and
@CC placed)
@CC ----------------------------------------------------------- ND-5000: Place Applic-500¶
Process no.: 3 : (DOM-SIB-500)TERMINAL-53
Segment
Phys seg
Description
Process seg
60B
(DOM-SIB-500)TERMINAL-53
Instr. seg 1B
618B
(DOM-SIB-500)APPLIC-500:DOM
Instr. seg 30B
64B
(DOM-SIB-500)SIBR-LIBRARY-A06:SEG
Data seg 1B
628B
(DOM-SIB-500)APPLIC-500:DOM
Data seg 25B
63B
(DOM-SIB-500)SIBR-MESS-TS-A06:SEG
Data seg 30B
65B
(DOM-SIB-500)SIBR-LIBRARY-A06:SEG
Data seg 31B
66B
(DOM-SIB-500)SIBR-MESSAGE-A06:SEG
ND-5000: CC addresses, which are at the end of the library segment. ND-5000: Look-At-Program 30´2614¶
Address
Instruction
P30 2614B
ENTM 30´70448,+54B,3100B
P30 2631B
JUMPG +30´114375B 30´114375B/
P30 114375B:
H MOVE 358,30´2054B .
ND-5000: Look-At-Program 30´3144¶
Address
Instruction
P30 3144B:
ENTM 30´70448,+44B,3100B
P30 3161B:
JUMPG +30´114030B 30´114030B/
P30 114030B:
W1 DIV4 IN0(8.24B),144B,W2 .
ND-5000: Exit¶
Page 292¶
APPENDIX I¶
VERSION HISTORY¶
CHANGES FROM VERSION A TO B¶
NEW COMMANDS:¶
MODIFIED COMMANDS:¶
#CCLC can now be specified for the current common load address.#DCLC, #PCLC or #THA were specified in a command before these special symbols were defined either implicitly through a LOAD or SET-SEGMENT-NUMBER command, or explicitly through SET-LOAD-ADDRESS, version A initialized them to 10000000004B, 10000000004B, and 0B respectively. Version B gives an error message (e.g. NO DATA SEGMENT SET). LOAD still initializes them to the mentioned values before loading, as before.
In parameter 3, address or entry, if an address is specified without the upper five bits (i.e. the logical segment number), the address is taken to be a relative address within the current data or common segment.
| entry selection | (Defined, Undefine, All) |
|
Page 293¶
VERSION HISTORY¶
SAVE-ENTRIES: two optional parameters added.¶
SET-HIGH-ADDRESS¶
SET-SEGMENT-NUMBER¶
CHANGES IN NRF FORMAT¶
DDF:¶
LIB:¶
REP,O:¶
BEG:¶
Page 294¶
Glossary¶
A data area declared in a FORTRAN program as COMMON. The purpose is normally to allow several programs, or several subprograms of a program to access the same data.
An internal variable in the Linker that points to the address where the Linker will load the next common block. This address is called the common current load address.
The address where the Linker will load the next common block. This address changes as common blocks are loaded. You can specify this address when a value is required, by specifying "#CCLC".
A data segment used to load common blocks. When a segment is opened as a common segment, the currently open data segment is not closed.
A data element in an NRF-file which directs the Linker during loading.
The address where the Linker will load the next item of common, data or program module. The Linker has three counters, referred to as #CCLC, #DCLC, and #PCLC, that keep track of the next free position in the currently open common, data, and program segments respectively. The context determines which of the three positions is meant.
An internal variable in the Linker that points to the address where the Linker will load the next data module. This address is called the data current load address.
The address where the Linker will load the next data module. This address changes as data modules are loaded. You can specify this address when a value is required, by specifying "#DCLC".
One of the 32 areas of equal size in which the data address space of a domain is divided.
1. To insert a symbol and its value in the symbol table, producing a defined entry. This is done by the Linker.
2. To specify the value of a symbol. The value needs not be given explicitly. A symbol definition in an NRF-file directs the Linker to take the value of the common, data or program current loadcounter at the time when the Linker encounters the definition, as the value of the symbol.
Page 295¶
Glossary¶
1. A symbol whose value is known, i.e. appears in a defined entry in the symbol table.
1. A domain file.
A file organizing the program code and data of an ND-500(0) program. This code is divided into one or more segments, which are either contained directly in the domain file (slave segment), or in separate segment files (free segments). The domain file also contains information needed by the ND-5000 monitor when the domain is placed. The domain file can also contain link information and debug information.
See defined entry and undefined entry.
A segment whose code is not contained in a domain file, but in a separate segment file. The opposite is slave segment.
Reference in a domain or segment file to a free segment.
(A domain or first free segment to a second free segment) Operation that effectively makes the second segment a component of the domain, or of every domain that is linked to the first segment. This is achieved by including in the domain or first segment a reference to the second segment, such that whenever the domain or first segment is placed, the second segment will also be placed. The operation also implies that the symbols defined in the link information of the second segment are included in the symbol table, and any undefined references to these symbols are resolved.
Table in a domain or segment file containing symbols and their corresponding values. Only symbols whose values are addresses in the segment appear in the link information of a segment file. The link information of a domain file contains symbols whose values are addresses in the slave segments of the domain.
Free segment to which a domain or a second free segment has been linked.
1. The sequence of commands given to the Linker after the Linker is started, or after the Linker is reset, until the first exit from it, or until it is reset (again).
(An NRF-file, or a module contained in an NRF-file) Write code contained in the file or module to a segment in a domain or segment file. This operation also implies resolving references in the NRF-file or module to symbols which are already defined, defining symbols defined in the file or module, and resolving undefined references to such symbols.
Page 296¶
Glossary¶
1. The sequence of commands given to the Linker from an initial OPEN-DOMAIN or OPEN-SEGMENT to the first explicit or implicit CLOSE command.
2. The period of time during which such a sequence of commands is given.PCLC see Program current load counter.¶
Page 297¶
GLOSSARY¶
Symbol reference (n)¶
Symbol table (n)¶
Symbolic value (n)¶
#THA (n)¶
Undefined symbol (n)¶
Undefined reference (n)¶
Value (n) (of a symbol)¶
Page 298¶
Page 299¶
Index¶
Term
Page(s)
%
206
@
207
A¶
Term
Page(s)
Abbreviate
12
Abort listing
162
ABORT-BATCH-ON-ERROR
92
ABORT-BATCH-ON-ERROR
19
Absolute
120, 121
Access
97, 170, 175
ADA
233
Add data address
233
Add immediately
233
Add program address
233
ADD
235
ADI
233
Adjust
232
Advanced mode
212
Advanced
85
AJS
232
Allocate
192, 230
Alphabetically sorted
91
Ambiguous module
223
APA
233
APPEND-DOMAIN
93
APPEND-SEGMENT
95
APPEND-SEGMENT
24
Append
125, 170
Attribute list
158
B¶
Term
Page(s)
Batch job
206
Begin module
228
BEG
228
C¶
Term
Page(s)
CACHE
160
CCLC
59
CGR0
235
CGR1
235
CHANGE-FILE-REFERENCES
97
CHANGE-LINK-LOCK
99
Checksum
229
CLEAR-CAPABILITY-ALLOWED
160
Page 300¶
Index¶
C¶
Term
Page Number
CLOSE
102
Command modes
85
COMMON area
63
Communication RTCOMMON
67
Compilation
7
Complement
227
Compound group
235
COMPRESS
104
Computer mode
144, 224
Conflicting definitions
58
Contiguous
121
Control byte
145
Control field
227
Control group
235
CONVERT-DOMAIN
252
COPY-CAPABILITY-ALLOWED
160
Correcting Errors
13
CREATE-ROUTINE-VECTOR
106
Critical sequences
92
D¶
Term
Page Number
Data Byte Pointer
226
Data mode
233
Data symbol definition
232
Data symbol reference
232
Data symbol
122
DBG
234
DCLC
59
DDF
122, 232
Debug information
173
DEBUG-MODE
8
Debug
234
Default number system
12
Default trap value
72
DEF
231
DEFINE-ENTRY
107
DEFINE-ENTRY
58
DEFINE-FORTRAN-COMMON
64
DEFINE-FORTRAN-COMMON
109
DELETE-DEBUG-INFORMATION
111
DELETE-ENTRIES
113
DELETE-MODULES
115
Description file
238
Destination domain
252
Disabling traps
76
DIVIDE-BY-ZERO trap
76
DIV
235
DMO
233
Page 301¶
D¶
Topic
Page
Domain format
238
Domain
238
Domains
86
DOMINO processor
178
DRF
232
E¶
Topic
Page
EMPTY-DATA-SEGMENT
159
Enabling traps
76
End module
229
End of file
234
END
229
ENDLIST
14, 15
Entry point
58
EOF
234
Erase
156, 157
Exception library
72
Execution
7
Execution inhibit
234
EXIT
117, 119
EXPORT
175
F¶
Topic
Page
Faster loading
60
FILE-AS-SEGMENT
159
FIX-SEGMENT
120
FMO
226, 233
FORCE-LIBRARY
122
FORTRAN library
183
FORTRAN-COMMON-SEGMENT
160
FORTRAN-COMMON-SEGMENT
64
Free mode
226, 233
Free Pointer
226
Free segment
13
Functional grouping
86
G¶
Topic
Page
Generic byte pointer
228
GET-MODULES
125
Group ignored
228
H¶
Topic
Page
Hardware traps
72
HELP
11
HELP
85
History
14
Page 302¶
I¶
Item
Pages
Ignorable trap
72, 75
IGNORE-DEBUG-INFORMATION
128
IHB
234
Include linked segments
252
INCLUDE-IN-ROUTINE-VECTOR
130
Included segment
135
Included segments
23
INSERT-MESSAGE
132, 133
Internal debugging
185
J¶
Item
Pages
JOB
14
JOB-control Language Statements
15
L¶
Item
Pages
LBB
234
LDI
233
LDN
235
Leading zero
12
LIB
230
Library handler
88, 155
Library module byte pointer
234
Library reference
231
Library
230
Link information
170, 173
Link lock
135, 158
LINK-RT-PROGRAMS
137
Linked segments
252
Linker modes
85
LINKER-SERVICE-PROGRAM
87, 138, 215
LINK
135
Linking
7
LIST
14, 15
LIST-DOMAINS
139
LIST-ENTRIES
140
LIST-MODULES
142
LIST-NRF
144
LIST-SEGMENTS
146
LIST-STATUS
147, 148
Listing mode
185
Load immediately
233
LOAD
10
LOAD
151
Loading
7
Loading nrf code
87
Logical memory
61
LRF
231
Page 303¶
M¶
Topic
Page
Main start address
229
MATCH-RT-SEGMENT
153
Memory allocation
87
Memory allocation
61
Message
234
Miscellaneous commands
88
Miscellaneous
235
MIS
235
Mode File
19
Mode job
206
Modes
85
Module
10
Motorola MC68000
178
MSA
229
MSG
234
MUL
235
N¶
Topic
Page
ND Relocatable Format
9
ND-100/ND-500(0) communication
67, 88
ND-500(0) Monitor
7
ND-500(0) program
7
New domain format
238
Non-ignorable trap
72
NOT-CACHE
160
NOT-COPY-CAPABILITY-ALLOWED
160
NOT-EMPTY-DATA-SEGMENT
159
NOT-FILE-AS-SEGMENT
159
NOT-FORTRAN-COMMON-SEGMENT
160
NOT-MOVE-CAPABILITY-ALLOWED
160
NOT-PARAMETER-ACCESS
159
NOT-SHARED-DATA-SEGMENT
159
NRF control-groups description
228
NRF
7, 9
NRF-control numbers summary
236
NRF-Format description
227
NRF-LIBRARY-HANDLER
155, 216
NUL
228
Number sign(#)
227
Numeric field
227
O¶
Topic
Page
Object computer
224
Page 304¶
P¶
Topic
Page Number
OPEN-DOMAIN
156
OPEN-SEGMENT
157
Optimize swapping
188
Own SET-TRAP-CONDITION
78
PARAMETER-ACCESS
159
PCLC
59
PIOC
178
PMO
233
PREPARE-LIBRARY
161
Program Byte Pointer
226
Program mode
233
Program reference
231
Program symbol definition
231
R¶
Topic
Page Number
READ-ONLY
159
Redefinition of symbols
57
REFER-ENTRY
163
Reference handling
87
Reference handling
57
REF
231
RELOAD
165
Relocatable format
7
Remove symbol
232
Repeat
233
REP
233
REPLACE-MODULES
167
RESET-LINKER
169
RMV
232
RT program
137
RTCOMMON
67
S¶
Topic
Page Number
SAVE-ENTRIES
170
SAVE-LIBRARY
171
Scattered
121
Search strategy
102, 103
Segment header
23
Segment number
22
Segment, included
135
Segments
86
Service program
215
Set data mode
233
Set free mode
233
Set load address
232
Page 305¶
Set program mode¶
SET-ADVANCED-MODE¶
SET-AREA-SIZE¶
SET-CASE-SIGNIFICANCE¶
Term
Page
SET-COMPUTER
178
SET-FORMAT
12
SET-FORMAT
179
SET-HEAP-SIZE
180
SET-HIGH-ADDRESS
182
SET-IO-BUFFERS
183
SET-LIBRARY
184
SET-LIST-MODE
185
SET-LOAD-ADDRESS
186
SET-SEGMENT-LIMITS
188
SET-SEGMENT-NUMBER
190
SET-SEGMENT-SIZE
192
SET-START-ADDRESS
195
SET-TRAP-CONDITION
196
SET-TRAP-CONDITION
76, 78
SHARED-DATA-SEGMANT
159
SHIFT + HELP
11
SLA
232
SPECIAL-DEFINE
201
SPECIAL-LINK
203
SPECIAL-LOAD
204
Standard mode
211
Standard
85
Start address
195
SUB
235
SWAP-ON-ORIGINAL-FILE
159
SWAP-ON-SWAP-FILE
159
Symbol definition
231
Symbol reference
231
Symbol table
10, 57
Symbolic Debugger
64
Symbolic field
227
Symbols
10, 57
T¶
Term
Page
THA
59
Trap handling
87
Trap name
72
Trap number
72
U¶
Term
Page
Unfix
121
User-defined traphandling
78
Page 306¶
V¶
Topic
Page
Variable
15
W¶
Topic
Page
Work Areas
18
WRITE-PERMIT
64
Additional Topics¶
Topic
Page
User-written traphandler
78
Utility library
80
Page 307¶
SEND US YOUR COMMENTS!¶
Norsk Data A.S
Documentation Department
P.O. Box 25 BOGERUD
N · 0621 OSLO 6 · NorwayNOTE!¶
Manual Name: ______
Manual number: ______
Which version of the product are you using? ____
Your name: ______
Date: _____
Company: ________
Position: __
Page 308¶
Page 309¶
Page 310¶
Page 311¶
Page 312¶









