Dear All, I have a question about ?C?ICALL. When a function is called via a function pionter, the callee is called via ?C?ICALL. In ?C?ICALL, it initialize DPTR and A, and Jmp @A+DPTR. But when the caller and the callee are not in the same bank, how does ?C?ICALL handle it? with kind regards Jay
I forget specify the product. Sorry. It is ?C?ICALL in C51.
http://www.keil.com/support/docs/2486.htm Jon
I've read this aritcle:) What I want to ask is where is the bank switch machanism while using function pointer. When not using function pointer to call, it first LCALL to intrabank table and then jmp to bank switching code. But I don't know when to do bank switching (i.e. LCALL to intrabank...) while using function pointer. Does ?C?ICALL do it? or somewhere else? with kind regards Jay
bank switching .... function pointer Why do you not get yourself a PC instead of trying to stretc the '51 so far that it is likely to break. Erik
Sorry. I don't what you mean. Could you take some example? Thank you in advanced. Jay
Bank switching works the same whether the function is called directly or indirectly. There must be an entry in the intra-bank call table either way. Jon
Why do you not get yourself a PC instead of trying to stretc the '51 so far that it is likely to break .... Sorry. I don't what you mean. I mean that if you need the above you have chosen the wrong processor or the wrong programming style. programming the '51 as if it is a PC (e.g. function pointers) is a surefire way to kill the throughput. Erik
But in this way(i.e. using function pointer array, or struct of function pointer), we can make the program more readable. In addition, don't care about the problem:) I am just curious about the switching mechanmism while using function pointers. thanks for your replay Jay