Reply to post: Re: Vi (CR-LF history)

Windows Notepad fixed after 33 years: Now it finally handles Unix, Mac OS line endings

Missing Semicolon Silver badge
Boffin

Re: Vi (CR-LF history)

I used to have an old TeleType Type 33.

That is when I found out why it is CR-LF, and not LF-CR.

The Type 33 was completely electromechanical, with exactly one transistor (presumably for the receive side of the 20mA current loop interface).

Each character was printed as soon as it was decoded.

When the CR is interpreted, the carriage is released from its position towards the right of the platen, and a big clock spring hurls it towards the left. A piston on the carriage enters a cylinder at the left, and that cushions the impact against the end stop. Meanwhile, the LF has been decoded, and the paper is moved up one line.

From all-the-way-to-the-right to the home position takes more than one character time at 75baud, so the carriage was still moving as the paper was advanced - it had settled in the leftmost position by the time the first printable character on the next line had been decoded.

I successfully drove mine from my ZX81, and I sent LFCR. The first character on each line was actually blatted on the the paper an inch or so the the right of the home position!

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon