TEST I/O, CLEAR I/O, HALT I/O, HALT DE­
VICE, and STORE CHANNEL ID are issued and
must remain disabled until the information in the
CSW provided by the instruction has been acted
upon or stored elsewhere for later use.
Clear l/O CLRIO [S] C 9DOl I B2 I D2 I o Either a TIO or CLRIO function is performed, de­
pending on the channel and the block-multiplexing
control: control register 0, bit 0. The TIO function is
performed when the CLRIO function is not imple­
mented by the channel or when the block­
multiplexing control bit is zero.
The TIO function is described in the definition of
the instruction TEST I/O. Bits 8··14 of the instruction are ignored. Bit posi­
tions 16-31 of the second-operand address identify
the channel, subchannel, and I/O device to which
the instruction applies.
The CLRIO function causes the current operation
with the addressed device to be discontinued and the
state of the operation at the time of the discontinua­
tion to be indicated in the stored CSW.
When the subchannel is available, interruption
pending with another device, or working with anoth­
er device, no channel action is taken, and condition
code ° is set. Channels not capable of determining
subchannel states while in the working state may
instead set condition code 2.
When the subchannel is either working with the
addressed device or in the interruption-pending state
with the addressed device, the CLRIO function
causes the channel to discontinue the operation with
the addressed device by storing the status of the
operation in the CSW and making the subchannel
available. When the channel is working with the
addressed device, the instruction causes the device to
be signaled to terminate the current operation. Some
channels may, instead, indicate busy and cause no
channel action.
When any of the following conditions occurs, the
CLRIO function causes the CSW at location 64 to
be stored. The contents of the entire CSW pertain to
the I/O device addressed by the instruction.
1. The channel is in the available or interruption­
pending state, and the subchannel contains an
interruption-pending condition for the ad­
dressed device or is working with the addressed
device. The protection-key, command-address,
and count fields describe the state of the opera­
tion at the time of the execution of the instruc­
tion.
2. The channel is working with the addressed
device. The protection-key, command-address,
and count fields describe the state of the opera­
tion at the time the instruction is executed.
(Some channels alternatively indicate busy un­
der this condition.)
3. The channel is working with a device other
than the one addressed, and the subchannel
contains an interruption-pending condition for l\lame Mnemonic Characteristics Code CLEAR I/O HALT DEVICE HALT I/O START I/O START I/O FAST RELEASE STORE CHANNEL ID TEST CHANNEL TEST I/O Explanation: C Condition code is set.
M Privilegl3d-operation exception. S S instruction format. CLRIO HDV HIO SIO SIOF STIDC TCH TIO Bits 8-14 of the operation code are ignored. + Bits 8-15 of the operation code are ignored.
Input/Output-Instruction Summary
198 System/370 Principles of Operation S C M 9001* S C M 9E01* S C M 9EOO* S C M 9COO* S C M 9C01 * S C M B203 S C M 9FOO+ S C M 9000*
the addressed device or is working with the
addressed device. The protection-key,
command-address, and count fields describe
the state of the operation at the time CLEAR I/O is executed. (Some channels alternatively
indicate busy under these conditions.)
4. The channel detected an equipment error dur­
ing the execution of the instruction. The CSW
identifies the error condition. The states of the
channel and the I/O operations in progress are
unpredictable. The limited channel logout, if
stored, indicates a sequence code of 000. When CLEAR I/O cannot be executed because
of a pending-logout condition that affects the opera­
tional capability of the channel, a full CSW is stored.
The fields in the CSW are all set to zeros, with the
exception of the logout-pending and channel-control­
check bits, which are set to ones. No channel logout
is associated with this status.
Program Exceptions:
Privileged operation
Resulting Condition Code: a No operation in progress for the
addressed device
1 CSW stored
2 Channel busy
3 Not operational
The condition code set by the CLRIO function
for all possible states of the I/O system is shown
graphically as follows. The condition code set when
CLEAR I/O causes the TIO function to be per­
formed is shown graphically in the definition of the
instruction TEST I/O. Channel A
Programming Note
Since some channels cause a condition code 2 to be
set when the instruction is received and the channel
is in the working state, it may be useful to issue a
halt instruction and then CLEAR I/O to the desired
address. Using HALT DEVICE will ensure that
condition code 2 is received on the CLEAR I/O only when the channel is working with a device oth­
er than the one addressed. U sing HALT I/O will
ensure that the current working state, if any, is termi­
nated without regard for the address.
Because of the inability of CLEAR I/O to termi­
nate operations on some channels when in the work­
ing state, the instruction is not a suitable substitute
for HALT I/O or HALT DEVICE.
The combination of HALT DEVICE followed by
CLEAR I/O can be used to clear out all activity on
a channel by executing the two instructions for all
device addresses on the channel.
Halt Device
HDV D2(B2) [S]
9E01 82 D2 0 16 20 31
The current I/O operation at the addressed I/O device is terminated. The subsequent state of the
sub channel depends on the type of channel. HALT
DEVICE is executed only when the CPU is in the
supervisor state. Bits 8-14 of the instruction are
ignored. Wf I Subchannel 1 A Ilf 1
1
#
1 WfIW# 1 N
o 0 1* 0 1* 3
A Ilf 1 1# I Wf I W#I N
o 0 1* 0 1* 3
A Ilf 1
1
#
t t tt t tt ttt A
W
N Available I nterruption pending If = I nterruption pending for a device other than
the one addressed 1#= Interruption pe.nding for the addressed device
Working Wf = Working with a device other than the one
addressed
W#= Working with the addressed device
Not operational CSW stored
Condition Codes Set by CLEAR I/O t In the WfAX, WflfX, and W#Nf.X states, a
condition code 0 or 2 may be set, depending on the channel. tt In the Wfl#X, W#N#X, and W#XX states, a
condition code 1 (with the CSW stored) or 2 may be set,
depending on the channel. ttt In the WfNX state, a condition code 2 or 3 may be set,
depending on the channel. Note: Underscored codes pertain to conditions that can occur only on the multiplexer channel. lnput/Output Operations 199
Previous Page Next Page