Keil Logo

MOD517 Compiler Directive




Optional parameters, enclosed in parentheses, to control support for individual components of the 80C517.




Options — Target — Use On-Chip Arithmetic Unit.
Options — Target — Use multiple DPTR registers.


The MOD517 directive instructs the Cx51 Compiler to produce code for the additional hardware components (the arithmetic processor and the additional data pointers) of the Infineon C517 or variants. This feature improves the performance of integer, long, and floating-point math operations, as well as functions that make use of the additional data pointers (memcpy, memmove, memcmp, strcpy, and strcmp).

Library functions that take advantage of the arithmetic processor have a 517 suffix. Refer to the Library Reference for details on these functions.)

Additional parameters may be specified with the MOD517 directive to control the Cx51 Compiler support of the individual components of the Infineon device. When specified, the parameters must appear within parentheses immediately following the MOD517 directive. Parentheses are not required if no additional parameters are specified.

Directive Description
NOAU When specified, the Cx51 Compiler uses only the additional data pointers of the Infineon device. The arithmetic processor is not used. The NOAU parameter is useful for functions that are called by an interrupt while the arithmetic processor is already being used.
NODP8 When specified, the Cx51 Compiler uses only the arithmetic processor. The additional data pointers are not used. The NODP8 parameter is useful for interrupt functions declared without the using function attribute. In this case, the extra data pointers are not used and, therefore, do not need to be saved on the stack during the interrupt.

Specifying both of these additional parameters with MOD517 has the same effect as using the NOMOD517 directive.


  • Although it may be specified several times in a source file, the MOD517 directive is valid only when defined outside of a function declaration.
  • The Infineon C517 uses the DPSEL SFR to select the DPTR register. On the Evatronix R8051XC Core the same register has the name DPS. Evatronix also offers the BSE (Bank Switch Enable) for automatic DPTR selection with register bank switches.
  • On Infineon C517 devices, the DPSEL SFR is located at address 0x92. However, some devices (like the Mentor M8051EW) locate DPSEL at a different address.

    The address for DPSEL is stored in a public symbol and may be changed by adding the following to an assembler source file like STARTUP.A51:
    ?C?DPSEL DATA 0A2H   ; DPSEL address for Mentor M8051EW
See Also


C51 SAMPL517.C  MOD517

#pragma MOD517 (NOAU)

#pragma MOD517 (NODP8)

#pragma MOD517 (NODP8, NOAU)
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.