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 would like to be able to drop into assembler in the middle of a c program, but can't find any way to do this. The C166 compiler manual has some examples of using ASM and ENDASM, but even when I enter the example code exactly as given in the book, the compiler generates "error C25: syntax error near '<EOF>'. Normally, in-line assembly is a very uncomplicated process. Is in-line assembly even possible with the C166 compiler? Thanks
"2. The SRC directive causes the affected file to be translated on every build - whether it needs it or not" Of course this is only if you are using the uVision IDE and can be avoided by using a make tool that checks obj->SRC->C dependencies; not that with today's speedy computers, it's all that important.
"Of course this is only if you are using the uVision IDE" True "and can be avoided by using a make tool" Also true "not that with today's speedy computers, it's all that important." Absolutely (unless it's a particularly huge souce file!).
What happens if you need in-line assembly in a header file (for a macro)? How do you set-up the compiler then?
This is covered in: http://www.keil.com/appnotes/files/apnt_172.htm Also the new method does not need the SRC directive anymore. Reinhard
Dimitris Papadakis asked: "What happens if you need in-line assembly in a header file (for a macro)? How do you set-up the compiler then?" Reinhard Keil replied: "This is covered in: http://www.keil.com/appnotes/files/apnt_172.htm Also the new method does not need the SRC directive anymore." The Application Note, and the original thread, relate to the C166 compiler. Dimitris specifically selected the C51 toolset for his follow-on question; Is this new "Extended Inline Assembler" facility available in C51? If not, is it intended that it will be?