AM3270/TR3271 Reference Manual
Details of the CRT Protocol
TR3271 Subdevice Protocols
086705 Tandem Computers Incorporated 6–7
SETMODE 59 Detail
CALL SETMODE (filenumber, 59, , ,params);
filenumber
an INT:value—is the file number returned by the OPEN for the subdevice.
59
an INT:value—is the SETMODE number for obtaining the actual count of the
bytes read.
params
is passed by reference (INT:ref:2), must be provided, and returns:
params[0] actual number of bytes read.
params[1] 0 (zero).
Note that the parameter positions normally used for param1 and param2 must not
be provided. If they are, a file-system error 2 (invalid operation attempted) will be
returned to the caller. Error 26 will be returned if the subdevice has no
outstanding two-step READs completed or if the SETMODE requester is not the
two-step READ requester.
The following is a functional example of the application request sequence using a two-
step READ and a SETMODE 59:
CALL OPEN (T^NAME,T1,FLAGS); open the subdevice.
.
.
CALL CONTROL (T1,22,500); post a 500-byte READ to T1
CALL AWAITIO (T1, ... ); and wait for completion.
.
.
CALL SETMODE (T1,59,,,PARAMS); the read has completed; get
. the actual size.
.
CALL READ(T1,BUFFER,PARAMS[0]); READ has completed with the
. actual byte size rather
. than 500.
WRITE Request
A WRITE request causes the subdevice to be flagged as “writing.” When the host
issues either a general poll to the control unit to which the writing subdevice is
logically connected, or a specific poll to the subdevice, TR3271 blocks and formats the
text unless certain status conditions exist. TR3271 then sends the text to the host a