* New version of IRM New version of the IRM, updated to Medley. * moved to docs/medley-irm as discussed
750 lines
80 KiB
Plaintext
750 lines
80 KiB
Plaintext
INTERLISP-D REFERENCE MANUAL
|
||
TERMINAL INPUT/OUTPUT
|
||
|
||
"30"29. TERMINALINPUT/OUTPUT
|
||
2
|
||
|
||
Most input/output operations in Interlisp can be simply modeled as reading or writing on a linear stream of bytes. However, the situation is much more complex when it comes to controlling the user's "terminal," which includes the keyboard, the mouse, and the display screen. For example, Interlisp coordinates the operation of these separate I/O devices so that the cursor on the screen moves as the mouse moves, and any characters typed by the user appear in the window currently containing a flashing cursor. Most of the time, this system works correctly without need for user modification.
|
||
The purpose of this chapter is to describe how to access the low-level controls for the terminal I/O devices. It documents the use of interrupt characters, the keyboard characters that generate interrupts. Then, it describes terminal tables, used to determine the meaning of the different editing characters (character delete, line delete, etc.). Then, the "dribble file" facility that allows terminal I/O to be saved onto a file is presented (see the Dribble Files section below). Finally, the low-level functions that control the mouse and cursor, the keyboard, and the screen are documented.
|
||
Interrupt Characters
|
||
1
|
||
|
||
Errors and breaks can be caused by errors within functions, or by explicitly breaking a function. The user can also indicate his desire to go into a break while a program is running by typing certain control characters known as "interrupt characters". The following interrupt characters are currently enabled in Interlisp-D:
|
||
Note: In Interlisp-D with multiple processes, it is not sufficient to say that "the computation" is broken, aborted, etc; it is necessary to specify which process is being acted upon. Usually, the user wants interrupts to occur in the TTY process, which is the one currently receiving keyboard input. However, sometimes the user wants to interrupt the mouse process, if it is currently busy executing a menu command or waiting for the user to specify a region on the screen. Most of the interrupt characters below take place in the mouse process if it is busy, otherwise the TTY process. Control-G can be used to break arbitrary processes. For more information, see Chapter 23.
|
||
Control-B Causes a break within the mouse process (if busy) or the TTY process. Use Control-G to break a particular process.
|
||
Control-D Aborts the mouse process (if busy) or the TTY process, and unwinds its stack to the top level. Calls RESET (see Chapter 14).
|
||
Control-E Aborts the mouse process (if busy) or the TTY process, and unwinds its stack to the last ERRORSET. Calls ERROR! (see Chapter 14).
|
||
Control-G Pops up a menu listing all of the currently-running processes. Selecting one of the processes will cause a break to take place in that process.
|
||
Control-P This interrupt is no longer supported in Medley.
|
||
Control-T Flashes the TTY process' window and prints status information for the TTY process. First it prints "IO wait," "Waiting", or "Running," depending on whether the TTY process is currently in waiting for characters to be typed, waiting for some other reason, or running. Next, it prints the names of the top three frames on the stack, to show what is running. Then, it prints a line describing the percentage of time (since the last control-T) that has been spent running a program, swapping, garbage collecting, doing local disk I/O, etc. For example:
|
||
Running in TTWAITFORINPUT in TTBIN in TTYIN1
|
||
95% Util, 0% Swap, 4% GC
|
||
DELETE Clears typeahead in all processes.
|
||
The user can disable and/or redefine Interlisp interrupt characters, as well as define new interrupt characters. Interlisp-D is initialized with the following interrupt ÿÿ |