Function Parameters

C functions may pass parameters in registers and/or fixed memory locations. The REGPARMS and NOREGPRAMS directives enable and disable parameter passing using registers. Parameters are passed in fixed memory locations if parameter passing in registers is disabled or if too many parameters are passed to fit in registers. Functions that pass parameters in registers are flagged by C51 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. See the section entitled “Using the SRC Directive” below for an example.