Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
11.2 Padding
9nother way to handle a 2worst case2 situation (without using flow control or buffers) is to add a bunch of nulls (bytes of value :ero) to escape se uences. .ometimes (;<'s are used instead provided they have no other function. .ee -ecogni:e (el. $he escape se uence starts the terminal doing something, and while the terminal is busy doing it, it receives a bunch of nulls which it ignores. "hen it gets the last null, it has completed its task and is ready for the ne#t command. $his is called null padding. $hese nulls formerly were called 2fill characters2. $hese nulls are added 4ust to 2waste2 time, but it's not all wasted since the terminal is usually kept busy doing something else while the nulls are being received. 8t was much used in the past before flow control became popular. $o be efficient, 4ust the right amount of nulls should be added and figuring out this is tedious. 8t was often done by trial and error since terminal manuals are of little or no help. 8f flow control doesn't work right or is not implemented, padding is one
of deadlock going on. 9nother type of keyboard lock happens when a certain escape se uence (or 4ust the CO control character for "yse A7) is sent to the terminal. "hile the previous type of lock is done by the serial driver, this type of lock is done by the hardware of a real terminal. 8t's a catch/%% situation if this happens since you can't type any commands to escape out of this lock. Eoing into setup and resetting might work (but it failed on my "yse A7 and 8 had to cycle power to escape). One could also send an 2unlock keyboard2 escape se uence from another terminal. $he term 2locked2 is also sometimes used for the common case of where the computer is told to stop sending to a terminal. $he keyboard is not locked so that whatever you type goes to the computer. .ince the computer can't send anything back to you, characters you type don't display on the screen and it may seem like the keyboard is locked. .crolling is locked (scroll lock) but the keyboard is not locked.
+e erse Channel
Old hard/copy terminals may have a reverse channel pin (such as pin *=) which behaves like the -$. pin in -$.!)$. flow control. $his pin but will also be negated if paper or ribbon runs out. 8t's often feasible to connect this pin to the )$. pin of the host computer. $here may be a dip switch to set the polarity of this signal.
$hese bytes are delayed by passing thru the *A/byte receive buffer. 8f the 2off2 byte was the first byte into this buffer, there could be a wait while *6 more bytes were received. $hen the *A bytes would get read and the 2off2 byte found. $his e#tra delay doesn't happen with hardware flow control.