Asynchronous Terminals and Printer Processes Programming Manual

TERMINAL PROGRAMMING CONSIDERATIONS
Page Mode
CALL READ ( HOME^TERM^NUM, BUFFER, 1, NUM^READ );
Reading one byte allocates one word of buffer space.
The terminal operator types in the page of text and presses a
function key. A ready character is sent to the host, causing
the READ to complete. The application then sends the trigger
character to the terminal and reads 600 characters with a call
to WRITEREAD. The WRITEREAD ensures that the computer is ready
to start reading when the terminal starts transmitting. For
example:
BUFFER := %010400; ! DC1
.
CALL WRITEREAD ( HOME^TERM^NUM, BUFFER, 1, 600, NUM^READ );
The terminal returns a page of information to BUFFER. The actual
number of bytes read is returned in NUM^READ.
Simulation of Pseudopolling
Terminals without pseudopolling (6511 and 6512 terminals) can
simulate this feature by having the terminal operator signal that
data is being sent by pressing a function key other than the
SEND PAGE key. Upon receipt of the characters transmitted by the
function key, the application program issues a SEND PAGE command
to the terminal to have the data returned through a call to the
WRITEREAD procedure.
Example
The following is an example of simulated pseudopolling coding
with the 6511 or 6512 terminal.
In this example, terminal operation is controlled by sending a
series of escape sequences to the terminal. For more information
about the escape sequences for 6511 and 6512 terminals, refer to
the
Lear-Siegler ADM-2 Operator’s Handbook
.
4-10