 | C251 User's Guide |  |
|
|
| PARM251 Compiler Directive| Abbreviation | P251 | | Arguments | None. | | Default | PARM251 | | µVision | Options — C251 Compiler — Object — C51 argument passing. | | Description | The PARM251 directive specifies that the compiler use the default 251 parameter passing conventions. Note - You may switch between C51 and C251 parameter passing conventions any number of times in your source files.
| | See Also | PARM51 | | Example |
#pragma PARM51 /* switch to C51 calling conventions */
extern char *function_51 (char); /* C51 function */
#pragma PARM251 /* switch to C251 calling conventions */
extern char *function_251 (int); /* C251 function */
pragma PARM51 /* switch to C51 calling conventions */
void f51 (char *p) { /* a C51 compatible function */
*p = 0;
}
#pragma PARM251 /* switch to C251 calling conventions */
void main (void) {
char *p;
p = function_51 (0); /* call a C51 function */
p = function_251 (1); /* call a C251 function */
}
|
|
|