Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

On why it's CR+LF and not LF+CR [ASR33]

137 views
Skip to first unread message

Johann 'Myrkraverk' Oskarsson

unread,
Feb 8, 2022, 5:16:37 AM2/8/22
to
Dear alt.folklore.computers,

Here is a link detailing some of the design decisions to use CR then LF
instead of the other way around; the way mechanical typewriters work.

https://www.revk.uk/2022/02/crlf-has-long-history.html

Probably most of you are familiar with it, but I thought to share.

This story is about the ASR33.

--
Johann | email: invalid -> com | www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | twitter: @myrkraverk

Charlie Gibbs

unread,
Feb 8, 2022, 1:31:49 PM2/8/22
to
On 2022-02-08, Johann 'Myrkraverk' Oskarsson <joh...@myrkraverk.invalid> wrote:

> Dear alt.folklore.computers,
>
> Here is a link detailing some of the design decisions to use CR then LF
> instead of the other way around; the way mechanical typewriters work.
>
> https://www.revk.uk/2022/02/crlf-has-long-history.html
>
> Probably most of you are familiar with it, but I thought to share.
>
> This story is about the ASR33.

That pretty much sums it up. But time delays didn't go away with
Teletypes. The Univac terminals I worked with in the '80s needed
time to perform various functions like clear screen, scroll up one
line, etc. While processing such functions they went blind to
incoming data for 20 milliseconds - so at 9600 bps you'd need to
insert 20 NULs after these functions in order not to lose anything.

Around this time there were clever dot matrix printers with a small
internal buffer to hold the characters that came in while performing
a carriage return, complemented by the ability to run faster than
normal for the time it took to catch up. They were amusing to
watch - there'd be a rhythm, and an audible pitch corresponding
to the rate at which the wires were fired, and after a carriage
return that pitch would increase while the printer was catching
up, after which it would settle back down to its normal rate.

Someone came up with a modification to run the printer at its
"catch-up" speed all the time - but then you'd be back to stuffing
NULs to keep from losing characters, not to mention the extra
wear and tear on the mechanism as it was forced to run continuously
at a speed it was only designed to handle intermittently.

--
/~\ Charlie Gibbs | Microsoft is a dictatorship.
\ / <cgi...@kltpzyxm.invalid> | Apple is a cult.
X I'm really at ac.dekanfrus | Linux is anarchy.
/ \ if you read it the right way. | Pick your poison.

John Levine

unread,
Feb 8, 2022, 4:18:38 PM2/8/22
to
According to Charlie Gibbs <cgi...@kltpzyxm.invalid>:
>> https://www.revk.uk/2022/02/crlf-has-long-history.html
>>
>> Probably most of you are familiar with it, but I thought to share.
>>
>> This story is about the ASR33.
>
>That pretty much sums it up. But time delays didn't go away with
>Teletypes.

Nor start with them. Before computers had Teletypes, they had Flexowriters
with moving carriages that were very good at knocking over adjacent coffee
cups.

Unix systems use LF rather than CR-LF as a line ending. I believe that is
because Bell Labs had a bunch of model 37 Teletypes, an improved upper-lower
case version of the 35 where the LF character both returned the carriage and
advanced the paper, and had enough buffering that it didn't need delays.

They also had 33's and early Unix had tty modes that added the needed delays.



--
Regards,
John Levine, jo...@taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly

Anne & Lynn Wheeler

unread,
Feb 8, 2022, 5:17:53 PM2/8/22
to
John Levine <jo...@taugh.com> writes:
> They also had 33's and early Unix had tty modes that added the needed
> delays.

when cp67 was originally installed at the univ, it had automagic
terminal recognition for 1050&2741 (using terminal controller "SAD" CCW
to switch line port-scanner type). The univ. had some number of (ascii)
33&35 teletypes ... so I had ascii terminal support to CP67 ... and had
to change the number of NULL delay characters because different
line-speed ... but I did extend the automagic terminal type ... in
theory any type terminal come be connected to any port.

