468,247 Members | 1,317 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,247 developers. It's quick & easy.

Re: NUL to terminate strings; was reinventing ASCII?

On Mar 11, 8:04 am, billg...@cs.uofs.edu (Bill Gunshannon) wrote:
Actually, EOT = end of transmission
ETX = end of text
But the problem with this approach is it misses the point of ASCII.
American Standard Code for Information Interchange
While ASCII has been used for local storage of characters I believe its
intended purpose was for moving them between locations over what were the
common transmission methods of its day. Thus I think while there is an
ETX it would be meaningless without a preceding STX somewhere in the string.
Precisely. What makes ASCII NUL an appropriate terminator for
terminated strings is that fact that it is defined *in* ASCII as a ...
uh ... NUL character ... a character that the transmitter is free to
add as much as it wishes, say to keep a connection alive or to provide
a timing delay ... and which the receiver is free to discard on
receipt. A no-op.

It is, therefore, one character in ASCII that is not meaningful as a

Now, we very rarely do text fascimile transmission anymore (!), but
there are lots of analogues that could be found.

For text in storage rather than text in flight, the main useful ones
are FS GS RS and US, though if the resources are not available to
support UTF-8, and Latin-1 is not appropriate, SI and SO are also

If the process of a fascimile sender and fascimile receiver is mapped
as an analogy to the process of a selected SPI device or the
microcontroller acting as bus master talking to the other as sender
and receiver, many of the others can be found a reasonable use. And in
that context, the last thing you'd want would be to have them as
printable characters, or in use as part of the massages being passed
back and forth, since the whole point is that if the character AND $E0
is 0, its an ASCII7 control, and then you can do an indexed jump to
act on it, while it its not, you repeat the loop that you are in.
Jun 27 '08 #1
0 878

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Laurent Therond | last post: by
2 posts views Thread by Bill Janssen | last post: by
16 posts views Thread by Paul Prescod | last post: by
6 posts views Thread by Dmitri | last post: by
4 posts views Thread by Martin Fletcher | last post: by
2 posts views Thread by Fuzzyman | last post: by
3 posts views Thread by Sandra-24 | last post: by
14 posts views Thread by Dennis Benzinger | last post: by
16 posts views Thread by Sébastien Boisgérault | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.