How to use ASM into C code compiled by µVision ?
I have this error message: error C272: 'asm/endasm' requires src-control to be active Is there something to configure in the compiler for that?
I have this error message: error C272: 'asm/endasm' requires src-control to be active Is there something to configure in the compiler for that? Yes, but do not worry about it. Make your assembly in a separate .A51 module and link it in. ifg you need assembler use assembler, if you do not, use whatever you like. Combining the two in the same module is but a kluge. Erik
In fact, the project I have, compiles with another compiler but I'd to develop my program with Keil software, eg µVision. Can I send you the necessary ".c" & ".h" files in order to test the compilation on your computer? Thank's for advance
I have asm code for more than 1 function... Might I create a ".a51" file for each function? How to link it to the ".c" file? Thank's for advance, Regards
1)I have asm code for more than 1 function... Might I create a ".a51" file for each function? 2) How to link it to the ".c" file? 1) as you like all in one or separate, no difference 2) Brutal answer: with the linker, but you probably ask "how are parametres passed?. Create a 'skeleton' C function mimicking your assembly subroutine. Use the list or use src as a template. Erik
Not so easy to do... Can I send send you my ".c" and ".h" files?
"Is there something to configure in the compiler for that?" Yes, and it is clearly stated in the Manual Go and read the section about ASM/ENDASM in the manual - it tells you clearly & explicitly what to do! It gives you four simple bullet points - just do what it says!
Please tell me which manual you are speaking about... And where to find it? Thx
Well it's not surprising you're having trouble - if you don't even know where the manual is! You need to read the C51 User Guide. You also need to read the uVision Getting Started Guide and work through the example projects in it. ALL the manuals are available in the 'Books' tab of the uVision Project window; or open the PDFs directly: C51.PDF - the Compiler manual; A51.PDF - the Assembler manual; GS51.pdf - the uVision manual.