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/03 21:49
Read: times


 
#39390 - RE: calculating a delay ms and us
Responding to: ???'s previous message
If the compiler is smart, it will always give the BEST code, so there is no risk, if writing delay loops in C, independant of the type of the loop variable.

My µC/51 compiler, will use 'djnz', if the loop variable fits into 8 bit, and two nested 'djnz', if it fits in 16 bits, regardless if you count from -25 to +25 in steps of 5 or from 65000 to 10 step -1.

Which compiler does this not?



List of 10 messages in thread
TopicAuthorDate
calculating a delay ms and us            01/01/70 00:00      
   RE: calculating a delay ms and us            01/01/70 00:00      
      RE: calculating a delay ms and us            01/01/70 00:00      
         RE: calculating a delay ms and us            01/01/70 00:00      
         RE: calculating a delay ms and us            01/01/70 00:00      
            RE: calculating a delay ms and us            01/01/70 00:00      
         RE: calculating a delay ms and us            01/01/70 00:00      
            RE: calculating a delay ms and us            01/01/70 00:00      
   RE: calculating a delay ... addendum            01/01/70 00:00      
      RE: calculating a delay ... addendum            01/01/70 00:00      

Back to Subject List