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

creating assembly functions

How can I create an assembly function?

How can I call it from c?

Thanx..

Parents
  • The simplest way to create a C-callable assembly file, is to start with an outline in 'C', then let the compiler turn it into assembly source by using the SRC directive - see the Manual.

    You can be certain that the compiler knows exactly how to name the function, pass parameters, allocate local variables, and return a value in a C-compatible way.

    Once you have created this assembly outline, throw the 'C' file away and just work on that file in assembler.

    Add the assembly file to your project, and uVision will automatically use the assembler to translate it

Reply
  • The simplest way to create a C-callable assembly file, is to start with an outline in 'C', then let the compiler turn it into assembly source by using the SRC directive - see the Manual.

    You can be certain that the compiler knows exactly how to name the function, pass parameters, allocate local variables, and return a value in a C-compatible way.

    Once you have created this assembly outline, throw the 'C' file away and just work on that file in assembler.

    Add the assembly file to your project, and uVision will automatically use the assembler to translate it

Children