Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/29/02 05:31
Read: times


 
#28114 - RE: How to create a NOP in C
In Keil C51, it'd be _nop_() - and Raisonance claims to be source-compatible with Keil.

Alternatively, I believe that Raisonance's inline assembler facility (unlike Keil's) simply injects opcodes into the compiler's output - so you may be able to use that. Read the manual

"NOP fuction that will do nothing for 1 machine cycle or some other length of time in the C language."

If you need to do such things, they are not usually appropriate in 'C'
In choosing to write in 'C', you are trading-off your direct control of the precise generated machine code in favour of the programmer's (and maintainer's) convenience.
Therefore, if you really need to control timing down to the precise machine instructions, you should probably be writing at least that part of your code in Assembler.

List of 10 messages in thread
TopicAuthorDate
How to create a NOP in C            01/01/70 00:00      
RE: How to create a NOP in C            01/01/70 00:00      
RE: How to create a NOP in C            01/01/70 00:00      
RE: How to create a NOP in C            01/01/70 00:00      
RE: How to create a NOP in C            01/01/70 00:00      
RE: How to create a NOP in C            01/01/70 00:00      
RE: How to create a NOP in C            01/01/70 00:00      
RE: How to create a NOP in C            01/01/70 00:00      
RE: How to create a NOP in C            01/01/70 00:00      
RE: How to create a NOP in C            01/01/70 00:00      

Back to Subject List