On 16 Feb 2001, at 7:16, Pense, Joachim wrote: > Ian wrote: > > >As a a sometime user of an ASR33 (aka "teletype") there's a very good > >reason for the CR/LF pair. The CR was sent first, and started the print > >head moving. Then the LF, which advanced the platen. The CR motion took > >longer, so needed a "dead" character after it. Unless you wanted to > >overprint, CR-LF did fine. Otherwise you sent CR-NUL. > > I somehow do not get the point. I understand CR moves the point to the left, > LF one line down. I see no dead character there... The problem is the timing: it took *more*than*a*character*time* to move the CR back to the left margin. But less than two [at least on all the Teletype corp TTYs] and so the sequence: xyz<Ret><LF>abc would always have the 'abc' appearing just where it belonged at the left margin. If you did "xyz<LF><RET>abc" the 'a' would be printed someplace in the middle of the next line, as the carriage was moving left. In fact, if you did: "....xyz<FORMFEED><RET>abcd.." you would get the 'a' 'b' 'c' printed on a funny diagonal slanting down and to the left across the bottom of the page being ejected. Formfeed, "\f" to us'uns, took a LONG time and at the end of pages you had to put a fair bit of padding to ensure that the next char really was at the top of the next page and not printed while the paper was still advancing. Also, almost every hardcopy terminals [e.g., DEC, TI "silent 700"s, etc] required some sort of delay after a <RETURN> before you could print the next char and be sure the carriage was at the left margin. For *most*, one character time was enough, and so <RETURN><LINEFEED> was OK, but for example, the TI silent 700 series [printed on thermal paper] required several chars and so for that terminal you had to do: <RET><Pad><pad>...<PAD><LINEFEED> [or you could put the padding after the linefeed --- anywhere you wanted after the <RET> and before the first printing character]. The PAD was generally either NUL [\0] or RUBOUT [\0177]. those of us with the misfortune of having to write TTY drivers for beasts like this needed to know the particular terminal type [e.g. "DEC 110" or some such] and there'd be strange algorithms [generally tuned empirically] to "compute" the right amount of padding [e.g., on a silent 700 it was something like (carriage pos - 20)/15 = number of pad chars you needed, and similar kinds of things for <realtabs> and <formfeeds>. /Bernie\ -- Bernie Cosell Fantasy Farm Fibers mailto:bernie@fantasyfarm.com Pearisburg, VA --> Too many people, too few sheep <-- ==== Want to unsubscribe from Fun With Perl? Well, if you insist... ==== Send email to <fwp-request@technofile.org> with message _body_ ==== unsubscribe