@X @~
~V7 56 2 -5
~V9 1
~D10
~H                   MUSS
~
~
~H    VOLUME        6
~
~
~H            PART        2
~D5
~M~OFORTRAN 77 INPUT OUTPUT LIBRARY~
~BThis volume contains the implementation details of the
input output library needed for the Fortran 77 compiler.~
~D6
~MUNIVERSITY OF MANCHESTER~
~V9 -1
~P
~V9 1
~D10
~S1~MVolume 6/2  CONTENTS~
~T# 15
~
~
#FTN201  -  Introduction~
~
#FTN211  -  Configuration Section~
~
#FTN221  -  Format Specification Processing~
~
#FTN231  -  Input Procedures~
~
#FTN241  -  Output Procedures~
~
#FTN251  -  Auxiliary I/O Procedures~
~
#FTN261  -  Job Control Procedures~
~
#FTN271  -  Unit Control Procedures~
~V9 -1
~P
~D10
~H                    MUSS
~
~D10
~
~H             FTN201
~D10
~MMANCHESTER UNIVERSITY  -  CONFIDENTIAL~
~
~
                                                            ISSUE 6~
~V9 -1
~P
~YFTN201
~V9 1
~S1~M~OFORTRAN 77 I/O LIBRARY IMPLEMENTATION DESCRIPTION~
~S1~M~OSection 20
~S1~OSection 20.  Introduction~
~S1~O1.1  General Description~
~BThis Manual documents the implementation of the
Input/Output Library for the "Portable" Fortran 77 Compiler,
which is described in part one of this volume.~
~BCalls to the procedures in this library are
planted by the compiler for the input/output statements in
the source program. These procedures perform the
input/output operations to the standard described in the
Fortran 77 description document 'BSR X3.9 FORTRAN 77 dpANS
FORTRAN Language X3J3/90' of the American National Standards.~
~BThis Manual is divided into seven sections, each section
describes the implementation of a particular aspect of the library.
Included in each section is:~
~T# 6
~
1.
~IA general description of the section, including a description of any
deviations from the Fortran 77 standard, and how the machine dependent
parts of the language have been interpreted.~
~
2.
~IIts interfaces with the compiler and other sections.~
~
3.
~IDetails of implementation, including an outline of its operations and
data structures.~
~
4.
~IFlowcharts for that section.~
~BThis library is written in the MUSL language using FLOCODER as a
documentation and programming aid
and at present is compiled as a single module.
A compile job can be found in Section 21 (Configuration Section).~
~BIn the level 1 MUSL code the machine dependent parts have been
preceeded by ::RE32/64, ::RE64/128, ::IN16 or ::IN32.
To generate the correct library for
a machine with 16 bit integers and 32 bit and 64 bit
real arithmetic, all occurrences of the comments ::IN16 and
::RE32/64 should be removed.
~S1~O1.2 Implementor Defined Features~
~BThe Fortran standard does not define certain aspects of
Fortran 77 which are left for the implementors discretion.
The physical characteristics of Fortran files and records,
and the association of pre-connected units to a program are
examples.
~BThis Fortran system uses the input output facilities of the
MUSS library to perform all its input and output. All the
sequential formatted and list directed operations use the
simple unstructured character stream of MUSS. A sequential
unformatted file uses the record structured binary stream
of MUSS, and all the direct files use 'unit' structured streams
of MUSS with each Fortran record being a MUSS record or unit.
A record structured character stream in MUSS has no meaning
to this Fortran system.
~BAt present none of the Fortran input output uses magnetic tape
media directly - only the normal MUSS files are used. It would
be possible to add further extensions to this library to enable
Fortran programs to handle magnetic tapes.
~BThe implementation of pre-connected units is discussed in section 25.
~BThere are at present a few restrictions imposed on the
input/output operations of a Fortran program. It is not possible
to backspace over records on an unformatted unit or change from
reading to writing (or vice versa) on a sequentially accessed unit.
~S1~O1.3 Development Log~
~BThis records the major milestones in the development and
issue of the input output library for Fortran 77.~
~T# 6
~
1)~IJULY/AUG. 1979. New library designed and coded. Basic
I/O tested with MUPL programs.~
~ICoding not finished for Auxiliary procs and fault recovery
procs, these are awaiting MU6 Basic I/O library.~
~
2)~IJUNE/JULY 1980. Sections 25, 26, 27, re-designed. All sections
re-coded into MUSL using new MUSS Basic I/O specs. Job control
and error handling not yet coded.~
~IThis manual re-written to conform to new specifications.~
~
3)~INOVEMBER 1980. Updated resulting from Fortran validation.~
~
4)~IFEBRUARY 1981. PDP11 Code added.~
~
5)~IJULY 1981. Transferred from MU5 to VAX11.~
~S1~O1.4 Suggested Design Improvements~
~BThis is a log of any possible further developments or
improvements that could be made to the compiler at later
stages, of by other sites.~
~
1)~IIn output of Reals and Double precision items, the rounding
constants added should be obtained from a table not calculated
everytime. Efficiency mod.~
~
2)~IProcedures OREAD and OWRITE should be respecified to have as a
parameter the required FD (bit encoded). This removes multiplicitis
in checking for valid FD descriptors.~
~
3)~IThe restriction on INQUIRE for the unaccessed pre-connected
files by name may be removed by further coding.~
~
4)~IThe calculation of exponent would be more efficient using a
table of powers of 10.~
~
5)~IThe use of magnetic tapes from Fortran programs could be
implemented by an extension of open to specify this option.
This library could then handle the tape by using the MUSS
library procedures MOUNT, MT.READ, MT.WRITE and others.~
~
6)~IAt a later date the read/write restriction for sequential units
may be removed. Backspacing unformatted units may be possible.~
~Y
~V9 -1
~P
~D15
~HFLOWCHARTS
~
~
~H                FTN201
~F
@TITLE FTN20(1,6)
@COL 1S-2R-3F
@FLOW 1-2-3
@BOX 1.0
FORTRAN LIBRARY
@BOX 2.0
FTN21:I/O CONFIGURATION SECTION
FTN22:FORMAT SPECIFICATION SECTION
FTN23:INPUT SECTION
FTN24:OUTPUT SECTION
FTN25:AUXILIARY I/O SECTION
FTN26:JOB CONTROL SECTION
FTN27:UNIT CONTROL SECTION
@BOX 3.0
END
@BOX 2.1
#FTN21
#FTN27
#FTN22
#FTN23
#FTN24
#FTN25
#FTN26
@END

