David VanHorn wrote: >> As for variable initialization, I can't provide any information with any >> confidence. My reference is the avr-libc documentation and the gas (gnu >> assembler) documentation. For gcc tutorial, Smiley has a nice book out >> with some of the chapters on line on his website. > > You see where I'm coming from. :) I don't want to waste the > space/cycles with needless inits, but I want to absolutely KNOW which > it is. > Small chips are not a place to waste cycles or bytes. GCC might be a rude surprise then! There is an init section of code linked in that handles startup housekeeping that will take up several hundred bytes. That is what handles the "int foo = 1;" stuff, so I don't think that is avoidable. Of course it also handles setting up the call stack, DATA heap and all the rest of the stuff that goes into a high level language. If you are coming from assembly programming it all looks pretty "dirty", but essential. DLC -- ------------------------------------------------- Dennis Clark TTT Enterprises www.techtoystoday.com -------------------------------------------------
Message
Re: [AVR-Chat] Finally, really, actually, starting off with C
2009-01-07 by dlc
Attachments
- No local attachments were found for this message.