You can easily interface C51 to routines written in PL/M-51. Intels PL/M-51 is a popular programming language that is similar to C in many ways. The PL/M-51 compiler generates object files in the OMF-51 format. You can access PL/M-51 functions from C by declaring them with the alien function type specifier. Public variables declared in the PL/M-51 module are available to your C programs.
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.
extern alien unsigned int plm_i (char, int, ...);
*** ERROR IN LINE 1 OF A.C: 'plm_i': Var_parms on alien function