There are several machine instructions dedicated to performing I/O operations.  These include Start I/O (SIO), Start I/O Fast Release (SIOF), Test I/O (TIO), Clear I/O (CLRIO), Halt I/O (HIO), Halt Device (HDV), Store Channel ID (STIDC), and Test Channel (TCH).  All I/O instructions are privileged and can only be executed in supervisor state.

Each of these instructions has a single operand in the D2(B2) format where D2 is a displacement value and B2 is a register (0-15).  The operand does not refer to a storage address but instead bits 16-31 of the address value are used to identify a channel/device address for the instruction.

If a register of zero is specified then only the contents of the displacement value are used to specify the device address.

Examples

SIO     X’580’               * Start I/O on device 580

 

LA       1,X’580’

SIO     0(1)                 * Start I/O on device 580

 

LA       1,X’580′

SIO     1(1)                  * Start I/O on device 581

 

Start I/O (SIO)

An I/O operation (write, read, read-backward, control or sense) operation is initiated on the device with the specified channel and device address.  The Channel Address Word (CAW) at storage location 72 must be set prior to the SIO being issued.  The CAW contains the protection key for the channel (in bits 0-3) and the address of the first CCW (in bits 8-31).  A condition code is set to indicate the status of the SIO request.

0 – I/O operation initiated and channel is processing the channel program

1 – CSW stored

2 – Channel or subchannel busy

3 – Not operational

 

Test I/O (TIO)

Returns the status of the channel, subchannel and device by setting the condition code.

0 – Available

1 – CSW Stored

2 – Channel or subchannel busy

3 – Not operational

 

[Next – IPL Process]