Chapter
1
I
System Calls
ISDEV
=
1
if this channel is a device.
=
0
if this channel is a disk file (bits 8-15
=
0
in this case)
If ISDEV
=
1:
EOF
=
0
if end of file on input.
RAW
=
1
if this device is in Raw mode (literal
mode with no interpretation given to
characters).
=
0
if this device
is
cooked (normal mode
where the device interprets the characters).
SPECL
=
1
if this device is special.
ISCLK
=
1
if this device is the clock device.
ISNUL
=
1
if this device is the null device.
ISCOT
=
1
if this device
is
the console output.
ISCIN
=
1
if this device
is
the console input.
CTRL
=
0
if this device cannot process control
strings via calls AL
=
2
and AL
=
3.
CTRL
=
1
if this device can process control strings
via calls AL
=
2
and AL
=
3. Note that
the CTRL bit cannot be set by the Ioctl
system call.
If ISDEV
=
0:
EOF
=
0
if channel has been written.
Bits 0-5 are the block device number for
the channel
(0
=
A,
1
=
B,
etc.).
Bits
4,
8-13,
and 15 are reserved and should not be
altered.
Calls
AL
=
2,
AL
=
3,
AL
=
4,
and
AL
=
5:
These
4
calls allow arbitrary control strings to be sent or
received from a device. The call syntax is the same as
for the read and write calls, except for calls AL
=
4
and
AL
=
5
that pass
a
drive number in BL instead of a
handle in
BX.
An “Invalid function” error
is
returned if the CTRL bit is
zero. An “Access denied” error
is
returned by calls AL
=
4
and AL
=
5
if the drive number is invalid.
117