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

error while inserting assembly in C

Hi, i got this this error while trying to add some assembly code to my C. How do i activate the src-control? Any help is appreciated. Thank you!


error C272: 'asm/endasm' requires src-control to be active

Parents
  • "Thanks! so, i'm suppose to write any C code, as skeleton? as long as it generate a LST file?"

    No - When Erik said "LST" he should've said "SRC"

    As it tells you in the Manual, when you compile a 'C' source file, file.c, using the SRC directive, the compiler output is an Assembler source file, file.src.
    You can then pass this Assembler source to the assembler, and it will assemble it to an object file, file.obj.

    So what you do is:

    1) make the skeleton routine in C in a separate file
    2) compile it using the SRC directive
    3) throw that C file away
    4) use the .SRC file generated as your template (rename it to .A51 if you like)

    You do this because you can be certain that the Compiler will generate a correct skeleton for a function to be called from 'C'

    And this is only for the purpose of generating an Assembler function to be called from 'C' - you don't do any of this for 'C' functions to be called from 'C'!

Reply
  • "Thanks! so, i'm suppose to write any C code, as skeleton? as long as it generate a LST file?"

    No - When Erik said "LST" he should've said "SRC"

    As it tells you in the Manual, when you compile a 'C' source file, file.c, using the SRC directive, the compiler output is an Assembler source file, file.src.
    You can then pass this Assembler source to the assembler, and it will assemble it to an object file, file.obj.

    So what you do is:

    1) make the skeleton routine in C in a separate file
    2) compile it using the SRC directive
    3) throw that C file away
    4) use the .SRC file generated as your template (rename it to .A51 if you like)

    You do this because you can be certain that the Compiler will generate a correct skeleton for a function to be called from 'C'

    And this is only for the purpose of generating an Assembler function to be called from 'C' - you don't do any of this for 'C' functions to be called from 'C'!

Children
No data