gtpc2m4qC/C++ Language Support User's Guide

maskc-Modify Program Status Word (PSW) Mask Bits

This function modifies indicators in the program status word (PSW) to enable or disable selected interrupts.

Format

#include   <sysapi.h>
void       maskc(enum t_maskc_opt maskc_opt, enum t_mask mask);

maskc_opt
One of the following step types:

MASKC_DISABLE
Turns off the indicator that represents the mask in order to disable the selected interrupt.

MASKC_ENABLE
Turns on the indicator that represents the mask in order to enable the selected interrupt.

mask
One of the following interrupt types:

MASKC_EXT
External interrupts

MASKC_IO
Input/output (I/O) interrupts

MASKC_PER
Program event recording interrupts.

Normal Return

Void.

Error Return

None.

Programming Considerations

Only one type of interrupt may be enabled or disabled per function call. Modifying combinations of interrupts is not allowed.

Examples

The following example enables I/O interrupts.

#include <sysapi.h>

  ·
  ·
  ·
maskc(MASKC_ENABLE, MASKC_IO);

Related Information

None.