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

How to use Assembly in C code file

Hi
I am a little less experienced in using Keil C51 tools.
I have uVision 2 installed on my computer. Can you please help me on how to insert a piece of Assembly code in my C source file and build the final product.
Actually I wanted to implement a delay function in Assembly in my application.

/upendra

Parents
  • 1) make a separate module with the delay routine written in C - do not worry about the length of the delay it need not be what you want. Also insert the prototype in your .h.

    2) compile that module using the SRC control.

    3) use the result for an assembly module, calculate the dalay and make it exact.

    4) assemble and link tha .a51 module

    Erik

Reply
  • 1) make a separate module with the delay routine written in C - do not worry about the length of the delay it need not be what you want. Also insert the prototype in your .h.

    2) compile that module using the SRC control.

    3) use the result for an assembly module, calculate the dalay and make it exact.

    4) assemble and link tha .a51 module

    Erik

Children