CR LF was: freebsd vs. netbsd

Montgomery-Smith, Stephen stephen at missouri.edu
Fri Jun 12 19:32:59 UTC 2020


On 6/12/20 2:21 PM, Ottavio Caruso via freebsd-questions wrote:
> On Fri, 12 Jun 2020 at 19:58, Kurt Hackenberg <kh at panix.com> wrote:
>>
>> On 2020-06-12 02:14, Polytropon wrote:
>>
>>>> But it's often done by redefining the ASCII characters carriage return
>>>> and line feed. Originally they meant, respectively, move the print head
>>>> to the left margin, and roll the paper up a line.
>>>
>>> Erm... no. The carriage return returns the _carriage_ to the
>>> first position (here: to the right), that's why it is called
>>> carriage return and not print head return. :-)
>>>
>>> On older electrical typewriters, you will see...
>> Electric typewriters didn't use ASCII.
> 
> Maybe the OP meant teleprinters, which did indeed use 5-bit and 7-bit
> ascii, still used today by hams in RTTY and other legacy digital
> modes.
> 

I used to have a teletype.  On these devices, the CR would cause the
printer head to go to the left margin, and the LF would cause the page
to move up one line.

It always seemed to me to be a waste of bits.  Why not have one ASCII
code that did both?  Then I found out why.

One time, I decided to try a LF CR at the end of a line instead of CR
LF.  I found that the next character that was typed ended up in the
middle of the page, not on the far left as it should have been.  What I
realized was that the CR takes time to complete, because it has to
physically move the printer head to the left margin.  The extra LF gave
the printer the extra time it needed.

So I don't know about typewriters, but teletypes definitely used CR and
LF for two different purposes.  And it really was necessary to have CR
LF at the ends of the lines.


More information about the freebsd-questions mailing list