ARMODE | NOARMODE (C only)

Category

Object code control

Pragma equivalent

None.

Purpose

Specifies that all functions in the C source file will operate in access-register (AR) mode. ARMODE must be used with the METAL compiler option.

When ARMODE is in effect, all functions in the compilation unit will be compiled in AR mode. AR mode functions can access data stored in additional data spaces supported by IBM Z®.

To override the effect of the ARMODE option and selectively re-set particular functions to be in non-AR mode (or primary address space control mode), use __attribute__((noarmode)). For more information on this attribute, see The armode | noarmode type attribute (C only) and z/OS Metal C Programming Guide and Reference.

When NOARMODE is in effect, functions are not in AR mode unless __attribute__((armode)) is specifically specified for the functions.

Syntax

Read syntax diagramSkip visual syntax diagramNOARMODEARMODE

Defaults

NOARMODE

Usage

If the ARMODE compiler option is specified, all functions in the compilation unit will be compiled in AR mode.

Note: If the armode attribute is specified on a function in a compilation unit, it overrides the compiler option.

AR mode enables a program to manipulate large amounts of data in memory by using __far pointers. This means that a program working with a large table, for example, would not need to use temporary disk files to move the data in and out of disk storage. It also means that program logic can be less complicated, easier to maintain, and less error prone. Currently, only assembler can make use of AR Mode directly.

Note: The ARMODE compiler option is available only when the METAL option is specified. If the METAL option is not specified and the ARMODE compiler option is specified, an error message will be issued.

Predefined macros

None.

Related information