I recall that with some of the many compilers I use, use of in-line assembly interferes with the compiler's optimizer because a compiler may not look at the assembly code to know what registers have/haven't been modified, and thus generates code assuming the worst, that registers have been modified, and generates inefficent code accordingly. I don't recall if this is the case with Keil C. I'd appreciate it if someone could elaborate on C51's performance in this area, otherwise I'll have to generate test cases. Thanks, --Dan Henry
This restriction seems to have been removed now: http://www.keil.com/forum/docs/thread1657.asp#msg6654