On 10/14/2013 03:48 PM, Jim Stephens wrote:
It might be interesting also to hear how it got where
it is today and
why if it was so awful, what project / purpose did it serve and was it
used?
Langauge-wise, it was very close to CDC RUN, the older product. In
fact, it coexisted with RUN and many people actually preferred RUN.
The basis was that FTN was the "optimizing" compiler and could do the
more aggressive optimizations, while RUN was a bit more pedestrian.
Bitsevers has manuals for several versions of FTN and RUN, including the
internal maintenance specifications (IMS) for both. Since FORTRAN was
the meat-and-potatoes language of the CDC CYBER world, there's no
shortage of documentation. It got used for quite a bit of systems
utilities as well, so you might think of it as the "C" of its day.
Bitsavers has a document that describes the reason for FTN:
http://bitsavers.informatik.uni-stuttgart.de/pdf/cdc/cyber/lang/fortran/FTN…
Basically, with the non-optimizing RUN, CDC was not offering sufficient
bang-for-the-buck over the competition.
-------------------
To give you an idea of the nutty stuff that was routinely done with it,
consider the following example.
In both SCOPE and KRONOS operating systems, the way one made a system
request was to place a request name (up to 3 letters in the high-order
18 bits of a word) and pointer/function/parameter in location 1 of
one's field length. Peripher processor 0 would, as part of its "things
to do" loop would poll the location 1 of every program in memory and if
nonzero, would cause another PP to be loaded with a program that could
process the request. After the request was complete, the PP would clear
location 1 to zero.
So, suppose a program wanted to "cheat" and use a FORTRAN program to
write a request without resorting to assembly language. Say, the request
was to end the job (why anyone would want to do this is immaterial).
The function name is "END":
INTEGER P,Q(1)
P = LOC(Q)
Q(2-P) = 3LEOJ
100 IF (Q(2-P).NE.0) GOTO 100
The last line hangs until location 1 goes 0, which, in this case, would
not happen, as the program would end before the location is clear.
So, you have to get used to several things:
1. 6 bit characters (not ASCII; but CDC "Display Code"
2. Addressing granularity is 60 bit word, with 10 characters per word.
3. One's complement
4. Strange character constants; (L=left justified, zero fill, R =
right-justified; H = left justified, space fill.
etc.
--Chuck