This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320VC5416: TMS320VC5416

Part Number: TMS320VC5416

I have some legacy assembly routines for an application. Now we are doing some changes where there is a requirement to call these assembly routines from c functions. How easily that can be done.

second if some fresh assembly routines has to be written, how that to be integrated with c functions.

  • Hi Raj,

    I think you will need to define the assembly function _xyz in *.asm file and claim it to be global:

    .global _VECSTART 



    /* func body */

    then in C file you will need to claim xyz as the external and use it as a C function:

    extern void xyz(void);



    Please notice that any registers used in your assembly function have to be saved in the beginning of the function and restored at the end of the function, so that the C execution environment is kept unchanged. 

    Best regards,