Echo Control

Parent Previous Next

Echo Control


Under normal circumstances, UOS echoes characters as they are typed - but only when the running program is requesting input.  Characters typed when input isn't being requested are stored in the input buffer (also known as the "type-ahead" buffer).  They are echoed when the input buffer is processed if the terminal hasn't been set to binary input mode.  There are two reasons for not echoing characters unless a program has requested input: 1) echoing characters at other times may interfere with formatted output, and 2) the input may be a password which the program will not want echoed for security reasons.  Certain control codes are processed immediately upon receipt, rather than storing them in the type-ahead buffer for later processing.  Such characters are either echoed or otherwise processed immediately.


The echo ability can be turned off by setting the flag that prevents echo or by setting the terminal to binary mode.  Turning echo off can be used to protect a password while it is being typed (or processed).  Some terminals have a "local-echo" feature that automatically displays the typed characters as they are typed and sent to the computer.  In such a case, if the computer also echoes the character, the characters can be doubled on the terminal.  In such cases, the echo can be turned off to prevent the doubled characters.