Asynchronous Serial Communications Programmer's Reference Manual (32022-90052)
74 Chapter3
Common Device Control Functions
Writing to Asynchronous Devices
When writing to a terminal, a controlcode value of %320 is often used.
This value specifies that no carriage control will be sent to the terminal
and the next character printed by the next write will physically follow
the data written by the current write. You might use a controlcode of
%320 when prompting for user input at a terminal. No carriage return
or linefeed will follow the write and the cursor will be positioned next to
the prompt.
Figure 3-5 illustrates the use of the FWRITE intrinsic. This code
fragment opens a terminal file as $STDLIST with write access
specified. The prompt to be written to the terminal is placed into buffer
and the variable cctl is specified as %320. FWRITE is then called using
these values. The result will be that the prompt “Enter Your Name” will
be written to the device and the cursor will be placed next to the
prompt.
Your program should check condition codes after each FWRITE;
however, you should be aware that this intrinsic is completed logically.
This means that once data is passed to an output buffer the write is
considered to have completed successfully. If the output device has
suspended operation, due to flow control or some other reason, the
actual write may not have occurred. There is no programmatic way to
verify the physical output of data to a device.