Chromatix wrote:
Problem: With traditional console protocols (eg. VT-100, WYSE, Acorn VDU), it is not possible to unambiguously determine whether or not you are in the middle of a control sequence, and thereby synchronise to the correct control/data sense if you begin receiving in the middle of a session. In a hobbyist context this could easily happen due to accidentally power-cycling your terminal device or jostling the serial cable.
Speaking as one who has installed and set up hundreds of host-based systems, as well as installed and set up thousands of terminals (and has debugged countless serial interfaces), I respectfully opine you are describing a non-problem.
Assuming the serial interface has proper flow control set up (meaning CTS/RTS, not XON/XOFF) an unplugged cable will automatically cause CTS to be deasserted at both ends, completely stopping all activity. Similarly, if the terminal is off-line for any reason (not powered, in setup mode, etc.) it will deassert its RTS output, which will deassert the host's CTS, causing the host to cease transmitting. The worst that could happen is a couple of boo-boos might appear on the screen when the terminal is powered (when in setup mode, all terminals with which I have experience deassert RTS, thus halting transmission from the host).
Quote:
$00 - NUL - A one-byte command which does nothing. Can be used to guarantee that the end of a command sequence is detected. Should be inserted between a multi-byte command sequence and a printable character from outside the ASCII range. Should also be the first byte sent by both host and terminal after each is reset.
In general, nulls are best avoided in serial communications. In some circumstances, a null may look like a break to the host if a framing error occurs and missing stop bit detection is not implemented. If the host poorly handles a break there is no telling what will happen next (on my POC units, reception of a break causes a spurious interrupt). Avoidance of nulls in the data stream was one of several reasons for the development of data transfer protocols such as Motorola S-record, Intel hex, XMODEM, etc.
Quote:
$16 - SYN - Synchronise. May take any number of parameters. The receiver must respond with an ACK command with the SYN reason, followed by the given parameters verbatim.
A solution in search of a problem.
Quote:
$7F - DEL - Backspaces the cursor and erases the character there.
That's not how
<DEL> works. Your suggestion would be contrary to long-accepted industry standards.
In strict terms,
<DEL> erases the character under the cursor, and does nothing else (back in my Tele-Type days, we referred to
<DEL> as "rub-out," since that was its effect). The behavior you describe is a "destructive backspace," not a delete, and has to be synthesized in software by a sequence of procedures that no terminal with which I am familiar can do in hardware.
Quote:
Solution: UTF-8 to the rescue!
Yet another solution in search of a problem.