mirror of
https://github.com/PDP-10/its.git
synced 2026-01-13 15:27:28 +00:00
Binary-only compiler and library, plus documentation and include files for compiling new programs.
49 lines
2.1 KiB
Plaintext
Executable File
49 lines
2.1 KiB
Plaintext
Executable File
The following library routines are available ON ITS ONLY:
|
|
|
|
Buffered I/O:
|
|
Input: there is a default prompt string (settable), which is
|
|
printed when ^L in typed; if the default prompt string is not set,
|
|
then any partial (buffered) output line is used; delete deletes a
|
|
character as usual; CR completes the reading of a buffered line.
|
|
Output: nothing happens until the buffer is full, a CR is
|
|
sent, or a tyo_flush is done.
|
|
|
|
char tyi (); reads one buffered character; CR is changed to LF
|
|
tyo (c) char c; outputs a buffered char; ^P changed to ^
|
|
followed by P; full buffer or CR causes buffer to be
|
|
sent
|
|
tyo_flush (); forces buffer to be sent
|
|
tyos (s) char *s; calls tyo repeatedly, changing CR to LF
|
|
setprompt (s) char *s; sets the default prompt string
|
|
|
|
Unbuffered I/O:
|
|
char utyi (); flushes the output buffer and reads a char;
|
|
no mapping or echoing performed
|
|
utyo (c) char c; flushes the output buffer and send the
|
|
char; no mapping done EXCEPT ^P changed to ^ followed
|
|
by P
|
|
spctty (c) char c; flushes the output buffer then sends
|
|
^P followed by the argument; for ITS display codes.
|
|
|
|
Interrupts:
|
|
^G and ^S are set to interrupt; they result in signals
|
|
of ctrlg_interrupt and ctrls_interrupt, respectively. To
|
|
associate a routine with them (one which does nothing is a good
|
|
way to ignore the interrupts) you do:
|
|
on (ctrlg_interrupt, f) (likewise for ^S)
|
|
where f is a function taking no arguments and returning no
|
|
results. The interrupt character will have been read at
|
|
interrupt level. If you want to handle TTY interrupts yourself,
|
|
you can do
|
|
on (ttyi_interrupt, fn) and fn will be called on a
|
|
tty input interrupt; ityic (tty_input_channel) will return
|
|
an interrupt char (-1 means it went away); tty_input_channel
|
|
is an int defined in one of the library routines. To set
|
|
which chars will interrupt, you can use:
|
|
ttyget (tty_input_channel, block)
|
|
and ttyset (tty_input_channel, block)
|
|
where block is an array of 4 ints; these 4 words are the
|
|
results and the arguments of the corresponding ITS .call's,
|
|
in the same order. Initially all chars activate, and ^G and ^S
|
|
interrupt.
|