Asynchronous Serial Communications Programmer's Reference Manual (32022-90052)
Chapter 8 191
Intrinsics Reference
FCONTROL(36)
FCONTROL(36)
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 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 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