Instruction Format
All I/O instructions use the following SI format: OpCode B1 I 78 1516 1920 31
Bit positioIiS 8-15 of the instruction are ignored.
The content of the Bl field designates a register. The
sum obtained by the addition of the content of reg­
ister Bl and content of the Dl field identifies the
channel and the I/O device. This sum has the format:
Bit positions 0-7 are not part of the address. Bit
positions 8-20, which constitute the high-order portion
of the address, are ignored. Bit positions 21-23 of the
sum contain the channel address, while bit positions
24-31 identify the device on the channel and, on the
multiplexor channel, the subchannel. Instructionls The mnemonics, format, and operation codes of the I/O instructions follow. The table also indicates that
all I/O instructions cause program interruption when
they are encountered in the problem state, and that
all I/O instructions set the condition code.
NAME MNEMONIC TYPE EXCEPTION CODE Start 110 SIO SI, C M 9C
Test 110 TIO SI, C M 9D
Halt 110 HIO SI, C M 9E
Test Channel TCH SI, C M 9F NOTES C Condition code is set
M Privileged-operation exception
Programming Note
The instructions START I/O, TEST I/O, and HALT I/O may cause a csw to be stored. To prevent the con­
tents of the csw stored by the instruction from being
destroyed by an immediately following I/O interrup­
tion, all channels must be masked before issuing START I/O, TEST I/O, or HALT I/O and must remain
masked until the information in the csw provided by
the instruction has been acted upon or stored else­
where for later use.
92 Start I/O 5/0 51 9C 7 8 1516 1920 31
A write, read, read backward, control or sense opera­
tion is initiated at the addressed I/O device and sub­
channel. The instruction START I/O is executed only
when the CPU is in the supervisor state.
Bit positions 21-31 of the sum formed by the addi­
tion of the content of register Bl and the content of
the Dl field identify the channel, sub channel, and I/O device to which the instruction applies. The CAW at
location 72 contains the protection key for the sub­
channel and the address of the first ccw. The ccw so
designated specifies the operation to be performed,
the main-storage area to be used, and the action to
be taken when the operation is completed.
The I/O operation specified by START I/O is initiated
if the addressed I/O device and subchannel are avail­
able, the channel is available or is in the interruption­
pending state, and errors or exceptional conditions
have not been detected. When the addressed part of
the I/O system is in any other state or when the chan­
nel or device detect any error or exceptional condition
during exccution of the instruction, the I/O operation
is not initiated.
When any of the following conditions occurs, START I/O causes the status portion, bit positions 32-47, of
the csw at location 64 to be replaced by a new set of
status bits. The status bits pertain to the device ad­ dressed by the instruction. The contents of the other fields of the csw at location 64 are not changed.
1. An immediate operation was executed, and no
command chaining is taking place. An operation is
called immediate when the I/O device signals the
channel-end condition immediately on receipt of the
command code. The csw contains the channel-end bit
and any other indications provided by the channel or
the device. The busy bit is off. The I/O operation has
been initiated, but no information has been transferred
to or from the storage area designated by the ccw. No
interruption conditions are generated at the device or
snbchannel, and the sub channel is available for a
new I/O operation.
2. The I/O device contains a pending interruption
condition due to device end or attention, or the con-
trol unit contains a pending channel end or control
unit end for the addressed device. The csw unit­
status field contains the busy bit, identifies the inter­
ruption condition, and may contain other bits pro­
vided by the device or control unit. The interruption
condition is cleared. The channel-status field contains
zeros.
3. The I/O device or the control unit is executing a
previously initiated operation, or the control unit has
pending channel end or control unit end for a device
other than the one addressed. The csw unit-status
field contains the busy bit or, if the control unit is
busy, the busy and status-modifier bits. The channel­
status field contains zeros.
4. The I/O device or channel detected an equip­
ment or programming error during execution of the
instruction. The channel-end and busy bits are off,
unless the error was detected after the device was
selected and was found to be busy, in which case the
busy bit, as well as any bits indicating pending inter­
ruption conditions, are on. The interruption conditions
indicated in the csw have been cleared at the device.
The csw identifies the error condition. The I/O op­
eration has not been initiated. No interruption condi­
tions are generated at the I/O device or subchannel.
Resulting Condition Code:
o I/O operation initiated and channel proceed-
ing with its execution
1 csw stored
2 Channel or sub channel busy
3 Not operational Program Interruptions: Privileged operation.
Programming Note
When a programming error occurs and the addressed
device contains an interruption condition, with the
channel and subchannel in the available state, START I/O mayor may not clear the interruption condition,
depending on the type of error and the model. If the
instruction has caused the device to be interrogated,
as indicated by the presence of the busy bit in the
csw, the interruption condition has been cleared, and
the csw contains program check, as well as the status
from the device.
Test I/O rio 51
9D 78 1516 1920 31
The state of the addressed channel, subchannel, and
device is indicated by setting the condition code in
the psw and, under certain conditions, by storing the
csw. Pending interruption conditions may be cleared.
The instruction TEST I/O is executed only when the CPU is in the supervisor state.
Bit positions 21-31 of the sum formed by the addi­
tion of the content of register Bl and the content of
the Dl field identify the channel, subchannel, and I/O device to which the instruction applies.
When any of the following conditions is detected, TEST I/O causes the csw at location 64 to be stored.
The content of the csw pertains to the I/O device ad­
dressed by the instruction.
1. The subchannel contains a pending interruption
condition due to a terminated operation at the ad­
dressed device. The interruption condition is cleared.
The protection key, command address, and count
fields contain the final values for the I/O operation,
and the status may include other bits provided by
the channel and the device. The interruption condi­
tion in the subchannel is not cleared, and the csw is
not stored if the interruption condition is associated
with an operation on a device other than the one
addressed.
2. The I/O device contains a pending interruption
condition due to device end or attention, or the con­
trol unit contains a pending channel end or control
unit end for the addressed device. The csw unit-status
field identifies the interruption condition and may
contain other bits provided by the device or control
unit. The interruption condition is cleared. The busy
bit in the csw is off. The other fields of the csw con­
tain zeros.
3. The I/O device or the control unit is executing a
previously initiated operation or the control unit has
pending channel end or control unit end for a device
other than the one addressed. The csw unit-status
field contains the busy bit or, if the control unit is
busy, the busy and status-modifier bits. Other fields
of the csw contain zeros.
4. The I/O device or channel detected an equip­
ment error during execution of the instruction. The
csw identifies the error condition. No interruption
conditions are generated at the I/O device or the sub­
channel.
When TEST I/O is used to clear an interruption con­
dition from the subchannel and the channel has not
yet accepted the condition from the device, the in­
struction causes the device to be selected and the
interruption condition in the device to be reset. Dur­
ing certain I/O operations, some types of devices can­
not provide their current status in response to TEST I/O. The tape control unit, for example, is in such a
state when it has provided the channel-end condition
and is executing the backspace-file operation. When TEST I/O is issued to a control unit in such a state, the
unit-status field of the csw contains the busy and Input/Output Operations 93
Previous Page Next Page