Mail Archives: djgpp/1998/07/05/19:00:48
Luc Van der Veken wrote:
> What exact character would be used in the papertape days to
> signal the end of a tape? Decennia ago I used them, but I don't
> remember.
>
> CTRL/Z - ETX (CTRL/C) - EOT (CTRL/D) - EM (CTRL/Y)?
>
> Or more than one, platform-dependent?
EOT (0x04, ^D) is the "correct" one from the ASCII standard, since it
stands for "end of transmission." This is used (almost?) universally on
Unix systems,
ETX (0x03, ^C) means "end of text." It doesn't necessarily imply the
end of the data stream (i.e., the text block could only be one portion
of the file being read).
EM (0x19, ^Y) means "end of medium." It doesn't necessarily mean that
the medium is exhausted, though.
SUB (0x1a, ^Z) means "substitute." This is the end-of-file marker on
MSDOS systems (and CP/M, apparently, which I've never had the "pleasure"
of being exposed to). It is, in fact, absolutely the wrong choice for
an end-of-file marker. (I can only hope that it's use was for legacy
purposes.) The SUB character is supposed to be inserted when an
incoming character is known to be in error. It has nothing to do with
end-of-file markers.
Note that according to the ASCII standard, all of the control characters
have glyphs associated with them. EOT looks like a little bolt of
lightning; ETX is a square with the top and left sides removed; EM is a
verticle line with a small filled circle in the center; and SUB is a
backwards question mark.
--
Erik Max Francis, &tSftDotIotE / mailto:max AT alcyone DOT com
Alcyone Systems / http://www.alcyone.com/max/
San Jose, California, United States / icbm:+37.20.07/-121.53.38
\
I put away my nine, fool / 'cause I'm colorblind.
/ Ice Cube
- Raw text -