Asynchronous Terminals and Printer Processes Programming Manual

TERMINAL PROGRAMMING CONSIDERATIONS
Conversational Mode
• If any character other than carriage return is the current
line termination character, the file system always issues a
<CR><LF> sequence to the terminal.
• The line is terminated automatically when the number of
characters specified in the
read-count
parameter has been
input. If termination on
read-count
occurs, the file system
does not issue <CR><LF>.
Use a READ call similar to the following one to terminate a line
with a carriage return. The system supplies the line feed.
.
CALL READ ( HOME^TERM^NUM, BUFFER, 72, NUM^READ );
.
If the terminal operator types the characters
NOW IS THE TIME<CR>
"NOW IS THE TIME" is returned in BUFFER, the value 15 is
returned in NUM^READ, and the file system issues a line feed to
HOME^TERM^NUM.
If the operator only presses RETURN, the content of the buffer
remains the same, zero is returned in NUM^READ, and the system
issues a line feed to the terminal.
Use the following procedure call to terminate a line with
read-
count
.
.
CALL READ ( HOME^TERM^NUM, BUFFER, 10, NUM^READ );
When the operator types the 10 characters
NOW IS THE
"NOW IS THE" is returned in BUFFER, and 10 is returned in
NUM^READ.
4-5