On Sun, 14 Dec 2014 15:37:08 +0000, Peter Corlett wrote:
On Thu, Dec 11, 2014 at 11:38:35PM +0000, Mark Wickens
wrote:
I'm toying with the idea of writing a simple
word processing package along
the lines of Wordstar for my Retrochallenge 2015/01 entry.
Editors look deceptively simple to write, but they're actually quite hard to
do well.
You know, it could always be worse.
In my first year studying engineering, a poor soul from the Computer Science
faculty was sent over to give 240 of us a one hour a week lecture in writing
rudimenary FORTRAN IV programs on an IBM System/370 based system which we got
to access in line mode using ADM-5 terminals. By the end of the year, most of
the class had managed to successfully compile a simple program and had a vague
idea about how to read data from a file, perform calculations on it and write
it out to another file, basic stuff that many engineers would find a useful
foundation for solving more complicated problems using computers.
In second year, the lecturer was replaced by a new guy from Computer Science
who clearly hadn't spoken to the previous guy about our prowess and interest
in computer programming. He breezed in and opened the first lecture with:
"I suppose you are all familiar with 6800 assembly language programming?"
and took it from the general lack of reaction that we probably were. In
reality most of the class had no idea what he was talking about and those
that did were too taken by surprise to reply.
His first assignment to us was to write some sort of part 6800 simulator
using the same FORTRAN IV system we had been using the previous year but now
with (just about) full screen access on the ADM-5's, provided you could master
the escape sequences needed to generate the equivelant of function keys to
work the editor. The FORTRAN compiler (WATFIV) only had what it called
"structured programming" (IF/THEN/ELSE and WHILE/ENDWHILE) and novelties like
(fixed length) character variables because it sported extentions from the
standard and it mainly saw its role in life as preventing us from accessing
anything on the system that might be remotely useful for this particular task.
It liked everything to start at one and had a deep hatred of anything that
started at zero. It also liked to issue obscure error messages whenever anyone
typed any input it didn't like and delighted in making it difficult to trap
these errors and replace them with something more meaningful.
Why am I mentioning all this? This guy's assignment to us later in the year was
to write some vague approximation of a word processor using the same FORTRAN IV
setup. I think the idea was to read in words typed at the terminal and format
them newspaper column style with nice straight left and right margins. (Did I
mention that the system could only reluctantly be persuaded to deal with lower
case? As for dynamic memory allocation? Not a chance.)
Many years after performing this somewhat less than useful task, my advice is:
don't write your word processor in FORTRAN IV on an IBM S/370.
(I'm expecting Fred will probably have something to say about college
administrators about now.)
Regards,
Peter Coghlan.