I then wanted to have a single dial-in number ... hunt group
https://en.wikipedia.org/wiki/Line_hunting
for all terminals. Didn't quite work since I could switch line scanner
for each port (on IBM telecommunication controller), IBM had took short
cut and hard wired line speed for each port (TTY was different line
speed from 2741&1052). Thus was born univ. project to do a clone
controller, built a mainframe channel interface board for Interdata/3
programmed to emulate mainframe telecommunication controller with the
addition it could also do dynamic line speed determination. Later it was
enhanced with Interdata/4 for the channel interface and cluster of
Interdata/3s for the port interfaces. Interdata (and later Perkin/Elmer)
sell it commercially as IBM clone controller. Four of us at the
univ. get written up responsible for (some part of the) clone controller
business.
https://en.wikipedia.org/wiki/Interdata
https://en.wikipedia.org/wiki/Perkin-Elmer

I fiddled some one byte calculations in ASCII support (assuming no ASCII
would be more than 255, science center was picking up and shipping most
of the code I was doing to customers). Van Vleck was supporting MIT
Urban Systems Lab CP67 (in tech sq, opposite the bldg that multics &
science center were in). He changes the maximum ASCII terminal
line-length to 1200 (for some device down at harvad) and CP67 crashes 27
times in one day (because of the one byte fiddle, line length
calculations were invalid and was over running buffers).
https://www.multicians.org/thvv/360-67.html


--
virtualization experience starting Jan1968, online at home since Mar1970

robertth...@googlemail.com

unread,
Feb 8, 2022, 7:45:10 PM2/8/22
to
On Tuesday, 8 February 2022 at 21:18:38 UTC, John Levine wrote:
> Nor start with them. Before computers had Teletypes, they had Flexowriters
> with moving carriages that were very good at knocking over adjacent coffee
> cups.

Aaah, the Frieden Flexowriter of blessed memory. There were still a couple of these in the Cambridge Computer Lab when I was an undergrad in the 1970s. ISTR they were the remains of the infrastructure that surrounded the Titan that had just been retired when I arrived.

Back in the days when my mail address was just RB16, Maurice Wilkes was still lecturing, and the IBM370 was cutting edge.

Nostalgia isn't what it used to be.

Robin Vowels

unread,
Feb 8, 2022, 8:33:30 PM2/8/22
to
On Tuesday, February 8, 2022 at 9:16:37 PM UTC+11, Johann 'Myrkraverk' Oskarsson wrote:
> Dear alt.folklore.computers,
>
> Here is a link detailing some of the design decisions to use CR then LF
> instead of the other way around; the way mechanical typewriters work.
>
> https://www.revk.uk/2022/02/crlf-has-long-history.html
>
> Probably most of you are familiar with it, but I thought to share.
>
> This story is about the ASR33.

The reason goes a long way before the ASR 33.
From the first use of teleprinters c. 1920s, time was needed to move the
carrier from the RHS back to the LHS, ready for the next line.
CR therefore was issued first, followed by LF, and then by two NULL
characters -- all of which ensured that the carrier had completed moving
and was back at the LHS.

Even in the case of electric typewriters where the platen moved,
significant time was needed to move the heavy platen from the
LHS to the RHS.

Of course, in these devices, if the next line is indented further than
the current position of the carrier, only a LF needs to be given,
along with a few spaces, thus saving time.

Quadibloc

unread,
Feb 8, 2022, 8:57:56 PM2/8/22
to
On Tuesday, February 8, 2022 at 2:18:38 PM UTC-7, John Levine wrote:

> Unix systems use LF rather than CR-LF as a line ending. I believe that is
> because Bell Labs had a bunch of model 37 Teletypes, an improved upper-lower
> case version of the 35 where the LF character both returned the carriage and
> advanced the paper, and had enough buffering that it didn't need delays.

That feature wasn't intrinsic to the Model 37. It was just an option that you
could get for a Model 33 - or even a Model 19 - as well. A lot of hams had
Model 19 5-level Teletypes with that option because it avoided lines overprinting
if the LF character happened to get garbled for RTTY.

John Savard

Dan Espen

unread,
Feb 8, 2022, 11:07:27 PM2/8/22
to
John Levine <jo...@taugh.com> writes:

