I/O Machine Instructions

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.


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]


  1. I DO NOT do Hercules
    Where can i find the missing macros for the 370 era Machine
    for the following macros:

    missing macro =OPEN
    missing macro =PUT
    missing macro =CLOSE
    missing macro =DCB
    missing macro =SIO
    missing macro =TIO

    • OPEN, PUT, CLOSE, and DCB are all in SYS1.MACLIB which is available from MVS 3.8 I assembled all the code here on MVS 3.8 running under the Hercules emulator. SIO and TIO are assembler instructions (Start I/O and Test I/O) and are built in to the MVS assembler (IFOX00).

    • I should be fairly easy to create macros for SIO and TIO or you could just code using DC X’…’. I assume the assembler you are using does not support these instructions since they are older 370 specific. The assembler on Hercules/MVS 3.8 supports them because they were state of the art when that assembler was written….

  2. AZ390E ERRSUM missing macro =OPEN
    AZ390E ERRSUM missing macro =PUT
    AZ390E ERRSUM missing macro =CLOSE
    AZ390E ERRSUM missing macro =DCB
    AZ390E ERRSUM missing macro =SIO
    AZ390E ERRSUM missing macro =TIO

    SO, this what z390 can’t find, if i dont do Hercules where do i get the macro libs for them

    • OPEN, CLOSE, PUT, and DCB are part of MVS. One source is MVS 3.8 which only runs on Hercules. SIO and TIO are 370 assembler instructions but are probably not implemented in current assemblers since they only apply to 370 mode of operation.

Leave a Reply

Your email address will not be published. Required fields are marked *