Keil Logo

Function Parameters

By default, C functions pass up to three parameters in registers. Remaining parameters are passed in fixed memory locations. You may use the NOREGPARMS directive to disable passing parameters in registers.

Parameters are passed in fixed memory locations if parameter passing in registers is disabled or if there are too many parameters to fit in registers. Functions that pass parameters in registers are flagged by the Cx51 Compiler with an underscore character ('_') prefixed to the function name at code generation time.

Functions that pass parameters only in fixed memory locations are not prefixed with an underscore. Refer to Using the SRC Directive for an example.

  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.