This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Error in Two long variable Passing in Funciton to Pointer

Hi,
I am using Function to Pointer. i have definded this functin poiter in one structure with two long variable argument.
it is giving me error below.

Error C212: indirect call: parameters do not fit within registers.

though it is given in c51.pdf that it will pass funciton argument with two long variable, i face this error.

expecting solution as soon as possible

code is like this

typedef struct
{
unsigned long var1;
unsigned long var2;
void (*funptr) (unsigned long var1,unsigned long var2);

}test;

void main()
{

struct test *pt,t;

t.vars1 = 6550;
t.vars2 = 6551;
t.funptr = TESTING;
// where TESTING is fucntion definition macro

pt->funptr(pt->var1,pt->var2);
// here i get error listed above
}

thanks
niraj

Parents Reply Children
No data