I have written a LIB with the following decleration:
idata u_char clock_occ; idata void (*f_ce)(u_char stat); I use it in the LIB in the way as: clock_occ = 1; f_ce(TRUE); so far, no problem, I compile it -> ok: I add the LIB to my project and use it like: extern idata u_char clock_occ; extern idata void (*f_ce)(u_char stat); void SetChipEnable (u_char stat) { ... } void main (void) { clock_occ=0; f_ce = (void *)SetChipEnable; }