ASCII: Difference between revisions

Content deleted Content added
Hym3242 (talk | contribs)
Hym3242 (talk | contribs)
→‎End of line: this little trivia may save a new unix learner some time.
Line 281:
 
====End of line====
The inherent ambiguity of many control characters, combined with their historical usage, created problems when transferring "plain text" files between systems. The best example of this is the [[newline]] problem on various [[operating system]]s. Teletype machines required that a line of text be terminated with both "carriage return" (which moves the printhead to the beginning of the line) and "line feed" (which advances the paper one line without moving the printhead). This is still true in today's terminal emulators. The reason LF alone is sufficient to do a newline is due to the fact that the tty driver translates all LF to CRLF on output. The name "carriage return" comes from the fact that on a manual [[typewriter]] the carriage holding the paper moves while the typebars that strike the ribbon remain stationary. The entire carriage had to be pushed (returned) to the right in order to position the paper for the next line.
 
DEC operating systems ([[OS/8]], [[RT-11]], [[RSX-11]], [[RSTS/E|RSTS]], [[TOPS-10]], etc.) used both characters to mark the end of a line so that the console device (originally Teletype machines) would work. By the time so-called "glass TTYs" (later called CRTs or "dumb terminals") came along, the convention was so well established that [[backward compatibility]] necessitated continuing to follow it. When [[Gary Kildall]] created [[CP/M]], he was inspired by some of the command line interface conventions used in DEC's RT-11 operating system.