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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/18/09 17:30
Read: times


 
#162556 - It's IMPOSSIBLE - but here's how...
Responding to: ???'s previous message
Erik Malund said:
you can NEVER predict the duration of a delay in 'C'.

In fact, you can never predict the duration of any piece of high-level language (HLL) source code[1].

You can, of course, examine the generated machine code after compilation - but the effort is (far) more than just writing it in assembler in the first place!

any change (related or not) to your code may change the delay

true

write it in assembler.

exactly!

And here's how: http://www.8052.com/forum/read/149030

See also: http://www.8052.com/forum/read/150987

and: http://www.8052.com/forum/read/98544



[1] Unless you have some explicit, compiler-specific extension; eg, the _nop_() "intrinsic" function in Keil.

List of 5 messages in thread
TopicAuthorDate
Delay loop in C Programming            01/01/70 00:00      
   you can't            01/01/70 00:00      
      Timer ticks            01/01/70 00:00      
      It's IMPOSSIBLE - but here's how...            01/01/70 00:00      
   You do not            01/01/70 00:00      

Back to Subject List