Hello, In my program, I call C function form assembly main code. But sometimes while excuting the C functions, the program jumps back to the Assembly code!!!! Have this happened to anyone? I'm using Level 9 optimize (because my code is very big). Thanks.
Oh, thanks for quick answer. But I've figured out the reason. That's all about my Stack size. In the assembly program, I initilized the stack size is 32 bytes and that is not enough for the whole new program, with C functions. Thanks again. P/s: about the optimize level, because when I compile my program with Level 8, it made the code size was over 100 KiloBytes, over my flash memory which is only 64KB. So I use the Level 9, and the code size reduced to 63KB, and that is all I need.
"not enough for the whole new program, with C functions." The "with 'C' functions" bit is irrelevant: C51 functions use no more stack than assembler functions, as they do not use the stack for parameters, locals, etc.