Command Code
The command code, bit positions0-7 of the CCW,
specifies to the channel and theI/O device the oper
ation to be performed. A detailed description of each
command appears under" Commands." The two low-order bits or, when these bits are 00, the four low-order bits of the command code identi
fy the operation to the channel. The channel distin
guishes among the following four operations:Output forward (write, control)
Input forward (read, sense)
Input backward (read backward)
Branching (transfer in channel)
The channel ignores the high-order bits of the
command code.
Commands that initiateI/O operations (write,
read, read backward, control, and sense) cause all
eight bitsiQf the command code to be transfened to
theI/O device. In these command codes, the high
order bit positions contain modifier bits. The modifi
er bits specify to the device how the command is to
be executed. They may cause, for example, the de
vice to compare data received during a write opera
tion with data previously recorded, and they may
specifysuch conditions as recording density and
parity. For the control command, the modifer bits
may contain the order code specifying the control
function to be performed. The meaning of the modi
fier bits depends on the type ofI/O device and is
specified in theSL or SRL publication for the de
vice.
The command -code assignment is listed in the
following table. The symbol x indicates that the bit
position isignored; m identifies a modifier bit. Code Command xxxx 0000 Invalid mmmm 0100 Sense
xxx x1000 Transfer in Channel mmmm 1100 Read Backward
mmmmmm01 Write
mmmmmm10 Read
mrnmm mm11Control Whenever the channel detects an invalid com
mand code during the initiation of acommand, the
program-check condition is generated. When the
first CCW designated by the CAW contains an in
valid command code, the status portion of theCSW with the program-check indication is stored during
execution ofSTART I/O or, if being executed as START I/O, START I/O FAST RELEASE. When
the invalid code is detected during command chain
ing or subsequent to the execution ofST ART I/O FAST RELEASE, the new operation is not initiated,
and an interruption condition is generated. The com-
212System/370 Principles of Operation manq code is ignored during data chaining, unless it
specifies transfer in channel.
Designation of StorageArea Note: For a description of the storage area associat
ed with a CCW when channel indirect data address
ing is invoked, see "Channel Indirect Data Address-
." .' mg.
The main-storage area associated with anI/O operation is defined by one or more CCWs. A CCW
defines an area by specifying the address of the first
eight-bit byte to be transferred and the number of
consecutive eight-bit bytes contained in the area.
The address of the first byte appears in the data
address field of the CCW. The number of bytes con
tained in the storage area is specified in the count
field.
In write, read, control, and sense operations stor
age locations are used in ascending order of address
es. As information is transferred to or from main
storage, the address from the address field is incre
mented, and the count from the count field is decre
mented. The read-backward operation places data in
storage in a descending order of addresses, and both
the count and the address are decremented. When
the count reaches zero, the storage area defined by
the CCW is exhausted.
Any main-storage location available to the chan
nel can be used in the transfer of data to or from anI/O device, provided that the location is not protect
ed against the type of reference. Similarly, the
CCWs can be located in anypart of available main
storage, provided the location is not protected
against a fetch-type reference. When the channel
attempts to refer to a protected location, the protec
tion check condition is generated, and the device is
signaled to terminate the operation.
In the event the channel refers to a location not
provided in the system, the program-check condition
is generated. When the first CCW designated by the
CAW is at a nonexistent location, theI/O operation
is not initiated, and the status portion of theCSW with the program-check indication is stored during
the execution ofSTART I/O or ST ART I/O FAST RELEASE being executed as START I/O. Invalid
data addresses, as well as any invalid CCW address
es detected on chaining or subsequent to the execut
ing ofSTART I/O FAST RELEASE, are indicated
to the program with the interruption conditions at
the conclusion of the operation or chain of opera
tions.
During an output operation, the channel may
fetch data from the main storage before the time theI/O device requests the data. Any number of bytes
The command code, bit positions
specifies to the channel and the
ation to be performed. A detailed description of each
command appears under" Commands.
fy the operation to the channel. The channel distin
guishes among the following four operations:
Input forward (read, sense)
Input backward (read backward)
Branching (transfer in channel)
The channel ignores the high-order bits of the
command code.
Commands that initiate
read, read backward, control, and sense) cause all
eight bits
the
order bit positions contain modifier bits. The modifi
er bits specify to the device how the command is to
be executed. They may cause, for example, the de
vice to compare data received during a write opera
tion with data previously recorded, and they may
specify
parity. For the control command, the modifer bits
may contain the order code specifying the control
function to be performed. The meaning of the modi
fier bits depends on the type of
specified in the
vice.
The command -code assignment is listed in the
following table. The symbol x indicates that the bit
position is
xxx x
mmmm
mmmm
mrnmm mm11
mand code during the initiation of a
program-check condition is generated. When the
first CCW designated by the CAW contains an in
valid command code, the status portion of the
execution of
the invalid code is detected during command chain
ing or subsequent to the execution of
and an interruption condition is generated. The com-
212
specifies transfer in channel.
Designation of Storage
ed with a CCW when channel indirect data address
ing is invoked, see "Channel Indirect Data Address-
.
The main-storage area associated with an
defines an area by specifying the address of the first
eight-bit byte to be transferred and the number of
consecutive eight-bit bytes contained in the area.
The address of the first byte appears in the data
address field of the CCW. The number of bytes con
tained in the storage area is specified in the count
field.
In write, read, control, and sense operations stor
age locations are used in ascending order of address
es. As information is transferred to or from main
storage, the address from the address field is incre
mented, and the count from the count field is decre
mented. The read-backward operation places data in
storage in a descending order of addresses, and both
the count and the address are decremented. When
the count reaches zero, the storage area defined by
the CCW is exhausted.
Any main-storage location available to the chan
nel can be used in the transfer of data to or from an
ed against the type of reference. Similarly, the
CCWs can be located in any
storage, provided the location is not protected
against a fetch-type reference. When the channel
attempts to refer to a protected location, the protec
tion check condition is generated, and the device is
signaled to terminate the operation.
In the event the channel refers to a location not
provided in the system, the program-check condition
is generated. When the first CCW designated by the
CAW is at a nonexistent location, the
is not initiated, and the status portion of the
the execution of
data addresses, as well as any invalid CCW address
es detected on chaining or subsequent to the execut
ing of
to the program with the interruption conditions at
the conclusion of the operation or chain of opera
tions.
During an output operation, the channel may
fetch data from the main storage before the time the