We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I am using Keil C51 V3.96 (quite old) to develop the firmware for DS87C550. I can generate the code that runs correctly. But if I try to add some new & short codes, the progrm will run incorrectly. There is anything wrong with my additional codes. I suspect it's the problem of the compiler. Anyone can help?
"Anyone can help?"
Perhaps with more information. Be precise and informative about your problem.
www.catb.org/.../smart-questions.html
"I suspect it's the problem of the compiler"
On what basis, exactly, do you suspect that?
Why? Because if I use C51 V8.02 compile the code, it's OK. By the way, there isn't anything wrong with my additional codes.
So, don't you think your original post should contain all relevant facts? How many more posts are you going to make with a sentence or two with "obvious" facts you have "forgotten" to mention earlier?
How do we know that there isn't anything wrong with your "additional codes"? We don't even know what problems you get into - something you kind of forgot to mention.
"if I use C51 V8.02 compile the code, it's OK"
There are almost certainly significant differences between v3.96 and v8.02 - it should not come as any surprise at all to find that code written for the latest & greatest (v8.02) doesn't work with its dim and distant predecessor.
This does not in any way indicate that there is anything wrong with v3.96 - just that it's different, and was never intended to do all the things that v8.02 now does.
"there isn't anything wrong with my additional codes"
If they are intended to be portable, and they don't port, then that is something wrong with them by definition.