line endings and Cygwin

John Yates jyates at netezza.com
Wed Apr 13 18:28:53 BST 2005


Martin Pool wrote:

> (Why oh why did Microsoft ever think CRLF was a good idea?...)

The standard already existed when I started using DEC systems over
35 years ago.  Back then Model 35 Teletypes were not uncommon and
I still ran into the occasional Model 10.

The reason the sequence was CR followed by LF and not the other
way around was mechanical dynamics.  Remember that the origin
was exactly as suggested by the company name: delivering typed
output at a remote site.  Typical usage was to prepare a paper
tape offline at the originating location.  Once ready the tape
was then placed into the attached reader.  (Both paper tape punch
and reader were integral pars of any teletype unit.)  With the
tape loaded transmission ran open loop at about 6 character per
second.  While the mechanism could advance the paper vertically
one line within a single character time returning the print head
(the "carriage") from its rightmost position to the left edge
typically took more than a single character time.  Transmitting
the "Carriage Return" control before the "Line Feed" control
allowed two character times to complete returning the carriage,
achieving a limited form of pipelining.

Still, this did not always solve the problem. I remember working
on a "terminal driver" that tracked both character column and
line on page.  Depending on the horizontal position a CR might
engender transmitting one or more nulls to satisfy timing.  And
of course there was a completely analogous processing for Form
Feed.

/john




More information about the bazaar mailing list