This description of the PDP-11 FORTRAN IV OTS was developed... students at Middlebury College, Vermont working in cooperation

This description of the PDP-11 FORTRAN IV OTS was developed... students at Middlebury College, Vermont working in cooperation
This description of the PDP-11 FORTRAN IV OTS was developed by
students at Middlebury College, Vermont working in cooperation
with Digital FORTRAN personnel.
Everyone involved tried to
ensure that a useful body of information would be presented.
Time and resources, however, were limited. It MUST be emphasized,
therefore, that there is NO GUARANTEE of either the COMPLETENESS
or FULL ACCURACY of all the material presented herin.
FORTRAN
IV OTS
PREFACE
AUDIENCE ASSUMPTIONS
It is assumed that readers are advanced FORTRAN programmers. The
material
in this manual is not needed for normal use of FORTRAN, therefore
beginning
programmers may it confusing.
MANUAL OBJECTIVES
This manual describes the FORTRAN IV Object Time System (OTS),
lists the
global entry points in the OTS, and tells how to use knowledge of
the OTS
to reduce program size.
STRUCTURE OF THIS DOCUMENT
This manual contains nine chapters and three appendixes:
1. Chapter 1 describes the OTS
explanation of
threaded code.
can
and
gives
a
brief
2.
Chapter 2 explains how the OTS handles I/O.
3.
Chapter 3 tells how this manual and a knowledge of the OTS
be
used to reduce program size.
4.
Chapter 4 describes the OTS utility modules.
5.
Chapter 5 describes the OTS file handling modules.
6.
Chapter 6 describes the OTS conversion modules.
7.
Chapter 7 describes the OTS arithmetic modules.
8.
Chapter 8 describes the OTS subroutine support modules,
including
the modules that define the library subroutines.
9.
Chapter 9 describes the OTS library functions.
10. Appendix A lists the OTS modules and their sizes.
11. Appendix B is a cross-reference listing of the
points
OTS
entry
and their modules.
12. Appendix C describes the OTS PSECTS, the OTS work area, for
RT-11
and RSTS/E, the file descriptor block (FDB), and, for IAS,
RSX-11,
and VMS, the logical unit control block (LUB).
USING THE MANUAL
If you are not familiar with the FORTRAN IV OTS, the description of
the OTS
in Chapter 1 will clarify the explanations of the entry points.
If you
have a working knowledge of the OTS, you may wish to begin with
Chapter 2.
i
FORTRAN IV OTS
PREFACE
RELATED DOCUMENTS
The following documents are relevant to the use of
proper
User's Guide depends on your operating system.
the
OTS.
The
RT-11, RSTS/E FORTRAN IV User's Guide
IAS, RSX FORTRAN IV User's Guide
PDP-11 FORTRAN Language Reference Manual
DOCUMENT CONVENTIONS
The term RSX-11 refers to both RSX-11M and RSX-11M PLUS,
otherwise
noted.
In this manual, an entry point name refers to
by
that entry point.
the
unless
routine
referenced
ii
CHAPTER 1
SUMMARY OF THE FORTRAN IV OBJECT TIME SYSTEM
A FORTRAN IV source program must be run through a FORTRAN IV
compiler and a
task builder, or linker, before it becomes an executable program.
The compiler translates the source program into an object module; then,
the task
builder, or linker, produces the executable program by combining the
object
modules with the necessary routines from the FORTRAN IV Object Time
System
(OTS) and the user library. (See Figure 1-1.)
The FORTRAN IV OTS is a library of assembly language modules; each
module
contains one or more routines that perform various functions needed
by FORTRAN programs. A routine is referenced by an entry point, which is
the address of the routine's first instruction.
1.1
OBJECT MODULES
A compiler can generate two types of object modules; threaded code
inline code.
You choose threaded or inline code by using the
appropriate
compiler switch from the list below:
or
RT-11
RSTS/E
RSX-11M, IAS
/code:xxx
/I:xxx
/CD:xxx
where xxx is:
EAE
EIS
FIS
THR
(EAE hardware)
(EIS hardware)
(EIS and FIS hardware)
threaded code
}
}
}
inline code
1.2
THREADED AND INLINE CODE
Most FORTRAN programs should be compiled with threaded code because
threaded code is smaller and executes as fast as inline code. The
exception is a
FORTRAN program which uses only integer arithmetic; in this case,
inline
code executes faster and is as small as threaded code. Threaded
code has
one advantage regardless of the FORTRAN program being linked;
it is
hardware independent. In other words, threaded code object modules
created
under one system configuration can be linked under another
configuration
without being re-compiled. Inline and threaded code are compared in
Figure
1-2.
PAGE 1-2
OTS
FORTRAN IV
Figure 1-1
FORTRAN IV OTS
PAGE 1-3
Source Code
Load Map
Inline Code
Threaded Code
Figure 1-2
Comparison of Inline and Threaded Code
in
The numbers in parentheses following each statement are used later
the
text.
PAGE 1-4
OTS
1.2.1
FORTRAN IV
Inline Code
When inline code is selected, the compiler produces the one-to-one PDP11
machine instructions required for the arithmetic hardware in the
system
configuration. If a function cannot by performed by a short sequence
of
machine instructions, the OTS routine for that function is referenced.
1.2.2
Threaded Code
Threaded code consists of entry points to the OTS routines and any
arguments the routines may need. When the threaded code modules are
linked,
the task builder, or linker, creates a list of the routine and argument
addresses and places the address of this list in R4. Later, during
program
execution, the executive uses R4 as a virtual program counter to
step
through the threaded code.
To begin execution, the executive loads the address of the first
threaded
code routine into R4, and executes the following instruction:
JMP @(R4)+
This instruction passes control to the first routine and increments R4,
the
virtual program counter; R4 now points to the address of either the
next
routine or the arguments needed by the first routine (any arguments
required by a routine are placed in memory following the routine's
entry
point, see Figure 1-2, MOF$MS). The arguments are addressed in
autoincrement address mode which increments R4 after the argument is
referenced.
Therefore, at the end of the routine, regardless of the number of
arguments
required, R4 contains the address of the next routine. At the end of
the
routine, the executive executes the instruction "JMP @(R4)+" which
passes
control to the next routine and again increments R4. In this way the
executive uses R4 to step through the threaded code.
Below is a step by step explanation of the threaded code in Figure
2;
the numbers below correspond to the numbers in parentheses in that
figure.
1.
The internal statement number is incremented.
2.
The variable, REAL, is moved from memory to stack.
1-
The address
of
the variable is $DATA+#000010. (See the load map in Figure 1-2.)
3.
A floating-point divide is performed.
The
numerator
is
on
stack
immediately in memory.
the
and
the
denominator
follows
The
first word of the floating-point constant, 2.0, is #040400.
4.
The value on top of the stack is converted to REAL*8.
5.
The double-precision
constant
3.1415926535D0
is
added
to
the
number on top of the stack.
Only constants that fit in one 16-
bit
word are stored inline.
Therefore, in this example, a memory
location in the $DATAP PSECT holds the value of the doubleprecision
constant.
FORTRAN IV OTS
PAGE 1-5
6.
The
The value on top of the stack is moved to location DBLE.
address of DBLE is $DATA+#000000. (See the load map in Figure
1-2.)
1.3
THE OTS MODULES
The FORTRAN IV OTS is used on the following systems:
1.
2.
3.
4.
RSTS
RSX-11
RT-11
VAX
Because of the differences between the systems, there are three
groups of
OTS modules:
1.
Modules common to all of the systems (these modules use
conditional code where it is necessary to differentiate between
systems)
2.
Modules common to RT-11 systems, and RSTS/E systems running
under
the RT-11 emulator
3.
Modules common to RSX-11 systems, IAS
systems,
and
VMS
systems
running under RSX Compatibility Mode
If you are using RT-11 or RSTS/E your FORTRAN OTS consists of the
modules
in groups 1 and 2 above. If you are using RSX-11, IAS or VMS your
FORTRAN
OTS consists of the modules in groups 1 and 3 above. In this
manual, when
a reference is made to the OTS modules as a group, the reference
applies to
the FORTRAN OTS which you are using.
The modules of the OTS fall into six principal categories:
1.
Utilities
2.
3.
4.
5.
6.
File handling
Conversions
Arithmetic functions
Subroutine support
Library functions
They are discussed briefly below and in greater detail in later
chapters.
1.3.1
Utilities
Utility routines perform functions needed by other routines. For
example,
they get files, put blocks in files, and check the status of
specified
PAGE 1-6
OTS
FORTRAN IV
bits. Under normal circumstances, the programmer does not see
routines, because they are called only by other routines.
1.3.2
these
File Handling
File-handling routines perform program I/O which includes reading,
writing,
opening and closing files. If an error occurs during I/O, the file
handling routines direct program control; if the keywords END or ERR
were
used, control will be passed to a recovery routine, otherwise, control
is
passed to an exiting routine.
1.3.3
Conversions
There are two types of conversions, arithmetic and I/O:
1.
Arithmetic conversions convert data from one type to another.
For
example,
if a program adds an integer to a real number, an
arithmetic routine converts the integer to a real number before the
addition is performed.
2.
I/O conversions convert data from internal format to external
format, or vice versa.
For example, if an input format statement
has
an L field descriptor, the data are read as 'T' or 'F' and converted to a -1 or 0, respectively, before being stored.
1.3.4
Arithmetic Functions
The arithmetic routines perform math operations;
multiplication
division
addition
subtraction
exponentiation
and program control operations;
branches
DO statements
logic
The code needed to move variables from one storage area to another is
also
included in the arithmetic routines.
FORTRAN IV OTS
PAGE 1-7
1.3.5
Subroutine Support
OTS subroutine support consists of the routine which transfers
program control to the subroutines defined in the OTS, and the routines that
perform
the subroutines defined in the OTS.
1.3.6
Library Functions
The OTS library routines perform the FORTRAN library functions.
1.4
CALLING THE OTS ROUTINES
Listed below are the calls used to reference the FORTRAN IV OTS
routines.
By far the most common calls are those using register 4 (R4) and
the program counter (PC).
(See
1.
R3 calls are used to call SAVRG$. (See Section 4.34.)
2.
R4 calls are used to execute or simulate threaded code.
Section 1.2.2 for more information on threaded code.)
3.
R5 calls are used to call $CHKER (See Section
5.4.1.) and
$OPNER
(Section 5.4.9).
4.
PC calls are used to call all other user-defined and OTS
routines;
this is the PDP-11 standard calling convention.
CHAPTER 2
I/O IN THE FORTRAN IV OBJECT TIME SYSTEM
The I/O subsystem of the FORTRAN IV OTS uses two data bases.
The
first
data base is the work area; this contains information concerning
the I/O
statement. The work area also contains an offset FILPTR which
points to
the second data base when an I/O operation is in progress. For
RT-11 and
RSTS/E systems, this second data base is the File Descriptor Block
(FDB)
which contains information concerning the file being processed.
For IAS,
RSX-11 and VMS, this second data base is the Logical Unit Control
Block
(LUB) which contains, among other things, the offset D.FDB which
points to
the FDB.
Figure 2-1
The I/O Subsystem in the FORTRAN IV OTS
PAGE 2-2
SYSTEM
I/O IN THE FORTRAN IV OBJECT TIME
Because only routines which deal directly with the files are system
dependent, the I/O subsystem is divided into three levels (See Figure 21.);
this allows many of the routines to be used for all systems.
The
major
difference between the systems is that in RT-11 and RSTS/E, the FDB is
an
OTS entity; in IAS, RSX-11 and VMS, the FDB is a system entity.
This
means that in RT-11 and RSTS/E systems all of the routines in the I/O
subsystem are performed within the OTS; in IAS, RSX-11 and VMS systems
the
routines in the I/O subsystem often call system routines to perform
file
control and file processing.
The three levels of the I/O subsystem are described below:
1.
The compiled code interface level contains the I/O
routines
that
are called directly from the compiled code.
2.
vari-
The data formatting level contains the routines that convert
ables
from internal representation to external representation
and
vice versa.
3.
The record processing level contains the routines that act on
the
files.
In addition to the routines in these three levels, there are also I/O
support routines used by routines in all three levels.
The following sections will describe the three I/O levels and the I/O
support routines.
2.1
The Compiled Code Interface
There are four types of compiled code interface:
com-
file interface, I/O
mand interfac, I/O format statement interface, and I/O list interface.
The
sections below describe each type of interface. Table 2-1 lists the
entry
points and section references for the routines in the compiled code
interface. For more information about a routine in this section, see the
section reference of that routine in Table 2-1.
I/O IN THE FORTRAN IV OBJECT TIME SYSTEM
PAGE 2-3
Table 2-1
Compiled Code Interface Routines
|-------------------------------|
|Type of
| Entry | Section |
|Interface | Point | Reference |
|-------------------------------|
|
|BKS$
|
|
|
|$CSTM
|
|
|File
|$OSTM
|
|
|
|RWD$
|
|
|-------------------------------|
|
|DEC$
|
|
|
|DEF$ * |
|
|I/O
|DEO$
|
|
|Command
|ENC$
|
|
|
|ENO$
|
|
|-------------------------------|
|
|IBR$ * |
|
|
|IBW$ * |
|
|
|IFR$
|
|
|I/O
|IFW$
|
|
|Format
|ILR$
|
|
|Statement |ILW$
|
|
|
|IRR$ * |
|
|
|IRW$ * |
|
|
|IUR$ * |
|
|
|IUW$ * |
|
|-------------------------------|
|
|EOL$
|
|
|
|TAC$
|
|
|
|TAD$
|
|
|
|TAF$
|
|
|
|TAI$
|
|
|
|TAL$
|
|
|
|TAP$
|
|
|I/O List |TAQ$
|
|
|
|TVC$
|
|
|
|TVD$
|
|
|
|TVF$
|
|
|
|TVI$
|
|
|
|TVL$
|
|
|
|TVP$
|
|
|
|TVQ$
|
|
|
|TVS$
|
|
|-------------------------------|
*
VMS.
These routines are different for RT-11, RSTS/E and IAS, RSX-11,
PAGE 2-4
SYSTEM
2.1.1
I/O IN THE FORTRAN IV OBJECT TIME
File Interface
There are four file interface routines.
Because these routines act
on
files they are system dependent; they perform the same function on
all
systems but, are implemented one way for RT-11 and RSTS/E, and a
different
way for IAS, RSX-11 and VMS.
The BKS$ and RWD$ routines perform the FORTRAN IV BACKSPACE and
REWIND
statements, respectively.
The $OSTM and $CSTM routines are used to
check
the keywords given by the FORTRAN IV OPEN and CLOSE statements,
respectively.
2.1.2
I/O Command Interface
DEC$ and ENC$ perform the FORTRAN IV DECODE and ENCODE statements,
respectively.
If the format specifier in a DECODE or ENCODE statement is
replaced by a format given in an array, DEO$ and ENO$ perform the
statements.
Finally, DEF$ performs the DEFINE statement.
2.1.3
I/O Format Statement Interface
The I/O statement interface routines first check to be sure that the
desired I/O can be preformed on the specified file. If it cannot, the
I/O
statement interface routine generates an error;
otherwise, the
routine
passes control to the data formattting level.
For instance, if a formatted read statement occurs in a FORTRAN IV
program,
IFR$ checks the specified file. If the file is not formatted, IFR$
will
generate an error rather than pass control to the data formatting
level.
ILW$ is called for list formatted write operations; IBR$ and IBW$
are
called for object time I/O operations; IFR$ and IFW$ are called for
formatted I/O; IRR$ and IRW$ are called for random access I/O; and IUR$
and
IUW$ are called for unformatted I/O.
2.1.4
I/O List Interface
Before the data formatting level can translate the elements of the I/O
list
from internal to external representation or vice-versa, information
about
the elements is needed. For instance, their types, their sizes, the
address of the first element, and how many elements there are; this is
the
information the I/O list interface places in the work area before
passing
control to the data formatting level. The I/O list interface routines
with
names beginning with 'TA' are used for elements which are arrays; the
routines with names beginning with 'TV' are used for elements which are
variables or constants. The EOL$ routine terminates the I/O list.
I/O IN THE FORTRAN IV OBJECT TIME SYSTEM
PAGE 2-5
2.2
Data Formatting Level
Table 2-2 lists the entry points and section references for the
routines in
the data formatting level. These routines convert data, according
to the
format given, from internal to external representation, or viceversa.
The routines in modules $CONVF, $CONVI and $CONVL with entry points
ending
in 'O,' convert from internal to external representation; the
routines in
these modules with entry points ending in 'I,' convert from
external to
internal representation.
The first letter of the entry point
indicates
which FORTRAN IV format is being used.
not
The routines in module $FIO handle the conversions for all formats
covered in the first three modules listed in Table 2-2.
$OBFJMT converts the data passed in run time I/O.
For more information about a routine in this section, see Table 2-2
for the
section reference of that routine.
Table 2-2
Data Formatting Routines
|-------------------------------|
|
Module | Entry | Section
|
|
| Point | Reference |
|
| RCI$
|
|
|-------------------------------|
|
| $ECI
|
|
|
| ICI$
|
|
|$CONVI
| ICO$
|
|
|
| OCI$
|
|
|
| OCO$
|
|
|-------------------------------|
|$CONVL
| LCI$
|
|
|
| LCO$
|
|
|-------------------------------|
| $FIO
| $FIO
|
|
|
| $$FIO |
|
|-------------------------------|
| $OBJFMT | $OBJFMT|
|
|-------------------------------|
|
| DCO$
|
|
|
| ECO$
|
|
|$CONVF
| FCO$
|
|
|
| GCO$
|
|
|-------------------------------|
PAGE 2-6
SYSTEM
2.3
I/O IN THE FORTRAN IV OBJECT TIME
Record Processing Level
There are six record processing routines.
Because these routines act
on
files they are system dependent; they perform the same function on
all
systems but, are implemented one way for RT-11 and RSTS/E, and a
different
way for IAS, RSX-11 and VMS.
Table 2-3
Record Processing Routines
|-----------------------|
|
Entry
| Section
|
|
Point
| Reference |
|-----------------------|
| $CLOSE
|
|
| $EOF
|
|
| $GETREC
|
|
| $OPEN
|
|
| $PUTREC
|
|
|-----------------------|
The $CLOSE and $OPEN routines perform the FORTRAN IV CLOSE and OPEN
statements, respectively.
$GETREC and $PUTREC read and write a file's records, respectively.
$EOF performs the FORTRAN IV ENDFILE statement.
For more information about a routine in this section, see Table 2-3 for
the
section reference of that routine.
2.4
I/O Support Routines
The I/O support routines are called by routines in all levels
I/O
subsystem.
of
the
I/O IN THE FORTRAN IV OBJECT TIME SYSTEM
PAGE 2-7
Table 2-4
I/O Support Routines
|-----------------------|
|
Entry
| Section
|
|
Point
| Reference |
|-----------------------|
| $CHKER * |
|
| $DUMPLAST |
|
| $FCHNL ~ |
|
| FND$ ~
|
|
| $GETBLK
|
|
| $GETFILE |
|
| $GETINF
|
|
| $INITIO
|
|
| $OPCL ~
|
|
| $OPNER * |
|
| $PUTBLK
|
|
| $SAVRG
|
|
| $SAVR4
|
|
| $SETINF
|
|
|-----------------------|
*
~
These routines are used by RT-11 and RSTS/E only.
These routines are different for RT-11, RSTS/E and IAS, RSX-11,
VMS.
$CHKER is called if an error occurs during an I/O operation; $OPNER
an
error occurs during execution of the OPEN statement. $CHKER and
$OPNER
first check to see if the keyword ERR was used. If ERR was not
used, they
return control to the statement which caused the error;
otherwise, they
call $CLOSE to close the file and then $IOEXIT, which recovers the
program
from the error and passes control to the transfer statement given by
ERR.
if
$DUMPLAST prepares a buffer containing the last block of a file;
then, if
necessary, calls $PUTBLK to write it to the file.
$INITIO is called by all of the I/O format statement interface
routines to
initialize I/O.
$OPCL enters the OPEN statement keywords and the CLOSE
keywords
statement
in the OTS work area.
for
of
The following I/O support routines are called to get
the
calling routine:
information
1.
$FCHNL gets the address of the File Descriptor Block (FDB)
2.
FND$ is used in random access I/O for finding
a
specified block
3.
$GETBLK gets a block from a file
the
address
PAGE 2-8
SYSTEM
4.
I/O IN THE FORTRAN IV OBJECT TIME
$GETFILE checks to see if an I/O operation is
in
progress,
then
calls $FCHNL to get the address of the FDB
5.
$GETINF is used in random access I/O for finding the number
of
a
specified record
6.
$PUTBLK writes a block to a file
7.
$SAVRG is a save/unsave coroutine for six registers
8.
$SAVR4 is a save/unsave coroutine for four registers
9.
$SETINF is used in random access I/O for finding the length
of
a
specified
record.
$SETINF also enters the record length, and
the
number of the next block in the work area
For more information about a routine in this section, see Table 2-4 for
the
section reference of that routine.
CHAPTER 3
REDUCING PROGRAM SIZE
This chapter explains how you can reduce program size through a
knowledge
of the OTS.
It is written under the assumption that you have
read the
chapter entitled "Increasing FORTRAN IV Programming Efficiency" in
the appropriate FORTRAN IV User's Guide. If you have followed all of
the programming hints in that chapter and your program still needs
space, this
chapter should be useful.
There are four sections in this chapter:
1.
Section 2.1 explains the automatic code reduction done by
the FORTRAN OTS
program
2. Section 2.2 explains how you can reduce code if your
uses
run time formatting or list formatting
3.
Section 2.3 explains how to use overlays on
an
RT-11
RSTS/E
system
4.
Section 2.4 explains how to use overlays on an RSX-11M
system
3.1
REDUCTIONS MADE BY THE OTS
The OTS saves a FORTRAN programmer both execution time and memory
space in
two ways: by grouping the OTS entry points efficiently, and by
optimizing
the code for common arithmetic statements.
3.1.1
GROUPING OF THE ENTRY POINTS
or
When object modules are linked, all references to OTS entry points
be
resolved by including, in the task image, the OTS modules
defining those
entry points. Because entire modules must be brought into memory,
entry
points are grouped as efficiently as possible. They are placed in
the same
module:
must
1.
If they share code.
Several entry points
may
perform
functions
which
are
very
similar,
functions
which differ only in
a flag
value or in the way arguments are passed.
the
For instance,
module
for
random
access,
$RIO,
contains the entry
points IRR$,
$IRR, IRW$, and $IRW;
differ in
the pairs IRR$/$IRR and IRW$/$IRW
PAGE 3-2
SIZE
REDUCING PROGRAM
a read/write flag value, and the different placement of the
dollar
sign ($) within each pair indicates a difference in how
arguments
are passed.
Because of their similar functions, the four
entry
points can share much of their code.
2.
utility
If they are likely to be used together.
For instance, the
routines $GETBLK and $PUTBLK, which are used for
reading/writing
blocks to/from a file, are both in module $RWBLK. Grouping
these
entry points into one module reduces the linker's overhead as
it
searches the library for unresolved references.
3.1.2
CODE OPTIMIZATION
<add>
3.2
DUMMY ROUTINES
In order for a FORTRAN program to perform I/O operations the necessary
I/O
conversion routines from the OTS must be included in the task
image.
FORTRAN format statements indicate which I/O conversion routines are
needed
in the task image. Therefore, instead of searching the OTS for all of
the
I/O conversion routines, the task builder, or linker, searches and
includes
in the task image, only those routines needed by the program being
processed. In run time and list formatting, however, the format is not
specified.
Since the format is not specified in run time and list formatting,
the
linker must include all of the I/O conversion routines in the task
image
because any or all of them may be needed. However, if you know in
advance
which I/O formats are going to be used at run time or in the list,
using
dummy routines you can prevent the linker from including the
unnecessary
I/O routines.
A dummy routine is a blank macro with the same name as a real
routine's
entry point. Because the linker searches the user library before the
OTS,
if there is a dummy routine, it will be included in the task image
instead
of the real routine.
Say your FORTRAN program uses run time formatting and you know that
the
only
format
that
will
be input is the G format for real
and
double-precision numbers. Your program only needs the I/O conversion
routines that perform real and double-precision conversions.
There are four modules that perform I/O conversions: $FIO, $CONVF,
$CONVI
and $CONVL. (See Sections 4.1.4 and 5.2.) $ILR/ILR$ and $ILW/ILW$ also
perform I/O conversions by calling routines in the $CONVF, $CONVI and
$CONVL
modules;
however, $ILR/ILR$ and $ILW/ILW$ perform list formatting and
are
not applicable to the problem stated in the paragraph above. $FIO
compiles
REDUCING PROGRAM SIZE
PAGE 3-3
the format statement and $CONVF
real,
double-precision and floating-point
these modules must be included in the task
conversions
for integer and octal variables and
conversions for
logical variables; the routines in
included in the task image.
performs
variables;
I/O
conversions
for
the routines in
image.
$CONVI performs I/O
$CONVL
performs
I/O
these modules do not need to be
You should make dummy routines to replace the routines in
$CONVI and
$CONVL.
Look in Appendix A, MODULE SIZES; by putting dummy
macros into
the task image in place of $CONVI and $CONVL you have saved 306
decimal
words.
3.3
OVERLAYING
This section explains how you can use this manual to decide if
certain OTS
modules can be safely overlaid. If you need information on how to
overlay
see either the RSX-11M Task Builer Manual or the RT-11 Linker
Manual.
When planning an overlay, you should be aware that a number of
different
routines frequently call the same entry points. The modules that
define
these entry points should be put in the root. A list of these
modules and
their entry points follows.
Module
Entry point(s)
$AOTS
$EOL
OTINIT
$SAVRE
$AOTS
$CHKER, $EOD/EOL$, $IOEXIT, $OPNER
$OTI, $$OTI, $$SET
SAVRG$, THRD$
When you are overlaying a program, a routine in one section of
overlay
an
region may call a routine in another section of the same overlay,
and you
must know whether the transfer of control is complete or
temporary.
In
this discussion, "complete" means that program control does not
return to
the calling program; "temporary" means that control is returned
to the
calling program. If the tranfer of control from one section of a
region to
another is complete, fine. However, if the transfer of control
from one
section to another is temporary, the overlay will not work.
To plan a successful overlay, you will need quite a bit of
information
about the entry points that your program calls. Chapters 3, 4, and
7 describe the entry points, according to the following format.
"Function" - tells what the entry point does, including which entry
points
are called and whether program control returns to the calling
routine or
not.
"Defined in" - tells what module the entry point is defined in and,
in parentheses, lists all the other entry points defined in that module.
"Called by" - lists the modules, and, in parentheses, the entry
points that
call the entry point being described.
PAGE 3-4
SIZE
REDUCING PROGRAM
"Calls" - lists the entry points, not in the module, that are called by
the
entry point being described.
Chapters 5, 6, and 8 are not organized in this way.
Chapter 5 the
I/O
conversions and the data conversions, Chapter 6 describes the
arithmetic
routines and Chapter 8 describes the library function routines. The
necessary information for these entry points is listed below:
"I/O conversions" - these entry points are grouped by modules, therefore
it
is simple to find all the entry points in a module.
"Called by" - following each I/O conversion entry point is a list, in
parentheses, of the entry points that may call it. Transfer of control
is
temporary.
"Calls" - None
"Data conversions" - these entry points are grouped by
therefore
it is simple to find all the entry points in a module.
"Called by" - $CVTDI and $CVTID are called by
of
control is temporary.
ILR$
modules,
($ILR).
Transfer
"Calls" - None
"Arithmetic routines" - these entry points are grouped by modules,
therefore it is simple to find all the entry points in a module.
"Called by" - the arithmetic entry points of the form $XXX are the
only
ones called.
They are only called by other arithmetic routines or by
library function routines. Transfer of control is temporary.
"Calls" - the entry points of the arithmetic routines share a lot
code
of
within modules. Therefore, if one entry point in the module calls an
entry
point from outside of the module, all of the entry points in the
module
will need the entry point called. If any calls are made, a NOTE at the
end
of the module description will tell you which entry points are
called.
Transfer of control is temporary.
"Library function routines" - all entry points in a given library
function
module can be found by looking through Table 8-1.
"Called by" - None
"Calls" - The entry points called by a function routine are listed in
Table
8-1 after the routine. Transfer of control is temporary.
It will probably take two or three tries to find an overlay plan that
will
work.
To simplify the scratch paper stage of the process, each time
you
put a module into a segment, you should include both the module name
and
the entry point(s) in that module that your program calls.
REDUCING PROGRAM SIZE
PAGE 3-5
Once you have a draft of the overlay, you must check that no entry
point in
the overlay is called by a module in another segment of the same
region,
unless there is a complete transfer of control.
To check this,
follow
these steps for each entry point in the overlay:
1.
2.
another seg-
Find the entry point in this manual.
Determine if the "Called by" list include a module in
ment of the same region.
If so, go to step 3.
If not, go
to step
5.
3.
Find the entry point listed in parentheses after the module
name.
This entry point transfers control to the entry point that
you are
checking.
4.
If
If the transfer of control is complete, go
to
step
5.
the
transfer of control is temporary, go to step 6.
5.
The overlay is okay;
proceed as indicated below.
6.
The overlay will not work;
try a new overlay plan.
If the overlay you planned works, you must check that the entry
points in
the overlay do not temporarily transfer control to entry points
in other
segments of the same region, or call entry points in regions with a
lower
number.
To simplify this check, next to each module list all of
the entry
points in that module. This is done by locating in this manual the
entry
point you know in the module: all other entry points in the
module are
listed in parentheses after "Defined in."
Once all the entry points in the module are listed, follow the steps
below
for each entry point called by your program.
1.
"Calls"
2.
is
Find the entry point in this manual.
If "Calls" is followed by "None," go to step
8.
If
followed by any entry point(s), go to step 3.
3.
a
Determine if the "Calls" list include any entry point(s) in
region
with
a
lower
number.
If so, go to step 9.
If
not, go to
step 4.
4.
Determine if the "Calls" list include any entry point(s) in
another
segment
of the same region.
If so, do steps 5 and 6
for each
entry point in another segment.
5.
If not, go to step 7.
Find the entry point in this manual.
This entry
point
transfers
control to the entry point you are checking.
6.
If
If the transfer of control is complete, return to step 1.
the
transfer of control is temporary go to step 9.
PAGE 3-6
SIZE
7.
REDUCING PROGRAM
Determine if the "Calls" list include any entry point(s) in a
region
with
a higher number.
If so, return to step 1.
go
to step 8.
8.
The overlay is okay.
9.
The overlay will not work;
try a new overlay plan.
If not,
CHAPTER 4
UTILITIES
This chapter describes the utility routines; the sections are
arranged alphabetically by the entry points which reference the routines.
If the
utility routine being described performs both threaded and inline
code, the
threaded code entry point is first, followed by the inline entry
point in
parentheses.
"Function"-
tells what the routine does.
"Defined in"- gives the name of the module in which the entry point
defined.
Where a module defines more than one entry
point, a
"see also" note directs the reader to the other
entry
point(s).
is
"Called by"described. The
lists the modules that call the routine being
entry
points in parentheses, following the module
names, are
the entry points in the module that call the routine.
"Calls"being
lists the entry points that are called by the
routine
described.
PC,
All utility routines are called by JSR PC,xxx and returned by RTS
unless otherwise noted at the beginning of the description.
4.1
BAH$ ($PSES)
These routines are used by RSTS and RT-11 only;
RSX-11
see PSE$
for
the
equivalent.
Function:
prints the
BAH$ performs a PAUSE
user's
message,
if
statement.
one
is
The
given,
routine
and then waits
for the
user's response before continuing program execution.
Defined in:
$PAUSE
Called by:
None
Calls:
None
PAGE 4-2
UTILITIES
4.2
BKS$ ($BKS)
Function:
a
BKS$ performs a BACKSPACE statement;
that is,
sequential
of the previous
file
to
the
beginning
it
resets
record.
This routine assumes that the logical unit
number
(LUN)
of
the
file to BACKSPACE is on the stack.
(See the PDP-11
FORTRAN Language Reference Manual for more
information
on
the
BACKSPACE statement.)
Defined in:
$BACKSPACE
Called by:
None
Calls:
$DUMPLAST
SAVR4$
$GETBLK
$GETFILE
4.3
$CAI
Function:
is
$CAI performs indirect subroutine and function calls;
it
called, for both library and user-defined subprograms, when
a
subprogram is used as
a
parameter
in
another
subprogram.
Arguments are passed and returned on the stack.
Defined in:
$CALL
Called by:
None
Calls:
None
4.4
$CAL
Function:
for
$CAL performs subroutine and function calls;
both
library
and
user-defined
are
passed and returned on the stack.
Defined in:
$CALL
Called by:
None
Calls:
None
it is used
subprograms.
Arguments
UTILITIES
PAGE 4-3
4.5
$CLOSE
Function:
$CLOSE
$CLOSE closes a file.
clears
the
file
If the file is already closed,
descriptor
block (FDB),
disassociates the
logical unit, restores the registers, and returns
control
to
the calling program.
If the file is open, $CLOSE
outputs the
last block of the file (if necessary), checks that
there are
no
more
data
after
the
last
block, and closes
the file.
$CLOSE then clears the FDB, disassociates the
logical
unit,
restores
the
registers,
and returns control to the
program.
If an error is encountered
calling
in
closing
file,
error number 52 is generated.
Defined in:
$CLOSE
Called by:
CLOSTM ($CSTM, $CSTMI)
$CLS (CLOSE)
$EOL ($OPNER)
$OPEN ($OPEN)
OPNSTM ($OSTM, $OSTMI)
Calls:
$CHKER
$DUMPLAST
$FCHNL
$GETBLK (RSTS only)
$PUTBLK
$WAIT
4.6
and
$CSTM ($CSTMI)
Function:
then
$CSTM checks the keywords for the CLOSE
calls $CLOSE to close the file.
statement
the
Defined in:
CLOSTM
Called by:
None
Calls:
$CHKER
$CLOSE
$$$DIS
$$$ERR
$GETFILE
$$OPCL
PAGE 4-4
UTILITIES
4.7
$DINT
Function:
part
$DINT is an internal OTS function;
of
a
double-precision
it finds the integer
number and returns the result on
the
stack.
Defined in:
$DINT
Called by:
DMOD (DMOD)
DSIN (DCOS, DSIN)
Calls:
None
4.8
$DUMPLAST
Function:
the
$DUMPLAST creates a buffer containing the last block
file.
If
of
this buffer differs from the version in the
file,
$PUTBLK is called to output the buffer.
The pointer
to
the
block is passed to $DUMPLAST in R0.
Defined in:
$DUMPLAST
Called by:
$BACKSPACE (BKS$/$BKS)
$CLOSE ($CLOSE)
$REWIND (RWD$/$RWD)
Calls:
$PUTBLK (conditionally called;
4.9
see Function)
$ERRTB
Function:
Ap-
$ERRTB initializes the error table in the work area. (See
pendix C.2.)
Defined in:
ERRSS
Called by:
$OTI (OTI$/$OTI, $$OTI)
Calls:
None
UTILITIES
PAGE 4-5
4.10
$FCALL
Function:
within
$FCALL calls single argument FORTRAN
other
FORTRAN
functions.
The
functions
pointer
from
to the
function is
passed in R4;
the pointer to the argument list in R5.
Defined in:
$FCALL
Called by:
$CABS (CABS)
$CEXP (CEXP)
$CLOG (CLOG)
$CSIN (CCOS, CSIN)
$CSQRT (CSQRT)
$DABS (DABS)
$TANH (TANH)
$XDD (XFD$/$XFD, XDF$/$XDF, XDD$/$XDD)
$XFF (XFF$/$XFF)
Calls:
None
4.11
$FCHNL
the
Function:
cal-
99.
If
$FCHNL receives the logical unit number (LUN), from
ling
routine,
in R2.
The LUN must be between 1 and
it is not, $FCHNL generates error
$FCHNL
number
20.
then
searches for a valid RT-11 channel.
If a channel is
not available, error number 21 is generated.
Otherwise,
the
RT-11
channel number is entered in the file descriptor block
(FDB),
and $FCHNL returns to the calling program with the
address of
the FDB in R0.
Defined in:
$FCHNL
Called by:
$CLOSE ($CLOSE)
$GETFILE ($GETFILE)
$INITIO ($INITIO)
Calls:
None
PAGE 4-6
UTILITIES
4.12
FND$ ($FND)
Function:
FND$
FND$ is used in reading a direct access
calls
file.
$INITIO to initialize I/O operations.
First,
When $INITIO
is
finished, FND$ makes sure that either a
DEFINE
FILE
or
an
OPEN statement has been executed to associate the file with
a
logical unit number (LUN);
if a LUN is not
associated
with
the file, error number 37 is generated.
FND$ then checks
the
device because random I/O
cannot
be
performed
on
a
line
printer
or
terminal.
If
either of these devices is
being
used, error number 38 is generated.
FND$
now
searches
for
the
desired
block.
If
the
desired
block is the
current
block, FND$ passes control back to the calling
program.
If
the desired block is not the current block, the current
block
is output, and FND$ returns to the calling program
with
the
address of the desired block on the stack.
Defined in:
$FIND
Called by:
None
Calls:
$GETINF
$INITIO
$PUTBLK
SAVR4$
4.13
$GETBLK
Function:
error
$GETBLK gets a block from the
file.
If
I/O
fails,
number
23
is
generated, unless ERR= was used;
if ERR=
was
used, $GETBLK jumps to $IOEXIT.
$IOEXIT recovers the
program
from
the
error
and passes control to the next statement
of
the compiled code (JMP @(R4)+ for threaded code).
Defined in:
$RWBLK (See also $EOF2, $EOFIL, $PUTBLK.)
Called by:
$BACKSPACE (BKS$/$BKS)
$CLOSE ($CLOSE, RSTS only)
$GETREC ($GETREC)
$RIO (IRR$/$IRR, IRW$/$IRW)
$UIO (IUR$/$IUR, IUW$/$IUW)
Calls:
$IOEXIT (conditionally called;
see Function)
UTILITIES
PAGE 4-7
4.14
$GETFILE
Function:
descriptor
$GETFILE is called to get the address of a file's
block
(FDB).
First, $GETFILE checks to see if an I/O
operation is in progress.
number
If I/O is in progress, error
26
is
generated;
otherwise,
$GETFILE
calls
$FCHNL.
$FCHNL
finds the address of the FDB and associates the file
with
an
RT-11
channel.
$FCHNL returns to $GETFILE, which
saves the
address of the FDB in the work area (See
Appendix
C.2.) and
returns to the calling program.
Defined in:
$GETFILE
Called by:
$ASSIGN (ASSIGN)
$BACKSPACE (BKS$/$BKS)
$CLOSTM ($CSTM, $CSTMI)
$CLS (CLOSE, RT-11 and RSTS/E)
$EOF (EOF$/$EOF)
OPNSTM ($OSTM, $OSTMI)
$REWIND (RWD$/$RWD)
$RIO (DEF$/$DEF)
Calls:
$FCHNL
4.15
$GETINF
Function:
number
$GETINF performs random access I/O.
of
a requested record.
$GETINF gets the
If the number of records in
the file
is given, $GETINF checks to see if the requested
record is in
the file.
If the record number is higher than allowed
in the
file, error number 24 is generated.
passes pro-
$GETINF then
gram
control to $SETINF which finds the length of the
record
and passes control to the routine that called $GETINF.
Defined in:
$RIO (See also DEF$, IRR$/IRW$, $SETINF.)
Called by:
$FIND (FND$/$FND)
Calls:
None
PAGE 4-8
UTILITIES
4.16
$GETREC
Function:
re-
$GETREC is used for reading formatted files;
cord from a file.
it gets
a
If the record is too long, error number
22
is generated.
Defined in:
$GETREC
Called by:
$IFR (IFR$$/$$IFR, IFR$/$IFR)
$LISTI (ILR$/$ILR)
Calls:
$EOF2
$GETBLK
4.17
$INITIO
Function:
be
$INITIO initializes all I/O operations.
If the
file
used is not open, $INITIO opens a default file.
to
$INITIO
then
checks to see if an I/O operation is already in progress.
If
it is, error 26 is generated because recursive I/O is not
allowed;
otherwise, $INITIO gets the address of the file
descriptor
block
(FDB)
by calling $FCHNL.
$FCHNL returns
the
address of the FDB in R0.
$INITIO then passes
control
back
to the calling program.
The calling program now sets the read/write bit.
If
a
read
is being attempted after a write, error number 25 is
generated, unless the device being used is a terminal.
If no
error
is
generated,
the
calling
program
passes control back
to
$INITIO.
after
$INITIO then calls $OPEN to open the
file;
opening
the
file,
$OPEN
returns
control to $INITIO
which
passes control back to the calling program for the last
time.
Defined in:
$INITIO
Called by:
$FIND (FND$/$FND)
$IBR (IBR$/$IBR)
$IBW (IBW$/$IBW)
$IFR (IFR$/$IFR, $$IFR)
$IFW (IFW$/$IFW, $$IFW)
$LISTI (ILR$/$ILR)
$LISTO (ILW$/$ILW)
$RIO (IRR$/$IRR, IRW$/$IRW)
$UIO (IUR$/$IUR, IUW$/$IUW)
Calls:
$FCHNL
$OPEN (conditionally called; see Function)
UTILITIES
PAGE 4-9
4.18
ISN$
Function:
ISN$ increments the internal statement number.
Defined in:
$ISNLS (See also $ISNTRC, LSN$, $LSNTRC.)
Called by:
None
Calls:
None
4.19
$ISNTRC
Function:
state-
$ISNTRC is the section of ISN$ that jumps to the next
ment of the compiled code (JMP @(R4)+ for threaded
code);
it
also keeps track of the necessary
DEBUG
information
is
being used.
Defined in:
ISNLS (See also ISN$, LSN$, $LSNTRC.)
Called by:
None
Calls:
None
4.20
LSN$
Function:
LSN$ increments the labeled statement number.
Defined in:
$ISNLS (ISN$, $ISNTRC, $LSNTRC)
Called by:
None
Calls:
None
if
PAGE 4-10
UTILITIES
4.21
$LSNTRC
Function:
state-
$LSNTRC is the section of LSN$ that jumps to the next
ment of the compiled code (JMP @(R4)+ for threaded code);
it
also keeps track of the necessary
information
if
DEBUG
is
being used.
Defined in:
ISNLS (ISN$, $ISNTRC, LSN$)
Called by:
None
Calls:
None
4.22
$$OPCL
Function:
it
$$OPCL enters all of the given keywords in the work area;
also
contains
the
code
that
generates
the
inconsistent
OPEN/CLOSE specification error (error number 51).
Defined in:
OPNCLO (See also $$$DIS, $$$ERR.)
Called by:
CLOSTM ($CSTM, $CSTMI)
OPNSTM ($OSTM, $OSTMI)
Calls:
None
4.23
$OPEN
Function:
an
$OPEN associates the file with a device, assigns the file
RT-11 channel, and then checks for the following errors:
1.
bad device (error number 27)
2.
no RT-11 channel available (error number 31)
3.
open failure (error number 28)
4.
not enough room for the device handler (error
number
29)
UTILITIES
PAGE 4-11
If no error is generated, $OPEN associates the
with
file
a
format
mode,
either
the one specified by the user
fault.
Finally, $OPEN sets the "open" bit in the
or a destatus word
(See
Appendix C.4.)
and
passes program control back
to the
calling routine.
Defined in:
$OPEN
Called by:
$INITI ($INITIO)
OPNSTM ($OSTM, $OSTMI)
Calls:
$CLOSE
$OPNER
$WAIT
4.24
and
$OSTM ($OSTMI)
Function:
then
$OSTM checks the keywords for the
calls $OPEN to open the file.
Defined in:
OPNSTM
Called by:
None
Calls:
$CHKER
$CLOSE
$$$DIS
$$$ERR
$GETFILE
$$OPCL
$OPEN
$SETINF
4.25
$OTI ($$OTI)
OPEN
statement
Function:
an
If
$OTI initializes the work area of the
error
FORTRAN
OTS.
occurs during initialization an RT-11 or RSTS/E
system
will generate the message "?ERR 62 FORTRAN
fail,"
start
an
IAS, RSX-11 or VMS system will generate error number
130.
PAGE 4-12
UTILITIES
The first statement of $OTI places a nonzero number in R1
to
indicate
that threaded code is being used;
the first
statement of $$OTI places a zero in R1
to
indicate
that
inline
code is being used.
Defined in:
OTINIT
Called by:
None
Calls:
$ERRTB
$EXIT
$IOEXIT
$VIRINT
4.26
$POPR3
Function:
from
$POPR3 is called when a function needs two words
taken
the stack and put in R0 and R1.
Called by:
$AMIN0 (AMAX0, AMIN0)
$AMOD (AMOD)
$ATAN (ATAN, ATAN2)
$FLOAT (FLOAT)
Calls:
None
4.27
$POPR4, $POPR5
Function:
more
$POPR4 and $POPR5 reference the same routine, $POPR4 is
commonly
used.
This routine is called when a function
needs
four words taken from the stack and put in R0 through R3.
Called by:
$CEXP (CEXP)
$DATAN (DATAN, DATAN2)
$DEXP
$DLOG
$DMOD
$DSIN
Calls:
None
(DEXP)
(DLOG, DLOG10)
(DMOD)
(DSIN)
UTILITIES
PAGE 4-13
4.28
and
PSE$ ($PSE)
These routines are used for RSX-11 only;
the
RT-11 equivalents.
Function:
prints the
see BAH$ for the RSTS/E
PSE$ performs a PAUSE statement.
user's
message,
if
one
is
This
given,
routine
and then waits
for the
user's response before continuing program execution.
Defined in:
$PAUSE
Called by:
None
Calls:
None
4.29
file
$PUTBLK
Function:
is
$PUTBLK is used to write a block to a file.
readonly,
$PUTBLK
generates
If the
error number 35.
If
I/O fails
during the write operation error number 23 is
generated,
unless
ERR=
was
used;
if
ERR=
was used, $PUTBLK
jumps to
$IOEXIT.
error
$IOEXIT recovers the program
from
the
and
passes
control
to
the
next statement of the
compiled code
(JMP @(R4)+ for threaded code).
Defined in:
$RWBLK (See also $EOF2, $EOFIL, $GETBLK.)
Called by:
$CLOSE (CLOSE)
$DUMPLAST ($DUMPL)
$FIND (FND$/$FND)
$PUTREC ($PUTREC)
$RIO (IRR$/$IRR, IRW$/$IRW)
$UIO (IUW$/$IUW)
Calls:
$IOEXIT (conditionally called;
see Function)
PAGE 4-14
UTILITIES
4.30
$PUTREC
Function:
a
$PUTREC is used for writing formatted files;
it
outputs
record to a file.
Defined in:
$PUTREC
Called by:
EOF ($EOF; if file is formatted)
$IFW (IFW$/$IFW, $$IFW/IFW$$)
$LISTO (ILW$/$ILW; RT-11 and RSTS/E only)
$UIO (IUR$/$IUR, IUW$/$IUW; if file is unformatted)
Calls:
$PUTBLK (unless output is to the terminal)
4.31
RET$
Function:
of
This routine passes program control to the next statement
the compiled code (JMP @(R4)+ for threaded code).
Defined in:
$RETS
Called by:
$ASFRE (STK$F, STK$I, STK$L)
$RETD (RET$D)
$RETDS (STK$D)
Calls:
None
4.32
RET$D, RET$F, RET$I, RET$L
Function:
a
These routines are called
user-defined
function.
to
return
to
OTS
code
from
The
result
of the function is
returned in registers R0 through R3.
The last character of
the
entry point name represents the data type of the function:
D
F
I
L
Defined in:
-
REAL*8
REAL*4
INTEGER
LOGICAL
$RETS
UTILITIES
PAGE 4-15
NOTE
RET$D is not defined in $RETS but in $RETD.
Called by:
None
Calls:
RET$
STP$ (RET$D only)
4.33
RWD$ ($RWD)
Function:
involves
RWD$ performs a REWIND statement.
the
record
This
statement
processing level of I/O (See I/O Chapter
of this
manual.)
so
this
routine's
performance depends
upon which
system you are using.
RT-11, RSTS/E:
FDB
RWD$ first calls $GETFILE to get the
address.
If
the file is not open or is random access
the pointer to the FDB and LUN are cleared to indicate
that
there
is
no
longer
an
active
file attached to the LUN
and RWD$
passes control to the calling routine.
Otherwise,
RWD$ calls
$DUMPLAST
to
output
the
last
block
of the file
and then
checks the format of file.
formatted
If the file is not
the
FDB
and
LUN are cleared and RWD$ passes control to
the calling routine;
otherwise the file pointer is reset to
the beginning
of
the
to the
calling routine.
file before RWD$ passes control back
IAS, RSX-11, VMS:
the
RWD$ first calls $GETFILE to
ge
FDB
address.
If
the file is not open the pointer to the
FDB is
cleared and RWD$ passes control back to the calling
program.
If
the
file is random access error number 148 is
generated.
If no error is generated RWD$ clears
a
special
bit,
DV.RW
(See
Table
C-8.) to indicate that a read operation
is being
performed on the file, and then jumps to
.POINT
to
perform
the
rewind.
If
no error occurs, the pointer to the
FDB is
cleared and RWD$ passes control back to the calling
routine,
otherwise,
error
number
148 is generated.
PDP-11
FORTRAN Language Reference Manual
information
on
REWIND.)
Defined in:
$REWIND
Called by:
None
Calls:
$DUMPLAST
$GETFILE
SAVR4$
for
more
(See the
PAGE 4-16
UTILITIES
4.34
SAVRG$
Function:
six
SAVRG$ serves as a register save/unsave
registers.
for
It receives two arguments on the stack.
Defined in:
$SAVRE
Called by:
$ENCODE (ENC$/$ENC, DEC$/$DEC)
$IBR (IBR$/$IBR)
$IBW (IBW$/$IBW)
$IFR (IFR$/$IFR)
$IFW (IFW$/$IFW)
$LISTI (ILR$/$ILR)
$LISTO (ILW$/$ILW)
$RIO (IRR$/$IRR, IRW$/$IRW)
$UIO (IUR$/$IUR, IUW$/$IUW)
Calls:
None
4.35
co-routine
SAVR4$
Function:
four
SAVR4$ serves as a register save/unsave co-routine
registers.
for
It receives four arguments on the stack.
Defined in:
$SAV4R
Called by:
$BACKSPACE (BKS$/$BKS)
$EOF (EOF$/$EOF)
$FIND (FND$/$FND)
$REWIND (RWD$/$RWD)
$RIO (DEF$/$DEF)
Calls:
None
UTILITIES
PAGE 4-17
4.36
$$SET
Function:
enters the
$$SET is called when an error occurs.
error
number
and
the
First $$SET
logical unit number (LUN)
associated
with the error in the work area, then $$SET enters the
error
in the error table. (See Appendix C.)
Warning:
therefore,
All errors trap to
this
routine;
it
must be in the root.
Defined in:
OTINIT
Called by:
$EOL ($CHKER)
Calls:
None
4.37
$SETINF
Function:
$SETINF
$SETINF is used only for random access files.
finds the length of a requested record.
First,
If the the
record is
too long, $SETINF
generates
error
number
40;
otherwise,
$SETINF
enters
the
length of the record into the
file descriptor block (FDB).
of
$SETINF then enters the number
the
next random block in the work area. (See Appendix
C.2.)
file
Defined in:
$RIO (See also DEF$, $GETINF, IRR$/IRW$.)
Called by:
is
$OPNSTM ($OSTM, $OSTMI;
random
access.
$SETINF is called only if a
Therefore,
to
save space, a dummy
$SETINF
entry point may be used if the program being run has
no
ran-
dom access I/O.)
Calls:
None
PAGE 4-18
UTILITIES
4.38
STK$D, STK$F, STK$I, STK$L
Function:
arith-
These routines are called to return to the OTS from an
metic
statement function.
The result of the function is
returned in registers R0 through R3.
The last character of
the
entry point name represents the data type of the function:
D
F
I
L
Defined in:
-
REAL*8
REAL*4
INTEGER
LOGICAL
$ASFRE
NOTE
STK$D is not defined in $ASFRE but in $RETDS.
Called by:
None
Calls:
RET$
4.39
THRD$
Function:
.
THRD$ is an entry point to
When
a
one
instruction:
JMP
@(R4)+
routine performs both threaded and inline code,
this
instruction is pushed onto the stack by MOV
THRD$,-(SP).
At
the end of the routine the address of the next instruction
is
on the stack for the inline code, and the address of the
JMP
@(R4)+
command is on the stack for threaded code.
Section 1.4 for a discussion on threaded code.)
(See
The following example is taken from module $ENCODE:
ENC$: MOV
$ENC: MOV
BR
DEC$: MOV
$DEC: MOV
COMMON: XXX
.
.
.
RTS
PC
THRD$,-(SP)
WRITEY,-(SP)
COMMON
THRD$,-(SP)
READY,-(SP)
;RETURN
;RETURN ADDRESS
;SET ENCODE FLAG
;RETURN ADDRESS
;SET DECODE FLAG
;COMMON CODE
UTILITIES
PAGE 4-19
When module $ENCODE is entered via the
threaded
code
entry
points, ENC$ or DEC$, the MOV THRD$,-(SP) instruction
is executed to push THRD$ onto the stack.
If
$ENCODE
is
entered
via
the
the
inline
entry
points,
$ENC
or
$DEC,
MOV
THRD$,-(SP) instruction is not
executed.
Therefore,
after
the
common
code
has
been executed, the RTS PC
instruction
causes the instruction on
executed.
the
stack
to
be
If
$ENCODE
was
entered by threaded code entry points,
that instruction will be JMP @(R4)+ ;
if $ENCODE was entered
by inline
entry
points, that instruction will be the next
inline
instruction.
Defined in:
$SAVRE
Called by:
$ENCODE (DEC$/ENC$)
$IBR (IBR$)
$IBW (IBW$)
$IFR (IFR$)
$IFW (IFW$)
$LISTI (ILR$)
$LISTO (ILW$)
$UIO (IUR$, IUW$)
$OBJENC (DEO$/ENO$)
$RIO (IRR$, IRW$, DEF$)
Calls:
None
4.40
$WAIT
Function:
opened
$WAIT temporarily stops all I/O while a file is being
or closed.
Defined in:
WAIT
Called by:
$CLOSE ($CLOSE)
$OPEN ($OPEN)
Calls:
None
CHAPTER 5
FILE HANDLING
This chapter discusses I/O initialization, I/O list transfer calls,
I/O exiting, and error processing. Each subsection is arranged
alphabetically by
the entry points which reference the routines. If the routine
being described performs both threaded and inline code, the threaded
code entry
point is first, followed by the inline entry point in parentheses.
"Function"-
tells what the routine does.
"Defined in"- gives the name of the module in which the entry point
defined.
Where a module defines more than one entry
point, a
"see also" note directs the reader to the other
entry
point(s).
is
"Called by"described. The
lists the modules that call the routine being
entry
points in parentheses, following the module
names, are
the entry points in the module that call the routine.
"Calls"being
lists the entry points that are called by the
routine
described.
All routines are called by JSR PC,xxx and returned via RTS PC,
unless otherwise noted at the beginning of the section.
5.1
5.1.1
I/O INITIALIZATION
DEC$ ($DEC)/ENC$ ($ENC)
Function:
ENCODE
DEC$ performs a DECODE statement;
statement.
(The
PDP-11
FORTRAN
ENC$
performs
an
Language Reference
Manual
describes these DECODE and ENCODE).
The
two
entry
points
share
much
of their code.
DEC$/ENC$ first checks to
see if
I/O is in progress.
If it is, error number 26
is
generated
because recursive I/O is not allowed.
then calls
The routine
PAGE 5-2
HANDLING
FILE
the formatted I/O processor, $$FIO (RT-11 and RSTS/W) or
$FIO
(RSX-11).
If an attempt is made to process more than one
record, DEC$/ENC$ generates error number 44 (error
number
155
for RSX-11).
Defined in:
$ENCODE
Called by:
None
Calls:
$$FIO (RT-11 and RSTS/E)
$FIO (RSX-11 only)
$SAVRG
THRD$ (DEC$ and ENC$ only)
5.1.2
DEF$ ($DEF)
Function:
random
DEF$ performs a DEFINE FILE statement which defines a
access file.
If the file is already open, error number 41
is
generated.
If the file is not open, DEF$ puts the
following
information in the file descriptor block (FDB):
1.
The address of the associated variable
2.
The record size (in words)
3.
The number of records in the file (See Appendix
C.3.)
DEF$ also sets the random access bit in the status word.
(See
Appendix
C.4.)
When this routine is finished, the file
has
been defined, but not opened.
Defined in:
$RIO (See also $GETINF, IRR$/IRW$, $SETINF.)
Called by:
None
Calls:
$GETFILE
SAVR4$
THRD$ (DEF$ only)
FILE HANDLING
PAGE 5-3
5.1.3
DEO$ ($DEO)/ENO$ ($ENO)
Function:
share much
DEO$ performs run time formatting.
of
their
code.
DEO$ and ENO$
They are used for reading and
writing, respectively.
DEO$/ENO$ finds the address of the format
string
and
then calls $OBJFMT to compile it.
DEO$ then
passes control to DEC$ to process the format string.
ENO$ then
passes
control to ENC$ to process the format string.
Defined in:
$OBJENC
Called by:
None
Calls:
$OBJFMT
THRD$ (DEO$ and ENO$ only)
5.1.4
$FIO
Function:
first
$FIO executes the
clears
factor.
the
compiled
format
statement.
$FIO
dollar format flag, then the P scale
It
is now ready for the first data item.
To get the
first item,
$FIO
returns to the calling program which returns
control to
$FIO;
$FIO completes the compilation.
$FIO uses a loop structure to perform compilation.
The
format
character
is
put
into
R0 and then sent to a
dispatch
character
cases,
table.
The dispatch table checks the
passes
control
format
and
to
the appropriate routine.
In some
the routine is in $FIO;
the
in
other
cases,
one
of
I/O
conversion routines is called.
(See Section 5.1.)
When finished, the routine passes control back
to
the
which
gets the next format character and repeats the
process.
Defined in:
$FIO (See also $$FIO.)
Called by:
$ENCODE (DEC$/$DEC, ENC$/$ENC;
$IFR (IFR$$/$$IFR, IFR$/$IFR)
$IFW (IFW$$/$$IFW, IFW$/$IFW)
$VCTRAN (TVC$/$TVC)
$VTRAN (TV?$/$TV?)
Calls:
$CHKER
RSX-11 only)
loop,
PAGE 5-4
HANDLING
5.1.5
FILE
$$FIO
Function:
by
$$FIO is the internal version of $FIO;
other OTS modules.
it is called only
$$FIO and $FIO as shown in the diagram
of
module $FIO below:
_________________
|
|
|$FIO : $
|
|
F
|
|
I
|
|
O
|
|
|
|
|
|$$FIO: C
|
|
O
|
|
M
|
|
M
|
|
O
|
|
N |
|
|
|_______________|
Diagram 4-1
Module $FIO
The code between the two routines becomes common
after
$FIO
clears the dollar format flag.
The $FIO routine is
described
in Section 4.1.4.
Defined in:
$FIO (See also $FIO.)
Called by:
$ENCODE (DEC$/$DEC, ENC$/$ENC;
Calls:
$CHKER
5.1.6
IBR$ ($IBR)
RT-11 and RSTS/E)
Function:
First,
IBR$ performs read operations in run time formatting.
IBR$
initializes
I/O operations by a call to $INITIO.
IBR$
then compiles the format string by
After
calling
$OBJFMT.
FILE HANDLING
PAGE 5-5
the
string
is
compiled, IBR$ passes control to
IFR$$ which
initializes the read operation for formatted files.
Defined in:
$IBR
Called by:
None
Calls:
IFR$$
$INITIO
$OBJFMT
SAVRG$
THRD$ (IBR$ only)
5.1.7
IBW$ ($IBW)
Function:
formatting.
IBW$
performs
First,
write
operations
in
run
time
IBW$ initializes I/O operations by a call to
$INITIO.
IBW$ then prepares the file for a write operation
and
calls
$OBJFMT
to
compile
the format string.
After the
string is
compiled, IBW$ passes control to IFW$$, the routine
that initializes the write operation for a formatted file.
Defined in:
$IBW
Called by:
None
Calls:
IFW$$
$INITIO
$OBJFMT
SAVRG$
THRD$ (IBW$ only)
5.1.8
IFR$ ($IFR)
Function:
IFR$ prepares a file for a formatted
read
operation.
IFR$
initializes
I/O
operations
by
calling $INITIO.
From this
point on this routine's performance depends on
which
system
you are using.
RT-11, RSTS/E:
was
IFR$ checks to see which operation
last
performed
operation
on the file, a read operation or a write
PAGE 5-6
HANDLING
FILE
generating error number 25 if a read operation is
being
attempted after a write operation, unless the device being
used
is a terminal.
The file is now initialized.
IFR$ then puts the address of $GETREC in the OTS
work
area.
(See
Table
C-3.
The
address
is
put in RECIO.)
IFR$
now
checks the format of the file;
if the
file
is
unformatted
error
number 32 is generated, otherwise, IFR$ passes
program
control to $FIO, the formatted I/O processor.
IAS, RSX-11, VMS:
IFR$ sets bits in the status word to
indicate
that
the file is formatted and that the last
operation
performed was a read operation.
Then IFR$ puts
the
address
of GFMTRC (described below) in the OTS work area.
(See
Table
C-4, the address is put in RECIO).
IFR$ now checks the
format of the file;
if the file is unformatted error number
159
is generated, otherwise, IFR$ passes program control to
$FIO,
the formatted I/O processor.
$FIO looks in RECIO to find the address of the
routine
that
will
read
the first record in the file;
if RT-11 or
RSTS/E
is used the routine is $GETREC
and
IFR$
is
not
affected,
however,
if IAS, RSX-11 or VMS is used the routine is
GFMTRC
and $FIO returns control module IFR$.
GFMTRC
calls
$GETREC
to
get
the
control
back to $FIO.
Defined in:
IFR$
Called by:
None
first
record from the file, and passes
Calls:
5.1.9
$FIO
$GETREC (RSX-11 only)
$INITIO
SAVRG$
THRD$ (IFR$ only)
$$IFR, IFR$$
Function:
are
$$IFR and IFR$$ are internal entry points to IFR$;
referenced
only
by OTS routines.
they
The routine referenced
by
$$IFR contains almost the same code as IFR$ and $IFR;
IFR$,
being
the threaded code entry point contains the MOV
#THRD$,
-(SP) instruction (See Section 3.41.), and both IFR$ and
$IFR
contain
a call to the SAVRG$ routine which saves certain
registers for the calling routine, but other than these two
exceptions
Section
4.1.8).
$$IFR
is
the
same
as
IFR$ ($IFR). (See
FILE HANDLING
PAGE 5-7
IFR$$ is only used with RT-11 and
shares
RSTS/E.
It
code
with
IFR$ ($IFR) once the initialization of the file
is complete, that is the code described in Section 4.1.8,
the
second paragraph under RT-11, RSTS/E.
Defined in:
$IFR
Called by:
$IBR (IBR$/$IBR)
Calls:
$FIO
$GETREC (IAS, RSX-11 and VMS only)
$INITIO ($$IFR only)
SAVRG$ ($$IFR only)
5.1.10
IFW$ ($IFW)
Function:
IFW$ prepares a file for a formatted write
operation.
IFW$
initializes I/O operations by calling $INITIO, then
checks to
see which was the last operation performed
file,
on
the
a
read operation or a write operation.
If it was a read
operation, IFW$ resets the pointer in the file to the
beginning of
the file.
The file is now initialized.
Once file initialization is complete, IFW$ puts
the
address
of
the
$FIO
routine on the stack so that when IFW$
is finished program control will pass to $FIO.
IFW$ then
checks to
see
if
the
file
is formatted;
if the file is
unformatted
error number 32 is generated because you cannot mix
formats,
otherwise,
record.
IFW$
calls
$PUTREC
to output the first
IFW$ passes program control to $FIO.
Defined in:
$IFW
Called by:
None
Calls:
$FIO
$INITIO
$PUTREC
SAVRG$
THRD$ (IFW$ only)
PAGE 5-8
HANDLING
5.1.11
FILE
$$IFW, IFW$$
Function:
are
$$IFW and IFW$$ are internal entry points to IFW$;
they
referenced only be OTS routines.
___________________________
|IFW$ : MOV
THRD,-(SP) |
|$IFW : JSR R3,SAVRG$
|
|$$IFW: JSR PC, $INITIO |
|
C
|
|
O
|
|
M
|
|
M
|
|
O
|
|
N
|
|IFW$$:
A
|
|
L
|
|
L
|
|_________________________|
Diagram 4-3
Module $IFW
The routine referenced by $$IFW contains almost the same
code
as
IFW$ and $IFW;
IFW$, being the threaded code entry
point
contains the MOV #THRD$, -(SP) instruction and both IFW$
and
$IFW contain a call to the SAVRG$ routine which saves
certain
registers for the calling routine, but other than
these
two
exceptions
$$IFW
is the same
as IFW$ ($IFW).
(See
Diagram
4.3.)
IFW$$, however, is called only if the file is
already
initialized;
therefore,
IFW$$ shares code with IFW$
($IFW)
and $$IFW after the initialization code
used
by
the
other
three
entry
points
(the initialization code is the
section
marked COMMON in Diagram 4-3).
The code referenced by
IFW$$
is described in the second paragraph of Section 4.1.10.
Defined in:
$IFW
Called by:
$IBW (IBW$/$IBW;
IFW$$ only)
Calls:
$FIO
$INITIO ($$IFW only)
$PUTREC
SAVRG$ ($$IFW only)
FILE HANDLING
PAGE 5-9
5.1.12
ILR$ ($ILR)
Function:
First ILR$
ILR$ performs a list-directed
calls
$INITIO
to
initialize
read
operation.
I/O operations.
When
program
control returns from $INITIO, the routine's
performance
depends on which system you are using.
RT-11, RSTS/E:
status
First, ILR$ sets the bits in the
word
to indicate that the file is formatted and that a read
operation is being performed.
which
Then, ILR$ checks to see
operation
was
performed
last, read or write
generating error
number 25 if an attempt is made to read after a write
operation,
unless the device is a terminal.
Next, ILR$
checks to
see which I/O formats have been used in previous
I/O
operations;
if an unformatted read operation has been
executed on
the file, error number 32 is generated
because
I/O
formats
cannot be mixed.
IAS, RSX-11, VMS:
First, ILR$ sets the bits
in
the
status
word
to
indicate that the file is formatted and that
a read
operation is being performed.
Then, ILR$ checks to
see which
I/O formats have been used in previous I/O operations;
if an
unformatted read operation has been
executed
on
the
file,
error
number
159 is generated because I/O formats
cannot be
mixed.
ILR$ is now ready to
start
processing
the
list
elements.
This is done the same way on all of the systems.
uses a
ILR$
series of co-routine calls in a loop to read
list
the
elements.
Through
these co-routine calls ILR$ reads
each list
element, calling the appropriate input
and,
conversion,
if
necessary,
type conversion routines.
Because all
conversion
routines are referenced regardless of whether or not
they are
called,
this
type
of I/O should be avoided if
possible, in
order
occurs
to
save
space.
If
a
syntax
error
in
list-directed I/O, RT-11 or RSTS/E generates error
number 53;
IAS, RSX-11 or VMS generates error number 197.
Defined in:
$LISTI
Called by:
None
Calls:
$CVTDI
$CVTID
DCO$
ECO$
FCO$
GCO$
ICO$
$INITIO
LCI$
LCO$
OCI$
OCO$
THRD$ (ILR$ only)
$GETREC
ICI$
RCI$
SAVRG$
$CHKER
RSX-11 only:
$FLDEF
RT-11 and RSTS/E
only:
PAGE 5-10
HANDLING
5.1.13
FILE
ILW$ ($ILW)
Function:
ILW$
ILW$ performs a list-directed write
calls
$INITIO
operation.
initialize I/O operations.
First
When program
control returns from $INITIO, the routine's performance
depends
on which system you are using.
RT-11, RSTS/E:
ILW$ sets the bits of the status word to
indicate
that the file is formatted and that a write
operation
is being performed.
ILW$ then checks to see which I/O
operation was last performed on the file.
If it was a read
operation, the file is "rewound," that is,
the
block
number
is
reset
to the beginning of the file.
ILW$ now places the
address of the $FIO routine on the stack so that when
ILW$
is
finished
control will pass to $FIO.
Finally, ILW$ check
the
format of the file, if the file is unformatted, error
number
32
is
generated because I/O formats cannot be mixed.
If
no
error is generated, ILW$ calls $PUTREC to
output
the
first
record
of the file (allowing only 133 characters) and
passes
control to $FIO.
IAS, RSX-11, VMS:
ILW$ checks which I/O operation
was
last
performed on the file;
if it was a read operation <<find
out
what f.urbd, f.nrbd are in RSX>>.
ILW$ then sets the bits
in
the
status
word
to indicate that the file is formatted
and
that a write operation is being performed.
places
ILW$ nnow
the
address
of
the
$FIO routine on the stack so that
when
ILW$ is finished control will pass to
$FIO.
Finally,
ILW$
checks the format of the file, generating error number 159
if
the file is unformatted.
If
no
error
is
generated,
ILW$
calls
$PUTREC
to
output
the
first record of the file
and
passes control to $FIO.
Defined in:
$LISTO (See also $TVS.)
Called by:
None
Calls:
$INITIO
SAVRG$
THRD$ (ILW$ only)
RT-11 and RSTS/E:
$CHKER
$CLOSE
$PUTREC
RSX-11 only:
DCO$
ECO$
FCO$
$FLDEF
GCO$
ICI$
ICO$
LCI$
LCO$
OCI$
OCO$
RCI$
FILE HANDLING
PAGE 5-11
5.1.14
IRR$ ($IRR)/IRW$ ($IRW)
Function:
performs
IRR$ performs random access read operations;
random
access
write
operations.
IRW$
These two
routines share
much of their code;
discussion
therefore, the following
applies to both routines.
IRR$/IRW$ initializes I/O by
calling
$INITIO.
When $INITIO is finished, IRR$/IRW$ makes
sure that
either
a
DEFINE
FILE
or
an
OPEN
statement
(with
ACCESS="DIRECT") has been executed to associate the
file with
a logical unit number (LUN);
if a LUN is not
associated with
the file, error
IRR$/IRW$
number
37
is
generated.
then
checks the device because random I/O cannot be
performed on a
line printer or terminal.
devices
If
either
of
these
is
used,
error number 38 is generated.
IRR$/IRW$ then
gets the
information needed for the data transfer.
Read/write
operations are done until the data transfer is complete or
the record size is exceeded;
if the record size is
exceeded, error
number 39 is generated.
Defined in:
$RIO (See also DEF$, $GETINF, $SETINF.)
Called by:
None
Calls:
$GETBLK
$INITIO
$PUTBLK
SAVRG$
THRD$ (IRR$, IRW$ only)
5.1.15
IUR$ ($IUR)
Function:
initializes
IUR$ performs unformatted read operations.
IUR$
I/O by calling $INITIO, then checks for the following
errors:
1.
Read after write (error number 25);
you
cannot perform
a
read operation after a write
operation, unless the device is a terminal
2.
Mixed I/O formats (error number 32);
if a
formatted
read
operation
has
been executed on the
file, you
cannot perform an unformatted read operation
3.
unformatted
Illegal device (error number 34);
I/O
cannot performed on a terminal or line
printer
PAGE 5-12
HANDLING
FILE
If no errors are generated IUR$ uses a series
of
co-
routine
calls
in
a
loop to read the list elements generating
error
number 33 if an attempt is made to read past the end of a
record.
Defined in:
$UIO (See also IUW$.)
Called by:
None
Calls:
$EOF
$EOF2
$EOFILE
$GETBLK
$INITIO
$SAVRG
THRD$ (IUR$ only)
5.1.16
IUW$ ($IUW)
Function:
first
IUW$ performs an unformatted
checks
to
write
operation.
IUW$
see which I/O operation was last performed on
the
file.
If it was a read operation,
the
file
is
"rewound,"
that
is,
the block number is reset to the previous block
of
the file.
IUW$ now checks the format of the file, if
formatted
error
it
is
number
32
is generated because format
I/O
cannot be mixed.
Finally
IUW$
uses
series
routine
calls in a loop to write the I/O elements.
Defined in:
$UIO (See also IUR$.)
Called by:
None
Calls:
$CLOSE
of
co-
$EOF
$EOF2
$EOFILE
$GETBLK
$INITIO
$PUTBLK
SAVRG$
THRD$ (IUW$ only)
FILE HANDLING
PAGE 5-13
5.1.17
$OBJFMT
Function:
address of
$OBJFMT compiles run time format statements;
the
R0.
the
statement to be compiled is passed to $OBJFMT in
In
case of an error during compilation of the line,
$OBJFMT generates
errors
42
or 43, memory overflow and syntax
errors,
respectively.
After compiling the format statement,
$OBJFMT
passes program control back to the calling program.
Defined in:
$OBJFMT
Called by:
$IBR (IBR$/$IBR)
$IBW (IBW$/$IBW)
$OBJENC (DEO$/$DEO, ENO$/$ENO)
Calls:
None
5.2
I/O LIST TRANSFER CALLS
5.2.1
EOL$ ($EOL)
Function:
routine call
EOL$ terminates the I/O list by executing a
to FIO/RIO/ILR/ILW/IUR/IUW.
Defined in:
$EOL (See $CHKER, $IOEXIT, $OPNER.)
Called by:
None
Calls:
None
co-
PAGE 5-14
HANDLING
5.2.2
FILE
TAC$, TAD$, TAF$, TAI$, TAL$, TAP$, TAQ$
Function:
to
These
routines
execute
a
co-routine
call
FIO/RIO/ILR/ILW/IUR/IUW to prepare for the transfer of an
I/O
list element which is an array.
The last letter of the
entry
point name represents the data type of the array:
C
D
F
I
L
P
Q
for
for
for
for
for
for
for
The
COMPLEX
REAL*8
REAL*4
INTEGER*2,
LOGICAL*1
LOGICAL*4
INTEGER*4
threaded
code
entry
points
are
listed
in
the
heading;
the
inline
entry points are similar,
except
the dollar sign ($) is at the
beginning
of
the
entry
point name instead of at the end.
Defined in:
$TRARY
NOTE
TAC$ ($TAC) is not defined in $TRARY but in $TCMPLX.
Called by:
None
Calls:
None
FILE HANDLING
PAGE 5-15
5.2.3
TVC$, TVD$, TVF$, TVI$, TVL$, TVP$, TVQ$
Function:
to
call
These
routines
execute
FIO/RIO/ILR/ILW/IUR/IUW
to
a
co-routine
prepare
for the transfer
for an
I/O list element which is a variable or constant.
The
last
letter
of
the
entry point name represents the data
type of
the element:
C
D
F
I
L
P
Q
for
for
for
for
for
for
for
The
in
COMPLEX
REAL*8
REAL*4
INTEGER*2
LOGICAL*1
LOGICAL*4
INTEGER*4
threaded
code
entry
points
are
listed
the
heading;
the
inline
entry points are similar,
except
the dollar sign ($) is at the
beginning
of
entry
point name instead of the end.
Defined in:
$VTRAN
NOTE
TVC$ ($TVC) is not defined in $VTRAN but in
$VCTRAN.
Called by:
None
Calls:
$FIO
the
PAGE 5-16
HANDLING
5.2.4
FILE
TVS$ ($TVS)
FUNCTION:
prepare
$TVS executes a co-routine call to FIO/RIO/ILW/IUW to
for the transfer of an I/O list element which is a string
literal.
When you use formatted I/O, a string in the I/O
list
causes
the
list-directed
output
module
to
be
called.
Therefore, if possible, place the string in the format
statement.
Defined in:
$LISTO (See also ILW$.)
Called by:
None
Calls:
$CHKER (RT-11 and RSTS/E)
RSX-11 only:
DCO$
ECO$
FCO$
$FLDEF
GCO$
ICI$
ICO$
LCI$
LCO$
OCI$
OCO$
RCI$
5.3
I/O EXITING
5.3.1
$$$DIS
Function:
PRINT
$$$DIS handles the keyword DISPOSE.
If you attempt to
or
DELETE
a
read-only
file, or to PRINT or SAVE a
scratch
file, error number 51 is generated.
If SPOOL is
used
on
a
system
other
then RSTS/E, error number 67 is generated as
a
warning that the keyword is unsupported.
Defined in:
OPNCLO (See also $$$ERR, $$OPCL.)
Called by:
CLOSTM ($CSTM, $CSTMI)
OPNSTM ($OSTM, $OSTMI)
Calls:
None
FILE HANDLING
PAGE 5-17
5.3.2
$$$ERR
Function:
transfer
$$$ERR handles the keyword ERR.
$$$ERR
saves
the
address and passes control back to the calling
routine.
Defined in:
Ca
lled by:
OPNCLO (See also $$$DIS, $$OPCL.)
CLOSTM ($CSTM, $CSTMI)
OPNSTM ($OSTM, $OSTMI)
Calls:
5.3.3
None
$EXIT
Function:
routine.
$EXIT exits from the program using the user's
exit
If there is no user-exit routine, $EXIT uses .EXIT.,
the system-exit routine.
Defined in:
$STOP (See also FOO$, STP$.)
Called by:
$CEXIT (EXIT)
OTINIT ($OTI, $$OTI)
Calls:
$CLOSE
5.3.4
with
FOO$ ($STPS)
Function:
a
FOO$ is called when the FORTRAN STOP command is used
message.
to close
FOO$
prints the message and calls $CLOSE
routine;
the file.
FOO$ then looks for the user's exit
there
no
if
is
user-exit
routine, then FOO$ uses
.EXIT., the
system-exit routine.
Defined in:
$STOP (See also $EXIT, STP$.)
Called by:
None
Calls:
None
PAGE 5-18
HANDLING
5.3.5
FILE
STP$ ($STP)
Function:
without
STP$ is called when the FORTRAN STOP command is used
a
message.
FOO$
calls
$CLOSE
to close the file and
then
looks for the user's exit routine;
if there is no
user-
exit
routine, FOO$ uses .EXIT., the system-exit routine.
Defined in:
$STOP (See also $EXIT, FOO$.)
Called by:
$RETD (RET$D;
Calls:
None
5.4
STP$ only)
ERROR PROCESSING
5.4.1
$CHKER
This routine is called with JSR R5,$CHKER.
Function:
generated.
This routine is
$CHKER
called
when
an
I/O
error
is
first checks to see if ERR= was used.
If it was
not,
program control is returned to the location of the
error
by
way
of
RTS
R5.
If
ERR=
was
used, $CHKER puts the
ERR=
transfer address in R4, the
threaded
code
virtual
program
counter (See Section 1.4.), and then calls $$SET to enter
the
error information in the work area.
Finally,
$CHKER
passes
control
the
to
$IOEXIT.
$IOEXIT recovers the program from
error and passes control to the next statement
of
the
compiled code (JMP @(R4)+ for threaded code).
Defined in:
$EOL (See also $EOL, $IOEXIT, $OPNER.)
Called by:
$CLOSE ($CLOSE)
CLOSTM ($CSTM, $CSTMI)
$FIO ($FIO, $$FIO)
$LISTI (ILR$/$ILR; RT-11 and RSTS/E only)
$LISTO (ILW$/$ILW, TVS$/$TVS; RT-11 and RSTS/E only)
OPNSTM ($OSTM, $OSTMI)
Calls:
The following routines are called only if ERR= was used:
$CLOSE
$$SET
FILE HANDLING
PAGE 5-19
5.4.2
END$ ($END)
Function:
statement
END$ causes program execution to continue
at
the
given by the keyword END.
Defined in:
$ENDERR (See also ERR$.)
Called by:
None
Calls:
None
5.4.3
is
EOF$ ($EOF)
Function:
not
EOF$ performs the ENDFILE statement.
open,
EOF$
returns
If
the
to the calling program.
file
If the
file is
random access, EOF$ generates error number 49 and
returns
to
the
calling program.
If the file is unformatted,
EOF$ calls
$UIO to create the end-of-file record and
$PUTREC
calls
to
put
it
in the file.
If the file is formatted, EOF$
creates
the end-of-file record and calls $PUTREC to
in
put
the
file.
Defined in:
EOF
Called by:
None
Calls:
$GETFILE
$PUTREC (not called unless the file is formatted)
SAVR4$
$UIO (not called unless the file is unformatted)
it
5.4.4
$EOF2
Function:
$EOF2
$EOF2 handles end-of-file errors.
If END=
was
used,
saves the transfer address and jumps to $IOEXIT.
$IOEXIT recovers the program from the error and continues
program
execution
at
the
transfer address.
If END= was not
used, the
fatal end-of-file error, number 24, is generated.
Defined in:
$RWBLK (See also $EOFIL, $GETBLK, $PUTBLK.)
Called by:
$GETREC ($GETREC)
$UIO (IUR$/$IUR, IUW$/$IUW)
Calls:
$IOEXIT (called if END= is used)
PAGE 5-20
HANDLING
5.4.5
FILE
$EOFILE
Function:
unformatted
$EOFILE may simulate an end-of-file condition for
I/O.
$EOFILE
first
checks
to
see is a read operation
is
being attempted before a write
operation;
if
it
is,
the
block
pointer
is
set to the next block and program
control
returns to the program that called the
routine
that
called
$EOFILE.
If a read operation is not being attempted before
a
write operation, $EOFILE sets
the
end-of-file
bit
the
status
word and falls through to $EOF2 which follows
$EOFILE
in module $RWBLK.
Defined in:
$RWBLK (See also $EOF2, $GETBLK, $PUTBLK.)
Called by:
$UIO (IUR$/$IUR, IUW$/$IUW)
Calls:
$IOEXIT (called if END= is used)
5.4.6
ERR$ ($ERR)
Function:
statement
ERR$ causes program execution to continue
given by the keyword ERR.
Defined in:
$ENDERR (See also END$.)
Called by:
None
Calls:
None
at
the
in
5.4.7
FUD$ ($ERROR)
Function:
3
FUD$ handles compiler errors, first generating error number
and then returning to the calling program.
Defined in:
$FUD
Called by:
None
Calls:
None
FILE HANDLING
PAGE 5-21
5.4.8
$IOEXIT
This routine is called by JMP $IOEXIT.
Function:
condition
$IOEXIT is called when an I/O error or end-of-file
is encountered, provided that ERR= or END= was used.
$IOEXIT
resets the stack pointer and R4 to point to next
statement of
the compiled code (JMP @(R4)+ for threaded code),
removes the
ERR= transfer address and the END= transfer address,
restores
the
registers, and resets various words in the OTS
work area
to recover the program from the error.
everything
After
is
reset,
$IOEXIT passes program control to the
statement given
by ERR= or END=.
Defined in:
Called by:
$GETBLK)
$EOL (See also $CHKER, $EOL, $OPNER.)
$GETBLK ($GETBLK;
calls $IOEXIT conditionally, see
OTINIT ($OTI, $$OTI)
$RWBLK ($EOF2, $EOFILE, $PUTBLK)
Calls:
5.4.9
None
$OPNER
Function:
$OPEN
This routine is called if an error occurs
routine.
during
$OPNER closes the file that generated the
error by
freeing the RT-11 channel, disassociating
logical
the
unit
number (LUN), and then calling $CLOSE to close the
file.
the
Defined in:
$EOL (See also $CHKER, $EOL, $IOEXIT.)
Called by:
$OPEN ($OPEN)
Calls:
$CLOSE
CHAPTER 6
CONVERSIONS
The first section in this chapter discusses I/O
second
section discusses data conversions.
6.1
conversions;
the
I/O CONVERSIONS
I/O conversions are internal routines called by I/O modules to
convert
internal representation to external representation and vice-versa.
The I/O
routines are defined in three modules: $CONVF, $CONVI, and
$CONVL.
The
conversions not performed by these I/O conversion modules are
performed in
$FIO.
The routines in $CONVF are used to convert real and floating-point
numbers.
The input routine, RCI$, receives format information and the the
address of
the number to be converted on the stack. RCI$ fetches the digits
of the
number to be converted one by one. As each digit is fetched, it
is converted to an internal format. If an exponent is encountered, RCI$
passes
control to $ECI (Exponent conversion - input); $ECI returns the
result to
$CONVF on the stack. After all the digits are converted, RCI$
scales the
number to agree with the I/O format chosen.
When a $CONVF output routine is called, flags are set to indicate
which I/O
format is being used. These flags are necessary because all of the
output
routines merge into common code. First, if formats E, D, or G are
used,
the width of the field is reduced by four to save room for the
exponent.
The output routine then converts the number to decimal, scales it,
and converts it to ASCII code.
The $CONVI routines receive the address of the number on the
stack.
The
routine checks the number for agreement with the radix,
performs the
conversion, puts the result on the stack, and then returns to the
calling
program.
The $CONVL input routine receives the address of the variable on the
stack
and sets the default to false by clearing the SP. If the variable
is found
to be true, the input routine decrements the SP.
The $CONVL output routine receives the width of the output field in
and
returns the output field in R0. The output routine first
places blank
characters into R0 until the output field is one character short
of the
correct width, then checks the variable and places a 'T' or 'F'
in R0 as
the final character of the output field.
R1
PAGE 6-2
CONVERSIONS
The naming convention used for the entry points in I/O conversion
routines
is:
fCt
where
and
f
is the format used.
The following list shows the
formats
their symbols:
D
E
F
G
I
L
O
R
t
Double
Exponential
Floating
General
Integer
Logical
Octal
Real
is either I or O depending on whether the format
statement
is
input or output
Table 6-1 lists the conversion modules, their entry points, and the
modules
that call each entry point.
CONVERSIONS
PAGE 6-3
Table 6-1
I/O Conversion Modules
-------------------------------------------------------------------------|
|
|
|
|
Module | Entry |
Calling
Modules
|
|
| Point |
|
-------------------------------------------------------------------------|
|
|
|
| $CONVF
| DCO$
| $FIO, $$FIO, $ILR, $ILW, $IBR, $OBJFMT
|
|
| ECO$
| $FIO, $$FIO, $ILR, $ILW, $IBR
|
|
| FCO$
| $FIO, $$FIO, $ILR, $ILW, $IBR
|
|
| GCO$
| $FIO, $$FIO, $ILR, $ILW, $IBR
|
|
| RCI$
| $FIO, $$FIO, $ILR, $ILW, $IBR, DEO$/ENO$,
$OBJFMT |
|
|
|
|
-------------------------------------------------------------------------|
|
|
|
| $CONVI
| $ECI
| $IBW
|
|
| ICI$
| $FIO, $$FIO, $ILR, $ILW, $IBR, DEO$/ENO$,
$OBJFMT|
|
| ICO$
| $FIO, $$FIO, $ILR, $ILW, $IBR, $OBJFMT
|
|
| OCI$
| $FIO, $$FIO, $ILR, $ILW, $IBR, $OBJENC
|
|
| OCO$
| $FIO, $$FIO, $ILR, $ILW, $IBR
|
|
|
|
|
-------------------------------------------------------------------------|
|
|
|
| $CONVL
| LCI$
| $FIO, $$FIO, $ILR, $ILW, $IBR, $OBJFMT
|
|
|
|
|
LCO$
|
$FIO, $$FIO, $ILR, $ILW, $IBR, $OBJFMT
|
|
|
-------------------------------------------------------------------------Look at the calling modules. In most cases, if an I/O module
calls one
conversion routine it calls almost all of the other ones. To
prevent the
linker from including all of the I/O conversion routines in the task
image,
the I/O modules are written with a blank word where the address
of the
conversion routine is to go. When the program is compiled, the
compiler
enters the address of the conversion needed; unless the compiler
does not
know which conversion routine is needed.
When you use run time or list formatting in your program, the
compiler does
not know which conversion routine is needed and, therefore, will
call all
of the I/O conversions. However, if you know which conversion is
needed,
you can save space by creating dummy entry points for those
conversions not
needed. (See Section 2.1.)
PAGE 6-4
CONVERSIONS
6.2
DATA TYPE CONVERSIONS
There are three naming conventions for data conversion routines:
$xy
$CVTxy
Cyx$
where
x
y
(internal entry point)
(inline entry point)
(threaded code entry point)
is the data type of the argument
is the data type the argument is to become
Below is a list of data types and their symbols:
SYMBOL
B
C
D
F
I
L
Q
R
DATA TYPE
LOGICAL*1 (byte)
COMPLEX
REAL*8 (double-precision)
REAL*4
INTEGER (*2 or *4)
LOGICAL*4
INTEGER*4
REAL*4
The three entry points share their conversioncode.
Cyx$ and $xy
have
identical code and $CVTxy shares this code after preparing for a return
to
inline code. (See Figure 6-1.) $xy is internal to the OTS, it is called
by
routines within the OTS; $CVTxy is used for inline code; and Cyx$ is
used
for threaded code.
_________________________________
| $CVTxy: PREPARE FOR A RETURN |
|
TO INLINE CODE.
|
|
|
| Cyx$:
|
| $xy:
COMMON
|
|
CONVERSION
|
|
CODE
|
|
|
|_______________________________|
Figure 6-1
Data Conversion Entry Points
CONVERSIONS
PAGE 6-5
The following is a list of the data type conversion modules and
their entry
points.
$CONV1 - $RC
$RD
$CVTFC
$CVTFD
CCF$
CDF$
$CONV2 - $DI
$RI
$CVTCB
$CVTCI
$CVTDB
$CVTDI
$CVTFB
$CVTFI
CIC$
CID$
DIF$
CIL$
CLD$
CLD$
CLF$
CLI$
$CONV3 - $IC
$ID
$IR
$CVTIC
$CVTID
$CVTIF
CCI$
CDI$
CFI$
$CONV4 - $DR
$CVTDF
CFD$
$CONV5 - $CVTBC
$CVTDB
$CVTDF
CCL$
CDL$
CFL$
$CONV6 - $CVTCD
$CVTCF
$CVTDC
CCD$
CDC$
CFC$
CHAPTER 7
ARITHMETIC FUNCTIONS
The first section of this chapter describes the entry point naming
convention used for the arithmetic function routines. The rest of the
chapter
divides the arithmetic routines into nine sections:
1.
2.
3.
4.
5.
6.
7.
8.
9.
Move Operators
Multiplication/Division
Addition/Subtraction
Exponentiation
Subscript Operators
Relational Operators
Logical Operators
Branch Operators
Do Statements
The modules containing the arithmetic routines are listed in the
appropriate section followed by the entry points defined in that module.
The variable names in the sample statements used in this
indicate
data types as follows:
B
C
D
I
L
R
-
chapter
LOGICAL*1 (byte)
COMPLEX
REAL*8 (double-precision)
INTEGER
LOGICAL*4
REAL*4
The letter P following any of the above letters means that the
variable of
that type is a subroutine parameter. In the arithmetic routines,
the code
for LOGICAL*1 variables (byte variables) is also applicable for
LOGICAL*4
variables;
however, only the first byte of the LOGICAL*4 variable
is affected.
7.1
ENTRY POINT NAMING CONVENTIONS
Because the entry points follow a naming convention, the threaded
code generated by the arithmetic routines is easily read. The format
for these
entry points is:
mmt$xx
where
mm
the operation code (See Table 6-1.)
t
xx
the data type (See Table 6-2.)
the address code (See Table 6-3.)
PAGE 7-2
FUNCTIONS
ARITHMETIC
Most of the arithmetic entry points have two arguments.
The location
of
the arguments is specified by the address code part of the symbolic
name.
Operands may: reside on the stack (S), follow immediately in memory
(I),
reside in memory (M), be a subroutine parameter (P), or be an
intermediate
result stored at a particular temporary address (A). Table 6-3 shows
all
combinations that occur in the OTS; not all combinations are
permitted
with every operation code and data type. Note that special entry
points
exist for commonly occurring statements involving the constants 0 and 1.
Table 6-1
Operation Codes
CODE
AD
CC
CD
CF
CI
CL
CM
CO
CP
DE
DI
IC
JM
MO
MU
NG
NM
NP
SA
SU
SV
TA
TS
TV
X?
OPERATION
Addition
Convert to complex
Convert to double
Convert to floating-point
Convert to integer
Convert to logical
Compare
Logical complement
Copy
Decrement
Divide
Increment
Jump
Move
Multiply
Negate the argument
DO loop
DO loop using a parameter for a control value
Subscript calculations
Subtract
Subscript calculations
Transfer array operators
Logical tests (compare against zero)
Variable transfer
Raise to a power
Table 6-2
DATA TYPE
SYMBOL
C
D
F
I
L
Q
R
DATA TYPE
COMPLEX
REAL*8 (double-precision)
REAL*4
INTEGER (*2 or *4)
LOGICAL (*1 or *4 unless noted)
INTEGER*4
REAL*4
ARITHMETIC FUNCTIONS
PAGE 7-3
Table 6-3
ADDRESS CODES
-----------------------------------------------------------------|
|
SECOND
ARGUMENT
|
| FIRST
|-----------------------------------------------------|
|
Argument
Argument
Address Parameter Address |
| ARGUMENT |
on stack
in next
in next in next
on stack|
|
|
word
word
word
|
-----------------------------------------------------------------|Argument |
SS
|
SI
|
SM
|
SP
|
SA
|
|on stack |
|
|
|
|
|
-----------------------------------------------------------------|Argument |
IS
|
II
|
IM
|
IP
|
IA
|
|in next
|
|
|
|
|
|
|word
|
|
|
|
|
|
-----------------------------------------------------------------|Address
|
MS
|
MI
|
MM
|
MP
|
MA
|
|in next
|
|
|
|
|
|
|word
|
|
|
|
|
|
-----------------------------------------------------------------|Parameter*|
PS
|
PI
|
PM
|
PP
|
PA
|
|in next
|
|
|
|
|
|
|word
|
|
|
|
|
|
-----------------------------------------------------------------|Moves 0
|
0S
|
-|
0M
|
0P
|
0A
|
|into 2nd |
|
|
|
|
|
|argument |
|
|
|
|
|
-----------------------------------------------------------------|Moves R0 |
RS
|
-|
RM
|
RP
|
RA
|
|into 2nd |
|
|
|
|
|
|argument |
|
|
|
|
|
-----------------------------------------------------------------|Increments|
1S
|
1I
|
1M
|
1P
|
1A
|
|or decre- |
|
|
|
|
|
|ments 2nd |
|
|
|
|
|
|argument |
|
|
|
|
|
-----------------------------------------------------------------|Address
|
VS
|
-|
-|
-|
-|
|in R0
|
|
|
|
|
|
-----------------------------------------------------------------<<All examples left blank in the sections below
will be filled as soon as a programmer has time>>
PAGE 7-4
FUNCTIONS
7.2
ARITHMETIC
MOVE OPERATIONS
Move operations typically account for a major part of the code generated
by
a FORTRAN program. Therefore, significantly more modularity and code
optimization exists within the modules for move operations. For example,
a
special copy operation exists for duplicating an argument on the
stack.
Special routines also exist for commonly used constant values.
The modules containing the move routines are listed below.
Each
module
name is followed by the entry points to the routines defined in that
module. Following each entry point, is a statement which generates the
entry
point;
any number in parentheses following the statement refers to a
note
at the end of the section.
$COPY - Create copy of argument
CPI$SM
CPL$SM
CPF$SM
I1=(I+3)*(I+3)
B1=(B+3)*(B+3)
R1=(R+3)*(R+3)
CPD$SM
D1=(D+3)*(D+3)
$DMOV1 - Move double-precision immediate to stack
MOD$IS
D=10.D1+10.D2
$DMOV2 - Move double-precision from R0 to stack
MOD$0S
$DMOV3 - Move double-precis
ion zero or immediate to second argument
MOD$0P
MOD$0A
MOD$0M
D(J)=0
D=0
MOD$IP
DP=1.
MOD$IA
MOD$IM
D(J)=10.D1
D=1.
$DMOV4 - Move double-precision from stack by way of address
MOD$SA
D(J)=D(I)
$DMOV5 - Move double-precision to stack
MOD$MS
MOD$SS
MOD$PS
MOD$VS
D=D+1.
DP=DP-1
(1)
ARITHMETIC FUNCTIONS
PAGE 7-5
$DMOV6 - Move double-precision from memory and parameter
MOD$MA
MOD$MM
MOD$MP
MOD$PA
MOD$PM
MOD$PP
D(J)=D2
D=D1
DP=DP2
$DMOV7 - Move double-precision from stack
MOD$SP
MOD$SM
DP=DP+1
D=D+1.
(1)
$DMOVR - Move double-precision from R0 through R3
MOD$RS
MOD$RM
MOD$RP
MOD$RA
$FMOV1 - Move real stack to stack
MOF$SS
$FMOV2 - Move real to stack
MOF$IS
MOF$0S
$FMOV3 - Move real to stack
MOF$MS
MOF$PS
I=.1
R=(RP*2)+1
$FMOV4 - Move real from stack
MOF$SA
RP(J)=RP(I)
$FMOV5 - Move real from immediate
(2)
MOF$IA
R(J)=1
PAGE 7-6
FUNCTIONS
ARITHMETIC
$FMOV6 - Move real from stack
MOF$SM
MOF$SP
R=I
RP=RP/R
(3)
$FMOV7 - Move real from immediate
MOF$IM
MOF$IP
R=1.
RP=1.
$FMOV8 - Move real zero to second argument
MOF$0M
MOF$0A
MOF$0P
R=0
R(J)=0
RP=0
$FMOV9 - Move real from memory and parameter
MOF$MM
MOF$MA
MOF$MP
R=R1
R(J)=R(2)
MOF$PM
MOF$PA
MOF$PP
R=RP-1
RP=RP2
RP=RP2
$FMOVR - Move real from R0-R1
MOF$RS
MOF$RM
MOF$RA
R(J)=ROOT(R)
(4)
MOF$RP
$IMOVR - Move integer from R0
MOI$RS
MOI$RM
MOI$RA
MOI$RP
MOL$RS
R=R2-ROOT(I)
R=ROOT(M)
(4)
(4)
$IMOVS - Integer move
MOI$SS
MOI$SM
MOI$SA
I=.1
I(I1)=I(I2)
(5)
(6)
(7)
ARITHMETIC FUNCTIONS
PAGE 7-7
MOI$IS
MOI$IM
MOI$IA
J=I+5
I(J)=1
MOI$MS
MOI$MM
MOI$MA
R=I
I=I1
I(J)=K
MOI$0S
MOI$0M
MOI$0A
I=0
I(J)=0
MOI$1S
MOI$1M
MOI$1A
(8)
I=1
MOL$IS
MOL$SS
REL$
(8)
(5)
- Same as MOL$IS
$IPMOV - Integer and parameter moves
MOI$SP
MOI$IP
MOI$MP
IP=IP+1
IP=1
IP=I
MOI$PS
MOI$PM
MOI$PA
IP=IP+1
I=IP
IP(I)=IP2
MOI$PP
MOI$0P
MOI$1P
IP=IP2
IP=0
IP=1
$LMOVR - Move logical*1 from R0
MOL$RA
MOL$RP
MOL$RM
$LMOVS - Logical*1 moves
MOL$SM
MOL$SA
(3)
B=B+1
B(I)=B(I2)
MOL$SP
BP=BP+1
MOL$IM
MOL$IP
MOL$IA
B=.true.
BP=I
B(J)=0
PAGE 7-8
FUNCTIONS
MOL$MP
MOL$MM
MOL$MA
ARITHMETIC
B=B1
B(J)=B2
MOL$MP
MOL$MS
MOL$PM
MOL$PA
MOL$PP
MOL$PS
(1) The 1.
the
stack;
BP=BP2
BP=BP+1
has been converted to a double-precision number so is
on
D is in memory.
(2) The .1 is being put on the stack for conversion to integer.
(3) The I was on the stack for conversion to real and is now
moved
into R which is in memory.
being
(4) ROOT is a function.
(5) MOL$SS and MOI$SS are the same entry point.
(6) The .1 was on the stack for conversion to integer
being
moved into memory.
and
is
now
(7) The value of I(I2) is on the stack and the address of I(I1) is on
the
stack.
(8) MOI$IS,MOL$IS and REL$ are the same entry point.
7.3
MULTIPLICATION AND DIVISION.
The modules containing the multiplication and division routines are
listed
below.
Each module name is followed by the entry points to the
routines
defined in that module. Following each entry point, is a statement
which
generates the entry point; any number in parentheses following the
statement refers to a note at the end of the section.
In the example
statements, the values in parentheses are on the stack. Occasionally a
number
in parentheses follows the statement; it refers to a note at the end
of
the section.
In this section the address codes in the entry point names work as
follows:
1. For division, the first letter of the address code is the
location
of the denominator; the second letter is the location of the
numerator.
2. For multiplication, the first and second letters correspond to
the
second and first factors of the multiplication, respectively.
ARITHMETIC FUNCTIONS
PAGE 7-9
There are a number of entry points in the following modules that do
not fit
the naming convention; they are not used for threaded code.
$CDIV - Complex divide
DIC$SS
DIC$IS
DIC$MS
C=(C-2)/(C1-3)
C=C/2
C=(C-3)/C1
DIC$PS
C=(C-3)/CP
$DVC
- this entry point is the same as DIC$SS.
$DVC performs
calls to
this location that are made from within the OTS.
$DIVC - this is the inline entry point to the code at location
DIC$SS.
NOTE
$CDIV uses $ADR, $DVR, $MLR, and $SBR if
there
is
no
FPU hardware.
Therefore, when you perform complex
division ($CDIV), modules $FADD, $FDIV, and $FMUL
may
be
needed.
$CMUL - Complex multiply
MUC$SS
MUC$IS
MUC$MS
C=(C-2)*(C1-3)
C=C*3
C=C*(C1-3)
MUC$PS
C=(C-3)*CP
$MLC
- this entry point is the same as MUC$SS.
$MLC performs
calls to
this location that are made from within the OTS.
$MULC - this is the inline entry point to the code at location
MUC$SS.
NOTE
$CMUL uses $ADR, $MLR AND
$SBR
if
there
is
no
FPU
hardware.
Therefore,
when you perform complex
multiplication ($CMUL), modules $FADD and $FMUL may be
needed.
$DDIV - Double-precision divide
DID$SS
DID$IS
DID$MS
DID$PS
D=(D-2.)/(D1-3.)
D=D/2.
D=(D-3.)/D1
D=(D-3.)/CP
PAGE 7-10
FUNCTIONS
$DVD
ARITHMETIC
- this entry point is the same as DID$SS.
$DVD performs calls
to
this location that are made from within the OTS.
$DIVD - this is the inline entry point to the code at location
DID$SS.
$DMUL - Double-precision multiply
MUD$SS
MUD$IS
MUD$MS
D=(D-2)*(D1-3)
D=D*3
D=D*(D1-3)
MUD$PS
D=(D-3)*DP
$MLD
- this entry point is the same as MUD$SS.
$MLD performs calls
to
this location that are made from within the OTS.
$MULD - this is the inline entry point to the code at location
MUD$SS.
$FDIV - Real divide
DIF$SS
DIF$IS
DIF$MS
R=(R-2.)/(R1-3.)
R=R/2.
R=(R-3.)/R1
DIF$PS
R=(R-3.)/RP
$DVR
- this entry point is the same as DIF$SS.
$DVR performs calls
to
this location that are made from within the OTS.
$DIVF - this is the inline entry point to the code at location
DIF$SS.
$FMULS - Real multiply
MUF$SS
MUF$IS
MUF$MS
R=(R-2.)*(R1-3.)
R=R*3.
R=R*(R1-3.)
MUF$PS
R=(R-3.)*RP
$MLR
- this entry point is the same as MUF$SS.
$MLR performs calls
to
this location that are made from within the OTS.
$MULF - this is the inline entry point to the code at location
MUF$SS.
$IDIVS - Integer divide
DII$SS
DII$IS
DII$MS
DII$PS
I=(I-2)/(I1-3)
I=I/2
I=(I-3)/I1
I=(I-3)/IP
ARITHMETIC FUNCTIONS
PAGE 7-11
$DVI
- this entry point is the same as DII$SS.
$DVI performs
calls to
this location that are made from within the OTS.
$IMUL - Integer multiply
MUI$SS
MUI$IS
MUI$MS
I=(I-2)*(I1-3)
I=I*3
I=I*(I1-3)
MUI$PS
I=(I-3)*IP
$MLI
- this entry point is the same as MUI$SS.
$MLI performs
calls to
this location that are made from within the OTS.
7.4
ADDITION AND SUBTRACTION
The modules containing the addition and
listed
below.
Each module name is followed
routines
defined in that module. Following each
which
generates the entry point; any number
statement refers to a note at the end of the
subtraction
routines
are
by the entry points to the
entry point, is a
statement
in parentheses following the
section.
In this section the address codes in the entry point names work as
follows:
the first letter of the address code refers to the second
operand; the
second letter, to the first operand.
7.4.1
Negation, Increments and Decrements
$CNEG - Negate complex value
NGC$M
NGC$S
NGC$P
C=-C
C=-C+C2
CP1=-CP2
(1)
NGC$A
PAGE 7-12
FUNCTIONS
ARITHMETIC
$FNEG - Negate real value
NGF$S
NGF$M
NGF$A
R=-R+R2
R=-R
NGF$P
NGD$S
NGD$M
RP1=-RP2
D=-D+D2
D=-D
NGD$A
NGD$P
DP1=-DP2
$INEG - Negate integer value
NGI$S
NGI$M
NGI$A
I=-I+I2
I=-I
NGI$P
IP1=-IP2
$INCR - Increment and decrement integer values
ICI$S
ICI$M
ICI$A
I=(I+1)*8
I=I+1
ICI$P
DCI$S
DCI$M
IP1=IP1+1
I=(I-1)*8
I=I-1
DCI$A
DCI$P
IP2=IP2-1
$LNOTS - Logical .NOT. operators
COI$S
COI$M
COI$P
COI$A
COL$S
COL$M
COL$P
COL$A
I=.NOT.(I+I1)
I=.NOT.I
B=.NOT.(B.OR.B1)
B=.NOT.B
(1) The variable C is moved to the stack for later addition to C2.
ARITHMETIC FUNCTIONS
PAGE
7-13
7.4.2
General Addition and Subtraction
There are a number of entry points in the following modules that do
not fit
the naming convention; they are not used for threaded code.
In these examples, the value in parentheses is on the stack.
$ADDA - Real add to memory via address
ADF$IA
ADF$SA
ADF$MA
ADF$PA
SUF$IA
SUF$SA
SUF$MA
SUF$PA
NOTE
$ADDA uses ADD$ unless there is FIS or FPU
hardware.
Therefore, when you use $ADDA module $FADD may be needed.
$ADDM - Real add to memory
ADF$IM
ADF$SM
ADF$MM
R=R+2.
R=R+I
R=R1+R
ADF$PM
SUF$IM
SUF$SM
R=R+RP
R=R-2
SUF$MM
SUF$PM
R=R-R1
(1)
NOTE
$ADDM uses ADD$ unless there is
FIS
or
FPP
hardware. Therefore, when you use $ADDM, module $FADD may be needed.
PAGE 7-14
FUNCTIONS
ARITHMETIC
$ADDP - Real add to parameter
ADF$IP
ADF$SP
ADF$MP
ADF$PP
RP=RP+3
RP=(R+1.0)+RP
RP=RP+R1
RP=RP+RP1
SUF$IP
SUF$SP
SUF$MP
SUF$PP
RP=RP-3
RP=RP-R1
RP=RP-RP1
NOTE
$ADDP uses ADD$ unless there is FIS or FPP
hardware. Therefore, when you use $ADDP, module $FADD may be needed.
$CADD - Complex add and subtract
ADC$IS
ADC$MS
ADC$SS
C=C+2.
C=C+.1
C=(C1+C2)+(C3+C4)
ADC$PS
SUC$IS
SUC$MS
C=CP1+(C3+C4)
C=C-2.
SUC$SS
SUC$PS
C=(C+1)-5.
$ADC
(2)
(5)
- this entry point is the same as ADC$SS.
$ADC performs calls
to
this location that are made from within the OTS.
$ADDC - this is the inline entry point to the code at location
ADC$SS.
$SBC
calls
- this entry point is the same as SUC$SS.
$SBC is used for
to this location that arae made from within the OTS.
$SUBC - this is the inline entry point to the code at location
SUC$SS.
NOTE
$CADD uses $ADR if there is
no
FPU
hardware.
Therefore, when you perform complex addition ($CADD),
module $FADD may be needed.
ARITHMETIC FUNCTIONS
PAGE 7-15
$DADD - Double-precision add and subtract
ADD$IS
ADD$MS
ADD$SS
ADD$PS
D=D+2.
D=D+.1
D=(D1+D2)+(D3+D4)
D=DP+(D1+D2)
SUD$IS
SUD$MS
SUD$SS
SUD$PS
D=D-2.
D=D-D1
D=(D1+D2)-(D3+D4)
$ADD
(3)
- this entry point is the same as ADD$SS.
$ADD performs
calls to
this location that are made from within the OTS.
$ADDD - this is the inline entry point to the code at location
ADD$SS.
$SBD
- this entry point is the same as SUD$SS.
$SBD performs
calls to
this location that are made from within the OTS.
$SUBD - this is the inline entry point to the code at location
SUD$SS.
$FADD - Real addition
performs
ADF$IS
ADF$MS
ADF$SS
R=1.0+(R1+R2)
R=R1+R2+(R3+R4)
R=(R1+R2)+(R3+R4)
ADF$PS
SUF$IS
SUF$MS
R=RP+(R1+R2)
R=(R+1)-5.
SUF$SS
SUF$PS
R=(R1+R2)-(R3+R4)
ADD$
a
- this is
the
entry
floating-point
point
to
the
routine
that
add of two single precision numbers.
The operands are taken from R0:R1 and R2:R3.
returned on
the top of the stack.
The result is
$ADR
- this entry point is the same as ADF$SS.
$ADR performs
calls to
this location that are made from within the OTS.
$ADDF - this is the inline entry point to the code at location
ADF$SS.
$SBR
- this entry point is the same as SUF$SS.
$SBR performs
calls to
this location that are made from within the OTS.
$SUBF - this is the inline entry point to the code at location
SUF$SS.
PAGE 7-16
FUNCTIONS
ARITHMETIC
$IADDS - Integer add
ADI$SS
ADI$SA
ADI$SM
I=(I+2)+(I1+3)
ADI$IS
ADI$IA
ADI$IM
I=L+2
ADI$MS
ADI$MA
ADI$MM
I=(I2+3)+I
I=I+(I1+3)
(4)
I=I+2
I=I+I1
$IPADD - Integer add with parameters
ADI$SP
ADI$IP
ADI$MP
IP=IP+(I+3)
IP=IP+3
IP=IP+I
ADI$PS
ADI$PM
ADI$PA
I=IP+(I1+I2)
I=IP+I
ADI$PP
IP1=IP1+IP2
$IPSUB - Integer subtract with parameters
SUI$SP
SUI$IP
SUI$MP
IP1=(I+I1)-IP1
IP1=3-IP1
IP1=I-IP1
SUI$PS
SUI$PM
SUI$PA
I2=IP1-(I1+I2)
I=IP1-I
SUI$PP
IP1=IP1-IP2
$ISUBS - Integer subtract
SUI$SS
SUI$SA
SUI$SM
I2=(I1+I2)-(I3-I4)
SUI$IS
SUI$IA
I2=1-(I1+I2)
I2=(I2+I3)-I4
SUI$IM
I=I-2
SUI$MS
SUI$MA
SUI$MM
I=I1-(I2-I4)
I=I-I1
ARITHMETIC FUNCTIONS
PAGE 7-17
(1) The I has been converted to a real number, so is on the stack.
R
is
in memory.
(2) The .1 is converted to a complex number, so is on the stack.
is
C
in
memory.
on
(3) The .1 has been converted to a double-precision number, so is
the
stack. D is in memory.
is
(4) The L has been converted to an integer, so is on the stack.
immediate.
(5) The 5.
7.5
2
is converted to a complex number, so is on the stack.
EXPONENTIATION
The modules containing the exponentiation routines are listed below.
Each
module name is followed by the entry points to the routines defined
in that
module. Following each entry point, is a statement which
generates the
entry point; any number in parentheses following the statement
refers to a
note at the end of the section.
The modules in this section are used for both threaded and inline
code.
The entry points listed are the threaded code entry points. The
inline
code entry points are generated by the same statements, but the
name is
slightly different;
for the inline entry points, the dollar sign
($) is
the first character instead of the last.
$XCI - Complex raised to an integer power
XCI$
C=C**I
(1)
$XDD - Double-precision raised to a double-precision power
XDD$
XFD$
XDF$
D=D**D
R=R**D
D=D**R
(2)
$XDI - Double-precision raised to an integer power
XDI$
D=D**I
(1)
$XFF - Real raised to a real power
XFF$
R=R**R
(1)
PAGE 7-18
FUNCTIONS
ARITHMETIC
$XFI - Real raised to an integer power
XFI$
R=R**I
(1)
$XII - Integer raised to an integer power
XII$
I=I**I
(1)
(1) The exponent is pointed to by the top of the stack, and
is
second on the stack.
the
base
(2) The exponent is on the top of the stack, and the base is second on
the
stack.
7.6
SUBSCRIPT OPERATORS
Subscript calculations differ according to the dimension of the array,
the
use of subscript vectoring for multidimensional arrays, and the size of
the
data elements. In addition, module sizes vary slightly according to
whether or not bounds checking has been incorporated. (See Table A-3.)
The modules containing the subscript routines are listed below.
Each
module name is followed by the entry points to the routines defined in
that
module. Following each entry point, is a statement which generates
the
entry point; any number in parentheses following the statement refers to
a
note at the end of the section.
$DVEC - Double-precision subscript operators
SAD$IM
SAD$MM
SAD$SM
D(I)=D1
D(I+I1)=D1
SVD$IM
SVD$MM
SVD$SM
D1=D(I)
D1=D(I+I1)
$FVEC - Real*4 subscript operators
SAF$IM
SAF$MM
SAF$SM
R(I)=R1
R(I+I1)=R1
SVF$IM
SVF$MM
SVF$SM
R1=R(I)
R1=R(I+I1)
ARITHMETIC FUNCTIONS
PAGE 7-19
$IVEC - Integer subscript operators
SAI$IM
SAI$MM
SAI$SM
I(I1)=I2
I(I1+I2)=I3
SVI$IM
SVI$MM
SVI$SM
I2=I(I1)
I3=I(I1+I2)
$LVEC - Logical*1 subscript operators
SAL$IM
SAL$MM
SAL$SM
L(I)=L2
L(I1+I2)=L2
SVL$IM
SVL$MM
SVL$SM
L2=L(I)
L2=L(I1+I2)
$DVECC - Double-precision subscript operators involving parameters
SAD$IP
SAD$MP
SAD$SP
DP(3)=D2
SVD$IP
SVD$MP
SVD$SP
D2=DP(3)
DP(I+I1)=D2
D2=DP(I+I1)
$FVECC - Real subscript operators involving parameters
SAF$IP
SAF$MP
SAF$SP
RP(3)=R2
SVF$IP
SVF$MP
SVF$SP
R2=RP(3)
RP(I+I1)=R2
R2=RP(I+I1)
$IVECC - Integer subscript operators involving parameters
SAI$IP
SAI$MP
SAI$SP
IP(3)=I2
IP(I+I1)=I2
SVI$IP
SVI$MP
SVI$SP
I2=IP(I)
I2=IP(I+I1)
PAGE 7-20
ARITHMETIC FUNCTIONS
$LVECC - Logical*1 subscript operators involving parameters
SAL$IP
SAL$MP
SAL$SP
LP(3)=L2
SVL$IP
SVL$MP
SVL$SP
L2=BP(3)
LP(I+I2)=L2
L2=LP(I+I2)
$DVECP - Double subscript operators involving parameters
SAD$PM
SAD$PP
SVD$PM
D(IP)=D1
D1=D(IP)
SVD$PP
$FVECP - Real subscript operators involving parameters
SAF$PM
SAF$PP
SVF$PM
R(IP)=R2
R2=R(IP)
SVF$PP
$IVECP - Integer subscript operators involving parameters
SAI$PM
SAI$PP
SVI$PM
I(IP)=I2
I2=I(IP)
SVI$PP
$LVECP - Logical*1 subscript operators involving parameters
SAL$PM
SAL$PP
SVL$PM
L(IP)=L1
L1=L(IP)
SVL$PP
$QPVEC - Logical*4 and integer*4 subscript operators involving parameters
SVQ$PM
I=K(IP)
(1)
SVQ$PP
ARITHMETIC FUNCTIONS
PAGE 7-21
$QVEC - Logical*4 and integer*4 subscript operators
SVQ$IM
SVQ$SM
SVQ$MM
I=K(I1+I2)
I=K(I1)
(1)
(1)
$QVECP - Logical*4 and integer*4 subscript operators involving
parameters
SVQ$IP
SVQ$SP
SVQ$MP
I=KP(3)
I=KP(I1+I2)
(1)
(1)
(1) The variable K is declared as an INTEGER*4 array.
7.7
RELATIONAL OPERATORS
In the following routines, code produced for LOGICAL*1 (byte)
variables
would also be produced for LOGICAL*4 variables, because only the
low-order
byte of a LOGICAL*4 variable contains a value. Note that
comparisons against the constants 0, 0.0, 0.0D0 and .FALSE. generate
special code.
However, this efficiency in execution is at the expense of loading
another
OTS module, which causes an increase in program size.
The modules containing the relational routines are listed below.
module name is followed by the entry points to the routines defined
in that
module. Following each entry point, is a statement which
generates the
entry point; any number in parentheses following the statement
refers to a
note at the end of the section.
Each
There are a number of entry points in the following modules that do
not fit
the naming convention; they are not used for threaded code.
$CMPD - Double-precision comparisons
CMD$SS
CMD$IS
CMD$MS
B=(D1+D2).LT.(D3+D4)
B=3.DO.LT.(D3+D4)
B=D1.LT.(D3+D4)
CMD$PS
CMD$SI
CMD$II
B=DP1.LT.(D3+D4)
B=(D4+D5).LT.3.0
B=3.DO.LT.2.DO
CMD$MI
CMD$PI
CMD$SM
B=D.LT.3.DO
B=DP1.LT.3.DO
B=(D1+D7).LT.D
CMD$IM
CMD$MM
CMD$PM
B=3.DO.LT.D
B=D.LT.D1
B=DP1.LT.D
PAGE 7-22
ARITHMETIC FUNCTIONS
CMD$SP
CMD$IP
CMD$MP
B=(D1+D8).LT.DP1
B=3.DO.LT.DP1
B=D.LT.DP1
CMD$PP
B=DP1.LT.DP2
$CMD
- this entry point is the same as CMD$SS.
$CMD performs calls
to
this location that are made from within the OTS.
$CMPD - this is the inline entry point to the code at location
CMD$SS.
$CMPF - Real comparisons
CMF$SS
CMF$IS
CMF$MS
B=(R1+R2).LT.(R3+R4)
B=3.0.LT.(R3+R4)
B=R1.LT.(R3+R4)
CMF$PS
CMF$SI
CMF$II
B=RP1.LT.(R3+R4)
B=(R4+R5).LT.3.0
B=3.0.LT.2.0
CMF$MI
CMF$PI
CMF$SM
B=R.LT.3.0
B=RP1.LT.3.0
B=(R1+R7).LT.R
CMF$IM
CMF$MM
CMF$PM
B=3.0.LT.R
B=R.LT.R1
B=RP1.LT.R
CMF$SP
CMF$IP
CMF$MP
B=(R1+R8).LT.RP1
B=3.0.LT.RP1
B=R.LT.RP1
CMF$PP
B=RP1.LT.RP2
$CMR
- this entry point is the same as CMF$SS.
$CMR performs calls
to
this location that are made from within the OTS.
$CMPF - this is the inline entry point to the code at location
CMF$SS.
$ICMPS - Integer comparisons
CMI$SS
CMI$SI
CMI$SM
B=(I1+I2).LT.(I3+I4)
B=(I4+I5).LT.3
B=(I1+I7).LTI
CMI$IS
CMI$II
CMI$IM
B=3.LT.(D3+D5)
B=3.LT.2
B=3.LT.I
CMI$MS
CMI$MI
CMI$MM
B=D1.LT.(D3+D4)
B=I.LT.3
B=I.LT.I1
ARITHMETIC FUNCTIONS
PAGE 7-23
$IPCMP - Integer parameter comparisons
CMI$PI
CMI$PM
CMI$PP
B=IP1.LT.3
B=IP1.LT.I
B=IP1.LT.IP2
CMI$PS
CMI$MP
CMI$IP
B=IP1.LT.(I3+I5)
B=I.LT.IP1
B=3.LT.IP1
CMI$SP
B=(I1+I8).LT.IP1
$LCMPI - Immediate logical*1 comparisons
CML$SI
CML$MI
B=(B1.OR.B2).LT..TRUE.
B=B.LT..TRUE.
$LCMPP - Logical*1 comparisons to parameter
CML$SP
CML$IP
CML$MP
B=(B1.OR.B2).LT.BP
B=.TRUE..LT.BP
B=B.LT.BP
CML$PP
B=BP1.LT.BP2
$LCMPS - Logical*1 comparisons to stack and memory
CML$SS
CML$MS
CML$IS
B=(B1.OR.B2).LT.(B3.OR.B4)
B=B1.LT.(B2.OR.B3)
B=.TRUE..LT.(B1.OR.B2)
CML$SM
CML$MM
CML$IM
B=(B1.OR.B2).LT.B
B=(B.LT.B1
B=.TRUE..LT.B
$LPCMPS - Logical*1 parameter comparisons
CML$PS
CML$PI
CML$PM
B=BP.LT.(B1.OR.B2)
B=BP.LT..TRUE.
B=BP.LT.B
$LTEST - Logical*1 test operators
TSL$S
B=(B.OR.B1).EQ..FALSE.
TSL$M
TSL$I
B=B.EQ..FALSE.
B=.FALSE..EQ..FALSE.
TSL$P
B=BP.EQ..FALSE.
PAGE 7-24
FUNCTIONS
ARITHMETIC
$TESTC - Complex test operators
TSC$S
TSC$M
TSC$I
B=(C+C1).LT.(0.0,0.0)
B=C.LT.(0.0,0.0)
B=(0.0,0.0).LT.(0.0,0.0)
TSC$P
B=BP.LT.(0.0,0.0)
$TESTS - Integer, real, and double-precision tests against 0
7.8
TSI$S
TSI$M
TSI$I
B=(I+I1).LT.0
B=I.LT.0
B=0.LT.0
TSI$P
TSF$S
TSF$M
B=IP.LT.0
B=(R+R1).LT.0.0
B=R.LT.0.0
TSF$I
TSF$P
TSD$S
B=0.0.LT.0.
B=RP.LT.0.0
B=(D+D1).LT.0.0D0
TSD$M
TSD$I
TSD$P
B=D.LT.0.0D0
B=0.0 D0.LT.0.0D0
B=DP.LT.0.0D0
LOGICAL OPERATORS
The modules containing the logic routines are listed below.
Each
module
name is followed by the entry points to the routines defined in that
module. Following each entry point, is a statement which generates the
entry
point;
any number in parentheses following the statement refers to a
note
at the end of the section.
$BITDI - Logical Expressions
AND$
EQV$
IOR$
L=L.AND.L1
L=L.EQV.L1
L=L.IOR.L1
XOR$
L=L.XOR.L1
ARITHMETIC FUNCTIONS
PAGE 7-25
$LOADS - Relational Expressions
7.9
LEQ$
LGE$
LGT$
L=L.EQ.L1
L=L.GE.L1
L=L.GT.L1
LLE$
LLT$
LNE$
L=L.LE.L1
L=L.LT.L1
L=L.NE.L1
BRANCH OPERATORS
The modules containing the branch routines are listed below.
Each
module
name is followed by the entry points to the routines defined in
that module. Following each entry point, is a statement which generates
the entry
point;
any number in parentheses following the statement refers to
a note
at the end of the section.
$AIF - Arithmetic IF Statement
AIF$
IF (I-I1) 10,20,30
$BRAS - Conditional GOTO Statements
NOTE
In the following examples, the appropriate
relational operator from Section 6.6 evaluates the equation in parentheses;
then the
branch operator directs program control according to the results of that evaluation.
BEQ$
BGE$
BGT$
IF (L.EQ.L1) GOTO 10
IF (L.GE.L1) GOTO 10
IF (L.GT.L1) GOTO 10
BLE$
BLT$
IF (L.LE.L1) GOTO 10
IF (L.LT.L1) GOTO 10
BNE$
IF (L.NE.L1) GOTO 10
BRA$
GOTO 10
$GOTO - Computed and Assigned GOTO Statements
JMC$
JMI$M
JMI$P
GOTO (10,20),I
GOTO I,(10,20)
GOTO IP,(10,20)
PAGE 7-26
7.10
ARITHMETIC FUNCTIONS
DO STATEMENTS
The modules containing the DO routines are listed below. Each module
name
is followed by the entry points to the routines defined in that
module.
Following each entry point, is a statement which generates the entry
point;
any number in parentheses following the statement refers to a note at
the
end of the section.
In this section the address code of the entry point name works as
follows:
the first letter of the address code is the location of the
increment
value; the second letter is the location of the termination
value.
Special entry points are used when the increment value is one.
Remember that the operation code NM is a DO loop in the main program.
The
operation code NP is a DO loop using a parameter for a control variable.
$BRAS - Increment value is 1
NMI$1I
NMI$1M
DO 10 I=2,8
DO 10 I=2,I1
$NXT1 - Termination value is immediate
NMI$II
NMI$MI
NMI$PI
DO 10 I=2,8,2
DO 10 I=2,8,I1
DO 10 I=2,8,IP
NPI$II
NPI$MI
NPI$PI
DO 10 IP=2,8,2
DO 10 IP=2,8,I
DO 10 IP=2,8,IP1
$NXT2 - Termination value is in memory
NMI$IM
NMI$MM
NMI$PM
DO 10 I=2,I1,2
DO 10 I=2,I1,I2
DO 10 I=2,I1,IP
NPI$IM
NPI$MM
DO 10 IP=2,I1,2
DO 10 IP=2,I1,I2
(1)
(1)
NPI$PM
DO 10 IP=2,I1,IP1
$NXT3 - Termination value is a parameter
NMI$IP
NMI$MP
NMI$PP
DO 10 I=2,IP,2
DO 10 I=2,IP,I1
DO 10 I=2,IP,IP1
NPI$IP
NPI$MP
NPI$PP
DO 10 IP=2,IP1,2
DO 10 IP=2,IP1,I
DO 10 IP=2,IP1,IP2
ARITHMETIC FUNCTIONS
PAGE 7-27
$NXT4 - Increment value is 1
NMI$1P
NPI$1I
NPI$1M
DO 10 I=2,IP
DO 10 IP=2,8
DO 10 IP=2,I
(1)
(1)
(1)
NPI$1P
DO 10 IP=2,IP1
(1)
(1) The default increment is 1.
CHAPTER 8
SUBROUTINE SUPPORT
The first section of this chapter describes the routine that passes
control
to the subroutines. The other ten sections describe the routines
that perform the library subroutines and are arranged alphabetically by the
entry
points which reference the routines. See the appropriate FORTRAN IV
User's
Guide for more information on the library subroutines.
If the routine being described performs both threaded and inline
the
threaded code entry point is first followed by the inline entry
point in
parentheses.
code
"Function" tells what the routine does.
"Defined in" gives the name of the module in which the entry point
defined.
Where a module defines more than one entry
point, a
"see also" note directs the reader to the other
entry
point(s).
is
"Called by" lists the modules that call the routine being
described.
The
entry points in parentheses, following the module
names, are
the entry points in the module that call the routine.
"Calls" lists the entry points that are called by the
being described.
routine
All subroutines are called by a JSR PC,xxx instruction.
8.1
$OTIS ($$OTIS)
to
Function:
the
$OTIS sets the stack before passing program
subroutine.
control
First, two words from the OTS work area
(See Appendix C.2.) are put on the stack: THREAD, which tells
if the
code
is threaded or inline;
and ENMLNK, which points
to the
last name in the queue. (See Table C-3; offset 14.)
Then the
internal
line
number
of the calling function is put
on the
stack, followed by the name of the subroutine (in
RAD50)
and
the
arguments,
if there are any.
$OTIS then passes
control
finished,
to the subroutine.
When
passes
the
the
subroutine
is
it
control
to
next statement of the
compiled code
(JMP @(R4)+ for threaded code).
PAGE 8-2
SUPPORT
SUBROUTINE
$$OTIS (inline code)
is
a
little
different.
Control
is
passed
to the subroutine in the same way;
however, when
the
subroutine is finished, control returns
to
$$OTIS.
$$OTIS
removes
the
information
that was put on the stack and
then
moves to the next instruction.
Defined in:
$SUBR
Called by:
None
Calls:
None
8.2
ASSIGN
Function:
file.
The subroutine ASSIGN, like the OPEN statement, opens a
The
OPEN statement is preferred because the code is more
efficient.
For more information on this
subroutine,
see
the
appropriate FORTRAN IV User's Guide.
For more information
on
the statement, see the FORTRAN Language Reference Manual.
Defined in:
$ASSIGN
Called by:
None
Calls:
$GETFILE
8.3
CLOSE
Function:
a
The subroutine CLOSE, like
the
CLOSE
statement,
closes
file.
The
CLOSE statement is preferred because the code
is
more efficient.
For more information on this subroutine,
see
the
appropriate
FORTRAN IV User's Guide.
For more
information on the statement, see
Reference
Manual.
Defined in:
$CLS
Called by:
None
Calls:
$CLOSE
$GETFILE (RT-11 and RSTS/E)
the
FORTRAN
Language
SUBROUTINE SUPPORT
PAGE 8-3
8.4
DATE
Function:
returns
DATE is passed an array name or an array element and
the
date,
as
set
by
the system.
The month is
given as a
three letter abreviation.
to
If no argument is
passed
the
subroutine, error number 16 is generated.
Defined in:
$DATE
Called by:
None
Calls:
None
8.5
ERRSNS
Function:
ERRSNS
ERRSNS can be passed zero, one,
goes
or
two
arguments.
to the work area (See Appendix C.2.) and finds
the last
error number and the associated logical
unit
number
(LUN).
If no arguments were passed, ERRSNS clears these two
bytes of
information.
If one argument
was
passed,
the
error
number
is
returned
in the argument.
If two
arguments were
passed, both bytes of information are returned.
Defined in:
ERRSNS
Called by:
None
Calls:
None
8.6
ERRTST
last
Function:
number
ERRTST receives two arguments.
passed
in
the
first
ERRTST takes the error
argument
and tries to find it
in the
error table. (See Appendix C.2.) If the error has
occured and
is in the error table, ERRTST returns a 1 in the
second argument.
0
If the error has not occured, ERRTST returns
in
Defined in:
the second argument.
ERRTST
Called by:
None
Calls:
None
a
PAGE 8-4
SUPPORT
8.7
SUBROUTINE
EXIT
Function:
STOP
EXIT causes a jump to $EXIT.
This call performs
as
a
command but does not print any message.
Defined in:
$CEXIT
Called by:
None
Calls:
$EXIT
8.8
IDATE
Function:
re-
IDATE receives three integer variables.
turn
These variables
the month, day and year, as set by the system.
If
less
than three arguments are passed, error number 16 is
generated.
Defined in:
$IDATE
Called by:
None
Calls:
None
8.9
RANDU
Function:
argu-
RANDU is a random number generator, it receives
ments.
The
first
three
two are the generator base, the third
is
the variable name in which the random number is returned.
If
less then three variables are passed, error number 16 is
gen-
erated.
Defined in:
$RANDU
Called by:
None
Calls:
None
SUBROUTINE SUPPORT
PAGE 8-5
8.10
is
SETERR
Function:
an
SETERR receives two variables.
error
The
first
variable
number, the second a value that tells the
compiler how
to treat the error.
If less then two variables
are
passed,
error number 16 is generated.
Defined in:
$SETERR
Called by:
None
Calls:
None
8.11
USEREX
Function:
beginning
The instruction, CALL USEREX [routine name], at the
of
a
Fortran
program, causes any exit statement to
jump to
the routine named before exiting the program.
USEREX
saves
the address of the routine named in the instruction.
Defined in:
$USERE
Called by:
None
Calls:
None
CHAPTER 9
FORTRAN LIBRARY FUNCTIONS
This chapter discusses the routines that perform the FORTRAN library
functions.
All FORTRAN library functions assume that R5 points to an
argument
block containing the number of arguments passed, followed by
their addresses.
Functions are returned by way of the RTS PC instruction
with the
results in R0 through R3.
The compiler sets up the argument block by generating a series
REL$
calls to put arguments onto the stack; it then generates a CAL$
call, followed by the number of arguments given and the name of the desired
function
(function names are global). After the function is performed, a
move is
generated to move the result out of the register(s).
of
Table 8-1 lists the FORTRAN functions. MODULE gives the name of the
module
in which the function is defined; CALLS lists the entry points,
external
to the module, that the module calls. In some cases the external
entry points are called only under certain hardware configurations;
these are
noted by a conditional statement such as "If no FPU:".
Table 8-1
FORTRAN Functions
FUNCTION
MODULE
CALLS
ABS
AIMAG
AINT*
ALOG
ALOG10
AMAX0
AMAX1
AMIN0
AMIN1
$ABS
$AIMAG
$AINT
$ALOG
$ALOG
$AMIN0
$AMAX1
$AMIN0
$AMAX1
None
None
None
If no FPU:
If no FPU:
$IR,$POPR3
$CMR,$RI
$IR,$POPR3
$CMR,$RI
$ADR,$DVR,$IR,$MLR,$SBR
$ADR,$DVR,$IR,$MLR,$SBR
AMOD
ATAN
ATAN2
CABS
CCOS
CEXP
CLOG
CMPLX
CONJC
COS
CSIN
CSQRT
$AMOD
$ATAN
$ATAN
$CABS
$CSIN
$CEXP
$CLOG
$CMPLX
$CONJC
$SIN
$CSIN
$CSQRT
$DVR,$INTR,$MLR,$POPR3,$SBR
If no FPU: $ADR,$DVR,$MLR,$POPR3,$SBR
If no FPU: $ADR,$DVR,$MLR,$POPR3,$SBR
$ADR,$DVR,$FCALL,$MLR
COS,EXP,SIN,$ADR,$DVR,$FCALL,$MLR,$SBR
COS,EXP,MOF$RS,SIN,$FCALL,$MLC,$MLR,$POPR4,$SBR
ALOG,ATAN2,CABS,$FCALL
None
None
If no FPU: $ADR,$DVR,$INTR,$MLR,$SBR
COS,EXP,SIN,$ADR,$DVR,$FCALL,$MLR,$SBR
$ABS,$ADR,$IVR,$FCALL
PAGE 9-2
FUNCTIONS
DABS
DATAN
DATAN2
DBLE**
DCOS
DEXP
DIM
DLOG
DLOG10
DMAX1
DMIN1
DMOD
DSIGN
DSIN
DSQRT
EXP
FLOAT**
IABS
IDIM
IDINT***
IFIX**
INT***
ISIGN
MAX0
MAX1
MIN0
MIN1
MOD
RAN
REAL
SIGN
SIN
SNGLE
SQRT
TANH
*
on
FORTRAN LIBRARY
$DABS
$DATAN
$DATAN
$DBLE
$DSIN
$DEXP
$DIM
$DLOG
$DLOG
$DMIN1
$DMIN1
$DMOD
$DSIGN
$DSIN
$DSQRT
$EXP
$FLOAT
$IABS
$IDIM
$INT
$IFIX
$INT
$ISIGN
$MAX0
$AMAX1
$MIN0
$AMAX1
$MOD
$RAN
$REAL
$SIGN
$SIN
$SNGLE
$SQRT
$TANH
SQR,$ADR,$DVR,$FCALL,$MLR
If no FPU: $ADD,$DVD,$MLD,$POPR4,$SBD
If no FPU: $ADD,$DVD,$MLD,$POPR4,$SBD
None
If no FPU: $ADD,$DINT,$DVD,$MLD,$POPR4,$SBD
If no FPU: $ADD,$DI,$DVD,$ID,$MLD,$POPR4,$SBD
$SBR
If no FPU: $ADD,$DVD,$ID,$MLD,$POPR4,$SBD
If no FPU: $ADD,$DVD,$ID,$MLD,$POPR4,$SBD
$CMD
$CMD
$DVD,$DINT,$MLD,$SBD
None
If no FPU: $ADD,$DINT,$DVD,$MLD,$POPR4,4SBD
If no FPU: $ADD,$DVD
If no FPU: $ADR,$DVR,$IR,$MLR,$RI,$SBR
$IR,$POPR3
None
None
$RI
$RI
$RI
None
None
$CMR,$RI
None
$CMR,$RI
$DVI,$MLI
None
None
None
If no FPU: $ADR,$DVR,$INTR,$MLR,$SBR
None
If FIS: $ADR,$DVR
EXP,MOF$RS,$ADR,$DVR,$FCALL,$MLR,$SBR
$INTR is like the AINT function.
However, the result is
returned
the stack instead of in R0:R1.
** These routines exist but are never called. Instead the compiler
calls
the appropriate conversion routine directly.
*** These functions generate blocks of code that can be avoided by
direct
conversions.
For example, FORTRAN programs should use I=R instead
of
I=INT(R), or in MACRO simply call $RI.
APPENDIX A
OTS MODULE SIZES
The first section of this appendix deals with the
modules.
The second section deals with the RSX-11 modules.
A.1
RT-11/RSTS/E
RT-11/RSTS/E MODULE SIZES
Tables A-1, A-2 and A-3 list the RT-11/RSTS/E modules, followed
the
PSECT(s) that contain the module, and the size of the module. In
Tables
A-1 and A-2 the module sizes are divided into the contributions
to each
PSECT. In these tables the total module size is obtained by adding
the module's contributions to each PSECT. The sizes are in decimal words.
Table A-1
OTSCOM (Hardware Independent Modules)
Mod
Psect Size
Mod
Psect Size
Mod
Psect
Size
by
$ABS
$AMAX1
$ASFRE
$BACKS
$CABS
$CEXP
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
7
60
8
100
74
36
$AIF
$AMIN0
$ASSIG
$BITDI
$CALL
$CLOG
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
6
24
138
12
15
34
$AIMAG
$AMOD
$AOTS
$BRAS
$CEXIT
$CLOSE
CLOSTM
OTS$I
OTS$D
OTS$I
OTS$I
39
4
16
31
$CLS
$CMPF
$CONJG
$CONVI
14
9
20
5
8
8
43
56
19
35
$CSIN
$DATE
$DMIN1
$DMOV2
$DMOV5
$DMOVR
$ENCOD
$EOL
$ERRSN
EXTEND
10
67
10
131
20
120
65
46
5
12
16
65
83
16
21
40
$CMPD
$CMPLX
$CONV5
$CONVL
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$P
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$P
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$P
OTS$I
$CNEG
$CONV6
$COPY
$DABS
$DIM
$DMOV1
$DMOV4
$DMOV7
$DUMPL
EOF
$ERRTS
$CSQRT
$DBLE
$DMOD
$DMOV3
$DMOV6
$DSIGN
$ENDER
ERRS
ERRSS
$FCALL
$FCHNL
OTS$I
OTS$I
OTS$S
OTS$I
OTS$I
OTS$I
OTS$P
OTS$I
OTS$I
OTS$I
OTS$I
OTS$P
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
6
23
1
22
2
178
20
88
9
18
35
20
69
7
31
19
19
14
26
960
139
7
33
$FIND
OTS$I
69
$FIO
$FMOV2
$FMOV5
$FMOV8
$FNEG
OTS$I
OTS$I
OTS$I
OTS$I
6
4
8
15
$FMOV3
$FMOV6
$FMOV9
$FUD
OTS$I
OTS$P
OTS$I
OTS$I
OTS$I
OTS$I
484
20
7
6
17
5
$FLOAT
$FMOV1
$FMOV4
$FMOV7
$FMOVR
$GETFI
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
8
5
6
8
11
15
PAGE A-2
SIZES
OTS MODULE
Mod
Psect
Size
Mod
Psect
Size
Mod
Psect
Size
$GETRE
$IADDS
$ICMPS
$IFIX
$LISTI
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$P
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$D
OTS$I
OTS$I
68
18
18
11
361
20
33
37
19
12
13
5
12
10
1
30
339
299
18
20
14
$GOTO
$IBR
$IDATE
$IFR
$LISTO
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
8
27
10
39
7
7
7
19
19
18
9
16
10
15
28
31
77
8
18
12
14
$QVECP
$REAL
$RETS
$RWBLK
$SETER
$SNGL
16
25
37
26
240
20
14
11
26
56
4
39
10
10
28
24
271
50
28
20
97
20
8
5
20
140
21
14
$IABS
$IBW
$IDIM
$IFW
$IMOVR
$IMOVR
$INEG
$IPADD
$IPSUB
$ISUBS
$LCMPP
$LNOTS
$LTEST
$MOD
$NXT2
$OBJEN
OPNCLO
$POPR
$PSHD2
$PSHF2
$QPVEC
OTS$I
8
OTS$I
45
OTS$I
13
OTS$I 210
OTS$I
26
OTS$P
20
$STACK 64
$STKST
0
OTS$S
97
OTS$I 553
OTS$I
13
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$P
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$O
OTS$I
OTS$I
OTS$I
OTS$I
OTS$P
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
$RAN
$RETD
$REWIN
$SAVRE
$SIGN
$STOP
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$P
42
19
37
56
12
55
20
$SUBR
$TCMPL
$TRARY
OTS$I
OTS$I
OTS$I
41
45
88
$TANH
$TESTC
$TVIRD
OTS$I
OTS$I
OTS$I
121
14
OTS$I
OTS$I
85
92
$TVIRI
$TVIRC
OTS$I
OTS$I
78
111
$TVIRL
$UIO
OTS$I
OTS$P
OTS$I
OTS$D
OTS$P
OTS$I
OTS$D
OTS$I
OTS$I
252
20
91
1
21
65
1
90
138
$USERE
$VINTX
$VIRDN
$VIRIN
$VIRQN
$VIRDP
$VIRIP
$VTRAN
$XDD
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
10
1
103
79
79
116
88
61
95
$VCTRA
OTS$I
OTS$I
OTS$P
OTS$I
78
252
20
40
$VIRFN
$VIRLN
OTS$I
OTS$I
88
88
$VIRFP
$VIRLP
WAIT
$XFF
OTS$I
OTS$I
OTS$I
OTS$I
100
87
17
54
$IMOVS
$INITI
$IPCMP
$ISIGN
$LCMPS
$LMOVR
$LOADS
$MAX0
$NOVIR
$NXT3
$OBJFM
OPNSTM
$PSHD3
$PSHF3
$QVEC
$RANDU
$RETDS
$RIO
$SAV4R
SIMRT
$TESTS
86
$TVIRF
$TVIRQ
$UIO
$VINTN
$VINTP
$VIRQP
$XCI
$INCR
$INT
$IPMOV
$ISNLS
$LCMPI
$LMOVS
$LPCMP
$MIN0
$NXT1
$NXT4
$OPEN
$PAUSE
$PSHD1
$PSHF1
$PUTRE
OTS MODULE SIZES
PAGE A-3
Table A-2 list the hardware dependent modules. When you are
determining
the size of OTS modules for NHD/EAE/EIS hardware, it is usually
necessary
to include the modules which contain the emulation code for the
arithmetic
operations you are using. These modules, and the operations they
are needed for, are listed below:
$DADD (REAL*8 additon/subtraction)
$DDIV (REAL*8 division)
$DMUL (REAL*8 multiplication)
$FADD (REAL*4 addition/subtraction)
$FDIV (REAL*4 divsion)
$FMULS (REAL*4 multiplication)
Table A-2
Hardware Dependent Modules
Mod
$ADDA
$ADDM
$ADDP
$AINT
$ALOG
$ATAN
$CADD
$CDIV
$CMUL
$CONV1
$CONV2
$CONV3
$CONV4
$CONVF
$DADD
$DATAN
$DDIV
$DEXP
$DINT
$DLOG
$DMUL
$DSIN
$DSQRT
Psect
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$P
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
Size for each hardware
NHD
EAE
EIS
FIS
FPU
27
28
28
39
120
215
83
129
82
12
55
43
18
485
20
326
361
247
226
53
194
222
184
66
27
28
28
41
120
215
83
129
82
12
59
43
18
485
20
371
361
247
226
55
194
296
184
66
27
28
28
33
120
215
83
129
82
12
53
43
18
503
20
323
361
247
226
41
194
289
184
66
54
46
45
33
120
215
83
129
82
12
53
43
18
503
20
323
361
247
226
41
194
289
184
66
46
46
54
15
59
115
53
46
35
10
30
17
12
503
20
49
154
24
114
11
92
23
97
41
$EXP
$FADD
$FDIV
$FMULS
$IDIVS
$IMUL
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
112
176
105
114
42
30
112
176
145
142
19
19
112
176
138
127
15
14
112
36
17
17
15
14
74
49
18
17
15
14
PAGE A-4
SIZES
OTINIT
$SIN
$SQRT
$XDI
$XFI
$XII
OTS MODULE
. ABS.
OTS$I
OTS$D
OTS$P
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
16
582
3
21
125
62
132
92
67
16
591
3
21
125
62
132
92
67
16
582
3
21
125
62
132
92
49
16
614
3
21
125
44
132
92
49
16
633
3
21
66
30
40
38
49
Table A-3 lists the modules used in subscript operations. The column
labeled "Bounds" is the module size if you are using bounds checking;
that
is, if the subscript is being checked to see if it is in the array.
Mod
$DPVEC
$DVECP
$FVEC
$IPVEC
$IVECP
$LVEC
A.2
Table A-3
Subscript Calculations
Psect
Size
Mod
Psect
Size
Bounds No Bounds
Bounds No Bounds
OTS$I
32
30
$DVEC
OTS$I
19
18
OTS$I
19
18
$FPVEC OTS$I
29
27
OTS$I
19
18
$FVECP OTS$I
19
18
OTS$I
24
22
$IVEC
OTS$I
22
13
OTS$I
14
13
$LPVEC OTS$I
20
18
OTS$I
12
11
$LVECP OTS$I
12
11
RSX-11 MODULE SIZES
Table A-4 lists the RSX-11 modules, followed by the PSECT that contains
the
module, and the size of the module. The RSX-11 PSECTs are different
than
the RT-11/RSTS/E PSECTs.
Mod
PSECT Size
Mod
PSECT Size
Mod
PSECT Size
$ABS
$ADDA
$ADDM
$ADDP
$AIF
$AIMAG
$AINT
$ALOG
$AMAX1
$AMIN0
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
61
123
124
124
60
94
306
159
105
$DEXP
$DIM
$DINT
$DLOG
$DMIN1
$DMOD
$DMOVR
$DMOV1
$DMOV2
$DMOV3
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
442
88
101
415
121
129
82
59
59
95
$FMOV8
$FMOV9
$FMULS
$FNBST
$FNEG
$FPVEC
$FUD
$FVEC
$FVECP
$GETFI
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
70
93
230
184
99
96
62
94
94
82
$ASFRE
$ASSIG
$ATAN
$BACKS
$BITDI
$BRAS
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
79
137
419
191
78
113
$DMOV4
$DMOV5
$DMOV6
$DMOV7
$DMUL
$DPVEC
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
62
78
95
66
419
115
$GETRE
$GOTO
$IABS
$IADDS
$IBR
$IBW
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
109
78
62
106
185
149
OTS MODULE SIZES
PAGE A-5
$CABS
OTS$I
191
$DSIGN
OTS$I
68
$ICMPS
OTS$I
$CADD
OTS$I
227
$DSIN
OTS$I
430
$IDATE
OTS$I
$CALL
OTS$I
73
$DSQRT
OTS$I
147
$IDIM
OTS$I
$CDIV
OTS$I
308
$DVEC
OTS$I
103
$IDIVS
OTS$I
$CEXP
OTS$I
166
$DVECP
OTS$I
103
$IFIX
OTS$I
$CLOG
OTS$I
128
$ENCOD
OTS$I
203
$IFR
OTS$I
$CLOSE
OTS$I
143
$ENDER
OTS$I
117
$IFW
OTS$I
CLOSTM
OTS$I
160
$EOF
OTS$I
140
$IMOVR
OTS$I
$CLS
OTS$I
79
$EOL
OTS$I
149
$IMOVS
OTS$I
$CMPD
OTS$I
237
$ERMOP
OTS$I
226
$IMUL
OTS$I
$CMPF
OTS$I
213
$ERQIO
OTS$I
177
$INCR
OTS$I
$CMPLX
OTS$I
63
$ERRPT
OTS$I
896
$INEG
OTS$I
$CMUL
OTS$I
225
$ERRSE
OTS$I
148
$INITI
OTS$I
$CNEG
OTS$I
82
$ERRSN
OTS$I
98
$INT
OTS$I
$CONJG
OTS$I
64
$ERRTS
OTS$I
88
$IPADD
OTS$I
$CONVF
CV$$F
728
$ERTXT
OTS$I
1018
$IPCMP
OTS$I
$CONVI
CV$$I
$EXIT
OTS$I
65
$IPMOV
OTS$I
$CONVL
CV$$L
128
$EXP
OTS$I
269
$IPSUB
OTS$I
$CONV1
OTS$I
97
$FADD
OTS$I
321
$IPVEC
OTS$I
$CONV2
OTS$I
191
$FCALL
OTS$I
61
$IRAD5
OTS$I
$CONV3
OTS$I
151
$FCHNL
OTS$I
69
$IRR
OTS$I
$CONV4
OTS$I
89
$FDBSE
OTS$I
155
$IRW
OTS$I
$CONV5
OTS$I
120
$FDIV
OTS$I
244
$ISIGN
OTS$I
$CONV6
OTS$I
125
$FIND
OTS$I
113
$ISNLS
OTS$I
106
95
64
87
76
173
190
79
164
86
98
73
109
80
99
99
117
99
91
78
191
222
66
76
$COPY
OTS$I
80
$FIO
OTS$F
797
$ISUBS
OTS$I
$CSIN
OTS$I
297
$FLOAT
OTS$I
80
$IUR
OTS$I
$CSQRT
OTS$I
182
$FMOVR
OTS$I
77
$IUW
OTS$I
$DABS
OTS$I
63
$FMOV1
OTS$I
59
$IVEC
OTS$I
$DADD
OTS$I
485
$FMOV2
OTS$I
64
$IVECP
OTS$I
$DATAN
OTS$I
627
$FMOV3
OTS$I
65
$LCMPI
OTS$I
$DATIM
OTS$I
173
$FMOV4
OTS$I
60
$LCMPP
OTS$I
$DBLE
OTS$I
61
$FMOV5
OTS$I
58
$LCMPS
OTS$I
$DDIV
OTS$I
368
$FMOV6
OTS$I
64
$LISTI
OTS$F
$DEFIN
OTS$I
132
$FMOV7
OTS$I
66
$LISTO
OTS$F
106
217
230
89
89
62
75
89
699
501
PAGE A-6
SIZES
OTS MODULE
Mod
PSECT
Size
$LMOVR
$LMOVS
$LOADS
$LPCMP
$LPVEC
$LTEST
$LVEC
$LVECP
$MAX0
$MIN0
$MOD
$NXT1
$NXT2
$LNOTS
$NXT3
$NXT4
$OBJEN
$OBJFM
$OPEN
OPNCLO
OPNSTM
$OTI
$OTV
$POPR
$PUTRE
$QPVEC
$QVEC
$QVECP
$RAD50
$RAN
$RANDO
$RANDU
$REAL
$RETD
$RETDS
$RETS
$REWIN
$R50
$R50AS
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
67
155
88
725
84
76
87
87
64
64
87
123
123
100
12
11
15
57
30
17
71
22
36
70
80
72
70
70
77
70
95
74
59
89
76
109
133
99
69
Mod
PSECT
Size
$R50WD
$SAVRE
$SAVRG
$SAV4R
$SECND
$SHORT
$SIGN
$SIN
$SNGL
$SQRT
$STPPA
$SUBR
$TANH
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
108
133
140
87
263
135
66
315
$TESTC
$TESTS
$TRARY
$TVIRC
$TVIRD
$TVIRF
$TVIRI
$TVIRL
$TVIRQ
$USERE
$VCTRA
$VINIT
$VIRDP
$VIRFP
$VIRIP
$VIRLP
$VIRQP
$VTRAN
$XCI
$XDD
$XDI
$XFF
$XFI
$XII
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
OTS$I
80
112
2201
2290
1966
1955
1881
1889
2170
73
12
122
298
260
253
253
253
181
257
237
252
166
204
126
125
281
119
301
Mod
PSECT
Size
APPENDIX B
CROSS-REFERENCE LISTING OF ENTRY POINTS AND MODULES
In the following table, the entry points of the FORTRAN IV OTS are
listed
alphabetically. Following each entry point is the name of the
module in
which it is defined.
ENTRY MODULE
$$$DIS OPNCLO
$$$ERR OPNCLO
$$FIO $FIO
$$IFR $IFR
$$IFW $IFW
$$OPCL OPNCLO
$$OTI OTINIT
$$OTIS $SUBR
$$SET OTINIT
$ADC $CADD
$ADD $DADD
$ADDC $CADD
$ADDD $DADD
$ADDF $FADD
$ADR $FADD
$AOTS $AOTS
$BKS $BACKS
$CHKER $EOL
$CLOSE $CLOSE
$CMD $CMPD
$CMPD $CMPD
$CMPF $CMPF
$CMR $CMPF
$CSTM CLOSTM
$CSTMI CLOSTM
$CVTBC $CONV5
$CVTBD $CONV5
$CVTBF $CONV5
OHANDL
$CVTCB $CONV2
$POPR
$CVTCD $CONV6
$CVTCF $CONV6
$CVTCI $CONV2
$CVTDB $CONV2
$CVTDC $CONV6
ENTRY MODULE
ENTRY MODULE
$DEC $ENCOD
$INITI
$INITI
$DEF $RIO
$INTR $AINT
$DEO $OBJEN
$IOEXI
$EOL
$DI
$CONV2
$IR
$CONV3
$DINT $DINT
$IRR $RIO
$DIVC $CDIV
$IRW $RIO
$DIVD $DDIV
$ISNTR
$ISNLS
$DIVF $FDIV
$IUR $UIO
$DR
$CONV4
$IUW $UIO
$DUMPL
$DUMPL
$LSNTR
$ISNLS
$DVC $CDIV
$MLC $CMUL
$DVD $DDIV
$MLD $DMUL
$DVI $IDIVS
$MLI $IMUL
$DVR $FDIV
$MLR $FMULS
$ECI $CONVI
$MULC $CMUL
$ENC $ENCOD
$MULD $DMUL
$END $ENDER
$MULF $FMULS
$ENO $OBJEN
$OBJFM
$OBJFM
$EOF EOF
$ODF1 OHANDL
$EOF2 $RWBLK
$ODF2 OHANDL
$EOFIL
$RWBLK
$OPEN $OPEN
$EOL $EOL
$OPNER
$OPEN
$ERR $ENDER
$OSTM OPNSTM
$ERROR
$FUD
$OSTMI
OPNSTM
$ERRS ERRSS
$OTI OTINIT
$ERRTB
ERRSS
$OTIS $SUBR
$EXIT $STOP
$OVRH OHANDL
$FCALL
$FCALL
$OVTAB
$FCHNL
$FCHNL
$POPR3
$FIO $FIO
$POPR4
$POPR
$FND $FIND
$POPR5
$POPR
$GETBL
$RWBLK
$PSE $PAUSE
$GETFI
$GETFI
$PSES $PAUSE
$GETIN
$RIO
$PUTBL
$RWBLK
$CVTDF $CONV4
$PUTRE
$CVTDI $CONV2
$CVTFB $CONV2
$CVTFC $CONV1
$CVTFD $CONV1
$CVTFI $CONV2
$CVTIC $CONV3
$CVTID $CONV3
$CVTIF $CONV3
$GETRE
$IBR
$IBW
$IC
$ID
$IFR
$IFW
$ILR
$ILW
$GETRE
$IBR
$IBW
$CONV3
$CONV3
$IFR
$IFW
$LISTI
$LISTO
$RC
$RD
$SBC
$SBD
$PUTRE
$CONV1
$CONV1
$RI
$CONV2
$RWD $REWIN
$CADD
$DADD
$SBR $FADD
$SETIN
$RIO
PAGE B-2
MODULES
ENTRY MODULE
CROSS-REFERENCE LISTING OF ENTRY POINTS AND
ENTRY MODULE
ENTRY MODULE
$SHORT
ERRSS
ADF$MS
$FADD
CAL$ $CALL
$STP $STOP
ADF$PA
$ADDA
CCD$ $CONV6
$STPS $STOP
ADF$PM
$ADDM
CCF$ $CONV1
$SUBC $CADD
ADF$PP
$ADDP
CCI$ $CONV3
$SUBD $DADD
ADF$PS
$FADD
CCL$ $CONV5
$SUBF $FADD
ADF$SA
$ADDA
CCOS $CSIN
$TAC $TCMPL
ADF$SM
$ADDM
CDC$ $CONV6
$TAD $TRARY
ADF$SP
$ADDP
CDF$ $CONV1
$TAF $TRARY
ADF$SS
$FADD
CDI$ $CONV3
$TAI $TRARY
ADI$IA
$IADDS
CDL$ $CONV5
$TAL $TRARY
ADI$IM
$IADDS
CEXP $CEXP
$TAP $TRARY
ADI$IP
$IPADD
CFC$ $CONV6
$TAQ $TRARY
ADI$IS
$IADDS
CFD$ $CONV4
$TTYIN
$GETRE
ADI$MA
$IADDS
CFI$ $CONV3
$TVC $VCTRA
ADI$MM
$IADDS
CFL$ $CONV5
$TVD $VTRAN
ADI$MP
$IPADD
CIC$ $CONV2
$TVF $VTRAN
ADI$MS
$IADDS
CID$ $CONV2
$TVI $VTRAN
ADI$PA
$IPADD
CIF$ $CONV2
$TVL $VTRAN
ADI$PM
$IPADD
CIL$ $CONV2
$TVP $VTRAN
ADI$PP
$IPADD
CLC$ $CONV2
$TVQ $VTRAN
ADI$PS
$IPADD
CLD$ $CONV2
$TVS $LISTO
ADI$SA
$IADDS
CLF$ $CONV2
$VRINT
$NOVIR
ADI$SM
$IADDS
CLI$ $CONV2
$WAIT WAIT
ADI$SP
$IPADD
CLOG $CLOG
$XCI $XCI
ADI$SS
$IADDS
CLOSE $CLS
$XDD $XDD
AIF$ $AIF
CMD$II
$CMPD
$XDF $XDD
AIMAG $AIMAG
CMD$IM
$CMPD
$XDI $XDI
AINT $AINT
CMD$IP
$CMPD
$XFD $XDD
ALOG $ALOG
CMD$IS
$CMPD
$XFF $XFF
ALOG10
$ALOG
CMD$MI
$CMPD
$XFI $XFI
AMAX0 $AMIN0
CMD$MM
$CMPD
$XII $XII
AMAX1 $AMAX1
CMD$MP
$CMPD
??
$VINTX
AMIN0 $AMIN0
CMD$MS
$CMPD
??
ERRS
AMIN1 $AMAX1
CMD$PI
$CMPD
ABS
$ABS
AMOD $AMOD
CMD$PM
$CMPD
ADC$IS
$CADD
AND$ $BITDI
CMD$PP
$CMPD
ADC$MS
$CADD
ASSIGN
$ASSIG
CMD$PS
$CMPD
ADC$PS
$CADD
ATAN $ATAN
CMD$SI
$CMPD
ADC$SS
$CADD
ATAN2 $ATAN
CMD$SM
$CMPD
ADD$IS
$DADD
BAH$ $PAUSE
CMD$SP
$CMPD
ADD$MS
$DADD
BEQ$ $BRAS
CMD$SS
$CMPD
ADD$PS
$DADD
BGE$ $BRAS
CMF$II
$CMPF
ADD$SS
$DADD
BGT$ $BRAS
CMF$IM
$CMPF
ADF$IA
$ADDA
BKS$ $BACKS
CMF$IP
$CMPF
ADF$IM
$ADDM
BLE$ $BRAS
CMF$IS
$CMPF
ADF$IP
$ADDP
BLT$ $BRAS
CMF$MI
$CMPF
ADF$IS
$FADD
BNE$ $BRAS
CMF$MM
$CMPF
ADF$MA
$ADDA
BRA$ $BRAS
CMF$MP
$CMPF
ADF$MM
ADF$MP
$ADDM
$ADDP
CABS
CAI$
$CABS
$CALL
CMF$MS
CMF$PI
$CMPF
$CMPF
CROSS-REFERENCE LISTING OF ENTRY POINTS AND MODULES
PAGE B-3
ENTRY MODULE
CMF$PM $CMPF
CMF$PP $CMPF
CMF$PS $CMPF
CMF$SI $CMPF
CMF$SM $CMPF
CMF$SP $CMPF
CMF$SS $CMPF
CMI$II $ICMPS
CMI$IM $ICMPS
CMI$IP $IPCMP
CMI$IS $ICMPS
CMI$MI $ICMPS
CMI$MM $ICMPS
CMI$MP $IPCMP
CMI$MS $ICMPS
CMI$PI $IPCMP
CMI$PM $IPCMP
CMI$PP $IPCMP
CMI$PS $IPCMP
CMI$SI $ICMPS
CMI$SM $ICMPS
CMI$SP $IPCMP
CMI$SS $ICMPS
CML$IM $LCMPS
CML$IP $LCMPP
CML$IS $LCMPS
CML$MI $LCMPI
CML$MM $LCMPS
CML$MP $LCMPP
CML$MS $LCMPS
CML$PI $LPCMP
CML$PM $LPCMP
CML$PP $LCMPP
CML$PS $LPCMP
CML$SI $LCMPI
CML$SM $LCMPS
CML$SP $LCMPP
CML$SS $LCMPS
CMPLX $CMPLX
COI$A $LNOTS
COI$M $LNOTS
COI$P $LNOTS
COI$S $LNOTS
COL$A $LNOTS
COL$M $LNOTS
COL$P $LNOTS
COL$S $LNOTS
ENTRY MODULE
ENTRY MODULE
CPF$SM
$COPY
EOL$ $EOL
CPI$SM
$COPY
EQV$ $BITDI
CPL$SM
$COPY
ERR$ $ENDER
CSIN $CSIN
ERRSNS
$ERRSN
CSQRT $CSQRT
ERRTST
$ERRTS
DABS $DABS
EXIT $CEXIT
DATAN $DATAN
EXP
$EXP
DATAN2
$DATAN
FCO$ $CONVF
DATE $DATE
FLOAT $FLOAT
DBLE $DBLE
FND$ $FIND
DCI$A $INCR
FOO$ $STOP
DCI$M $INCR
FUD$ $FUD
DCI$P $INCR
GCO$ $CONVF
DCI$S $INCR
IABS $IABS
DCO$ $CONVF
IBR$ $IBR
DCOS $DSIN
IBW$ $IBW
DEC$ $ENCOD
ICI$ $CONVI
DEF$ $RIO
ICI$A $INCR
DEO$ $OBJEN
ICI$M $INCR
DEXP $DEXP
ICI$P $INCR
DIC$IS
$CDIV
ICI$S $INCR
DIC$MS
$CDIV
ICO$ $CONVI
DIC$PS
$CDIV
IDATE $IDATE
DIC$SS
$CDIV
IDIM $IDIM
DID$IS
$DDIV
IDINT $INT
DID$MS
$DDIV
IFIX $IFIX
DID$PS
$DDIV
IFR$ $IFR
DID$SS
$DDIV
IFR$$ $IFR
DIF$IS
$FDIV
IFW$ $IFW
DIF$MS
$FDIV
IFW$$ $IFW
DIF$PS
$FDIV
ILR$ $LISTI
DIF$SS
$FDIV
ILW$ $LISTO
DII$IS
$IDIVS
INT
$INT
DII$MS
$IDIVS
IOR$ $BITDI
DII$PS
$IDIVS
IRR$ $RIO
DII$SS
$IDIVS
IRW$ $RIO
DIM
$DIM
ISIGN $ISIGN
DLOG $DLOG
ISN$ $ISNLS
DLOG10
$DLOG
IUR$ $UIO
DMAX1 $DMIN1
IUW$ $UIO
DMIN1 $DMIN1
JMC$ $GOTO
DMOD $DMOD
JMI$M $GOTO
DSIGN $DSIGN
JMI$P $GOTO
DSIN $DSIN
LCI$ $CONVL
DSQRT $DSQRT
LCO$ $CONVL
ECO$ $CONVF
LEQ$ $LOADS
ENC$ $ENCOD
LGE$ $LOADS
CONJG $CONJG
COS
$SIN
CPD$SM $COPY
ENO$
EOF$
END$ $ENDER
$OBJEN
EOF
LLT$
LGT$ $LOADS
LLE$ $LOADS
$LOADS
PAGE B-4
MODULES
ENTRY MODULE
CROSS-REFERENCE LISTING OF ENTRY POINTS AND
ENTRY MODULE
ENTRY MODULE
LNE$ $LOADS
MOF$RP
$FMOVR
MOL$SA
$LMOVS
LSN$ $ISNLS
MOF$RS
$FMOVR
MOL$SM
$LMOVS
MAX0 $MAX0
MOF$SA
$FMOV4
MOL$SP
$LMOVS
MAX1 $AMAX1
MOF$SM
$FMOV6
MOL$SS
$IMOVS
MIN0 $MIN0
MOF$SP
$FMOV6
MUC$IS
$CMUL
MIN1 $AMAX1
MOF$SS
$FMOV1
MUC$MS
$CMUL
MOD
$MOD
MOI$0A
$IMOVS
MUC$PS
$CMUL
MOD$0A
$DMOV3
MOI$0M
$IMOVS
MUC$SS
$CMUL
MOD$0M
$DMOV3
MOI$0P
$IPMOV
MUD$IS
$DMUL
MOD$0P
$DMOV3
MOI$0S
$IMOVS
MUD$MS
$DMUL
MOD$0S
$DMOV2
MOI$1A
$IMOVS
MUD$PS
$DMUL
MOD$IA
$DMOV3
MOI$1M
$IMOVS
MUD$SS
$DMUL
MOD$IM
$DMOV3
MOI$1P
$IPMOV
MUF$IS
$FMULS
MOD$IP
$DMOV3
MOI$1S
$IMOVS
MUF$MS
$FMULS
MOD$IS
$DMOV1
MOI$IA
$IMOVS
MUF$PS
$FMULS
MOD$MA
$DMOV6
MOI$IM
$IMOVS
MUF$SS
$FMULS
MOD$MM
$DMOV6
MOI$IP
$IPMOV
MUI$IS
$IMUL
MOD$MP
$DMOV6
MOI$IS
$IMOVS
MUI$MS
$IMUL
MOD$MS
$DMOV5
MOI$MA
$IMOVS
MUI$PS
$IMUL
MOD$PA
$DMOV6
MOI$MM
$IMOVS
MUI$SS
$IMUL
MOD$PM
$DMOV6
MOI$MP
$IPMOV
NGC$A $CNEG
MOD$PP
$DMOV6
MOI$MS
$IMOVS
NGC$M $CNEG
MOD$PS
$DMOV5
MOI$PA
$IPMOV
NGC$P $CNEG
MOD$RA
$DMOVR
MOI$PM
$IPMOV
NGC$S $CNEG
MOD$RM
$DMOVR
MOI$PP
$IPMOV
NGD$A $FNEG
MOD$RP
$DMOVR
MOI$PS
$IPMOV
NGD$M $FNEG
MOD$RS
$DMOVR
MOI$RA
$IMOVR
NGD$P $FNEG
MOD$SA
$DMOV4
MOI$RM
$IMOVR
NGD$S $FNEG
MOD$SM
$DMOV7
MOI$RP
$IMOVR
NGF$A $FNEG
MOD$SP
$DMOV7
MOI$RS
$IMOVR
NGF$M $FNEG
MOD$SS
$DMOV5
MOI$SA
$IMOVS
NGF$P $FNEG
MOD$VS
$DMOV5
MOI$SM
$IMOVS
NGF$S $FNEG
MOF$0A
$FMOV8
MOI$SP
$IPMOV
NGI$A $INEG
MOF$0M
$FMOV8
MOI$SS
$IMOVS
NGI$M $INEG
MOF$0P
$FMOV8
MOL$IA
$LMOVS
NGI$P $INEG
MOF$0S
MOF$IA
$BRAS
MOF$IM
$BRAS
MOF$IP
$NXT4
MOF$IS
$NXT1
MOF$MA
$NXT2
MOF$MM
$NXT3
MOF$MP
$NXT1
MOF$MS
$NXT2
MOF$PA
$NXT3
MOF$PM
$NXT1
MOF$PP
$NXT2
MOF$PS
$NXT3
MOF$RA
$NXT4
MOF$RM
$NXT4
$FMOV2
$FMOV5
MOL$IM
MOL$IP
$LMOVS
$LMOVS
NGI$S $INEG
NMI$1I
$FMOV7
MOL$IS
$IMOVS
NMI$1M
$FMOV7
MOL$MA
$LMOVS
NMI$1P
$FMOV2
MOL$MM
$LMOVS
NMI$II
$FMOV9
MOL$MP
$LMOVS
NMI$IM
$FMOV9
MOL$MS
$LMOVS
NMI$IP
$FMOV9
MOL$PA
$LMOVS
NMI$MI
$FMOV3
MOL$PM
$LMOVS
NMI$MM
$FMOV9
MOL$PP
$LMOVS
NMI$MP
$FMOV9
MOL$PS
$LMOVS
NMI$PI
$FMOV9
MOL$RA
$LMOVR
NMI$PM
$FMOV3
MOL$RM
$LMOVR
NMI$PP
$FMOVR
MOL$RP
$LMOVR
NPI$1I
$FMOVR
MOL$RS
$IMOVR
NPI$1M
CROSS-REFERENCE LISTING OF ENTRY POINTS AND MODULES
PAGE B-5
ENTRY MODULE
NPI$1P $NXT4
NPI$II $NXT1
NPI$IM $NXT2
NPI$IP $NXT3
NPI$MI $NXT1
NPI$MM $NXT2
NPI$MP $NXT3
NPI$PI $NXT1
NPI$PM $NXT2
NPI$PP $NXT3
O$DONE OHANDL
$ISUBS
O$READ OHANDL
$DVEC
OCI$ $CONVI
OCO$ $CONVI
OPEN $ROPEN
PSE$ $PAUSE
RAN
$RAN
RANDU $RANDU
RCI$ $CONVF
REAL $REAL
REL$ $IMOVS
RET$ $RETS
RET$D $RETD
RET$F $RETS
RET$I $RETS
RET$L $RETS
RWD$ $REWIN
SAD$IM $DVEC
SAD$IP $DVECP
SAD$MM $DVEC
SAD$MP $DVECP
SAD$PM $DPVEC
SAD$PP $DPVEC
SAD$SM $DVEC
SAD$SP $DVECP
SAF$IM $FVEC
SAF$IP $FVECP
SAF$MM $FVEC
SAF$MP $FVECP
SAF$PM $FPVEC
SAF$PP $FPVEC
SAF$SM $FVEC
SAF$SP $FVECP
SAI$IM $IVEC
SAI$IP $IVECP
SAI$MM $IVEC
ENTRY MODULE
ENTRY MODULE
SAI$SP
$IVECP
SUI$MM
$ISUBS
SAL$IM
$LVEC
SUI$MP
$IPSUB
SAL$IP
$LVECP
SUI$MS
$ISUBS
SAL$MM
$LVEC
SUI$PA
$IPSUB
SAL$MP
$LVECP
SUI$PM
$IPSUB
SAL$PM
$LPVEC
SUI$PP
$IPSUB
SAL$PP
$LPVEC
SUI$PS
$IPSUB
SAL$SM
$LVEC
SUI$SA
$ISUBS
SAL$SP
$LVECP
SUI$SM
$ISUBS
SAVR4$
$SAV4R
SUI$SP
$IPSUB
SAVRG$
$SAVRE
SUI$SS
SETERR
$SETER
SIGN $SIGN
SIN
$SIN
SNGL $SNGL
SQRT $SQRT
STK$D $RETDS
STK$F $ASFRE
STK$I $ASFRE
STK$L $ASFRE
STP$ $STOP
SUC$IS
$CADD
SUC$MS
$CADD
SUC$PS
$CADD
SUC$SS
$CADD
SUD$IS
$DADD
SUD$MS
$DADD
SUD$PS
$DADD
SUD$SS
$DADD
SUF$IA
$ADDA
SUF$IM
$ADDM
SUF$IP
$ADDP
SUF$IS
$FADD
SUF$MA
$ADDA
SUF$MM
$ADDM
SUF$MP
$ADDP
SUF$MS
$FADD
SUF$PA
$ADDA
SUF$PM
$ADDM
SUF$PP
$ADDP
SUF$PS
$FADD
SUF$SA
$ADDA
SUF$SM
$ADDM
SUF$SP
$ADDP
SUF$SS
$FADD
SUI$IA
$ISUBS
SVD$IM
SVD$IP
$DVECP
SVD$MM
$DVEC
SVD$MP
$DVECP
SVD$PM
$DPVEC
SVD$PP
$DPVEC
SVD$SM
$DVEC
SVD$SP
$DVECP
SVF$IM
$FVEC
SVF$IP
$FVECP
SVF$MM
$FVEC
SVF$MP
$FVECP
SVF$PM
$FPVEC
SVF$PP
$FPVEC
SVF$SM
$FVEC
SVF$SP
$FVECP
SVI$IM
$IVEC
SVI$IP
$IVECP
SVI$MM
$IVEC
SVI$MP
$IVECP
SVI$PM
$IPVEC
SVI$PP
$IPVEC
SVI$SM
$IVEC
SVI$SP
$IVECP
SVL$IM
$LVEC
SVL$IP
$LVECP
SVL$MM
$LVEC
SVL$MP
$LVECP
SVL$PM
$LPVEC
SVL$PP
$LPVEC
SVL$SM
$LVEC
SVL$SP
$LVECP
SVQ$IM
$QVEC
SVQ$IP
$QVECP
SVQ$MM
$QVEC
SAI$MP $IVECP
$QVECP
SAI$PM $IPVEC
$QPVEC
SAI$PP $IPVEC
$QPVEC
SAI$SM $IVEC
SUI$IM
$ISUBS
SVQ$MP
SUI$IP
$IPSUB
SVQ$PM
SUI$IS
$ISUBS
SVQ$PP
SUI$MA
$ISUBS
SVQ$SM
$QVEC
PAGE B-6
MODULES
CROSS-REFERENCE LISTING OF ENTRY POINTS AND
ENTRY MODULE
ENTRY MODULE
ENTRY MODULE
SVQ$SP
$QVECP
TAC$ $TCMPL
TAD$ $TRARY
TAF$ $TRARY
TAI$ $TRARY
TAL$ $TRARY
TANH $TANH
TSI$I
TAP$ $TRARY
TAQ$ $TRARY
THRD$ $SAVRE
TSC$I $TESTC
TSC$M $TESTC
TSC$P $TESTC
TSC$S $TESTC
TSD$I $TESTS
TSD$M $TESTS
TSD$P $TESTS
TSD$S $TESTS
TVI$
TSF$I $TESTS
TVL$
TSF$M $TESTS
TVP$
TSF$P $TESTS
TVQ$
TSF$S $TESTS
TVS$
$TESTS
USEREX
TSI$M $TESTS
XCI$
TSI$P $TESTS
XDD$
TSI$S $TESTS
XDF$
TSL$I $LTEST
XDI$
TSL$M $LTEST
XFD$
TSL$P $LTEST
XFF$
TSL$S $LTEST
XFI$
TVC$ $VCTRA
XII$
TVD$ $VTRAN
XOR$
TVF$ $VTRAN
$VTRAN
$VTRAN
$VTRAN
$VTRAN
$LISTO
$USERE
$XCI
$XDD
$XDD
$XDI
$XDD
$XFF
$XFI
$XII
$BITDI
APPENDIX C
STORAGE AREAS OF THE FORTRAN IV OTS
Although RT-11/RSTS and RSX-11 perform in much the same way, their
storage
areas are very different.
In each of the following sections
both the
RT-11/RSTS areas and the RSX-11 areas are described.
C.1
THE PSECTS
The names and attributes of the OTS PSECT's are listed in the two
tables
below. Table C-1 gives the information for RT-11 and RSTS; Table C2 gives
the information for RSX-11.
Table C-1
RT-11/RSTS PSECT Attributes
PSECT
.ABS.
OTS$D
OTS$I
OTS$O
OTS$P
OTS$S
$STACK
$STKST
Attributes
RW,D,LCL,REL,CON
RW,I,LCL,REL,CON
RW,I,LCL,REL,CON
RW,D,GBL,REL,OVR
RW,D,LCL,REL,CON
RW,D,LCL,REL
RW,D,LCL,REL
Table C-2
RSX-11 PSECT Attributes
PSECT
OTS$P
OTS$I
OTS$D
STS$S
OTS$F
Attributes
RW,
RW,
RW,
RW,
RW,
D,
I,
D,
I,
I,
GBL,
LCL,
LCL,
LCL,
LCL,
REL,
REL,
REL,
REL,
REL,
OVR
CON
CON
CON
CON
PAGE C-2
IV OTS
C.2
STORAGE AREAS OF THE FORTRAN
THE OTS WORK AREA
The two tables in this section describe the OTS work area. Table C-3
gives
the information for RT-11 and RSTS;
Table C-4 gives the
information
for RSX-11. All numbers in the tables are decimal.
Table C-3
RT-11/RSTS OTS Work Area
Offset
Name
Description
0
SEQNO
Internal statement sequence number.
2
PLNBUF
Address of the line buffer.
4
CHNATB
Address of the beginning of the channel
address table.
6
FILETB
Address of the beginning of the file
information table.
8
QELEM
Flag - indicates that a queue element is
avilable. All RT-11 I/O transfers are
done through the queue. If a queue
element is not available, the program
issuing the I/O request can be blocked until
an element becomes available. (See .QSET
in the RT-11 Advanced Programmer's Guide.)
10
DEVHDR
Address of the lowest device handler.
12
FREESP
Pointer to free space.
14
ENMLNK
Pointer to the last name in the queue.
(See QELEM, offset 8.)
16
RTCNLS
Zeroed bits in this word indicate open
RT-11 channels.
18
FMTAD
Current pointer into the format string.
20
FILPTR
Address of the file descriptor block (FDB).
22
RECAD
Address of the data in the current record.
24
EOLBUF
Address of the end of the data in the line
buffer.
26
LNBUF
Address of the line buffer;
module $FIO.
used in
28
BLBUF
Current address of the data in the line
buffer.
STORAGE AREAS OF THE FORTRAN IV OTS
PAGE C-3
30
PSCALE
P scale factor;
used for the P format.
32
FSTKP*
Pointer to the format pushdown list.
34
FSTK*
Format pushdown list, uses 16 words.
OPEN also uses this area for scratch
FSTK
NOARG
Number of arguments that the format
item expects.
FSTK+2
PARLVL
Parentheses level.
FSTK+4
NUMFLG
Flag - Indicates to the format
processor that a number is available
and whether the number is negative.
FSTK+6
DELIM
When set to zero DELIM indicates
that a delimiter is required.
FSTK+8
RETADR
FSTK+10
V.VTYP
Holds the data type for list
input.
FSTK+12
V.W1
Holds the data for list input.
FSTK+14
V.W2
FSTK+16
V.W3
FSTK+16
V.W4
66
FMTRET
Address of the last top level parentheses.
68
VARAD
Address of the data item to be
transferred.
70
TSPECP
Highest pointer into the line buffer.
72
TYPE
Flag - Used for A,L,O,I,F,E,G,D
conversions.
74
REPCNT
Repeat count for A,L,O,I,F,E,G,D
conversions.
76
LENGTH
Format specification - external field
width.
78
D
Format specification - number of char-
acters to the right of the decimal point.
80
DSTATS
Address of the work area used by OPEN.
(See FSTK, offset 34.)
82
ITEMSZ
Size of the list variable to be trans-
PAGE C-4
STORAGE AREAS OF THE FORTRAN IV OTS
ferred.
84
TTYFWF
Flag - Indicates that read/write was the
last I/O operation to the terminal.
86
DOLFLG
Flag - Indicates that the dollar ($)
format character was encountered.
88
OBJFRE
Address of the free space for run
time formatting.
90
COUNT
Number of items to transfer for array
I/O.
92
RACNT
Count of the number of bytes remaining
in a random record.
RACNT
FMTLP
Flag - Indicates infinite format
loops. This flag can never be used with
RACNT.
94
NBLOCK
Next random block number.
96
RECIO
Address of current I/O routine.
98
DENCWD
Used for the fake FDB address in module
ENCODE.
100
FMTCLN
Contents of SP on entry to read/write
routines.
102
INITSP
Flag - Indicates a recursive error call.
104
THPTR
Initial value of the threaded pointer;
used for restarts.
106
SAVTOP
Initial upper limit of the program.
108
UERRTB
Address of the user error table.
110
EXADDR
Address of user EXIT routine.
112
ENDEXA
END= transfer address.
114
ERREXA
ERR= transfer address.
116
THREAD
Indicates threaded
zero means inline,
threaded; the low
I/O, the high byte
or inline code:
non-zero means
byte refers to
refers to the
main program.
118
HGHLIM
High limit of the partition.
120
LOWLIM
Low limit of the partition.
STORAGE AREAS OF THE FORTRAN IV OTS
PAGE C-5
122
LONAME
Low name of the program.
124
HINAME
High name of the program.
126
IORET
Return address is stored here while
the OTS is in I/O code.
130
WINDOW
Used for extended memory; this word tells
where the window is. (See the RT-11 Advanced
Programmer's Guide for a discussion of extended
memory.)
144
WINMAP
Address of the parameter block for .MAP
requests.
148
MAPADR
Pointer to WINMAP .AREA.
150
ERBITS
Error test bit table, uses five words.
Errors 0-15 are mapped here.
152
Errors 16-31.
154
Errors 32-47.
156
Errors 48-63.
158
Errors 64-79.
160
LASTER
Number of the last error.
162
LASTLN
Last logical unit number (LUN) associated
with an error.
164
V.TYPE
Variable type;
166
V.TEMP
Temporary storage area for TX? variable.
This area is four words long.
168
See V.TEMP.
170
See V.TEMP.
172
See V.TEMP.
set by TV?,TX?,TA?.
174
V.ARRY
Address of stored array, for TX?.
176
V.IDX
Index of stored array, for TX?.
178
O.FLG1
First flagword; for OPEN.
180
O.FLG2
Second flagword; for OPEN.
182
O.UNIT
Keyword, UNIT.
PAGE C-6
OTS
STORAGE AREAS OF THE FORTRAN IV
184
O.ACCS
Keyword, ACCESS.
186
O.ASSO
Keyword, ASSOCIATEVARIABLE.
188
O.BLKS
Keyword, BLOCKSIZE.
190
O.BUFF
Keyword, BUFFERCOUNT.
192
O.CARR
Keyword, CARRIAGECONTROL.
194
O.DISP
Keyword, DISPOSE.
196
O.ERR
Keyword, ERR.
198
O.EXTE
Keyword, EXTENDSIZE.
200
O.FORM
Keyword, FORM.
202
O.INIT
Keyword, INITIALSIZE.
204
O.MAXR
Keyword, MAXREC.
206
O.NAME
Keyword, NAME.
208
O.RECZ
Keyword, RECORDSIZE.
210
O.TYPE
Keyword, TYPE.
O.TYPE+2 AOTSZ
Highest address name.
Table C-4
RSX-11 OTS Work Area
Offset
Name
Description
0
W.SEQC
Internal statement number.
2
W.NAMC
Name chain pointer.
4
W.LUNS
Number of logical units.
6
W.MO
Last logical unit number (LUN) associated
with an error.
8
W.BFAD
Address of the I/O buffer.
10
W.BLEN
Length of the I/O buffer.
12
W.BEND
Address of the first word after the I/O
buffer.
14
LNBUF
Address of the line buffer.
STORAGE AREAS OF THE FORTRAN IV OTS
PAGE C-7
16
W.IOST
Address of QIO status.
18
W.DEV
Address of the device table.
20
RECIO
Address of the current I/O routine.
22
FMTAD
Current pointer into the format string.
24
FILPTR
Address of the file descriptor block
(FDB).
26
EOLBUF
Address of the end of the data in the line
buffer.
28
FMTCLN
Contents of SP on entry to read/write
routines.
30
BLBUF
Current address of the data in the line
buffer.
32
PSCALE
P scale factor;
34
FSTKP
Pointer to the format pushdown list.
36
FSTK
Format pushdown list; uses 16 words.
FSTK
NOARG
Number of arguments that the last format
item expects.
FSTK+2
PARLVL
Parentheses level.
FSTK+4
NUMFLG
Flag - indicates to the format processor
that a number is available and whether the
number is negative.
FSTK+6
DELIM
When set to zero DELIM indicates that a
delimiter is required.
FSTK+8
RETADR
Temporary address holder used in assembler
callable arithmetic routines.
FSTK+10
V.VTYP
Holds the data type for list input.
FSTK+12
V.W1
See V.VTYP, offset FSTK+8.
FSTK+14
V.W2
See V.VTYP, offset FSTK+8.
FSTK+16
V.W3
See V.VTYP, offset FSTK+8.
used for the P format.
FSTK+16
V.W4
See V.VTYP, offset FSTK+8.
70
FMTRET
Address of the last top level parentheses.
72
VARAD
Address of the data item to be
transferred.
PAGE C-8
OTS
STORAGE AREAS OF THE FORTRAN IV
74
TSPECP
Highest pointer into the line buffer.
76
TYPE
Flag - Used for A,L,O,I,F,E,G,D
conversions.
78
REPCNT
Repeat count for A,L,O,I,F,E,G,D
conversions.
REPCNT
UNFLGS Flag - Indicates unformatted I/O.
80
LENGTH
Format specification - external field
width.
82
D
Format specification - number of characters to the right of the decimal point.
84
ITEMSZ
Size of the list variable to be transferred.
86
DOLFLG
Flag - Indicates that the dollar ($)
format character was encoutered.
88
COUNT
Number of items to transfer for array
I/O.
90
RACNT
Count of the number of bytes remaining
in a random record.
RACNT
FMTLP
Flag - Indicates infinite format
loops.
RACNT
UNCNT
Count of the number of bytes in
an unformatted read.
92
DENCWD
Used for the fake FDB address in module
ENCODE.
94
W.PC
Saves the PC if a fatal trap occurs.
96
EXADDR
Address of user EXIT routine.
98
ENDEXA
END= transfer address.
100
ERREXA
ERR= transfer address.
102
ENDOTS
Address of the END= return for the OTS.
104
W.ECNT
Error count.
106
W.ERNM
108
W.ERFL
110
W.OPFL
Error number.
Flag - Used for the OPEN statement.
STORAGE AREAS OF THE FORTRAN IV OTS
PAGE C-9
112
W.ERLN
114
W.ERLE
116
W.TKNP
Address of the task name.
118
W.ERTB
Address of the error table.
120
W.FERR
122
W.FER1
124
W.SST
Address of the synchronous trap table.
126
W.OBFL
Address of the OBJFMT buffer.
128
W.OBFH
Address of the first word after the
OBJFMT buffer.
130
W.ERUN
Error number saved for SNSERR.
132
THREAD
Indicates threaded
zero means inline,
threaded; the low
I/O, the high byte
main program.
134
HGHLIM
High limit of the partition.
136
LOWLIM
Low limit of the partition.
138
LONAME
Low name of the program.
140
HINAME
High name of the program.
142
IORET
Return address is stored here while
the OTS is in I/O code.
144
WINDOW
Used for extended memory; this word tells
where the window is. (See the RSX-11
Advanced Programmer's Gude for
a discussion of extended memory.)
160
WINMAP
Address of the parameter block for .MAP
requests.
166
MAPADR
Pointer to WINMAP .AREA.
or inline code:
non-zero means
byte refers to
refers to the
168
V.TYPE
Variable type;
set by TV?, TX?, TA?.
170
V.ARRY
Address of stored array, for TX?.
172
V.IDX
Index of stored array, for TX?.
PAGE C-10
STORAGE AREAS OF THE FORTRAN IV OTS
174
V.TEMP
Temporary storage area for TX? variable.
184
O.FLG1
First flagword.
186
O.FLG2
Second flagword.
188
O.UNIT
Keyword, UNIT.
190
O.ACCS
Keyword, ACCESS.
192
O.ASSO
Keyword, ASSOCIATEVARIABLE.
194
O.BLKS
Keyword, BLOCKSIZE.
196
O.BUFF
Keyword, BUFFERCOUNT.
198
O.CARR
Keyword, CARRIAGECONTROL.
200
O.DISP
Keyword, DISPOSE.
202
O.ERR
Keyword, ERR.
204
O.EXTE
Keyword, EXTENDSIZE.
206
O.FORM
Keyword, FORM.
208
O.INIT
Keyword, INITIALSIZE.
210
O.MAXR
Keyword, MAXREC.
212
O.NAME
Keyword, NAME.
214
O.RECZ
Keyword, RECORDSIZE.
216
O.TYPE
Keyword, TYPE.
218
W.TSKP
Pointer to the virtual array size.
Expansion area.
260
W.EXST
Exit status.
262
W.END
End of the OTS work area.
C.3
THE FILE DESCRIPTOR BLOCK (FDB)
The two tables in this section describe the File Descriptor Block (FDB).
Table
C-5 gives the information for RT-11 and RSTS; Table C-6 gives the
information for RSX-11. All numbers in the tables are decimal.
STORAGE AREAS OF THE FORTRAN IV OTS
PAGE C-11
Table C-5
RT-11/RSTS File Descriptor Block
Offset
Name
Description
0
STATUS
Status word;
Table C-7.
2
BUFRAD
Address of the beginning of the buffer.
4
BUFRSZ
Size of the buffer, in words.
6
DEVNM
Device name, in RAD50.
8
FILNM
File name, in RAD50;
12
EXTEN
RAD50 extension.
14
DATAD
Address of the data pointer.
16
BUFNO
Number of buffers;
17
CHNLNO
RT-11 channel number associated with the
file.
18
ASSOCV
Address of the associated variable.
STPWD
High limit for data in an unformatted
block. STPWD and ASSOCV cannot be used
at the same time.
RECSZ
Record size.
CPOS
Relative pointer in an unformatted
block. Points to the last used pointer
word at the top of the block. CPOS and
RECSZ cannot be used at the same time.
22
BLKNO
Block number.
24
FILSZ
Number of blocks in the file.
LASTBLK
Block number of the last block written.
LASTBLK and FILSZ cannot be used at the
same time.
HIGHBL
Block number of the highest block written.
ASSOCV
20
RECSZ
FILSZ
26
the bits are described in
uses two words.
uses one byte.
28
STAT2
Another status word.
30
FILPPN
Project-Programmer Number (PPN), for
RSTS.
PAGE C-12
STORAGE AREAS OF THE FORTRAN IV OTS
32
RECMAX
Number of records in the file.
34
FILESZ
Size of the file descriptor block.
Table C-6
RSX-11 Logical Unit Control Block (LUB)
Offset
Name
Description
0
D.STAT
Status word 1;
Table C-8.
the bits are described in
2
D.STA2
Status word 2;
Table C-9.
the bits are described in
STAT2
Status word 2 for the OPEN statement.
D.RCNM
Number of records in the file.
D.RCCT
Record count; used for BACKSPACE.
D.RCN2
Number of records in the file; second word.
D.RCC2
Record count; second word.
D.AVAD
Address of the associated variable.
ASSOCV
Address of the associated variable.
10
D.SPAR
Spare word.
12
D.FDB
Start of the RSX-11 FDB.
D.STA2
4
D.RCNM
6
D.RCN2
8
D.AVAD
C.4
STATUS WORD
Both RT-11/RSTS and RSX-11 have two status words. For RT-11/RSTS both
status
words are described in Table C-7. For RSX-11 the first status word is
in
Table C-8, the second in Table C-9. All numbers in the table are in
decimal notation.
Table C-7
RT-11/RSTS Status Words
Bit
Name
Description
16
WRITE
Set if the file has been written to.
15
RA
Set if the file is Random Access.
14
KB
Set if the file is open to the keyboard.
STORAGE AREAS OF THE FORTRAN IV OTS
PAGE C-13
13
EOF
Set when the end of the file is reached.
12
OPNBIT
Set when the file is opened.
11
LP
Set if the file is open to the line printer.
10
FMTD
Set if the file is formatted.
9
OLD
Set if the file is opened with LOOKUP.
8
TT
Set if the file is open to a terminal.
7
RDO
Set if the file is read only.
6
LSTFMT
Set if the file is opened for listing format.
5
LISTMD
Output listing format; in other words, use
an automatic <CR><LF> combination.
4
UNLIST
Output FORTRAN format; in other words, interpret
the first character as a carriage control character.
3
SCR
Set if the file is a SCRATCH file.
deleted after it is closed.
2
MWRB
Set if the random block being looked at is modified.
1
BUFBIT
Set if double buffering occurs.
*4
RDBFWT
Set if a read is done to the file before a write.
*3
UNKNOW
Set if the file is opened with an unknown
attribute.
*2
APPND
Set if the file is opened with ACCESS='APPEND'.
*1
SPOOL
Set if the file is to be spooled when closed.
*
These bits are in the second status word, location 28 in the
FDB.
Bit
If set the file is
Name
Table C-8
RSX-11 Status Word 1
Description
DV.DFD
DV.DFD
Set if the file is random access.
RA
Set if the file is random access.
for the OPEN statement.
DV.WRT
Set if a write is allowed.
Used
PAGE C-14
OTS
STORAGE AREAS OF THE FORTRAN IV
DV.FACC
Used for file attributes. If set,
means call FDBSET; if not set, use the
default.
DV.OPN
Set if the unit is open.
DV.ENCD
DV.FMP
DV.FMP
Set if the file is formatted.
FMTD
Set if the file is formatted.
for the OPEN statement.
DV.UFP
Set if the file is unformatted.
DV.ASGN
Used for the file specification.
call ASSIGN; if not
Used
If set,
set, use default.
DV.CLO
Set if the file is being closed.
DV.FRE
Set if free format is allowed.
DV.RW
Used to specify the current operation.
Table C-9
RSX-11 Status Word 2
Bit
DV.SPL
Name
Description
DV.AI4
Used to specify the type of the
associated variable. If set, the type is
I*4; if not set, the type is I*2.
DV.CC
Set if explicit carriage control is
specified.
DV.SPL
Set if the file is to be spooled when
closed.
SPOOL
Set if the file is to be spooled when
closed. Used for the OPEN statement.
DV.DEL
Set if the file is to be deleted when
closed.
DV.RDO
Set if the file is read-only.
DV.RDO
RDO
Set if the file is read-only.
the OPEN statement.
DV.UNK
Set if the file is opened with
TYPE='UNKNOWN'.
Used for
STORAGE AREAS OF THE FORTRAN IV OTS
PAGE C-15
DV.UNK
DV.OLD
DV.SCR
DV.APD
UNKNOW
Set if the file is opened with
TYPE='UNKNOWN'. Used for the OPEN
statement.
DV.OLD
Set if the file is opened with
TYPE='OLD'.
OLD
Set if the file is opened with
TYPE='OLD'. Used for the OPEN
statement.
DV.NEW
Set if the file is opened with
TYPE='NEW'.
DV.SCR
Set if the file is opened with
TYPE='SCRATCH'.
SCR
Set if the file is opened with
TYPE='SCRATCH'. Used for the OPEN
statement.
DV.APD
Set if the file is opened with
TYPE='APPEND'.
APPND
Set if the file is opened with
TYPE='SCRATCH'. Used for the OPEN
statement.
DV.SAV
Set if the file is opened with
TYPE='SAVE'.
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement