HPlogo Asynchronous Serial Communications Programmer's Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 8 Intrinsics Reference

FCONTROL(25)

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

Parameters

controlcode

25 — Defines Additional End-of-Record (AEOR) character for terminal input.

param

16-bit unsigned integer by reference (required).

Passes the value of a character to be used as an additional line terminator. The octal or decimal code for the character must be contained in the right byte of the parameter; the left byte is ignored. If the NULL character (%0) is specified, normal (default) line termination conditions are restored.

Notes

An FCONTROL call with a controlcode value of 25 is used to establish an Additional End-of-Record (AEOR) character, which is then in effect for reads posted against the device that owns the file whose file number is specified in filenum. You can only assign one AEOR character at a time. If you need more than one AEOR, use FDEVICECONTROL instead.

Normally, character mode reads using standard editing are terminated by a carriage return ([Return]), the standard EOR character for HP terminal types. The system echoes the carriage return and sends a linefeed to the terminal, so that the cursor is positioned at the beginning of the next line, ready for the next read. Even if an AEOR character has been assigned by a call to FCONTROL(25), the EOR character will still terminate reads in the usual way.

When a read is terminated by an Additional End-of-Record character, the AEOR character is included in both the data and in the byte count. No carriage return or linefeed is sent to the terminal. The read terminates with an error condition which indicates that the Additional End-of-Record character has been encountered. A call to FCHECK returns an error code of 31. To recover from this error, your program can delete the AEOR character from the input data, subtract one from the byte count of the read, and send out a carriage return and linefeed to place the cursor in the proper place for the next read.

An AEOR character designated by FCONTROL(25) is also recognized as a line terminator during reads in transparent editing mode, along with a user defined EOR character that replaces [Return] as the normal EOR character.

See the discussion of FCONTROL(41) later in this chapter for more information on terminating reads in transparent mode.

To disable the Additional End-of-Record character, call FCONTROL(25) again specifying 0 as the value of param.

There are a number of characters that will not be recognized if used as AEOR characters, as listed in Table 8-4 “Characters Not Recognized If Used as AEORs”. You will receive no error message if you use one of these characters, but the character will not terminate a read if entered.

Table 8-4 Characters Not Recognized If Used as AEORs

ASCII CharacterTerminal KeyOctal CodeHex Code
NUL (Null)[CTRL]@% 0$ 0
DC1 (XON)[CTRL]Q% 21$11
DC3 (XOFF)[CTRL]S% 23$13
Current Subsystem Break[CTRL]Y (by default)[1]% 31$19
DEL (Rubout)[DEL]% 177$7F

[1] In transparent mode, you define the subsystem break character through FCONTROL(41). It may also be defined using FDEVICECONTROL.

 

NOTE: You should also avoid using a number of other characters which have special meaning to MPE/iX, specifically carriage return, linefeed, cancel ([CTRL]X by default), backspace, DC2, and escape. While these characters will be recognized and processed as AEOR characters, their use could yield unpredictable and often unsuccessful results. It is strongly recommended that you avoid using these characters unless the specific needs of your application make it absolutely necessary to do so.

In addition, [CTRL]A should not be used as an AEOR character at the console.

Condition Codes

CCE

Request granted.

CCG

Not returned by this intrinsic.

CCL

Request failed because the file number specified did not belong to this process or the device is not a terminal.

Additional Discussion

See FCONTROL(41) and FDEVICECONTROL in this manual.

Feedback to webmaster