Chain-Command Flag: Bit 33, when one and when
the chain-data flag is off, specifics chaining of com­
mands. It causes the operation specified by the com­
mand code in the next ccw to be initiated on normal
completion of the current operation. Whcn bit 33 is
zero or when the CD flag is one, the next ccw docs not
specify a new command.
Suppress-Length-Indication Flag: Bit 34 controls
whether an incorrect length condition is to be indi­
cated to the program. When this bit is one and the CD
flag is off in the last ccw used, the incorrect-length in­
dication is suppressed. If the ccw has the cc flag on,
command chaining takes place. Absence of the SLI flag or the presence of the CD flag causes the program to
be notified of the incorrect-length condition when it
occurs. Skip Flag: Bit 35, when one, specifies suppression
of transfer of information to storage during a read,
read-backward, or sense operation. When bit 35 is
zero, normal transfer of data takes place.
Program-Controlled-Interruption Flag: Bit 36,
when one, causes the channel to generate an inter­
ruption condition upon fetching the ccw. When bit 36
is zero, normal operation takes place.
Count: Bits 48-63 specify the number of eight-bit
byte locations in the storage area designated by the
ccw.
Bit positions 37-39 of every ccw other than one spe­
cifying transfer in channel must contain zeros. Viola­ tion of this restriction generates the program-check
condition. When the first ccw designated by the CAW
does not contain the required zeros, thc I/O operation
is not initiated, and the status portion of the csw with
the program-check indication is stored during execu­
tion of START I/O. Detection of this condition during
data chaining causes the I/O device to be signaled to
terminate the operation. When the absence of these
zeros is detected during command chaining, the new
operation is not initiated, and no interruption condition
is generated.
The content of bit positions 40-47 of the ccw is
ignored. Command Code The command code in the ccw specifies to the chan­
nel and the I/O device the operation to be performed.
The two low-order bits or, when these bits are 00, the four low-order bits of the command code iden­
tify the operation to the channel. The channel dis­
tinguishes 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 com­
mand code.
Commands that initiate I/O operations (write, read,
read backward, control, and sense) cause all eight bits
of the command code to be transferred to the I/O de­
vice. In these command codcs, the high-order bit po­
sitions contain modifier bits. The modifier bits specify to the device how the command is to he executed.
They may cause, for example, the device to compare
data rcceived during a write operation with data pre­
viously recorded, and they may specify such con­
ditions as recording density and parity. For the control
command, the modifier bits may contain thc order
code specifying the control function to be performed.
The meaning of the modifier bits depends on the type
of I/O device and is specified in the SRL publication
for the device.
The command code assignment is listed in the fo]­
lowing table. The symhol x indicates that the bit po­
sition is ignored; m identifies a modifier hit. CODE X X X X 0000 MMMM 0100 x x x x 1000 MMMM 1100 MMMMMMOI MMMMMM10
MMMMMM11 COMMAND Invalid
Sense
Transfer in channel Read hackward \Vritc
Read
Control
Whenever the channel detects an invalid command
code during the initiation of a command, the pro­
gram-check condition is generated. When the first ccw
designated by the CAW contains an invalid command
code, the status portion of the csw with the program­
check indication is stored during execution of START I/O. When the invalid code is detected during com­
mand chaining, the new operation is not initiated, and
an interruption condition is generated. The command
code is ignored during -data chaining, unless it speci­
fies transfer in channel.
Definition of Storage Area
The main-storage area associated with an I/O oper­
ation is defined by ccw's. A ccw defines an area by
specifying the address of the first eight-bit hyte to be
transferred and the number of consecutive eight-bit
bytes contained in the area. The address of the first
hyte appears in the data-address field of the ccw. The
number of bytes contained in the storage area is spe­
cified in the count field.
In write, read, control, and sense operations storage
locations are used in ascending order of addresses. As
information is transferred to or from main storage, the
content of the address field is incremented, and the
content of the count field is decrementcd .. The read­
backward operation causes data to be placed in stor- Input/Output Operations 97
age in a descending order of addresses, and both the
count and the address are stepped down. When the
count in any operation reaches zero, the storage area
defined by the ccw is exhausted.
Any main-storage location provided in the system
can be used to transfer data to or from an I/O device,
provided that during an input operation the location
is not protected. Similarly, the ccw's can be specified
in any part of available main storage. When the chan­
nel attempts to store data at a protected location, the
protection-check condition is generated, and the de­
vice is signaled to terminate the operation.
When the channel refers to a location not provided
in the system, the program-check condition is gener­
ated. When this condition occurs because the first ccw
designated by the CAW contains a data address ex­
ceeding the addressing capacity of the model, the I/O operation is not initiated, and the status portion of the
csw with the program-check indication is stored dur­
ing execution of START I/O. Invalid data addresses de­
tected after initiation of the opcration or detection of
an invalid ccw address during chaining is indicated
to the program with the interruption conditions at the
termination of the operation or chain of operations.
During an output operation, thc channel may fetch
data from main storage ahead of the time the I/O de­
vice requests the data. As many as 16 bytes may be
prefetehed and buffered. Similarly, on data chaining
during an output operation, the channel may fetch the
new ccw when as many as 16 bytes remain to be
transferred under the control of the current ccw.
When the I/O operation uses data and ccw's from 10- ations near the end of the available storage, such pre­
fetching may cause the channel to refer to locations
that do not exist. Invalid addresses detected during
prefetching of data or ccw's do not affect the execu­
tion of the operation and do not cause error indica­
tions until the I/O operation actually attempts to use
the information. If the operation is terminated by the I/O device or by HALT I/O before the invalid informa­
tion is needed, the condition is not brought to the
attention of the program. Storage addresses do not wrap around to location 0 unless the system has the maximum addressable stor­
age (16,777,216 bytes). When the maximum address­
able storage is provided, location 0 follows location
16,777,215 and, on reading backward, location
16,777,215 follows location O. The count field in the ccw can specify any number
of bytes up to 65,535. Except for a ccw specifying
transfer in channel, it may not contain the value zero.
Whenever the count field in the ccw initially contains
a zero, the program-check condition is generated.
When this occurs in the first ccw designated by the
98
CAW, the operation is not initiated, and the status por­
tion of the csw with the program-check indication is
stored during execution of START I/O. When a count
of zero is detected during data chaining, the I/O de­
vice is signaled to terminate the operation. Detection
of a count of zero during command chaining sup­
presses initiation of the new operation and generates
an interruption condition. Chaining When the channel has performed the transfer of in­
formation specified by a ccw, it can continue the ac­
tivity initiated by START I/O by fetching a new ccw.
The fetching of a new ccw upon the exhaustion of the
current ccw is called chaining and the ccw's belonging
to such a sequence are said to be chained.
Chaining takes place only between ccw's located
in successive double-word locations in storage. It pro­
ceeds in an ascending order of addresses; that is, the
address of the new ccw is obtained by adding eight
to the address of the current ccw. Two chains of
ccw's located in noncontiguous storage areas can be
coupled for chaining purposes by a transfer in chan­
nel command. All ccw's in a chain apply to the I/O device specified in the original START I/O. Two types of chaining are provided: chaining of
data and chaining of commands. Chaining is con­
trolled by the chain-data (CD) and chain-command
(cc) flags in the ccw. These flags specify the action
to be taken by the channel upon the exhaustion of
the current ccw. The following code is used:
CD CC ACTION o 0 No chaining. The current CCW is the last.
o 1 Command chaining
1 0 Data chaining
1 1 Data chaining
The specification of chaining is effectively propa­
gated through a transfer in channel command. When
in the process of chaining a transfer-in-channel com­
mand is fetched, the ccw designated by the transfer
in channel is used for the type of chaining specified
in the ccw preceding the transfer in channel.
The CD and cc flags are ignored in the transfer-in­
channel command.
Data Chaining
During data chaining, the new ccw fetched by the
channel defines a new storage area for the original I/O operation. Execution of the operation at the I/O device
is not affected. Data chaining occurs only when all data
designated by the current ccw have been transferred
to or from the device and causes the operation to con­
tinue, using the storage area designated by the new
Previous Page Next Page