TransWikia.com

Why was the return key symbol ⏎ drawn differently from the motion of a CR-LF?

Retrocomputing Asked on August 25, 2021

In the operating system (DOS) of IBM PCs, newlines were represented by a carriage return (CR) character, followed by a line feed (LF) character. The motion of a printer or teletype receiving such a combination would be first to move to the left, then down, and can be drawn this way:

---
|
V

or (if your browser font supports this)

However, the keyboards of those same IBM PCs used a different symbol on the return key: an arrow first drawn down, and then to the left.

   |
<---

or

Why didn’t the return key symbol match the motion of a CR-LF?

(If the intent was to have a symbol for just the CR, |<--- ( or ) would have been better.)

2 Answers

Chromatix answer already perfectly nails the technical background. Especially the reference to classic typewriter mechanics, predating any TTY or terminal, were the symbol used quite closely follows the hand movement when isueing a new line.

Historically it may be interesting to look at the development. The combined function as a single key was only introduced with electric typewriters - like the Friden Flexowriter with 'CAR RET'. Even as late as 1961, when the new IBM Selectric was introduced, keyboards didn't feature the symbol but had 'Return' written in text. The same was true for IBM's first dedicated terminal system, the 1050 (and that was the basis for the /360 console).

It wasn't until the 2741 in 1965 that the symbol found its way onto the key cap - and stayed there until today.

Noteworthy here is maybe that neither CR nor LF was used in its mainframe environment, but NEL - Next Line - which in turn wasn't considered part of an input line but part of the protocol.

While using CR/NL instead of NL/CR may support a speed-up due the way that TTY/typewriter mechanics operate (*1), this sequence also adds freedom in further transmission optimisation. Many TTYs had the ability to combine CR and LF into a single function (often switchable), to reduce the number of characters to be transmitted/stored (*2). Doing so makes more sense on LF than CR, as CR alone does have a useful application for overwriting a line - like adding underline or other overstrike, while LF always advanced to the next line which doesn't make much sense without repositioning the carriage as well.

As a result, TTYs configured for automatic CR on LF, would act the same, no matter if only a LF or CR/LF was sent, being agnostic to either variant, but still allow overwrite with CR alone.

This is the reason why UNIX and other TTY-based systems of that time use LF to mark a line end. They expect TTYs (as well as glass TTY) to be set to include an implied CR when LF was received. Here it was less of a speed concern, but simplification of text handling as now (like with NEL) a single character did symbolize line end, while still keeping compatibility with (TTY) output equipment, e.g. when dumping a file.


Side note about symbol usage: Already during the 1930s European TTY manufacturers replaced country specific label, like German WR/ZL for CR/LF, with symbols. Using < for CR and (Tripple Bar) for LF.


*1 - Being processed by independent Hardware, thus able to act in parallel.

*2 - Depending on the device at the cost of inserting additional space.

Correct answer by Raffzahn on August 25, 2021

Even though the CR usually goes before the LF in ASCII text, most printer mechanisms actually perform the LF before, or during, the CR. So the shape of the arrow is actually accurate.

This is even true of mechanical typewriters, in which the carriage is returned through a physical lever which, before enough force is transmitted through it to move the carriage, moves sufficiently to advance the page by one line. CR is sent first because it generally takes longer to perform the carriage movement than the line feed.

Answered by Chromatix on August 25, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP