I will replace the assembler instruction "nop" by a C instruction. How do I made ?
What about _NOP_(); This should do the thing Cheers Thomas
This is, of course, a Keil C51 extension; it is not standard C!! See the C51 manual!
First, this solution attempts to use generic C but will be compiler dependent. I'm not very optimistic it would work: void foo( void ) { ; /* A semicolon without an instruction may produce a NOP. */ } Second, this will work in Keil C51 void foo( void ) { #pragma asm NOP ; Use the ASM directive to insert assembly within C code. #pragma endasm } Hope this helps. Mark Shelton Remove "nospam" from my e-mail address for direct replies.