gnu@l5.uucp (John Gilmore) (12/30/85)
When a terminal emulator (or a terminal emulator running dedicated in a small micro commonly called a "terminal") receives an invalid escape code it can do roughly what it pleases. If it follows the X3.64 standard (ANSI or VT100 compatible) then it is required to ignore the whole sequence. The encoding of the sequences is designed so that a simple state machine can parse them even before the terminal knows what they mean -- so if it ends up not knowing what they mean, it can just toss them without trouble. If you are emulating a specific terminal, about the only thing to do is buy or borrow one of those terminals and try it. I screwed up the first release of Sun's firmware 4014 emulator that way -- when I got an invalid control char, I dropped out of graphics mode back to alpha mode. Seems like various programs were used to being able to send ^V's randomly scattered throughout their output [never did figure out why], and this broke my emulator. We didn't have a 4014 to test against (and of course the manual didn't say...of course!) so it took a customer to find the bug. I also consulted to Anderson-Jacobson on their VT100 clone years ago. There sure are a lot of things that you can ask a terminal to do, that aren't in the manual so you can see what it *ought* to do...or, in other words, "Specs? The *code* is the spec..."