Asynchronous Serial Communications Programmer's Reference Manual (32022-90052)
102 Chapter4
Using FDEVICECONTROL
Examples
The code fragment shown in Figure 4-5 illustrates another aspect of
backspace processing that can be manipulated through the
FDEVICECONTROL intrinsic. In this example,a control directive of 55
is used to select a backspace response action. The backspace response
action is the action that will be taken by the DTC as a result of a
backspace (or the designated backspace character) being entered from a
terminal.
There are two valid backspace response actions for MPE/iX systems.
The default response is for the DTC to discard the character that was to
the left of the terminal’s cursor when the backspace was entered and to
move the cursor back one space. The discarded character remains on
the terminal screen until the user types a new character.
The second valid backspace response action is for the discarded
character to be erased from the screen. To accomplish this, the DTC
backspaces the terminal cursor as usual, but then transmits a space to
erase the character from the screen and a second backspace to place the
cursor at the correct position for the next character to be entered.
Either of these backspace response actions can be set through
FDEVICECONTROL using a control directive of 55. To specify that the
character on the screen should be erased, set the value of buffer to 5.
To return to normal backspace response, set the value of buffer to 1.
The example shown in Figure 4-5 sets the backspace response to erase
by specifying a 5 as the value of buffer.