Is there a bug? I have a well debugged and tested C program, that works fine with a normal compile. (Optimization Level 8, emphasis on code size ) It does not work correct when I enable the Assembler SRC generation and assemble the SRC files. The bytes of code generated are exactly the same, but a comparison of the 2 resultant *.HEX files shows some differences. The differences occur near the beginning of the .hex file, and then the files are identical for the rest of the 3600+ bytes. Can anyone help?
What's the procedure prototype? The fourth parameter strikes me as significant because C51 passes up to three arguments in registers, while the fourth has to go into memory. Which memory depends on your memory model. Do the memory models match between main.c and other.c? If the caller assumes that extra arguments go into, say, xdata for the large model, while the callee assumes that arguments go into, say, data for the small model, you'd have a problem. Look at the assembler output for the C code that calls your function, and see where it puts that fourth param, and then look at the assembler code for the body of the routine and see where it expects it.