| |||||
Technical Support On-Line Manuals Cx51 User's Guide | Interfacing C programs to PL/M-51Intel's PL/M-51 is a popular programming language that is similar to C in many ways. You can easily interface the Cx51 Compiler to routines written in PL/M-51.
The Cx51 Compiler can generate code using the PL/M-51 parameter passing conventions. The alien function type specifier is used to declare public or external functions that are compatible with PL/M-51 in any memory model. For example:
extern alien char plm_func (int, char);
alien unsigned int c_func (unsigned char x, unsigned char y) {
return (x * y);
}
Parameters and return values of PL/M-51 functions may be any of the following types: bit, char, unsigned char, int, and unsigned int. Other types, including long, float, and all types of pointers, can be declared in C functions with the alien type specifier. However, use these types with care because PL/M-51 does not directly support 32-bit binary integers or floating-point numbers. Note
| ||||
| |||||