www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/05/19:00:48

From: Erik Max Francis <max AT alcyone DOT com>
Newsgroups: comp.os.msdos.djgpp,comp.os.cpm,alt.folklore.computers
Subject: Re: EOF char. (Was C++ and RHIDE)
Date: Sun, 05 Jul 1998 15:34:00 -0700
Organization: Alcyone Systems
Message-ID: <359FFF58.71CE272E@alcyone.com>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980705162804 DOT 23984W-100000 AT is> <35a4cd9e DOT 28052267 AT news5 DOT bellatlantic DOT net> <35a4c1be DOT 23702950 AT news DOT innet DOT be>
NNTP-Posting-Host: charmaine.alcyone.com
Mime-Version: 1.0
Lines: 42
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019