On Saturday 28 February 2009 09:00:50 David Kelly wrote: > On Fri, Feb 27, 2009 at 10:37:30PM +0100, Vincent Trouilliez wrote: > > On Fri, 27 Feb 2009 22:10:16 +0100 > > > > David Brown <david.br...@hesbynett.no> wrote: > > > sprintf((A_String + i), "%c", 0xff) > > > > > > has exactly the same effect as: > > > > > > A_String[i] = 0xff; > > > A_String[i + 1] = 0x00; > > > delay_about_1000_processor_cycles(); > > > waste_about_2000_bytes_of_code_space(); > > > > ROTF ! :-)))) > > sprintf() only costs 2kB? Sure enough, this little program is 2132 bytes > after strip:
Depends which vprintf you ask for, see http://www.nongnu.org/avr-libc/user-manual/group__avr__stdio.html#ga3b98c0d17b35642c0f3e4649092b9f1 Also, while it IS a pig (relative to the micro flash size and CPU) it is very powerful and for a lot of applications the speed is not critical. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list