> According to Charlie Gibbs <cgi...@kltpzyxm.invalid>:
> Unix systems use LF rather than CR-LF as a line ending. I believe that is
> because Bell Labs had a bunch of model 37 Teletypes, an improved upper-lower
> case version of the 35 where the LF character both returned the carriage and
> advanced the paper, and had enough buffering that it didn't need delays.
>
> They also had 33's and early Unix had tty modes that added the needed delays.

Bell Labs had just about every kind of printer imaginable.
I supported a mainframe application there that distributed print over an
attached and dial up network. We had to account for line endings, null
padding, the works.

We had a room full of these printers including some of those massive
teletypes. It was cool to go into the room then start up our
development copy. The room would shake with all those printers going
at once and the noise was pretty good too.

--
Dan Espen

Douglas Wells

unread,
Feb 8, 2022, 11:46:08 PM2/8/22
to
In article <stumnb$1g8v$1...@gal.iecc.com>, John Levine <jo...@taugh.com> wrote:

>Unix systems use LF rather than CR-LF as a line ending.

Actually, instead of LF, Unix systems use NL (NewLine): same
character code, different semantics. And I believe that Unix
inherited that from Multics.

ASCII-68 introduced the option to treat the octal 12 value as a
NewLine, along with lower-case characters and a few changes that
enhanced text processing.

Multics adopted the NL option for several reasons. First, Multics
(and Unix) were intended to support a wide variety of terminals, some
of which used CR-LF and some of which used NL. Thus, there was no
advantage to storing one form or the other in files. Using NL rather
than CR-LF saved one character of storage per line.

Second, and more importantly, Multics has significant support for text
processing and uses "canonicalized" input in order to simplify such
processing in user programs. Text that appears the same on paper is
always stored the same way in canonicalized text, no matter how that
text was typed. For example, multi-stroke characters are always
stored as <char1><backspace><char2>.... Thus, typing the characters
"Foo<CR>___<NL>" is transmogrified to "F<BS>__<BS>o_<BS>o<NL>" --
always. (Those who ever had to process text entered from a
Flexowriter will particularly appreciate the avoidance of the need to
handle the various "shift" characters.) Since a CR can never appear
in canonicalized text, it makes no sense to store them in a text file.

Additionally, canonicalized input is used to support a rudimentary
multi-national character set, at least as much as can be supported
using only ASCII characters. For instance, a French accented e would
be stored as "'<BS>e".

Unix doesn't do canonicalization, but eliminating the CR-LF sequence
simplifies text processing by avoiding the need to do state processing
at the end of lines.

> I believe that is
>because Bell Labs had a bunch of model 37 Teletypes, an improved upper-lower
>case version of the 35 where the LF character both returned the carriage and
>advanced the paper, and had enough buffering that it didn't need delays.

During the development of Multics, an ASCII environment was
retrofitted onto CTSS(*). According to multiple sources, the Bell
Labs folks used TTY 37s dialed into CTSS in order to participate in
the Multics development effort. I don't know whether those TTY 37s
were acquired specifically in order to support Multics development,
but after Bell Labs withdrew from the Multics effort, the 37s would
then have been available for use with the newly developed Unix.

(*) That's MIT's CTSS, not Cray's.

>They also had 33's and early Unix had tty modes that added the needed delays.

As did Multics and even CTSS.

- dmw

David Lesher

unread,
Feb 9, 2022, 1:18:22 AM2/9/22
to
Anne & Lynn Wheeler <ly...@garlic.com> writes:

>https://www.multicians.org/thvv/360-67.html

I can add a vignette to the above. As I've said before, NASA-LeRC
had some hard-core TSS gurus, A. L. Armstead being the most
notable. Other sites called for help, as did the Dallas IBM
office.

I was told a TSS story. Seems one of the West German TSS sites
had lost some vital part of the system, their backup was
skunked, and they were up the creek sans paddle.

