Newline - History

History

ASCII was developed simultaneously by the ISO and the ASA, the predecessor organization to ANSI. During the period of 1963–1968, the ISO draft standards supported the use of either CR+LF or LF alone as a newline, while the ASA drafts supported only CR+LF.

The sequence CR+LF was in common use on many early computer systems that had adopted Teletype machines, typically a Teletype Model 33 ASR, as a console device, because this sequence was required to position those printers at the start of a new line. On these systems, text was often routinely composed to be compatible with these printers, since the concept of device drivers hiding such hardware details from the application was not yet well developed; applications had to talk directly to the Teletype machine and follow its conventions. In particular, this explains the names of the control characters, which signify the actions of an ordinary mechanical typewriter of the times: "Line Feed" is the action to switch to a new line, carried out by the paper feed mechanism of the typewriter carriage, and "Carriage Return" is the action to position the typing device at the beginning of the line, carried out by the sliding movement of the carriage.

Most minicomputer systems from DEC used this convention. CP/M used it as well, to print on the same terminals that minicomputers used. From there MS-DOS (1981) adopted CP/M's CR+LF in order to be compatible, and this convention was inherited by Microsoft's later Windows operating system.

The separation of the two functions concealed the fact that the print head could not return from the far right to the beginning of the next line in one-character time. That is why the sequence was always sent with the CR first. In fact, it was often necessary to send extra characters (extraneous CRs or NULs, which are ignored) to give the print head time to move to the left margin. Even many early video displays required multiple character times to scroll the display.

The Multics operating system began development in 1964 and used LF alone as its newline. Multics used a device driver to translate this character to whatever sequence a printer needed (including extra padding characters), and the single byte was much more convenient for programming. The seemingly more obvious choice of CR was not used, as a plain CR provided the useful function of overprinting one line with another, and thus it was useful to not translate it. Unix followed the Multics practice, and later systems followed Unix.

Read more about this topic:  Newline

Famous quotes containing the word history:

    There are two great unknown forces to-day, electricity and woman, but men can reckon much better on electricity than they can on woman.
    Josephine K. Henry, U.S. suffragist. As quoted in History of Woman Suffrage, vol. 4, ch. 15, by Susan B. Anthony and Ida Husted Harper (1902)

    Literary works cannot be taken over like factories, or literary forms of expression like industrial methods. Realist writing, of which history offers many widely varying examples, is likewise conditioned by the question of how, when and for what class it is made use of.
    Bertolt Brecht (1898–1956)

    It’s a very delicate surgical operation—to cut out the heart without killing the patient. The history of our country, however, is a very tough old patient, and we’ll do the best we can.
    Dudley Nichols, U.S. screenwriter. Jean Renoir. Sorel (Philip Merivale)