[TUHS] Line Terminators in Text Files [Was: Re: Why Pascal is Not My Favorite Programming Language - Unearthed!]

Chris Torek torek at torek.net
Mon Sep 4 09:14:43 AEST 2017


>I think the reason for this is pretty obvious.  At the time -- for
>many of the paper terminals, line feed simply rotated the platen, and
>the print head stayed at the same column position.  Carriage return
>returned the print head to the first column without advancing the
>paper (remember overstriking?).

In what was either a remarkable coincidence, or actual planning,
the old ASR 33 at I think 110 baud (maybe 300) took two "character
times" to do the carriage return, so that if you sent CR and LF
in that order, the LF occurred mid-CR and the print head was
ready right at the time the next character arrived.

(One of the Stupid Pet Tricks of the day was to print a line with
an unfilled character halfway through, then send CR, then print
the middle character and have it come out in the right position.)

>But there were also some terminals that both advanced the paper
>and returned the print head (I'm hazy about this, but I think
>the IBM Selectric was one...).

Possibly, since as I recall there was a keyboard key that did the
equivalent of pushing the return bar on a manual typewriter.  If
you look at photos of Selectrics, there is no external bar (though
of course there are knobs to rotate the platen for inserting and
removing pages).

(I used a modified Selectric that had been converted into a
printer, hooking it to a custom driver that I wrote, and custom
hardware that came with the modified Selectric, on my home TRS-80,
back in high school -- 1980-81 or so.  I remember seven solenoids,
which must have been divided into 1 for shift -- 180 degree rotate
-- and 2 for tilt plus 4 for rotate.  I had access to an actual
Selectric as well, and when you pushed the shift key, the ball
would do the 180 degree rotate at that point, before doing the
tilt/rotate for each character.)

>Doug might remember better than I but I suspect some terminal did the
>combined CR/LF only, so that's why Unix adopted it.

As I recall, the original definition of ASCII suggested that the
LF character was either "line feed" or "new line", and that if it
*was* new-line, it would be stand-alone.

Wikipedia (https://en.wikipedia.org/wiki/ASCII) implies that Unix
got this from Multics.

Of course, DEL was code 0177 because it punched all the holes in
the paper tape, which would always work to "erase" any partially
punched holes....

Chris



More information about the TUHS mailing list