AM3270/TR3271 Reference Manual

Details of the CRT Protocol
TR3271 Subdevice Protocols
6–4 086705 Tandem Computers Incorporated
Considerations
When a text message is received or a line error occurs, the CONTROL completes
with a file-system error of 0 (zero) if the read was successful, or a file-system error
of some specific number if otherwise. If the error is 0, a READ should be issued
immediately to pick up the data buffer (a SETMODE 59 could precede the
READ—see below; also see “SETMODE Functions” in this section).
The count parameter of the READ is checked to see that it is at least as great as the
actual count read from the device. If it is not, file-system error 21 will be returned
to the application process and the data buffer will be flushed.
A CONTROL 22, where parameter equals -1, may be used in lieu of a READ. It
logically cancels a two-step READ after the data has been received by TR3271.
However, note that a CANCEL (or AWAITIO with a specific file and time limit)
will NOT perform this action.
The SETMODE 59 operation provides the ability to obtain the actual count of bytes
read. The operation is summarized under “SETMODE Functions” in this section.
READ Request
A READ request causes the subdevice to be flagged as “reading.” When the host
selects a subdevice that is reading, TR3271 acknowledges the select (except when
certain status conditions are pending) and allows the host to transmit the text. TR3271
inspects the incoming data stream to ensure that the command byte is valid. If valid,
the communication control characters are deleted and the remaining text is returned to
the application process, completing the READ request.
The following are valid control characters and their meanings:
? Erase all unprotected
5 Erase/WRITE
= Erase/WRITE alternate
1 WRITE
7 Copy (Valid if COPY has been enabled by SETMODE for both the selected device
and the device that is sending the data. Additionally, both devices must have the
same OPENer.)
An invalid command does not complete the application READ request. TR3271 sets
command reject status and instead of a normal acknowledgment, sends an EOT to the
host. If the incoming data does not have an escape (ESC) character preceding the
command, the action is the same as for an invalid command except that TR3271 sets
operation check status rather than command reject status.
If status other than device end is pending for the subdevice when it is selected, TR3271
responds with one of the following: RVI, if status other than device busy is posted, or
WACK if only device busy status is set. Return of status to the host has no effect on
pending READ or WRITE requests.