.th ioFunction IIa 4/21/86
.sh NAME
Input/Output device functions
.sh DESCRIPTION
These Input/Output functions are recognized by the KSOS Kernel.  Functions are
used as arguments to a K_device_function(II) Kernel call.
.s3
.lp 20 15
.In "READ"
Read.  (same as K_read_block (II)) Valid inP and open for read required.
.lp 20 15
.In "WRITE"
Write.  (same as K_write_block (II)) Valid outP and open for write
required.
.lp 20 15
.In "SETEOMCHARS"
Sets the set of characters considered to end a single input request for
a terminal.
.lp 20 15
.In "REWIND"
Rewind (tape only).  Open for write required.
.lp 20 15
.In "UNLOAD"
Unload removable medium.  Rewinds tapes to off-line condition, stops
disk drives where hardware permits.  Open for write required.
.lp 20 15
.In "WRITEMARK"
Write tape mark.  Open for write required.
.lp 20 15
.In "SETDENSITY"
Set tape writing density.  Open for write required.  The density (800
or 1600) is placed in the blockNo argument.
.lp 20 15
.In "SETTERMMODES1"
Set raw mode, echo, etc.  for terminals.  Open for read and write
required.
.lp 20 15
.In "SETTERMMODES2"
Set parity, baud rate, etc.  Open for read and write required, and the
caller must have the privilege to set these security-related modes.
[Requires privSetComm.]
.lp 20 15
.In "GETTERMMODES"
Get terminal modes.  Open for read and valid inP required.
.lp 20 15
.In "SETFILESIZE"
Set byte size of file.  Provides a way to store the size of the file in
bytes, and a way to determine the number of bytes used in the last
block of the file.  (bytes DIV 512 = blocks, remainder is number of
bytes used in the last block) This function does not allocate or
release file space.  Open for write required.
.lp 20 15
.In "ERASEFILE"
Release all blocks allocated to the file.  Open for write required.
.lp 20 15
.In "VOLUMEVALID"
Mark removable medium as usable.  Open for read and write required.
[Requires privImmigrate.]
.lp 20 15
.In "VOLUMEINVALID"
Mark removable medium as unusable.  Where hardware permits, performs an
UNLOAD.  Open for read and write required.
.lp 20 15
.In "INPUTWAIT"
This function is used to wait until input is available from a terminal.
It is only valid as an asynchronous request, and only for a terminal.
When an INPUTWAIT request completes, a following K_read_block request
for input from the terminal will return immediately with input data.
Thus, the effect of asynchronous terminal reads (which are not
supported) is available by performing an INPUTWAIT to wait until input
is available, and then when the asynchronous completion message is
received, performing a K_read_block request.  Open for read is required.
.lp 20 15
.In "SETPATH"
Connect physical terminal to a different logical terminal path.  The
desired path number is placed in the "blockNo" argument.  Open for read
and write required.  [Requires privSetPath.]
.i0
.sh "SEE ALSO"
K_device_function(II),
K_read_block(II),
K_write_block(II)
