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 11:29
Read: times


 
#28144 - RE: How to create a NOP in C
unsigned char x; 
:
x= x; 
:
"the "x=x;" line introduces some delay."

Beware! An optimising compiler may well optimise that line out altogether!

"The exact amount of time delay has to be determined browsing the machine code the compiler creates."

As I mentioned earlier, unless specifically guaranteed (as for _nop_), you cannot rely upon a 'C' compiler to generate any specific set of machine instructions from any given line of source text. If you need to be counting instructions to determine precise timing, you probably need to be working 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