Cycle stealing I/O controller with programmable offline mode of operation4451884Abstract A dual mode microprocessor acts either as a front-end IO controller processor relative to a primary host processor and device or as a secondary data processor having independent storage, processing and IO capabilities. Host software prepares a list of device control block (DCB) arrays, which contain primary commands interpretable by the microprocessor so as to evoke these modes. Each DCB contains a chaining bit permitting its interpretation sequence to be chained (or not chained) to another DCB sequence, and a mode bit defining either a high speed DI/DO (HS) mode of operation or a programmable offline (PO) mode. In HS mode the microprocessor conditions associated adapters to transfer a specified amount of data between the host memory and device, performing this transfer in an autonomous manner, i.e., without assistance from either processor. In PO mode the microprocessor directs associated elements to perform one or more programs of operations defined by secondary commands contained in a command list which is transferred to the microprocessor's memory by special PO mode "LOAD" type DCB's, and interpreted in response to special PO mode type "START" DCB's. A list transferred by one LOAD DCB may be repeatedly accessed at various positions by several START DCB's. The architecture of the command list includes commands which permit the microprocessor to exchange data with the host and/or a device, perform arithmetic operations on data, perform bit and byte manipulative operations on data, and directly control the device interface. Claims It is claimed: Description CROSS REFERENCE TO RELATED PATENT APPLICATIONS
______________________________________
Bit 0 Chaining flag. When this bit is a 1, the
attachment performs a chaining procedure.
The attachment completes the current
operation, but does not send an interrupt
request to the host processor. Instead,
the attachment fetches the next DCB in the
chain and performs the next operation.
(DCB word 5 indicates the location of the
next DCB). Chaining continues until the
attachment fetches a DCB that has a chaining
flag set to 0, thus indicating the last
operation in the chain.
If the suppress exception bit (bit 4) is a
1, a residual status block (RSB) is stored
for each operation in the chain, unless an
exception interrupt is reported. An excep-
tion interrupt also terminates a chain.
(Refer to the explanation of bit 4.)
Bit 1 Program-controlled interrupt. When this
bit is a 1, a program-controlled interrupt
is posted upon completion of the DCB
fetch. (Each interrupt must be serviced
before another interrupt can be posted.)
Bit 2 Input flag. For this (HS) mode this bit
indicates which direction data is to be
transferred. When this bit is a 1, the
attachment transfers data to processor
storage; when this bit is a 0, data is
transferred from processor storage to the
attachment.
Bit 3 This bit is not used in this operation;
it must be a 0.
Bit 4 Suppress exception. When this bit is a 1:
Exceptions in length which would
otherwise cause an exception interrupt
are reported as permissive device end.
The status of the attachment is stored
at the address specified by the residual
status block address (DCB word 4),
unless an exception interrupt is
reported.
A residual status block (RSB) is posted at
the end of each operation that is programmed
for suppress exception. The format of the
RSB is discussed below under "Residual
Status Block".
Bits 5-7 Address key. This is a three-bit key that
the attachment presents during data transfer
to verify that the program has authorization
to access processor storage. An incorrect
address key causes an exception interrupt.
Bits 8-10 These three bits are not used in this
operation; they must be 0's.
Bits 11-13
Program-controlled interrupt ID.
These three bits are presented as
bits 3, 4, and 5 of an Interrupt
Information byte (IIB) explained later,
during a following program-controlled
interrupt. (All other bits in the IIB
are 0's.)
Bit 14 21-second time-out. When this bit is
a 1, it activates a 21-second time-out
on the DCB operation. The attachment
must either chain or interrupt within
21 seconds; otherwise, an exception
interrupt is reported, and bit 9 of
cycle-steal status word 3 is set to 1.
When this bit is 0, the time-out is
not used.
Bit 15 Terminate chaining. When this bit is
a 1, in conjunction with bits 0 and 4
set to l's, the attachment suppresses
exceptions in length. However, it
terminates chaining operations when
a short exception in length is en-
countered (that is, the data that is
transferred is less than the byte
count specified in word 6).
When this bit is a 1 and either bit
0 or bit 4 is a 0, the attachment
reports a DCB specification check.
When this bit is a 0 and bit 4 is a 1,
the attachment continues chaining
despite short exceptions in length.
______________________________________
DCB WORD 1--ATTACHMENT-DIRECTED COMMAND With bit 0 of this word set to 0, this word defines an HS mode operation to the attachment with certain designated options. The word defines: the mode of operation (high-speed DI/DO), whether (command) words 2 and 3 are to be transferred to the device, and what data format and timing pulse period are to be used.
______________________________________
Bit 0 DI/DO definition. This bit is set to 0 to
define HS (high-speed DI/DO) mode
operation.
Bit 1 Command suppress. If this bit is a 0, the
command words given in DCB words 2 and 3
are delivered to the device. If this bit
is a 1, delivery of the command words to
the device is suppressed.
Bits 2, 3
Format. These bits define the format
of the attachment interface:
Bits 2, 3
Interface format
00 8 bits, unidirectional (U8)
01 16 bits, unidirectional (U16)
10 16 bits, bidirectional (B16)
11 32 bits, bidirectional (B32)
(For information about these formats and the
attachment-device interface, refer to copending
applications by Health and Adrews et al
Bits 4-7 Timer value. These bits designate the
timer output period to be used (refer to
BC9-81-013 for information timer usage).
Bits 4-7 Timer output
0000 No transitions
0001 10.4 usec pulse*
0010 10.4 usec
0011 20.8 usec
0100 41.6 usec
0101 83.3 usec
0110 166.6 usec
0111 333.3 usec
1000 666.6 usec
1001 1.333 msec
1010 2.666 msec
1011 5.333 msec
1100 10.66 msec
1101 21.33 msec.
1110 42.66 msec.
1111 85.33 msec
Bits 8-15
Array index boundary (port 0 counter
preset). When in 16-bit bidirectional
format, this field is set into the
high-order byte of the bus not used
for data transfer. The low-order byte
is set to hex 00. Together, the two
bytes form an array index expression
whose use is described in Heath.
Formats other than 16-bit bidirectional
must have bits 8-15 set to hex 00;
otherwise the attachment posts a DCB
specification check.
______________________________________
*0001 causes a single pulse; all other options cause a continuously
repetitive signal.
DCB Words 2 and 3 Device-Directed Command: DCB words 2 and 3 together comprise a 32-bit command that is delivered to the device, unless delivery is suppressed by a 1 in bit 1 of word 1. All 32 bits in the command are delivered, according to the format designated in bits 2 and 3 of word 1: If the interface is 32 bits wide, word 2 is the most-significant word and word 3 is the least-significant word. Both words are presented simultaneously on the device interface as a single outbound command transfer. If the interface is 16 bits wide, word 2 is presented first and then word 3 is presented, as two separate sequential transfers. Note: If only a 16-bit command is required, words 2 and 3 may be made identical and then stored into a single 16-bit register in the device logic. If the interface is eight bits wide, four sequential transfers are made: 1. Bits 0-7 of word 2 2. Bits 8-15 of word 2 3. Bits 0-7 of word 3 4. Bits 8-15 of word 3 Data transfers between the device and the attachment card occur after command delivery is completed. DCB Word 4--Residual Status Block Address This word contains the beginning address of an eight-word area in host storage where the residual status block (RSB) is to be stored. The address must be even; thus bit 15 must be a 0. An RSB is stored whenever the suppress exception bit (bit 4) in word 0 is a 1 and an exception interrupt is not reported. The format of the RSB is discussed below under "Residual Status Block". DCB Word 5--DCB Chain Address This word specifies the host main-storage address of the next DCB to be executed if the chaining flag (bit 0) of DCB word 0 is a 1. The DCB chain address must be even (bit 15 is a 0); if it is odd, an interrupt is posted and the DCB specification check bit (bit 3) in the ISB is set to 1. If an error occurs, condition code 2 (exception) is reported and chaining stops. DCB Word 6--Byte Count This word contains a 16-bit unsigned integer representing the number of data bytes to be transferred for the current DCB. The byte count may be specified through the entire 16-bit range of 0 through 65,535. However, partial transfers are not allowed; so the byte count must be a multiple of the formatted width of the device interface, as specified by bits 2 and 3 in word 1. If the byte count is greater than the maximum allowed for a particular operation, or if the byte count is odd for 16-bit or 32-bit formats, the DCB specification check bit (bit 3) in the ISB is set to 1. When the interrupt request is accepted, condition code 2 (exception) is reported. DCB Word 7--Data Address This word contains the starting address in host main storage for the data associated with the operation to be performed. The data address must be even (bit 15 is a 0) for 16-bit and 32-bit formats, but it may be odd for 8-bit unidirectional format. If the data address is odd for a 16-bit or 32-bit format, an interrupt request is posted and the DCB specification check bit (bit 3) in the ISB is set to 1. When the interrupt request is accepted, condition code 2 (exception) is reported. PO MODE, LPO TYPE Used to load the command list and an initial line access parameter for use during operation under a subsequent SPO type DCB. DCB WORD 0--CONTROL WORD
______________________________________
Bit 0 Chaining flag. Same context as in HS mode
DCB
Bit 1 Program-controlled interrupt. Same as for
HS mode.
Bit 2 Input flag. This bit indicates which
direction data is to be transferred.
Because data (i.e. command list) transfer
for this type of operation is always from
host storage to the attachment, this bit
must be a 0. Otherwise, a DCB specification
check will result.
Bit 3 This bit is not used in this operation;
it must be a 0.
Bit 4 Suppress checksum non-compare. The attach-
ment always.transfers and checks the check-
sum (the last word of the command list).
When bit 4 is set to 1, checksum non-compare
exceptions do not result in exception
interrupts. However, the checksum error
status is set, and the residual status
block is stored at the address specified by
the residual status block address (DCB word
4), if an exception interrupt is not
reported.
Note: This bit does not suppress interrupts
caused by exceptions in length. Nor does it
cause retries to occur when checksum non-compare
exception interrupts are suppressed.
Bits 5-7 Address key. Same as HS mode.
Bits 8-10
These three bits are not used in this
operation; they must be 0's.
Bits 11-13
Program-controlled interrupt ID.
Serves as HS mode.
Bit 14 21-second time-out. This bit must be
a 1. It activates a 21-second time-
out on the DCB operation. The attach-
ment must either chain or interrupt
within 21 seconds, or an exception
interrupt is reported.
Bit 15 Terminate chaining. This bit must
be a 0.
______________________________________
DCB Word 1--Attachment-Directed Command This attachment-directed command word specifies a load programmable offline mode (LPO) type operation.
______________________________________
Bit 0 This bit is a 1 for all PO mode
operations.
Bit 1 This bit is a 0 for LPO type operation.
Bits 2-15 These bits are reserved; they must
be 0's.
______________________________________
DCB Word 2--Reserved this word is reserved; it must be all 0's. DCB Word 3--Command List Start Line this word designates the command list line where the attachment should begin processing secondary (command list) commands when it next interprets a start programmable offline word (SPO) type DCB. This word must be less than hex 0700. Note: The first line of a command list is line 0000. Thus, if in this LPO type a DCB word 3 is 0000, the attachment begins processing at the first line of the command list; and if DCB word 3 is 0001, the attachment begins processing at the second line. This word is often used when a process has been interrupted in a previous operation and is being restarted at the next sequential command list line. (Refer to DCB word 6.) DCB Word 4--Residual Status Block (RSB) Address Same definition as for HS mode. DCB Word 5--DCB Chain Address Same as HS. DCB Word 6--Command List Length This word contains a 16-bit unsigned integer representing the length (in bytes) of the command list plus the two-byte checksum. If word 6 is 0000 and a command list has previously been loaded, the attachment restarts the command list program after the next start programmable offline mode DCB is accepted. In this case, the command list program restarts at the line indicated in DCB word 3. Command list programs may be restarted by this method. If no command list has previously been loaded, the attachment reports device end interrupt and sets bit 10 in cycle-steal status word 3 to a 1. The command list checksum is not rechecked when the byte count is 0000. If this word is non-zero, the attachment clears the I/O registers, accumulators, working registers, and processor status, and reads the command list into microprocessor storage until the byte count is exhausted. The byte count must be even and may not exceed hex 0E02 bytes. (Because commands are two bytes, the maximum command list length is 1792 commands plus 2 bytes for the checksum word). If the byte count is 0002 (Hex) the command list is considered to be zero-length with a two-byte checksum. In this case the attachment will effectively clear its local command list storage area so that any subsequent SPO type DCB will be denied access to the last loaded list. This permits any application program using PO mode to restrict access of other application programs to its command list (e.g. as a security measure). DCB Word 7--Command List Start Address This word contains the starting address of the command list in host storage. Because commands are two bytes, this word must be even (bit 15 is a 0). The command list, as resident in host storage, is shown in FIG. 6. The checksum contained in the last two bytes of the list is supposed to equal the number of commands plus 2. PO MODE SPO TYPE Used to start microprocessor processing of a sequence of secondary commands contained in a preloaded command list. DCB Word 0--Control Word
______________________________________
Bit 0 Chaining flag. Same as for HS.
Bit 1 Program-controlled interrupt. Same as HS.
Bit 2 Input flag. For this DCB, this bit must be
a 1. This DCB is used to invoke execution
of a series of command list commands which
may direct data transfers both to and from
host storage (see "Dual Mode Applications"
below).
Bit 3 This bit is not used and must be 0.
Bit 4 Suppress exception. Same as HS.
Bits 5-7 Same as HS.
Bits 8-10 These bits are reserved and must be 0's.
Otherwise, a DCB specification check will
result.
Bits 11-13 Program-controlled interrupt ID.
Same as HS.
Bit 14 21-second time-out. When this bit is a 1,
it causes a programmable offline mode I/O
operation to terminate 21 seconds after
the operation is started, if it has not
already terminated. Status is then
returned to the command list program that
a time-out has occurred.
When this bit is a 0, the time-out is not
used.
Bit 15 Terminate chaining (short exceptions in
length). When this bit is a 1, in conjunc-
tion with bits 0 and 4 set to l's, the
attachment suppresses exceptions in length.
However, it terminates chaining operations-
when a short exception in length is
encountered (that is, the data that is
transferred is less than the byte count
specified in word 2 or word 6 of the start
programmable offline mode DCB).
When this bit is a 1 and either bit 0 or
bit 4 is a 0, the attachment reports a DCB
specification check.
When this bit is a 0, the attachment
continues chaining despite exceptions in
length.
______________________________________
DCB Word 1--Attachment-Directed Command This attachment-directed command word specifies that start programmable offline (SPO) mode type operation, with designated options, is to be performed. The word defines the mode of operation (start programmable offline mode), and the interface handshaking and timing.
______________________________________
Bit 0 This bit is a 1 for all PO mode operations.
Bit 1 This bit is a 1 for SPO type operation.
Bits 2, 3 Handshake. These bits define the hand-
shaking of the interface. Bit 2 controls
bus 1; bit 3 controls bus 0. Coding is as
follows:
1 = device request (device controls
transfers)
If either bit is a 1, data transfers
on the bus controlled by that bit are
initiated by a request from the device.
Command processing halts pending pro-
grammable offline mode I/O transfers.
0 = internal request (attachment
controls transfers)
If either bit is a 0, no request is
required from the device for that bus.
Bits 4-7 Timer value. Same as for HS.
Bits 8-11 Operation length. This field contains a
code that designates the maximum permissible
operation length, that is, the number of
secondary (command list) I/O commands that
may be performed as a result of a single
SPO type DCB. If the designated maximum
is exceeded, the program terminates with a
device end interrupt, and bit 11 in cycle-
steal status word 3 is set to 1.
Bits Operation length
8-11 Hex Decimal
______________________________________
0000 1 1
0001 2 2
0010 4 4
0011 8 8
0100 10 16
0101 20 32
0110 40 64
0111 80 128
1000 100 256
1001 200 512
1010 400 1024
1011 800 2048
1100 1000 4096
1101 2000 8192
1110 4000 16384
1111 8000 32768
______________________________________
Note:
While this parameter is intended as a
terminating default condition, any length
operation may be achieved by chaining multiple
DCBs so that each succeeding DCB restarts the
command code of the preceding DCB. For example: -
First DCB operation length
512
Second DCB operation length
128
total operation length
640
As many DCBs as are needed may be chained to
achieve the desired total.
A command list program that terminates as a result
of the operation length being exceeded may be restarted
by using the restart feature of LPO (DCB word 3). -
Bits 12-15
This field must be all 0's, or a DCB
specification check will result.
______________________________________
DCB Word 2--Read Byte Count (See "Dual Mode Applications" below.) This word indicates the number of data bytes to be transferred into host storage by the current DCB. Each secondary command transferring data to host storage decrements the indicated byte count. When the byte count reaches 0000, data transfer with the host stops. This word must be even, or a DCB specification check will result. DCB Word 3--Read Start Address (See "Dual Mode Applications.") This word contains the starting address in host storage into which data is to be stored. This word must be even, or a DCB specification check will result. DCB Word 4--Residual Status Block Address Same as HS. DCB Word 5--DCB Chain Address Same as HS. DCB Word 6--Write Byte Count (See "Dual Mode Applications".) This word indicates the number of data bytes to be transferred from host storage by the current DCB. Each secondary command transferring data out of host storage decrements the indicated byte count. When the byte count reaches 0000, data transfer stops. This word must be even. DCB Word 7--Write Start Address (See "Dual Mode Applications".) This word contains the starting address in host storage from which data is to be written. This word must be even. Note: The read and write areas in host storage may (but need not) overlap. This allows an area in main storage to be reused by the attachment. However, only sequential access in ascending order is allowed. INTERRUPT STATUS INFORMATION When presenting a priority interrupt, the attachment also transfers an interrupt ID word to the host processor. The interrupt ID word contains the device (i.e. attachment) address and an "interrupt information byte" (IIB). The IIB is transferred to the host processor on attention or device end interrupts. The IIB on attention interrupts contains all 0's. On device end interrupts, a 1 in bit 0 (permissive device end bit) indicates that "soft" error information is available in the residual status block (RSB). Note: For a chained operation, a 1 in bit 0 indicates that at least one of the stored RSBs contains "soft" error information. A "soft" error is a suppress exception that sets IIB bit 0 to 1 when suppress exception (bit 4 in DCB word 0) is set to 1. For interrupt condition code 2 (exception) or 6 (attention and exception), the IIB has a special format and is called the interrupt status byte (ISB). Multiple ISB bits may be set on at one time. The ISB bits, when set to 1, give the following indications: Bit 0--Device Dependent Status Available: Indicates that further attachment status information is available in a cycle-steal status block. Bit 1--Delayed Command Reject: Indicates that there is an incorrect parameter, such as an odd byte DCB address or an incorrect function in the IDCB. This bit is also set to 1 if the IDCB specifies a DPC function not in the attachment's repertoire. Bit 2--Incorrect-Length Record: Indicates that the attachment encountered a mismatch between the byte count specified in DCB word 6 (or DCB word 2 for a start programmable offline mode DCB) and the length of the record read or written on the device interface. (Refer to "Residual Status Block" below for an explanation of incorrect-length record processing during suppress exception.) Bit 3--DCB Specification Check: Indicates that an invalid parameter, which prevented proper execution of the command, was found in the DCB. This could reside in any part of the DCB. The residual address in cycle-steal status word 0 points to the last byte of the word in which the bad parameter was found. When this bit is set to 1, bit 0 is also set to 1. Bit 4--Storage Data Check: Indicates that the host storage location accessed during a cycle-steal output operation contained a parity error. The parity in storage is not corrected and no machine check condition occurs. The operation terminates immediately. Bit 5--Invalid Storage Address: Indicates that a host storage address to which access was attempted during a cycle-steal operation exceeds the storage size of the processor. The operation terminates immediately. Bit 6--Protect Check: Indicates that the attachment attempted to access a host storage location without a correct key. The operation terminates immediately. Bit 7--Interface Data Check: Indicates that a parity error was detected on the device interface during a cycle-steal data transfer. The operation terminates immediately. The following errors cause an exception interrupt: A 21-second time-out occurred during the operation. An attachment parity error occurred. An equipment check occurred. An incorrect-length record transfer occurred, unless suppress exception (DCB word 0 bit 4) was set to 1. A condition was encountered during programmable offline mode that caused an exception under an offline control code command. A BASE or any jump instruction in programmable offline mode specified an address outside the boundaries of the command list. A loss of synchronization occurred in device handshake. For example, the device requested a second transfer before the attachment (or the channel) could service the first request. The `ready` line on the device interface had a transition to the not-ready state. A DCB specification check was reported. RESIDUAL STATUS BLOCK (RSB) When the suppress exception bit (bit 4 of DCB word 0) is set to 1 and an exception interrupt is not reported, a residual status block (RSB) is stored at the host storage address specified in DCB word 4. During chaining, an RSB is stored for each DCB that is chained. Incorrect-length records that are transferred are reported by a device-end interrupt with IIB bit 0 set to 1. The special interface counter may be connected to indicate the total number of transfers. The residual byte counts (RSB words 0 and 6) record the number of bytes not transferred on records that are less than the byte counts in DCB words 2 and 6. The load programmable offline mode DCB also reports an RSB when a checksum error is suppressed and an exception interrupt is not reported. Note: Values reported in the RSB for each DCB are sampled immediately after the DCB's operation is completed but before the termination interrupt is presented to the host. The RSB contains eight words. Its format is: Word 0--Residual Byte Count This word contains the byte count, as specified in DCB word 6 of the last cycle-steal operation (write or read if unidirectional-format, write only if bidirectioan) minus the number of bytes successfully transferred. Word 1--RSB Flags This word has the following format:
______________________________________
Bit 0 End of chain (EOC). This bit
is a 1 when bit 0 of DCB word 0 is
a 0.
Bit 1 Retry (RT). This bit is not used
and is always a 0.
Bits 2-7 Reserved. These bits are al-
ways 0's.
Bit 8 Write excess length (WEL). The
length of the transfer on the
device interface exceeds the byte
count specified in the DCB.
Bit 9 Read excess length (REL). The
length of the transfer on the de-
vice interface exceeds the byte
count specified in the DCB.
Bits 10-13 Reserved. These bits are al-
ways 0's.
Bit 14 Incorrect-length record (ILR).
This bit indicates that the record
written to or read from the device
is shorter or longer than the byte
count specified in the DCB.
Bit 15 No error (NE). This bit is a
summary of bits 8, 9 and 14. When
When each of those bits is a 0, bit
15 is a 1.
______________________________________
Word 2--Residual Address This word contains the host main storage address of the high-address byte (low-order odd byte) of the last cycle-steal write or read transfer attempted. The residual address may be a data address or a DCB address. Word 3--Residual Attachment Status The format of this word is identical to the format of cycle-steal status word 3. Bits 0-13 indicate the status accumulated during the DCB operation for which the RSB is reported. Bits 14 and 15 indicate the state of lines on the device interface taken at the end of the DCB operation.
______________________________________
Bit 0 Attachment parity check. Bad
parity was received on the device
interface (when parity operation is
selected).
Note: This bit is always reported
as a 0.
Bit 1 Cycle-steal status error. An error
was detected during processing of
the Start Cycle Steal Status com-
mand operation.
Note: This bit is always reported
as a 0.
Bit 2 Exceptional length transfer. The
attachment did not transfer the
entire length of the record(s).
The number of transfers on the
device interface exceeds the byte
count.
Bit 3 Checksum error. A checksum comparison
error occurred during command list
load.
Bit 4 Programmable offline mode process
error. The command decoder was
unable to process a command line.
Note: This bit is always reported
as a 0.
Bit 5 Excessive length command list. The
offline code command list length
exceeded the command list length
specified in the DCB.
Note: This bit is always reported
as a 0.
Bit 6 Device error. The last operation
terminated due to loss of the `ready`
line on the device interface, or
a + transition occurred on the
`ready` line when the attachment
was not busy. This bit is reported
only after a load programmable off-
line mode DCB.
Bit 7 Equipment check. The attachment
detected an internal malfunction,
or a DCB of other than 16-bit bi-
directional mode received while
the card-to-card option switch is
set on.
Note: This bit is always reported
as a 0.
Bit 8 Bidirectional data transfer. The
last transfer was a bidirectional-
DCB transfer
Bit 9 21-second time-out. DCB word 0
bit 14 was set to 1 and a time-out
occurred because the attachment
operation did not complete the data
transfer within 21 seconds. This
bit is reported only after a start
programmable offline mode DCB.
Bit 10 Command list not stored. No command
list is stored.
Bit 11 Operation length exceeded. The
programmable offline mode operation
length (designated by word 1) was
ecxceeded.
Bit 12 Offline debug mode. The offline
debug mode is on.
Bit 13 Interface overrun control sync
loss. Interface request overrun
caused a loss of control synchron-
ization.
Note: This bit is always reported
as a 0.
Bit 14 Device ready state. The inverse of
the current device ready state (0 =
ready, 1 = not ready). This bit
is reported only after a load
programmable offline mode DCB.
Bit 15 Device status. The state of the de-
vice status line on the interface.
______________________________________
Word 4--Last DCB Address This word contains the starting address of the last DCB used by the attachment. Word 5--Residual Address (Read for Bidirectional) Following a Unidirectional Format DCB: This word contains all 0's. Following a Bidirectional Format DCB: This word contains the host storage address of the high-address byte (low-order odd byte) of the last cycle-steal read transfer attempted. Word 6--Residual Byte Count (Read for Bidirectional) Following a Unidirectional Format DCB: This word contains all 0's. Following a Bidirectional Format DCB: This word contains the byte count as it was specified in DCB word 2 of the last cycle-steal operation, minus the number of bytes successfully transferred. Word 7--Special Interface Counter Value This word specifies the number of events counted by the special interface counter (refer to Andrews et al). If the special interface counter is used to count the total number of transfers to the attached device, this value minus the DCB byte count is the number of bytes that did not transfer on an incorrect record read of excessive length (overflow byte count). The special interface counter is active at all times, and it is reset upon receipt of a valid Start command DCB. In addition to this process for RSB generation, in the CS mode of IDCB handling discussed previously, a not-discussed specific IDCB form causes the attachment of a not-discussed special HS mode DCB which in turn causes the attachment to transfer a "Cycle Steal Status" (CSS) block as "Read" data to host storage. This CSS block includes all of the above RSB elements except the flags (RSB word 1). Instead the CSS provides a "Residual Command List Line" (RCLL) word which defines the command list line containing the secondary command whose execution was last attempted during a preceding SPO type DCB interpretation sequence. This permits the host system to involve recovery procedures with selective restart of command list execution at a position associated with the RCLL parameter (via a suitably programmed LPO type DCB). It also allows the host to identify a defective command associated with termination of an SPO type DCB command list execution with exception interrupt. PO MODE SECONDARY COMMANDS The command list format is indicated generally in FIG. 6. Command list processing, and (formats and functions of) specific secondary commands are defined below. Programmable offline mode operation permits control of the device interface directly from the attachment's microprocessor at low to moderate speeds. This mode may also be operated independently, so that the attachment's microprocessor becomes a subordinate processor to the central processor of the host subsystem. Control of the device interface is programmed through the host by loading a command list from host storage into attachment storage. The attachment recognizes 32 different commands. These commands can perform: I/O data transfers Internal data transfers Logical and arithmetic processing Conditional branching Card hardware control The I/O commands can transfer data on the device interface in 16-bit unidirectional format, and they can also cycle-steal data to and from host storage. A maximum of 1792 commands (or 3584 bytes) may be loaded into the attachment. The command list is loaded into the attachment by using a load programmable offline model DCB. Then the offline operation is started by a start programmable offline mode DCB. The line number in a command list where processing is to begin is placed in word 3 of the load programmable offline mode DCB. The address in host storage of command list line 0 is placed in word 7 of that same DCB, and the length (in bytes) of the command list +2 (two-byte checksum) is placed in word 6. When the load programmable offline mode DCB is issued, the command list is transferred to the attachment and verified using the checksum. The format of the command list, as resident in host storage, is shown in FIG. 6. The attachment begins processing a command list program when a start programmable offline mode DCB is issued. The program starts at the command list line indicated in DCB word 3 of the load programmable offline mode DCB. A command list must be loaded before a start programmable offline mode DCB is issued. Otherwise, processing stops immediately, with an exception interrupt and cyclesteal status indicating that no command list program has been loaded. Once loaded, a command list program may be restarted repeatedly by a new SPO type PO mode DCB. Command list program processing terminates when any one of the following occurs: A command evokes an interruption of the host processor. An exception condition occurs. The `op end` line on the device interface is set active. The operation length limit specified in the start programmable offline mode DCB is exceeded. FORMAT OF SECONDARY (COMMAND LIST) COMMANDS Bits 0-5 comprise the command operation code. Bits 0-4 define the tope of operation, as described below. Bit 5 selects the method of addressing the data to be acted upon. A 0 indicates direct addressing. A 1 indicates indirect addressing; that is, through a working register. Bits 6 and 7 designate the microprocessor accumulator, if any, on which the operation is to be performed. Bits 8-15 comprise an immediate data field, containing: immediate data to be used by the instruction, an address of data to be used by the instruction, or an address of a working register that, in turn, contains an address of data to be used by the instruction. Some command list instructions operate on a single bit, while others operate on a whole byte. The discussion for each individual command defines whether that command operates on a single bit or an entire byte. COMMAND DESCRIPTIONS This section contains the full set of command descriptions grouped functionally into the following five categories: External-internal data movement Internal data movement Accumulator operatives Conditional jumps Attachment hardware control EXTERNAL-INTERNAL DATA MOVEMENT The external-internal data movement commands transfer data to and from the attachment card. These commands do not access the working registers. They do, however, return status to the accumulators. The commands in this category are: DIDO DIDOI XFER XFERI DIDO (111000 AC Immediate data) This command moves data. There are four types of data move operations: Type A: Move data from the device input bus, port 1, to the device input register. (Bits 8 and 9=00) Type B: Move data from host storage to microprocessor host input registers. (Bits 8 and 9=01) Type C: Move data from device output registers to the device output bus, (port 0). (Bits 8 and 9=10) Type D: Move data from microprocessor output registers to host storage. (Bits 8 and 9=11) Up to eight words of data can be moved per instruction. Data transfers to the device interface are multiplexed/demultiplexed by the attachment hardware. The device interface provides an associated subaddress (S0,S1,S2) for each transfer, as follows:
______________________________________
Transfer Device I/O register
S0 S1 S2
______________________________________
Word 0 Bits 0-15 (bytes 0-1)
0 0 0
Word 1 Bits 16-31 (bytes 2-3)
0 0 1
Word 2 Bits 32-47 (bytes 4-5)
0 1 0
Word 3 Bits 48-63 (bytes 6-7)
0 1 1
Word 4 Bits 64-79 (bytes 8-9)
1 0 0
Word 5 Bits 80-95 (bytes 10-11)
1 0 1
Word 6 Bits 96-111 (bytes 12-13)
1 1 0
Word 7 Bits 112-127 (bytes 14-15)
1 1 1
______________________________________
This sub-addressing scheme works for both input and output transfers on the device interface (operation types A and C, previously defined). Input or output transfers with the host (operation types B and D) are multiplexed/demultiplexed from input and output registers as follows:
______________________________________
Transfer Input/Output register
______________________________________
Word 0 Bits 128-143 (bytes 0-1)
Word 1 Bits 144-159 (bytes 2-3)
Word 2 Bits 160-175 (bytes 4-5)
Word 3 Bits 176-191 (bytes 6-7)
Word 4 Bits 192-207 (bytes 8-9)
Word 5 Bits 208-223 (bytes 10-11)
Word 6 Bits 224-239 (bytes 12-13)
Word 7 Bits 240-255 (bytes 14-15)
______________________________________
Data transfers with host storage are addressed in ascending order. Each DIDO instruction begins at the next ascending address from the last DIDO instruction. That is, a block of data is moved by this instruction, and each block of one to eight words is addressed in successive order in host storage. Data is transferred with the area defined by the start programmable offline mode DCB. Parity for DIDO data is generated by the attachment. The immediate data field is coded as follows:
______________________________________
Bit 8 Read/Write (Data direction is with
reference to the attachment).
This bit is a 0 when:
. Data is transferred to the attach-
ment from the device (operation
type A)
. Data is transferred to the attach-
ment from host storage (operation
type D).
Bit 9 Device/host
This bit is a 0 when data is transferred
with the device.
This bit is a 1 when data is transferred
with the host.
Bits 10-12 These bits determine the initial word
to be transferred. They contain a value
(0-7) defining word 0 through word 7.
On device transfers, bits 10, 11, 12 are
the initial subaddress S0, S1, and S2,
respectively.
Bits 13-15 These bits contain a value that is one
less than the number of words to be
transferred. For example:
Bits 13, 14, 15 = 0,0,0 indicates
only one word transfer.
Bits 13, 14, 15 = 0,1,0 indicates
three word transfers.
Bits 13, 14, 15 = 1,1,1 indicates
eight word transfers.
______________________________________
If the DIDO instruction does not complete the transfer within 21 seconds when DCB word 0 bit 14 is a one, or if the byte count for either DCB word 2 or 6 is exhausted by the transfer, an incomplete transfer results. Incomplete transfers return to the designated accumulator the number of words not transferred by the instruction. Incomplete transfers also set the carry/borrow/error flag, which can be tested by the JFLG command. Otherwise, the flag is reset. If the device interface requests transfers in excess of the word count specified by bits 13-15, the device interface does not acknowledge the request. However, the request remains pending. The carry/borrow/error flag is also set in this situation. DIDOI 111001AC Working register address This is the indirect form of DIDO. XFER 100110AC Immediate data This command causes one of the following types of operation: Type A: Copy data from the device input register to the microprocessor's host register. Type B: Copy data from the microprocessor's host input register to the device output register. Type C: Cause a block of data to transfer at high speed from the host interface to the device interface. Type D: Cause a block of data to transfer at high speed from the device interface to the host interface. The device interface subaddress bits (S0,S1,S2) and the accumulators are unused and unaltered by this command. Note: XFER is intended for host device data transfer situations where inline (HS mode) processing is not desired (for that transfer only). XFER is not recommended for replacement of high-speed operations due to the limitation of the word count and the delay in setting up the instruction in the attachment. In spite of such limitations, however, the XFER function does offer a subtle advantage over HS. During XFER operation, data is stepped through the high-speed I/O path with the host by microprocessor commands. This interface is provided with a continuous path for byte parity and parity check circuits. Thus, higher data integrity is achieved. The immediate data field is coded as follows:
______________________________________
Operation
type Data movement
______________________________________
A or B Copy an input register to an output register:
Bit 8 is a 0 to copy a register.
Bit 9 is a 0 for host-to-device; it is
a 1 for device-to-host.
Bits 10-12 are the initial word address
in the input register.
Bits 13-15 are a binary value that is
one less than the number of words to
be transferred.
C or D Transfer a block of data from the host to
the device or from the device to the host:
Bit 8 is a 1 to transfer data.
Bit 9 is a 0 for host-to-device; it is
a 1 for device-to-host.
Bits 10-15 are a binary value that is
one less than the number of words to
be transferred.
______________________________________
If the XFER instruction does not complete the transfer within 21 seconds when DCB Word 0 bit 14 is a one, or if the byte count from DCB word 2 or 6 is exhausted by the transfer, an incomplete transfer results. Incomplete transfers return to the designated accumulator the number of words not transferred by the instruction. Incomplete transfers also set the carry/borrow/error flag, which can be tested by a JFLG command. If the device requests transfers in excess of the byte count specified in bits 10-15 of the XFER command, the device interface does not acknowledge. However, the request remains pending. The carry/borrow/error flag is also set in this situation. Otherwise, the flag is reset. Data transfers with host memory are addressed in ascending order. Each XFER instruction begins at the next ascending address from the last XFER instruction. That is, a block of data is moved by this instruction, and each block of 1 to 64 words is addressed in successive order in host storage. Data is transferred with the area defined by the start programmable offline mode DCB. XFERI 100111XX Working register address This is the indirect addressing form of XFER. FIG. 7 illustrates the handling of the foregoing external-internal secondary commands (DIDO, XFER) by the attachment microprocessor. The microprocessor allocates 32 word spaces 101 in microprocessor storage as registers for storage of data words transferred by these commands. Of these register spaces, 16 are dedicated as "input registers" 102 for receiving externally originated data and 16 are dedicated as output registers 103 for use as sources of output data. The input registers 102 are further grouped into 8 "host" input registers 104 for receiving external data originating from host storage, and 8 "device" input registers 105 for receiving data originated by the device. The output registers 103 are similarly grouped into 8 "host" output registers 106 for supplying data to be transferred to the host system and 8 "device" output registers 107 for supplying data for transfers to the device. The actions (data movements) evoked by specific types of DIDO and XFER secondary commands are indicated in broken outline boxes containing indications of these commands. Thus, DIDO type A shown at 108 transfers data from the device to a selected device input register 105, DIDO type B shown at 109 transfers data from the host to a selected host input register 104, DIDO type C shown at 110 transfers data from a selected device output register 107 to the device, DIDO type D shown at 111 transfers data from a selected output register 106 to the host system, XFER type C shown at 112 transfers data directly from the host interface to the device interface via path "u" shown in part at 113 and in part at 114, and XFER type D shown at 118 transfers data directly from the device interface to the host interface via path "v" shown partly at 119 and partly at 120. In addition, XFER type A shown at 121 permits transfers of data from device input registers 105 to host output registers 106, and XFER type B shown at 122 directs transfers of data from host input registers 104 to device output registers 107. Other registers in microprocessor storage (or discrete microprocessor hardware) are reserved as accumulators 112, working or "scratchpad" registers 123 and operation status registers 124. There are 4 accumulators, up to 64 working registers, and at least 8 operation status registers. Status information associated with each execution of DIDO or XFER is stored in an accumulator register as suggested at 125, and moved from that register to an operation status register by one of the internal data movement commands described next. INTERNAL DATA MOVEMENT Internal data movement commands tranfer data within the attachment registers. These commands access the working registers, and they transfer data to or from the accumulators. The commands in this category are: DECR DECRI GABB GABBI GABL GABLI GARB GARBI GARL GARLI GOBB GOBBI GOBL GOBLI GORB GORBI GORL GORLI INCR INCRI LDIA LDIAI PABB PABBI PABL PABLI PARB PARBI PARL PARLI DECR 011100XX Working register address This command subtracts 1 from the working register indicated in the immediate data field. If an underflow occurs, hex FF results, and the carry/borrow/error flag is set. Otherwise, the flat is reset. The result appears in the indicated working register. The accumulators are unaffected by this command. DECRI 011101XX Working register address This is the indirect address form of DECR. GABB 000110AC Input register address This command ANDs a byte from the input register (indicated by bits 11-15 of the immediate data field) into the eight-bit contents of the accumulator designated by bits 6 and 7. GABBI 000111AC Working register address This is the indirect address form of GABB. Bits 3-7 of the indicated working register's contents are decoded to select the byte from the input register. GABL 000100AC Input register address This command ANDs a bit (indicated by the immediate data field) of the input register with the most-significant bit of the accumulator designated by bits 6 and 7. The result remains in the most-significant bit of the accumulator. The remainder of the accumulator is unaltered. GABLI 000101AC Working register address This is the indirect address form of GABL. GARB 001110AC Working register address This command ANDs the eight-bit contents of the register indicated by the immediate data field into the accumulator designated by bits 6 and 7. GARBI 000111AC Working register address This is the indirect addressing form of GARB. GARL 001100AC Working register address This command ANDs the most-significant bit of a working register (indicated by the immediate data field) with the most-significant bit of the accumulator designated by bits 6 and 7. The result remains in the most-significant bit of the accumulator. The remainder of the accumulator is unaltered. GARLI 001101AC Working register address This is the indirect address form of GARL. GOBB 000010AC Immediate data This command ORs a byte from the input register (indicated by bits 11-15 of the immediate data field) into the eight-bit contents of the accumulator designated by bits 6 and 7. GOBBI 000011AC Working register address This is the indirect address form of GOBB. Bits 3-7 of the indicated working register's contents are decoded to select the byte from the input register. GOBL 000000AC Input register address This command ORs a bit (indicated by the immediate data field) of the input register with the most-significant bit of the accumulator designated by bits 6 and 7. The result remains in the most-significant bit of the accumulator. The remainder of the accumulator is unaltered. GOBLI 000001AC Working register address This is the indirect address form of GOBL. GORB 001010AC Working register address This command ORs the eight-bit contents of the working register indicated by the immediate data field into the accumulator designated by bits 6 and 7. GORBI 001011AC Working register address This is the indirect address form of GORB. GORL 001000AC Working register address This command ORs the most-significant bit of a working register (indicated by the immediate data field) with the most-significant bit of the accumulator designated by bits 6 and 7. The result remains in the most-significant bit of the accumulator. The remainder of the accumulator is unaltered. GORLI 001001AC Working register address This is the indirect address form of GORL. INCR 011000XX Working register address This command adds 1 to the working register indicated in the immediate data field. If an overflow occurs, hex 00 results, and the carry/borrow/error flag is set. Otherwise, the flag is reset. The result appears in the indicated working register. The accumulators are unaffected by this command. INCRI 011001XX Working register address This is the indirect address form of INCR. LDIA 011010AC Immediate data This command loads the immediate data field into the accumulator designated by bits 6 and 7. A LDIA instruction with an immediate field of hex 00 clears the designated accumulator. LDIAI 011011AC Working register address This is the indirect address form of LDIA. This command loads the eight-bit contents of the working register indicated by the immediate data field into the accumulator designated by bits 6 and 7. PABB 010010AC Output register address This command places a byte of data from the accumulator designated by bits 6 and 7 into the output register at the byte position indicated by bits 11-15 of the immediate data field. PABBI 010011AC Working register address This is the indirect address form of PABB. Bits 3-7 of the indicated working register's contents are decoded to select the byte on the output register. PABL 010000AC Output register address This command places the most-significant bit of the accumulator designated by bits 6 and 7 into a bit position (indicated by the immediate data field) in the output register. The remainder of the output register is unaltered. PABLI 010001AC Output register address This is the indirect address form of PABL. PARB 010110AC Working register address This command places a byte of data from the accumulator designated by bits 6 and 7 into the working register indicated by bits 8-15 of the immediate data field. PARBI 010111AC Working register address This is the indirect address form of PARB. PARL 010100AC Working register address This command places the most-significant bit of the accumulator designated by bits 6 and 7 into the most-significant bit position of a working register indicated by the immediate data field. The remainder of the working register is unaltered. PARLI 010101AC Working register address This is the indirect address form of PARL. ACCUMULATOR OPERATIVES The accumulator operatives cause operations to be performed on data in the accumulators. The following table summarizes the accumulator operative commands.
______________________________________
Command Operation
______________________________________
ADD Adds the contents of the accumulator 0
to the contents of the designated
accumulator (Acc n).
CLR Resets the most-significant bit in the
designated accumulator (ACC n) to 0.
INV Inverts the most-significant bit in the
designated accumulator (ACC n).
SROT(1) Shifts or rotates the contents of the
designated accumulator (Acc n). (Re-
fer to the full description of this com-
mand for coding details).
XOR Exclusive ORs the contents of the accu-
mulator 0 with the contents of the
designated accumulator (Acc n).
______________________________________
Full descriptions of these commands follow:
______________________________________
ADD 110010AC XXXXXXXX
or
110111AC XXXXXXXX
______________________________________
This command adds the eight-bit contents of accumulator 0 to the eight-bit contents of the designated accumulator. The result remains in the designated accumulator. A carry sets the carry/borrow/error flag. Otherwise, the flag is reset. The immediate data field is unused, and the indirect form of the command (bit 5=1) operates identically to the direct form.
______________________________________
CLR 110100AC XXXXXXXX
or
110101AC XXXXXXXX
______________________________________
This command sets to 0 the most-significant bit in the accumulator designated by bits 6 and 7. The immediate data field is unused, and the indirect form of the command (bit 5=1) operates identically to the direct form.
______________________________________
INV 110000AC XXXXXXXX
or
110001AC XXXXXXXX
______________________________________
This command inverts the most-significant bit in the accumulator designated by bits 6 and 7. The immediate data field is unused, and the indirect form of the command (bit 5=1) operates identically to the direct form. SROT 111010AC Immediate Data This command causes the designated accumulator to rotate or shift data to either the left or right, according to the following decode of the immediate field:
______________________________________
Bits
______________________________________
8 9 Shift/rotation
0 0 Shift left. Set the carry/borrow/error flag
if a 1 is shifted out at any time during the
instruction. The flat is reset, otherwise.
0 1 Shift right. Set the carry/borrow/error flag
if a 1 is shifted out at any time during the
instruction. The flag is reset, otherwise.
1 0 Rotate left.
1 1 Rotate Right.
______________________________________
Bits 10-15 designate the number of shifts or rotates to be performed. (Each rotate or shift consumes 100 microseconds.) SROTI 111011AC Working register address This is the indirect form of SROT.
______________________________________
XOR 110110AC XXXXXXXX
or
110111AC XXXXXXXX
______________________________________
This command Exclusive ORs the eight-bit contents of accumulator (0) with the eight-bit contents of the designated accumulator. The result remains in the designated accumulator. The immediate data field is unused, and the indirect form of the command (bit 5=1) operates identically to the direct form. NOTE: Byte values may be inverted by XORing all 1's with the designated accumulator. CONDITIONAL JUMPS Conditional jumps cause the instruction line address register to be reset when the specified condition is met. The new setting is the two-byte address formed as follows: The most-significant byte of the new instruction line address is taken from the immediate data field of the last BASE instruction. The least-significant byte of the new instruction line address is taken from the immediate data field of the current conditional jump instruction. Note: For indirect BASE and jump command forms, the byte for the new instruction line address is taken from the working register whose address is pointed to by the immediate data field. Notes: 1. BASE and BASEI set the most-significant byte of the jump line address. 2. RTN returns the instruction line address register to the address of the instruction immediately following the last jump instruction that was executed. BASE 111100XX Immediate data This command sets the most-significant byte in the base line address equal to the value in the immediate data field. The base line address is the sixteen-bit absolute line address used in all jump instructions. If the base exceeds 1/2 of the byte count in the load programmable offline mode DCB, an exception interrupt is reported, with cycle-steal status word 3 bit 4 set to 1. The accumulators are unaltered by this command. BASEI 111101XX Working register address This is the indirect form of BASE. JAEZ 101010AC Immediate data This command causes the instruction line address register to reset to the two-byte jump line address formed by the BASE line address (most-significant byte) accumulator and the immediate data field (least-significant byte) when the accumulator designated by bits 6 and 7 is equal to 0. The base line address is set by the BASE instruction. JAEZI 101011AC Working register address This is the indirect form of JAEZ. JFLG 101110XX Immediate data This command causes the instruction line address register to reset to the two-byte jump line address formed by the base line address (most-significant byte) and the immediate data field (least-significant byte) when the carry/borrow/error flag is set. The flag is set when: A carry or a borrow occurs during an INCR, DECR, or ADD instruction. A 1 is shifted out of the accumulator during a SROT instruction. An error occurs during a DIDO or XFER instruction. The flag is reset by this instruction. The base line address is set by the BASE instruction. JFLGI 101111XX Working register address This is the indirect address form of JFLG. JPIE 101000AC Immediate data This command causes the instruction line address register to reset to the two-byte jump line address formed by the base line address (most-significant byte) and the immediate data field (least-significant byte) when the designated accumulator is equal to accumulator 0. The base line address is set by the BASE instruction. JPIEI 101001AC Working register address This is the indirect address form of JPIE. JPIG 100000AC Immediate data This command causes the instruction line address register to reset to the two-byte jump line address formed by the base line address (most-significant byte) and the immediate data field (least-significant byte) when the designated accumulator is greater than accumulator 0. The base line address is set by the BASE instruction. JPIGI 100001AC Working register address This is the indirect address form of JPIG. JPIL 100100AC Immediate data This command causes the instruction line address register to reset to the two-byte jump line address formed by the base line address (most-significant byte) and the immediate data field (least-significant byte) when the designated accumulator is less than accumulator 0. The base line address is set by the BASE instruction. JPILI 100101AC Working register address This is the indirect address form of JPIL. JPIN 101100AC Immediate data This command causes the instruction line address register to reset to the two-byte jump line address formed by the base line address (most-significant byte) and the immediate field (least-significant byte) when the designated accumulator is not equal to accumulator 0. The base line address is set by the BASE instruction. JPINI 101101AC Working register address This is the indirect address form of JPIN.
______________________________________
RTN 111110XX XXXXXXXX
or
111111XX XXXXXXXX
______________________________________
This command allows the program counter to return to the instruction immediately following the last executed jump instruction. In this way a single level of subroutine may be constructed with any jump instruction. ATTACHMENT HARDWARE CONTROL The commands in this category are used to control attachment hardware. These commands are: STIT STITI TIME TIMEI The command description follow: STIT 011110AC Immediate data This command can be used to: Set the hardware timer value. Cause the attachment to interrupt the host. Set, pulse, or clear certain lines on the device interface control bus. For immediate data field decodes of hex X0, X1, X3 and X7 through XF, the accumulators are not used or altered. The immediate data field is coded as follows: Bits 8-11 correspond to bits 4-7 of DCB word 1. With one exception, identical hardware timer operation is achieved. The hardware timer may be reinitialized to 15 of the 16 selectable timings described for DCB word 1 under HS Mode above. The 0 decode function operates differently; a 0 decode does not change a previously set timer value. The timer function changes less than one but more than one-half of a timer period after the STIT command is completed. Bits 12-15 are coded as follows:
______________________________________
Hex Value
Meaning
______________________________________
0 No operation.
1 Issue `reset` pulse on the device interface.
2 Move the state of the `device status bit`
line on the device interface to the most-
significant bit position of the designated
accumulator.
3 Increment the special interface counter.
4 Set the most-significant byte of the special
interface counter from the designated accu-
mulator.
5 Read the least-significant byte of the special
interface counter to the designated accumulator.
6 Set the least-significant byte of the special
interface counter from the designated accu-
mulator.
7 Reserved.
8 Report an exception interrupt to the host.
9 Report a device end interrupt to the host.
A Report an exception with attention interrupt
to the host.
B Report a device end with attention inter-
rupt to the host.
C Set the `last transfer` line on the device
interface.
D Set the `command` line on the device inter-
face.
E Set the `status` line on the device interface.
F Clear all device interface tags.
______________________________________
STITI 011111AC Working register address This is the indirect addressing form of STIT. TIME 100010XX Immediate data This command provides a variable time delay in the process. This command delays 0.333 millisecond if the immediate data field is 00, or 1 millisecond times the immediate data field otherwise. For example, 08 in the immediate data field causes the process to wait 8 milliseconds on this instruction, and 00 causes it to wait 0.333 millisecond. (The delay is within .+-.10.0% of the value indicated in the immediate data field.) The accumulators are unused and unaltered by this command. TIMEI 100011XX Working register address This is the indirect addressing form of TIME. FIG. 8 illustrates the actions in the subject microprocessor organization evoked by the foregoing commands. Commands GABB, GABL, GOBB and GOBL, shown at 141, direct the microprocessor to logically combine information in data input registers 102 with data in accumulators 122. Commands GABB and GOBB respectively designate byte-ANDing and byte-ORing functions relative to specified single bytes in specified input and accumulator registers. Commands GABL and GOBL respectively direct bit-ANDing and OR-ing operations relative to designated single bits in designated input and accumulator registers. Commands GARB, GARL, GORB and GORL, shown at 142, direct logical operations relative to data in working registers 123 and accumulator registers 122. GARB and GORB respectively designate byte-AND and byte-OR operations relative to designated single bytes in specified registers, and GARL and GORL respectively, designate bit-AND and bit-OR operations relative to specified single bits in specified registers. Commands PARB and PARL, shown at 143, respectively define movement of a specified byte (PARB) or bit (PARL) from a specified accumulator register to a specified working register 123. Commands PABB and PABL, shown at 144, respectively define movements of a specified single byte (PABB) or bit (PABL) from a designated accumulator to a designated output register 103. Commands DECR and INCR, shown at 145, respectively designate unit decrementing and unit incrementing operations relative to data stored in a specified working register. The result is placed in that register. Command LDIA shown at 146 takes data from the immediate data field of the command (see "memory map" discussion below) and loads it into a specified accumulator register. Command LDIAI shown at 147 takes data from a working register specified in the immediate data field of the command and loads it into a specified accumulator register. DEVICE INTERFACE FORMATS FIG. 9 illustrates the data busing facilities at the device interface, and the various formats in which these buses can be used. The interface contains 32 data busing lines including 16 lines 201 termed the "0" bus group, and 16 lines termed the "1" bus group. Group 201 consists of a high order set of 8 lines 203 and a low order set of 8 lines 204. Group 202 contains a high order set of 8 lines 205 and a low order set of 8 lines 206. As suggested at "switching" position 207 data bytes are transferrable from the attachment to the device through set 203 during HS mode write operations in either 8-bit or 16-bit unidirectional format (U8W or U16W) or 32-bit bidirectional format (B32W), or during PO mode output operations (POXW), or during HS mode "array indexing" operations in format (B16). In the array indexing operation the data transferred at position 207 is an 8-bit portion of a 16-bit array address. At switching position 208 outgoing data is transferred byte sequentially to the device via low order set 204 during HS mode write operations in 16-bit unidirectional or 32-bit bidirectional format (U16W or B32W), or during PO mode output operations or during array indexing operations. In the HS mode 16-bit unidirectional and 32-bit bidirectional write operations, the PO mode output operations, and the array indexing operations, paths 207 and 208 are operated in parallel. In the array indexing operation "data" sent out over these paths represents addressing information associated with data concurrently being sent or received through switching positions associated with the 1 bus group. For additional details as to these formats and the array indexing operation refer to the cross referenced Heath application. During HS mode operations paths 207 and 208 are controlled by adapter 3b (FIG. 1) and during array indexing operations these paths are operated by the attachment microprocessor (via "MICROPROC DIRECT" control) in coordination with operations of adapter 3b relative to paths 209 and 210. These paths may also be operated individually by the microprocessor via its "MICROPROC DIRECT" access; e.g. for conducting diagnostic operations relative to these paths and the device. Switching paths 209 and 210 for respectively steering data from "1" bus group sets 205 and 206 to the device interface are operated jointly when data is being transferred during a high speed write operation in either 16 or 32 bit bidirectional format (in the 32-bit case data is presented over these paths in parallel with data presented via paths 207 and 208, and in the 16-bit array indexing case data is presented in parallel with an array address function presented on paths 207 and 208). These paths are also subject individually to direct microprocessor control. Switching paths 211 and 212 transfer (high and low byte portions of) data in parallel with paths 213 and 214, from the device interface to the 0 bus group, when a read operation is being conducted in HS mode with a bidirectional 32-bit format. These paths are also operable either jointly ore separately under direct microprocessor control. MICROPROCESSOR ORGANIZATION AND MEMORY MAP FIGS. 10-12 show the organization of the microprocessor with particular emphasis on the allocation of its storage resources (memory map) required for implementing the subject attachment subsystem. The microprocessor 250 (FIG. 10) communicates with the microprocessor storage facilities including an 8K (8,000 byte) ROS (Read Only Store) 251 and a 4.5K RAM (Random Access Memory) 252. The microprogram control functions mapped into ROS 251 on a fixed (non-volatile) basis are shown in FIG. 11. The mapping of other (volatile) information parameters into RAM 252 is shown in FIG. 12. Memories 251 and 252 are 8-bit wide facilities accessed by the microprocessor 250 through an 8-bit parallel bus (3i, FIG. 1). As previously noted the microprocessor may be physically embodied using an INTEL.RTM. 8085A microprocessor. ROS 251 may be implemented using MOSTEK.RTM. MK 36000 ROM chips (each 4K by 8). RAM 252 may be implemented with four INTEL 8185 static RAM modules. Power for all of the attachment elements may be derived from the main power supply source of the host subsystem. Microprocessor 250 contains an arithmetic logic unit, an 8-bit wide internal bus and internal registers for performing arithmetic and logical translation operations on byte units of information (refer to Chapter 6 in "MCS-80/85.TM. Family User's Manual" published October 1979 by INTEL Corporation). The basic instruction architecture permits this microprocessor (refer to pages 6-15 and 6-16 in chapter 6 of the foregoing User Manual) to perform many of the byte handling functions presently specified for PO mode operation. With presently described programming such machine language instructions are coded into assembly language programs for interpreting presently defined secondary (command list) commands. As shown in FIG. 11, ROS memory 251 is partitioned into sections 261-274 dedicated for storage of indicated microprogram functions. Section 261 is reserved for power-on sequencing control and diagnostic functions not directly relevant to the present invention. Section 262 is reserved for microprogram sequences for handling DPC data transfer operations associated with IDCBs and other IDCB-related operations for retrieving, checking and interpreting DCBs. Section 263 is used for staging command portions of HS mode DCBs for external presentation (e.g. DCB words 2 and 3 FIG. 5). Section 264 is reserved for preparing self-sequencing adapter 3a (sometimes termed "BASE II Adapter") for its various data transfer operations relative to the host interface, the attachment microprocessor and device interface adapter 3b. Section 265 is reserved for preparing a not-shown timer circuit (which may be contained in the control port adapter block 3d of FIG. 1). Section 266 is reserved for preparing self-sequencing adapter 3b (sometimes referred to as "the flexible funnel", see Heath referenced previously). Section 267 is reserved for subroutines for terminating HS mode operations and presenting status to the host subsystem. Section 268 is reserved for controlling presentation of attention interruptions and associated status information to the host subsystem. Section 269 is dedicated for interpreting PO mode commands (instructions). Section 270 contains "instruction" subroutines for performing command list programs. Section 271 is reserved for interruption handler subroutines for attending to interruption requests presented at the device interface. Section 272 is reserved for "command list development utility" subroutines associated with a not-shown utility keyboard/display terminal for permitting a command list programmer to directly key in command list functions for in situ development of command list command operators. Section 273 is reserved for various diagnostic subroutines. Section 274 is reserved for handling cycle steal status and residual status functions previously defined. The approximate sizes of areas 261-274 (in bytes) are respectively: 250 (area 261), 1000 (area 262), 150 (area 263), 500 (area 264), 100 (area 265), 1000 (area 266), 700 (area 267), 200 (area 268), 1000 (area 269), 1500 (area 270), 250 (area 271), 500 (area 272), 250 (area 273), and 500 (area 274). FIG. 12 indicates partitioning of RAM memory 252 into five sections 280-284 individually reserved for specialized usage. Section 280 is reserved for storage of command list programs. As previously noted such programs are loaded during interpretation of LPO type DCBs (by microprogram subroutines contained in section 269 of memory 251). Such programs are performed in association with interpretation of SPO type DCBs (by subroutines in section 269 of memory 251), and the individual command list commands/instructions are interpreted by microprograms contained in section 270 of memory 251. Section 280 has capacity for storage of up to 1,792 secondary commands (up to 3,584 bytes). It should be understood that if storage of longer command lists is required (by a particular user) memory 252 could easily be expanded without requiring any additional invention. Section 281 is reserved for input and output registers, accumulator registers, working registers, status storage registers, etc. (see FIGS. 7 and 8). Unused section 282 is available for supporting the optional command list development terminal mentioned previously. Section 283 is reserved for storage of DCB variables (addresses for accessing host storage, current byte count factors, etc.). Section 284 is reserved for storing data collected by diagnostic routines (see section 273 FIG. 11). EXAMPLES OF PO MODE APPLICATIONS The following examples of PO mode applications and associated command list programs indicate the versatility of the subject attachment subsystem. Several particularly interesting applications, discussed below under "dual mode operations", are claimed in a separate patent application by Heath which is being filed at the same time as this patent application. A. HEX TO DECIMAL CONVERSION In this example the program reads a hexadecimal number from host storage, converts its least significant byte to a decimal equivalent and presents the converted number to a device via the device interface's most significant bus set (0 bus group high order set, see FIG. 9). Indirect addressing of registers allows the conversion to be conducted by a table lookup. The command list program described below is assumed to have been loaded into microprocessor RAM storage 252 by operation of an LPO type DCB containing a starting line parameter pointing to command line number 00 below, and that an SPO type DCB has instigated access to this list beginning at that line number. CONVERSION PROGRAM
______________________________________
Command
Line list code
Number (hex) Instruction Purpose
______________________________________
00 6900 LDIA A1 A1 = 0 Set-up
01 5900 PARB A1 .fwdarw. RO
table
02 6901 LDIA AL = 1 .dwnarw.
03 5901 PARB A1 .fwdarw. R1
.dwnarw.
04 6902 LDIA A1 = 2 .dwnarw.
05 5902 PARB A1 .fwdarw. R2
.dwnarw.
06 6903 LDIA A1 = 3 .dwnarw.
07 5903 PARB A1 .fwdarw. R3
.dwnarw.
08 6904 LDIA A1 = 4 .dwnarw.
09 5904 PARB A1 .fwdarw. R4
.dwnarw.
OA 6905 LDIA A1 = 5 .dwnarw.
OB 5905 PARB A1 .fwdarw. R5
.dwnarw.
OC 6906 LDIA A1 = 6 .dwnarw.
OD 5906 PARB A1 .fwdarw. R6
.dwnarw.
OE 6907 LDIA A1 = 7 .dwnarw.
OF 5907 PARB A1 .fwdarw. R7
.dwnarw.
10 6908 LDIA A1 = 8 .dwnarw.
11 5908 PARB A1 .fwdarw. R8
.dwnarw.
12 6909 LDIA A1 = 9 .dwnarw.
13 5909 PARB A1 .fwdarw. R9
.dwnarw.
14 6910 LDIA A1 = 10 .dwnarw.
15 590A PARB A1 .fwdarw. RA
.dwnarw.
16 6911 LDIA A1 = 11 .dwnarw.
17 590B PARB A1 .fwdarw. RB
.dwnarw.
18 6912 LDIA A1 = 12 .dwnarw.
19 590C PARB A1 .fwdarw. RC
.dwnarw.
1A 6913 LDIA A1 = 13 .dwnarw.
1B 590D PARB A1 .fwdarw. RD
.dwnarw.
1C 6914 LDIA A1 = 14 .dwnarw.
1D 590E PARB A1 .fwdarw. RE
.dwnarw.
1E 6915 LDIA A1 = 15 set-up
1F 590F PARB A1 .fwdarw. RF
table
20 E040 DIDO From host; first
Input from
word, first posi-
host
tion .dwnarw.
21 6900 LDIA A1 = 0 .dwnarw.
22 0911 GOBB A1 .sym. 11 (host
.dwnarw.
input register,
.dwnarw.
least-significant
.dwnarw.
byte) = A .dwnarw.
23 5920 PARB A1 .fwdarw. R20
Convert
24 6900 LDIA A1 = 0 .dwnarw.
25 2D20 GORBI A1 .sym. with
.dwnarw.
register pointed to
.dwnarw.
by R20 = A1
.dwnarw.
26 4900 PABB A1 .fwdarw. 00 (device
Output to
output register)
device
27 E080 DIDO To device: first
.dwnarw.
word, first
.dwnarw.
position Device
.dwnarw.
28 7809 STIT end interrupt
.dwnarw.
______________________________________
The Load Immediate instructions LDIA at successive even line numbers from 00 to IE (specified in hex form) contain decimal values 0 to 15 in their immediate data fields, and specify transfers of said values to a specific accumulator register "A1". The "Put Accumulator to Working Register" instructions PARB at odd positions from 01 to 1F transfer contents of A1 to successive working registers RO through RF, thereby loading the "conversion table". The DIDO instruction at line 20 transfers a hexadecimal "argument" value to be converted from the interface into a host input register in microprocessor storage (section 281 of RAM 252, FIG. 12), and the next LDIA instruction sets 0's into register A1. The following GOBB instruction OR's the argument value in the input register with the 0's in A1 and stores the result (argument value) in A1. The following PARB transfers the argument value from A1 to working register R20, and A1 is again set to 0's by the next LDIA. The following GORBI instruction OR's the contents of A1 with those of the working register pointed to by the (argument) value in R20, thereby "looking up" the decimal equivalent of the argument number, and stores the result in A1. The content of A1 is then moved to device output register "00" by the following PABB instruction, and then to the device interface by the next DIDO instruction. The next STIT instruction causes a device end interrupt to be posted, terminating the operation. As an example of the "assembly language" microprogramming needed to interpret a subject secondary instruction consider the following routine for fetching and executing the above mentioned LDIA instruction using the routine language microin | ||||||
