character_io - perform raw character by character I/O to
Contains routines to perform raw terminal I/O, character by
character with no echo or tab substitution.
external class Character_IO= simlib/character_io";"
while true do
TTY.output(TTY.input); ! -- This will echo each
character as is. ;
Per Holm, Lund University.
Perform character by charcter I/O to the terminal, bypassing
sysin/sysout. The characters are read without echo and
written directly, no expanssion of tabs etc are done. The
routins are used to write programs making interactive use of
Vt100-type terminals. When these routines are used normal
I/O should not be used.
Sequencing: (Open (Input/Output/OutString)* Close)*
Must be called before any I/O operation. Will terminate the
program if it can not be performed.
Called to reset the terminal to normal operation. Should be
called before Sysin/sysout I/O is preformed or the program
character procedure Input;
Wait until the user hits a key, then return the ASCII
equivelent. There is no automatic echoing on the terminal.
procedure Output(Ch); character Ch;
Send the character Ch the the terminal as unprocessed as
text T; integer Length;
Send the first Length characters of T to the terminal. This
operation is equivalent to, but more efficient than,
repeated calls to Output.