We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I'm sure it's written somewhere and I'm not opposed to looking for it. However I have looked and found nothing so I'll ask. There are a host of "behind the scenes" library functions that perform such magic as right or left shifts of various data types, etc. Even the ubiquitous switch() statement compiles into a special library call (LCALL ?C?CCASE) to do the work. My (probably paranoid) concern is the degree to which these functions may be employed in an interrupt routine. I'm concluding that since none of my programs crash miserably that it's OK to use any "c" construct in an interrupt routine and that the behind the scenes library functions are designed for reentrancy. It would just be nice to find that in print somewhere. Thanks for reading & commenting. Steve C.
The run-time routines in the library use only registers and are therefore reentrant. Jon
Thanks Andy, You understand the question. Jon, The run-time routines in the library use only registers and are therefore reentrant. Are you refering to the hidden functions that I'm talking about? If so, what is the basis for your comment? I too can conclude that the functions must be reentrant or we'd all be in a world of hurt. But where does it say that? According to the link that Dan posted (http://www.keil.com/support/man/docs/c51/c51_lib_routines.htm) - and what I also found in the C51 manual: Many of the routines in the C51 standard library are reentrant and/or intrinsic. Many, but not ALL. And it says nothing of the of the other hidden functions. Thanks for all of your replies. Steve C.
"According to the link that Dan posted (http://www.keil.com/support/man/docs/c51/c51_lib_routines.htm) - and what I also found in the C51 manual: Many of the routines in the C51 standard library are reentrant and/or intrinsic." If you read the two sentences following that you will understand how to find out *which* routines are reentrant: <Many of the routines in the C51 standard library are reentrant and/or intrinsic. These specifications are listed in the following tables. Unless otherwise noted, routines are non-reentrant and non-intrinsic.> "And it says nothing of the of the other hidden functions." Why do you care if the hidden functions are reentrant? Why would there be any need to know if they are reentrant?
"Jon, ... what is the basis for your comment?" I think Jon has inside information... ;-)
OK, Duh, my bad. Sorry, Jon. Did a little research and I learned that you work for Keil. Thanks for the help :) Steve C.