Wouter van Ooijen escreveu: > > Another stupdity is the subroutine argument passing conventions. = > C18 uses a > = >> caller-clean model. = >> = > > This the default for C. I agree it is a stupid choice. > = With the callee cleaning the stack it would be impossible (or at least very difficult) to have functions with variable-length argument lists like printf. For some architectures it adds more complexity also, because first the return address need to be removed from the stack and saved, then the stack pointer must be incremented (decremented for some) and the return address finally used to return. The caller always knows how many bytes it pushed onto the stack, the callee don't. If the callee cleans the stack and there is some mistake with the function prototypes (or the equivalent) you get a hard crash. If the caller cleans, you may have a hard to find bug. Some processors have an unlink and return instruction that does this automatically, but others not. Isaac __________________________________________________ Fa=E7a liga=E7=F5es para outros computadores com o novo Yahoo! Messenger = http://br.beta.messenger.yahoo.com/ = -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist