Check
Channel
Instruction
Input/Output
Operation
• The
status
of
an
input/output
channel can be tested by executing a
Check Channel instruction. The Check Channel instruction is a privileged
operation
and
can only be executed
if
the mode
bit
(bit
position 15 of
the
Interrupt
Status
register
for
the
current
state)
is
set
to
o.
This instruc-
tion is executed in the normal mode. Continuation
of
program
execution
is delayed until the instruction is terminated.
Only the channel number
must
be specified in
the
instruction. Because
the
Channel Address Word is not
referred
to by.
the
Check Channel instruc-
tion,
the
Channel Address Word,
and
Channel Block Address (CBA)
and a Channel Command Word
are
not required.
Upon execution of a
Check Channel instruction,
the
following events
occur (see figure
8).
Block 1 •
If
the privileged mode
bit
(bit
position 15
of
the
Interrupt
Status
register)
for
the
current
state
is not set to
0,
the
privileged operation
bit
is set in the
Interrupt
Flag
register
and
interrupt
occurs
if
permitted.
Block 2 •
If
the
specified channel is a selector channel
that
is
not
available on
the system, the condition code is set to
3,
the Check Channel instruction
is terminated
and
program
control is
transferred
to
the
next instruction.
Block 3 •
If
the
specified channel is a selector channel
that
is busy
or
has
a
ter-
mination
interrupt
pending;
or
if
the specified channel is the multiplexor
that
is operating in
the
burst
mode, the condition code is
set
to
2,
the
Check Channel instruction is terminated and
program
control is
trans-
ferred
to the next instruction.
Block
4-
•
If
the specified channel is a selector channel
that
has
an
external device
request
interrupt
pending, the condition code is set to
1,
the
Check Channel
instruction is terminated and
program
control is
transferred
to
the
next instruction.
Block 5 •
If
the specified channel is a selector channel
that
is
not
busy
and
has
no
interrupts
pending;
or
is
the
multiplexor channel
that
is not
operating
in
the
burst
mode,
the
condition code is
set
to
0,
the
Check Channel
instruction is terminated
and
program
control is
transferred
to
the
next
instruction.
INPUT
/OUTPUT
STATUS
INDICATORS
Notes on Check Channel instruction:
1. The channel
status
byte and the
standard
device byte
are
never
stored by this instruction.
2.
The Channel Address Word ( CAW), Channel Block Address (CBA)
and
the
Channel Command Word (CCW)
are
not used by
this
instruction.
• Three levels of
status
information
are
available to
the
program
to
control
input/output
operation. The first
pertains
to
the
setting
of
the
condition code when
an
input/output
instruction is issued. The second level
provides more detailed information by
storing
the
channel
status
byte .and
the
standard
device byte in the appropriate
input/output
channel registers
in
scrflotch-pad memory. The
third
level of
status
information is generated
60