Re: NUL to terminate strings; was reinventing ASCII?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • BruceMcF

    Re: NUL to terminate strings; was reinventing ASCII?

    On Mar 11, 8:04 am, billg...@cs.uof s.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
    character.

    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
    useful.

    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.
Working...