Asynchronous Serial Communications Programmer's Reference Manual (32022-90052)
Chapter 3 61
Common Device Control Functions
Reading From Asynchronous Devices
Block mode is enabled programmatically by a block mode application
when it is executed at a terminal. The terminal’s configuration settings
need to be changed also, in order for the terminal to function properly
in block mode. This can be done by prompting the user to change the
terminal’s configuration settings or by programmatically sending
escape sequences to the terminal.
Block mode allows a terminal user to see data on the screen as it is
being typed in and to use the terminal’s local editing and cursor control
features to alter the data before it is transmitted to the DTC. It is
available only on terminals that have block mode capabilities; all of the
terminals supported for use on MPE/iX systems are capable of handling
block mode data transmission. When using a PC, however, you should
verify that the terminal emulation program you are using is capable of
handling block mode transmission.
User block mode can be invoked through a call to FCONTROL(29) and
makes it possible for your program to control the way in which a block
mode transaction will take place. See the discussion of
FCONTROL(28,29) in chapter 8 for more information on user block
mode.
NOTE
A convenient way to handle block mode processing is provided by the
VPLUS intrinsics.VPLUS intrinsics automatically perform many of the
block mode terminal control operations that you are otherwise
responsible for. It is recommended that you use this method whenever
possible. See the VPLUS Reference Manual for more information on
using the VPLUS intrinsics.
Field Mode
Enhancements have been added to provide the performance of block
mode and the flexibility of character mode, called field mode.
Field mode was created to help application programmers control
certain keys on the keyboard. Some applications require certain keys to
be controlled by the application and not processed locally in the
terminal. Block mode applications do not recognize any of these special
keys except in some cases where they are processed locally by the
terminal. To process the special characters would require reading
characters one at a time. This would result in performance degradation.
Field mode allows the users to collect normal user data input without
having to interrupt the CPU for each character, yet still have many
ways to return control to the application when the user enters
command input. The basic building blocks for field mode are
summarized:
• Inter-byte timer. Provides a mechanism by which the DTC can
terminate a read and forward data to the host. It is useful for
collecting data where there is no guarantee that an end-of-record or