3 ms·
This goes back further. Teletype machines needed a delay to move the printing apparatus back to the beginning of a line. The two characters provided that delay
by chasil 2y ago
This goes back further.
Teletype machines needed a delay to move the printing apparatus back to the beginning of a line. The two characters provided that delay.
I never used one of these; I was too young.
https://en.m.wikipedia.org/wiki/Teletype_Model_33 https://en.m.wikipedia.org/wiki/Teletype_Model_33
https://www.revk.uk/2022/02/crlf-has-long-history.html?m=1 https://www.revk.uk/2022/02/crlf-has-long-history.html?m=1
- EvanAnderson 2y agoWhen I got started w/ PCs in the late 80s I wrote a GW-BASIC program to take keypresses (one of those 'IF INKEY$<>""' type programs) and write each keypress out to my Okidata dot matrix printer a character at a time. Pressing keys made a physical thing move. That's always fun. It particularly interesting to send control codes to see what they made the printer do. Pressing <ENTER> got carriage returns without advancing the platen (so you could type over and over again on the same line). <CTRL><L> made the printer advance to the next page of the fan fold. <CTRL><G> made the printer beep. I figured out that <CTRL><H> moved the print head backward. I used this to make some "impossible to print" output (that is, impossible for my word processor to reproduce because it wouldn't send backspaces for the purposes of over-printing). Later, during my youthful phase of probing systems on various networks, I ran into systems that, upon entry of a bad password, would send a series of backspaces, various random letters, pound signs, and asterisks before giving a new logon prompt. At the time I didn't put two and two together. (I hadn't yet read Levy's "Hackers" and the idea of using a teletype as an input device on a computer wasn't a thing I'd heard about yet.) Years later, looking at old captures and seeing this seemingly strange series of characters, I realized what the purpose was. The characters were being sent to obliterate the password printed by your teletype's local echo. (I want to say the OS was PRIMOS but I don't remember for sure. I saw a number of them on either Tymnet or Telenet-- maybe both.)
- seoulbigchris 2y agoThose teletype machines did need extra time to perform the two distinct actions associated with EOL, that is, the carriage return and line feed. Line feed seems like it would take a fixed amount of time, but CR could be pretty long if the carriage was all the way out near column 80 or 132. So, two commands were needed on those teletypes because of how they work, not to introduce any delay. It's possible the baud rate could be slow enough such that all the mechanical movements are wrapped up during the transmission of two characters. But sometimes you need to insert a delay after an EOL, something you can set on lots of serial port terminal emulators (although that's usually done for different reasons). You can set a delay in the termcap parameters to account for this needed delay. I'm not sure if any of the common mechanical teletypes offered a handshaking line to hold off the computer until the motion stopped, but that would have been another option -- and a faster solution, since the delay time would be exactly what was needed (vs a maximum fixed delay of a software solution). Those teletypes were originally meant to be used in teletype to teletype operations, where the maximum baud rate was fixed by the mechanical operation of the printing mechanism. If you interfaced a 60 baud TTY to a computer running at 9600 baud, you also have to delay between each character, not only at the EOL. I know this because I foolishly interfaced my Commodore C64 back in college to an old Army surplus Kleinschmidt TT-4 mechanical teletype. I had to deal with these delays, as well as converting the parallel ASCII of the C64 to the serial Baudot needed by the TT-4. edit: I suppose they settled on CR/LF instead of LF/CR, because the former could be a little but quicker... the LF could be performed while the carriage was traveling back to the start of line. But that's just a guess.