This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

combine assembler and C-code?

How can i combine assmebler files and C code. How do i hand over the paramters in a function call? How must the function declaration look like in the headerfile? For example: application written in C that calls for example an I2C routine, that reads from an I2C ROM written in assembler.
thanks for answer,
Markus Kammersberger

  • The easy and safe method (I assume you will use assembler subroutines in a "C" main) is to write a 'skeleton' routine in "C" and compile it with the SRC directive. Then cut out the assembly code. Then cut the object with a coloumn edit. Now you have the entry and exit for your assembler routine and all interface questions are answered, so all there is left is to code the guts of the routine.

    Erik

  • It looks like that i have made a mistake. I only posted a message and didnt start a thread so i can't read the answers.
    Markus