??? 09/12/07 15:52 Read: times |
#144482 - No crisis here Responding to: ???'s previous message |
I was indeed commenting on the fact that the stack implementation is inefficient.
But how is this related to multitasking, you ask. Well in a multitasking environment you can hardly do any call tree analysis and thus no efficient overlaying. As Erik said the typical implementation uses function pointers and it is very hard to find out which functions can be in those pointers at any time. If a function pointer is called, where should you put the parameters if you don't know at compile time which function is really called? So static allocation for parameters becomes not feasable and the only real option is passing parameters on the stack. So, yes, accessing parameters on stack is a general shortcoming of the '51 architecture. But with a multitasking system you cannot go without it, where you otherwise can. Maarten |