So they reached out to LeRC and we obliged by sending what they
needed. Given the era {early 1980's} I have no idea if it
was sent via something modem-ish or air freight of a 9-track
tape. But it saved the day and they were happy.

But later, the fit hit the shan. Seems sending it broke ITAR,
even though they'd already had it. I think the punishment was a
blizzard of reports and forms, but nothing more.

--
A host is a host from coast to coast...............wb8foz@panix.com
& no one will talk to a host that's close..........................
Unless the host (that isn't close).........................pob 1433
is busy, hung or dead....................................20915-1433

Robin Vowels

unread,
Feb 9, 2022, 6:16:57 AM2/9/22
to
And if the CR character got garbled?

Quadibloc

unread,
Feb 9, 2022, 12:10:37 PM2/9/22
to
There was also another option available... and many radio amateurs
engaged in RTTY _did_ have both options on their Teletypes.

And there was also a *third* option, unshift on space, for 5-level
teletypes that avoided garbled text when a LTRS character was
garbled, but going into that would be going too far afield.

John Savard

Charlie Gibbs

unread,
Feb 9, 2022, 1:12:51 PM2/9/22
to
Then the next line gets piled up on the right margin.
At least it doesn't overprint the current line,
so you've only lost one line, not two.

Anne & Lynn Wheeler

unread,
Feb 9, 2022, 3:48:11 PM2/9/22
to
David Lesher <wb8...@panix.com> writes:
> I can add a vignette to the above. As I've said before, NASA-LeRC
> had some hard-core TSS gurus, A. L. Armstead being the most
> notable. Other sites called for help, as did the Dallas IBM
> office.
>
> I was told a TSS story. Seems one of the West German TSS sites
> had lost some vital part of the system, their backup was
> skunked, and they were up the creek sans paddle.
>
> So they reached out to LeRC and we obliged by sending what they
> needed. Given the era {early 1980's} I have no idea if it
> was sent via something modem-ish or air freight of a 9-track
> tape. But it saved the day and they were happy.
>
> But later, the fit hit the shan. Seems sending it broke ITAR,
> even though they'd already had it. I think the punishment was a
> blizzard of reports and forms, but nothing more.

mentioned recently univ. was sold 360/67 to replace 709/1401 supposedly
for tss/360, but never came to production fruition so ran as 360/65 with
os/360. The IBM TSS/360 SE would do some testing on weekends (I
sometimes had to share my 48hr weekend time).

Shortly after CP67 was delivered to univ, got to play with it on
weekends (in addition to os/360 support). Very early on (before I
started rewritting lots of CP67 code), the IBM SE and I put together a
fortran edit/compile/execute benchmark with simulated users, his for
TSS/360, mine for CP67/CMS. His TSS benchmark had four users and had
worse interactive response and throughput than my CP67/CMS benchmark
with 35 users.

Later at IBM, I did a paged-mapped filesystem for CP67/CMS and would
explain I learned what not to do from TSS/360. The (failed) Future
System somewhat adopted its "single-level-store" from TSS/360 ... some
FS details
http://www.jfsowa.com/computer/memo125.htm

... and I would periodically ridicule FS (in part of how they were doing
"single-level-store") ... which wasn't exactly a career enhancing
activity. Old quote from Ferguson & Morris, "Computer Wars: The Post-IBM
World", Time Books, 1993 .... reference to the "Future System" project
1st half of the 70s:

and perhaps most damaging, the old culture under Watson Snr and Jr of
free and vigorous debate was replaced with *SYNCOPHANCY* and *MAKE NO
WAVES* under Opel and Akers. It's claimed that thereafter, IBM lived in
the shadow of defeat ... But because of the heavy investment of face by
the top management, F/S took years to kill, although its wrong
headedness was obvious from the very outset. "For the first time, during
F/S, outspoken criticism became politically dangerous," recalls a former
top executive.

... snip ...

one of the final nails in the FS coffin was analysis by the IBM Houston
Science Center that if 370/195 software was redone for FS machine made out
of the fastest available technology, it would have the throughput of
370/145 (about 30 times slowdown).

The death of FS also gave virtual memory filesystems really bad
reputation inside IBM ... regardless of how they were implemented.

trivia: AT&T had a contract with IBM for a stripped-down TSS/360 kernel
referred to SSUP ... for UNIX to be layered on top. Part of the issue is
that mainframe hardware support required production/type-1 RAS&EREP for
maint. It turns out that adding that level of support to UNIX, was many
times larger than doing straight UNIX port to 370 (as well as layering
UNIX on top SSUP was significantly simpler).

This also came up for both Amdahl (gold/uts) and IBM (UCLA Locus for
AIX/370) ... both running them under VM370 (providing the necessary
type-1 RAS&EREP).

Ahem A Rivet's Shot

unread,
Feb 9, 2022, 5:30:02 PM2/9/22
to
On Tue, 8 Feb 2022 16:45:08 -0800 (PST)
"robertth...@googlemail.com" <robertth...@googlemail.com> wrote:

> Aaah, the Frieden Flexowriter of blessed memory. There were still a
> couple of these in the Cambridge Computer Lab when I was an undergrad in
> the 1970s. ISTR they were the remains of the infrastructure that
> surrounded the Titan that had just been retired when I arrived.

Just a few years before me by the sound of it. I saw the Titan
running on a school tour shortly before it was retired - fourth form I
think.

> Back in the days when my mail address was just RB16, Maurice Wilkes was
> still lecturing, and the IBM370 was cutting edge.

He retired during my second year while I was still pretending to be
a mathematician - I took the one year CST course for my third year and so
just missed him in the lab.

--
Steve O'Hara-Smith
Odds and Ends at http://www.sohara.org/

Anne & Lynn Wheeler

unread,
Feb 10, 2022, 1:07:31 PM2/10/22
to
Anne & Lynn Wheeler <ly...@garlic.com> writes:
> This also came up for both Amdahl (gold/uts) and IBM (UCLA Locus for
> AIX/370) ... both running them under VM370 (providing the necessary
> type-1 RAS&EREP).

... other RAS&EREP trivia/drift: when transferred to san jose research
in the late 70s, got to wander around of lot of datacenters in silicon
valley (both IBM&non-IBM), including disk engineering (bldg14) and disk
product test (bldg15) across the street. They were running
pre-scheduled, stand-alone, 7x24 mainframes for engineering
testing. They mentioned that they had recently tried MVS, but it had
15min mean-time-between-failure in that environment, requiring manual
re-ipl (boot). I offerred to rewrite input/output supervisor, making it
bullet proof and never fail, allowing any amount of on-demand,
concurrent testing, greatly improving productivitty. I then wrote
(internal) research report about the activity and happen to mention the
MVS 15min MTBF ... bringing down the wrath of the MVS organization on my
head.

Peter Flass

unread,
Feb 10, 2022, 4:05:42 PM2/10/22
to
The only thing worse than being wrong is being right.

--
Pete

Anne & Lynn Wheeler

unread,
Feb 10, 2022, 4:47:38 PM2/10/22
to
Peter Flass <peter...@yahoo.com> writes:
> The only thing worse than being wrong is being right.

... real topic drift ... In the late70s & early80s, I was blamed for
online computer conferencing on the internal network ... it really took
off spring 1981 after i distributed trip report of visit to Jim Gray at
Tandem. Only around 300 participated, but claim was the upwards of
25,000 wear reading. Six copies of about 300 pages were printed with
executive summary and summary of summary, packaged in Tandem 3-ring
binders and sent to corporate executive committee (folklore is that 5of6
wanted to fire me) ... some of summary of summary:

* The perception of many technical people in IBM is that the company is
rapidly heading for disaster. Furthermore, people fear that this
movement will not be appreciated until it begins more directly to affect
revenue, at which point recovery may be impossible

* Many technical people are extremely frustrated with their management and
with the way things are going in IBM. To an increasing extent, people
are reacting to this by leaving IBM Most of the contributors to the
present discussion would prefer to stay with IBM and see the problems
rectified. However, there is increasing skepticism that correction is
possible or likely, given the apparent lack of commitment by management
to take action

* There is a widespread perception that IBM management has failed to
understand how to manage technical people and high-technology
development in an extremely competitive environment.

... took another decade (1981-1992) ... IBM had gone into the red and
was being reorganized into the 13 "baby blues" in preparation for
breaking up the company .... reference gone behind paywall but mostly
lives free at wayback machine
http://web.archive.org/web/20101120231857/http://www.time.com/time/magazine/article/0,9171,977353,00.html
may also work
http://content.time.com/time/subscriber/article/0,33009,977353-1,00.html

we had already left IBM, but we get a call from the bowels of Armonk
asking if we could help with breakup of the company. Lots of business
units were using supplier contracts in other units via MOUs. After the
breakup, all of these contracts would be in different business units
... all of those MOUs would have to be cataloged and turned into their
own contracts (however, before we get started, the board brings in a new
CEO and reverses the breakup).

... in my executive exit interview, was told they could have forgiven me
for being wrong, but they never were going to forgive me for being
right.

... the joke somewhat on the MVS group ... they had to get in long line
of people that wished I was fired.

D.J.

unread,
Feb 10, 2022, 8:30:53 PM2/10/22
to
Yeah, blame Ye Olde Messenger, instead of the people screwng things
up.

Sounds familiar.
--
Jim

Andy Walker

unread,
Feb 11, 2022, 8:44:10 AM2/11/22
to
On 09/02/2022 22:06, Ahem A Rivet's Shot wrote:
> On Tue, 8 Feb 2022 16:45:08 -0800 (PST)
> "robertth...@googlemail.com" <robertth...@googlemail.com> wrote:
>> Aaah, the Frieden Flexowriter of blessed memory. There were still a
>> couple of these in the Cambridge Computer Lab when I was an undergrad in
>> the 1970s.

I used them extensively in my first few years of writing computer
programs. I nearly managed to liberate one when Nott'm cleared out the
old junk from our [maths] computer room; sadly, at some stage they had
augmented the old, built-like-a-tank one with a shiny new plastic one
which perhaps worked but was horrible. "We've saved you the Flexowriter
you wanted" -- but they hadn't, they'd junked the old one and kept the
new one for me. Grr! I did manage to liberate one of the Brunsviga
adding machines ["Wouldn't you rather have one of the electronic ones?"
"No!"] which I'd used for NA lectures.

>> ISTR they were the remains of the infrastructure that
>> surrounded the Titan that had just been retired when I arrived.
> Just a few years before me by the sound of it.

Titan arrived soon after I left Cambridge. Manchester had
the shiny new Atlas 1, of which they -- we! -- were very proud [Prof
Kopal: "We booked the old machine by the half-hour, we book this one
/by the second/." That would have been "interesting", but sadly it
wasn't exactly true; there was no booking, just a queuing system and
tight limits on how many/few seconds your programs were allowed.].

>> Back in the days when my mail address was just RB16, Maurice Wilkes was
>> still lecturing, and the IBM370 was cutting edge.
> He retired during my second year while I was still pretending to be
> a mathematician - I took the one year CST course for my third year and so
> just missed him in the lab.
He gave the Computing and NA course to first-year maths
students. My year was either the first or second time it was run,
undergrads being not highly favoured then. I didn't find it very
interesting at that time, but there weren't many jobs then for
astrophysicists, so I switched to computing and Nott'm gave me the
freedom to play games on the university's KDF9. I say "gave"; as
long as I delivered the lectures they wanted, they didn't ask what
else I was doing.

--
Andy Walker, Nottingham.
Andy's music pages: www.cuboid.me.uk/andy/Music
Composer of the day: www.cuboid.me.uk/andy/Music/Composers/Bach,CPE

Vir Campestris

unread,
Feb 13, 2022, 3:58:30 PM2/13/22
to
On 11/02/2022 13:44, Andy Walker wrote:
> Grr!  I did manage to liberate one of the Brunsviga
> adding machines ["Wouldn't you rather have one of the electronic ones?"
> "No!"] which I'd used for NA lectures.

When I was a student there were rows of mechanical calculators sitting
on top of the cupboards in the Biology labs.

It is one of my minor regrets that I didn't get one.

Andy

Rick C

unread,
Feb 13, 2022, 4:02:22 PM2/13/22
to
I was a chem student when they had those in a narrow lab room on the granite bench. In a couple of years they were replaced by HP calculators, one for one. So instead of a counter nearly filled by machines bigger than typewriters, we had these tiny keypads epoxied to the lab bench. After a few more years no one needed them as we all had calculators in our book bag.

--

Rick C.

- Get 1,000 miles of free Supercharging
- Tesla referral code - https://ts.la/richard11209
0 new messages