This is an old revision of the document!
FORTRAN-20 is a FORTRAN compiler for TOPS-20. It supports the FORTRAN-77 standard (ANSI X3.9-1978 American National Standard Programming Language FORTRAN) with extensions and additions.
The purpose of this tutorial is to document the peculiarities of using FORTRAN-20 on TOPS-20 as opposed to other FORTRAN implementations on other operating systems; to highlight useful FORTRAN-20 extensions and additions that are not found in standard FORTRAN-77; and to briefly introduce the FORTRAN-77 programming language for those unfamiliar with it.
The order of presentation moves from more to less specialized and technical which runs counter to traditional organization, but the author feels this order is more convenient for the primary audience of programmers already familiar with FORTRAN but unfamiliar with the TOPS-20 operating system environment.
FORTRAN uses logical device numbers for transmitting data to and from various input and output devices. In FORTRAN-20, some of these logical unit numbers were assigned to specific equipment that was common in the computer rooms of the 1970s and '80s but are not available in TWENEX.ORG's simulated PDP-10 environment.
When you are coding input/output statements, be sure to use a logical unit number that is valid for user programs and is associated with a device that is available on TWENEX.ORG.
Unfortunately, in FORTRAN-20 the default logical unit specified by “*” is assigned to the card reader for data input statements and the line printer for output statements. Since neither of these devices is available on TWENEX.ORG, the default logical unit is unusable.
|6||PTR||FOR06.DAT||Paper tape reader|
|7||PTP||FOR07.DAT||Paper tape punch|
|10-15||DTA2-7||FOR10 - 15.DAT||“|
|16-18||MTA0-2||FOR16 - 18.DAT||Magnetic tape|
|20-24||DSK||FOR20 - 24.DAT||Disk|
|25-29||DEV1-5||FOR25 - 29.DAT||Assignable devices|
|30-99||DSK||FOR30 - 99.DAT||Disk|
This section introduces potentially useful features that are unique to FORTRAN-20 and not included in the FORTRAN-77 standard.
This section gives an brief overview of the FORTRAN-77 programming language for programmers with at least some experience with one or more other programming languages. It is not intended to be a comprehensive description or tutorial. Readers desiring a more complete introduction to FORTRAN are recommended to read the Fortran 77 Tutorial linked in the References section below.
A sample program for the FORTRAN-20 compiler.
program hello write(5,*) ' Hello, World!' stop end
(Text on each line is preceded by six spaces.)
Digital Equipment Corporation. (1987, February). AA-N383B-TK FORTRAN Language Manual [Online]. Available: http://bitsavers.trailing-edge.com/pdf/dec/pdp10/TOPS20/fortran/AA-N383B-TK_FORTRAN_Language_Manual_Ver_10_May85.pdf.