Chapter
1
I
System
Calls
RC IERSI
I1
I
eT
SOAPSSSS
sR Reserved D
F
W
E C N C C
L E CLUOI
V
LKLTN
Ioctl
110
Control
for
Devices
Function Call
44H
Performs the following functions:
(1)
gets or sets device informa-
tion associated with an open handle,
(2)
sends a control string
to
a device handle or device, or
(3)
receives
a
control string from a
device handle or device.
The following values are allowed for the function code
passed in AL:
0
-
Get device information (returned in DX).
1
-
Set device information
(as
determined by DX).
2
-
Read the number of bytes indicated in CX from
the device control channel into buffer pointed to
by DS:DX. (BX
=
file handle.)
3
-
Write the number of bytes indicated in CX to
the device control channel from the buffer
pointed to by DS:DX. (BX
=
file handle.)
4
-
Same
as
2,
but use the drive number in BL.
5
-
Same
as
3,
but use the drive number in BL.
6
-
Get input status.
7
-
Get output status.
You can use this system call to get information about de-
vice channels. In addition, you can make calls on regular
files using function values
0,
6,
and
7.
Function values
other than these return an “Invalid function” error.
Calls
AL
=
0
and
AL
=
1:
The bits of DX are defined
as
follows. Note that the up-
per byte must be zero on
a
set
call (A
=
1).
1514131211109
8
7
6
5
4
3
2
10
116