hi I am calling a function recursively.but it overwrite the locale variables of that function. when function returns it overwrite the values. Regards FarhanArshad
"I am calling a function recursively.but it overwrite the locale variables of that function." As Jon says, that is because C51 functions are inherently not reentrant. It also says so in the Manual. For details of why this is so, read Application Note 129, Function Pointers in C51: http://www.keil.com/appnotes/docs/apnt_129.asp An the knowledgebase article C51 - PROBLEMS WITH FUNCTION POINTERS OVERWRITING VARIABLES: http://www.keil.com/support/docs/210.htm