|
| NOREGPARMS Compiler Directive| Abbreviation | | None. | | Arguments | | None. | | Default | | REGPARMS | | µVision | | Options — C51 — Misc controls. | | Description | | The NOREGPARMS directive forces the compiler to pass all function arguments in fixed memory locations. This directive generates parameter passing code which is compatible with Version 1 and Version 2 of the Keil C51 Compiler. Note - You may specify both the REGPARMS and NOREGPARMS directive several times within a source file to compile some functions using register parameters and other functions using the old style of parameter passing. For example:
#pragma NOREGPARMS /* Parm passing-old style */
extern int old_func (int, char);
#pragma REGPARMS /* Parm passing-in registers */
extern int new_func (int, char);
main () {
char a;
int x1, x2;
x1 = old_func (x2, a);
x1 = new_func (x2, a);
}
- You may use the NOREGPARMS directive when accessing assembly functions or libraries that were built with older tools.
| | See Also | | REGPARMS | | Example | |
C51 SAMPLE.C NOREGPARMS
|
|
|