Royce Pereira wrote:
So I have to write more 'C' code :) to get the same
stuff done, in the 'new & smarter' compiler!

Not more code, just correct code.

Have you tried returning the final value of your delay argument from the function? If the compiler optimizes only within the boundaries of individual functions it won't be able to take advantage of the fact that the result is not used. Strictly, this isn't correct either as the compiler could just assign zero and return. But, it may not be smart enough to do that and you may get closer to your original assembly language. Another way to go would be to write the function directly in assembly language.

Graham.




_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to