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

FCONTROL(36)

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

Parameters

controlcode

36 — Defines parity setting.

param

16-bit unsigned integer by reference (required)

Passes a value (0, 1, 2, 3, or 4) which represents a specified parity condition.

Returns the value of the previous setting.

Refer to Table 8-5 “Parity Settings with FCONTROL(36)” for a definition of the condition represented by each value.

Notes

An FCONTROL call with a controlcode value of 36 is used to specify the type of parity generation and checking that will be done if parity is enabled for a terminal.

When a terminal is initially opened certain parity conditions exist, as determined by the terminal type and port configuration, and whether the port is opened by an operator logon or by a user program. These parity conditions can be changed through a call to FCONTROL(36), specifying a number that corresponds to the desired parity as the value of param. Hewlett-Packard provides four parity options, called odd, even, ones and zeros. Table 8-5 “Parity Settings with FCONTROL(36)” shows the results of each of these options on input and output data, along with the param value associated with each option.

When FCONTROL(36) is called, the parity option specified replaces whatever option was previously associated with the terminal, and the previous option is returned to the call as the new value of param. This makes it possible to determine a terminal's parity setting even with parity disabled. You can also use the returned value to restore parity to its original setting when your program ends, since MPE/iX does not reset parity when a file is closed.

Once you have set the parity option, you can call FCONTROL(24) to enable parity. Your program should also request the terminal operator to change the terminal's parity setting to the new setting of the software. Additionally, if parity is to be checked on incoming data, the local terminal control that determines whether or not parity is checked should be set to check parity.

Parity cannot be used with 8-bit character sets.

This call is ignored for devices connected via PAD, DTC Telnet, Telnet/iX, or VT. If issued against such a device it will return a condition code of CCE, but no device control action will occur.

Table 8-5 Parity Settings with FCONTROL(36)

Value of paramParity TypeResults if Enabled
0ZerosNo parity checked on input Eighth bit set to 0 on output
1OnesNo parity check on input Eighth bit set to 1 on output
2EvenEven parity checked on input Even parity generated on output
3OddOdd parity check on input Odd parity generated on output
4NoneNo parity checked on input No parity checked on output

 

Condition Codes

CCE

Request granted.

CCG

Not returned by this intrinsic.

CCL

Failed because the file number specified did not belong to this process, the device is not a terminal, or an invalid value was used for param.

Additional Discussion

See also discussion of FCONTROL(23,24) in this manual.

Feedback to webmaster