One of the
recurring issues of ASCII is:
"What is the ASCII code for newline?"
What I've heard---there is no one character that returns the carriage to
the start of the line (CR) and advances down one line (LF). MS-DOS seems to
That, indeed, is how the Teletype 33 behaves. And 5-level teleprinters
normally had separate CR and LF codes that acted in that way.
think both are required, whereas Unix went with one
(LF) and add both if
required in the driver code. The older versions of Mac OS (prior to being
Unix under the hood) used CR. And while I wrote code to handle CR, LF,
TRS-80s used CR only IIRC. In fact they _sent_ CR only to the printer as
standard, which could be a a problem if you had a non-Radio-Shack
printer, or if you wanted to use an Radio Shack printer on some other
machine. There were 'filters' for some TRS-80 OSes to add the LF.
Most older printers had an internal DIP switch to set an 'Autofeed' --
that is to do a linefeed (as well as returning the carriage). There was
also a pin on the Centronics connector to enable/disable this feature.
IIRC the BBC micro has a operating system call to set the 'printer ignore
character'. At power-on this was set to 0x0A (LF). I think the OS would
try to send CR LF, the printer driver routine would then delete the LF so
that only the CR got through (requring a printer that did an autofeed),
then you could change the 'ignore' character to something else if the
printer neeeded both CR and LF.
The HP9866 is a thermal line printer (prinhead the full width of the
paper, but only one dot high). From what I can deduce from the
scehamtics, it ignroes CRs totally, when it gets an LF it springs into
life and prints the contents of its buffer.
CRLF, LFCR, I never did see LFCR in the wild.
I think I did, once. Really confuesed a bit of software I was using too...
Another recurring issue for ASCII: what is baskspace supposed to do?
I'm used to systems that use $08 [1] to move the cursor left one column and
overwrite the character there with a space. But Linux (maybe because Linus
was secretly a DEChead?) decided that $7F would move the cursor left one
column and overwrite the character there with a space, but X Windows (which
I use on Linux) seems to want to use $08 for that.
I beleive the original intention was that 0x7F would be _ignored_. The
point being you could overpunch any characeter on paper tape to turn it
into 0x7F (all holes), and thus you could effectively delete that
character from the tape
-tony