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 insert asm code in c file?

How to insert asm code in c file.
I don't want to generate asm file
and not to call asm function.

example :

void f1(void)
{
...
...
nop <----- put asm code here
...
}

how to write in Keil C compile ?

Parents
  • Read the sections on using the ASM and ENDASM directives in the C51 User's Guide and the Getting Started with µVision2 manual.

    If all you want is NOP, use _nop_ - see the Library Reference chapter in your C51 User's Guide.

    You can open the C51 User's Guide and Getting Started with µVision2 from the 'Books' tab in the uVision Project window.
    They're C51.pdf and GS51.PDF

Reply
  • Read the sections on using the ASM and ENDASM directives in the C51 User's Guide and the Getting Started with µVision2 manual.

    If all you want is NOP, use _nop_ - see the Library Reference chapter in your C51 User's Guide.

    You can open the C51 User's Guide and Getting Started with µVision2 from the 'Books' tab in the uVision Project window.
    They're C51.pdf and GS51.PDF

Children