{Begin SubSec Interrupt Characters} {Title Interrupt Characters} {Text {index *PRIMARY* Interrupt characters} 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 {PageRef Tag ProcessInterrupts}. {Begin LabeledList interrupt characters currently enabled in Interlisp-D} {Name Control-B{index *PRIMARY* Control-B (Interrupt Character)}} {Text Causes a break within the mouse process (if busy) or the TTY process. Use control-G to break a particular process.} {Name Control-D{index *PRIMARY* Control-D (Interrupt Character)}} {Text Aborts the mouse process (if busy) or the TTY process, and unwinds its stack to the top level. Calls {fn RESET} ({PageRef Fn RESET}).} {Name Control-E{index *PRIMARY* Control-E (Interrupt Character)}} {Text Aborts the mouse process (if busy) or the TTY process, and unwinds its stack to the last {fn ERRORSET}. Calls {fn ERROR!} ({PageRef Fn ERROR!}).} {Name Control-G{index *PRIMARY* Control-G (Interrupt Character)}} {Text 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.} {Name Control-P{index *PRIMARY* Control-P (Interrupt Character)}} {Text Changes the {fn PRINTLEVEL} setting of {fn PRINTLEVEL} (see {PageRef Fn PRINTLEVEL}) in the TTY process. This allows the {fn PRINTLEVEL} setting to be changed dynamically, even while Interlisp is printing. When control-P is typed, Interlisp rings the bell, prints "{lisp set printlevel to:}," and waits for the user to type a series of digits. Input is terminated by a non-digit, after which the program continues. If the input is terminated by a period or an exclamation point, the {fn CAR} printlevel is immediately set to this number, and printing continues with the (possibly new) printlevel. If the print routine is currently deeper than the new level, all unfinished lists above that level will be terminated by "{lisp --})". Thus, if a circular or long list of atoms, is being printed out, typing "control-P0." will cause the list to be terminated immediately. If the input is terminated by a comma, another number may be typed terminated by a period or exclamation point. The {fn CAR} printlevel will then be set to the first number, the {fn CDR} printlevel to the second number. In either case, if a period is used to terminate the printlevel setting, the printlevel will be returned to its previous setting after the current printout has finished. If an exclamation point is used, the change is permanent and the printlevel is not restored (until it is changed again). } {Name Control-T{index *PRIMARY* Control-T (Interrupt Character)}} {Text 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: {lispcode Running in TTWAITFORINPUT in TTBIN in TTYIN1 95% Util, 0% Swap, 4% GC} } {Name DELETE{index *PRIMARY* DELETE (Interrupt Character)}} {Text Clears typeahead in all processes. } {End LabeledList interrupt characters currently enabled in Interlisp-D} {note add something about SHIFT-SHIFT-CTRL-DEL emergency call to RAID --Ron} {index *PRIMARY* User interrupt characters} 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 channels: {lisp RESET}{index *PRIMARY* RESET (Interrupt Channel)} (control-D), {lisp ERROR}{index *PRIMARY* ERROR (Interrupt Channel)} (control-E), {lisp BREAK}{index *PRIMARY* BREAK (Interrupt Channel)} (control-B), {lisp HELP}{index *PRIMARY* HELP (Interrupt Channel)} (control-G), {lisp PRINTLEVEL}{index *PRIMARY* PRINTLEVEL (Interrupt Channel)} (control-P), {lisp RUBOUT}{index *PRIMARY* RUBOUT (Interrupt Channel)} (DELETE), and {lisp RAID}{index *PRIMARY* RAID (Interrupt Channel)}. Each of these channels independently can be disabled, or have a new interrupt character assigned to it via the function {fn INTERRUPTCHAR} described below. In addition, the user can enable new interrupt channels, and associate with each channel an interrupt character and an expression to be evaluated when that character is typed. {FnDef {FnName INTERRUPTCHAR} {FnArgs CHAR TYP/FORM HARDFLG {anonarg}} {Text Defines {arg CHAR} as an interrupt character. If {arg CHAR} was previously defined as an interrupt character, that interpretation is disabled. {arg CHAR} is either a character or a character code ({PageRef Term Character Codes}). Note that full sixteen-bit {index NS Characters}NS characters can be specified as interrupt characters (see {PageRef Term NS Characters}). {arg CHAR} can also be a value returned from {fn INTERRUPTCHAR}, as described below. If {arg TYP/FORM}={lisp NIL}, {arg CHAR} is disabled. If {arg TYP/FORM}={lisp T}, the current state of {arg CHAR} is returned without changing or disabling it. If {arg TYP/FORM} is one of the literal atoms {lisp RESET}, {lisp ERROR}, {lisp BREAK}, {lisp HELP}, {lisp PRINTLEVEL}, {lisp RUBOUT}, or {lisp RAID}, then {fn INTERRUPTCHAR} assigns {arg CHAR} to the indicated Interlisp interrupt channel, (reenabling the channel if previously disabled). If {arg TYP/FORM} is any other literal atom, {arg CHAR} is enabled as an interrupt character that when typed causes the atom {arg TYP/FORM} to be {it immediately} set to {lisp T}. If {arg TYP/FORM} is a list, {arg CHAR} is enabled as a user interrupt character, and {arg TYP/FORM} is the form that is evaluated when {arg CHAR} is typed. The interrupt will be hard if {arg HARDFLG}={lisp T}, otherwise soft. {lisp (INTERRUPTCHAR T)} restores all Interlisp channels to their original state, and disables all user interrupts. {arg HARDFLG} determines what process the interrupt should run in. If {arg HARDFLG} is {lisp NIL}, the interrupt will run in the TTY process, which is the process currently receiving keyboard input. If {arg HARDFLG} is {lisp T}, the interrupt will occur in whichever process happens to be running. If {arg HARDFLG} is {lisp MOUSE}, the interrupt will happen in the mouse process, if the mouse is busy, otherwise in the TTY process. {fn INTERRUPTCHAR} returns a value which, when given as the {arg CHAR} argument to {fn INTERRUPTCHAR}, will restore things as they were before the call to {fn INTERRUPTCHAR}. Therefore, {fn INTERRUPTCHAR} can be used in conjunction with {fn RESETFORM} or {fn RESETLST} ({PageRef Fn RESETFORM}). {fn INTERRUPTCHAR} is undoable. }} {FnDef {Name RESET.INTERRUPTS} {Args PERMITTEDINTERRUPTS SAVECURRENT?} {text {arg PERMITTEDINTERRUPTS} is a list of interrupt character settings to be performed, each of the form {lisp ({arg CHAR} {arg TYP/FORM} {arg HARDFLG})}. The effect of {fn RESET.INTERRUPTS} is as if {lisp (INTERRUPTCHAR {arg CHAR} {arg TYP/FORM} {arg HARDFLG})} were performed for each item on {arg PERMITTEDINTERRUPTS}, and {lisp (INTERRUPTCHAR {arg OTHERCHAR} NIL)} were performed on every other existing interrupt character. If {arg SAVECURRENT?} is non-{lisp NIL}, then {fn RESET.INTERRUPTS} returns the current state of the interrupts in a form that could be passed to {fn RESET.INTERRUPTS}, otherwise it returns {lisp NIL}. This can be used with a {fn RESET.INTERRUPTS} that appears in a {fn RESETFORM}, so that the list is built at "entry", but not upon "exit". }} {FnDef {Name LISPINTERRUPTS} {Args } {Text Returns the initial default interrupt character settings for Interlisp-D, as a list that {fn RESET.INTERRUPTS} would accept. }} {FnDef {FnName INTERRUPTABLE} {FnArgs FLAG} {Text if {arg FLAG}={lisp NIL}, turns interrupts off. If {arg FLAG}={lisp T}, turns interrupts on. Value is previous setting. {fn INTERRUPTABLE} compiles open. Any interrupt character typed while interrupts are off is treated the same as any other character, i.e. placed in the input buffer, and will not cause an interrupt when interrupts are turned back on. }} }{End SubSec Interrupt Characters} GACHA ?1(DEFAULTFONT 1 (GACHA 10) (GACHA 8) (TERMINAL 8)) ?1(DEFAULTFONT 1 (GACHA 10) (GACHA 8) (TERMINAL 8)) ·{ ñ$4zº