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.
The C51 manual states, "The using attribute may not be used in functions that return a value in registers" and goes on to state, "Even when you use the same register bank, functions declared with the using attribute cannot return a bit value." It's clear that a bit value set in the carry flag isn't passed back to the calling function. It's not clear why a function "using" a register bank can't call another function "using" the same register bank: The same bank select bits are being pushed, loaded, and popped. Am I missing something, or is this an OK thing to do?
You may be interested in this post
http://www.keil.com/forum/docs/thread13641.asp
--Cpt. Vince Foster 2nd Cannon Place Fort Marcy Park, VA
Vince:
Thx. for the reference. I think the point you made to "ensure that both code sections are identical" is the key to this issue. I certainly can't see anything that could cause a problem when doing so.
And the only thing worse than macros is \t characters in source code... ;-)