Michael Rigby-Jones wrote: > GCC lacks intrinsic support for Harvard memory architectures, i.e. > accessing data in program memory has to be performed through a macro. The > HiTech compiler automaticly puts 'const' objects in program memory and you > can access such objects directly through a pointer, no macros etc. You > can even access both data and (most of) program memory through the same > pointer which makes string handling functions so much simpler. > > GCC lacks suppport for bit variables, meaning writing to pins requires > using bit masks. Worse still an entire byte is used for each boolean > variable (they do not get packed). Michael, I used to believe that gcc lacked intrinsic support for Harvard memory architectures and bit variables too. However, I've since learned that depends what you mean by intrinsic. It's entirely possible to add support for both of these paradigms by using RTL and introducing additional compiler passes. This is not done by the AVR port because the authors there chose to generate instruction mnemonic text output at a very early stage in the compilation. If instead they had chosen to keep the intermediate code in RTL objects longer then they would've been able to introduce (stronger) concepts for bit variables, etc. To say gcc lacks this support is really another way of saying that the authors didn't see a way to introduce this support. (I'm not trying to dismiss the original author's efforts - I think they did an outstanding job.) A better way to make your statement is: "current gcc ports could do a much better job supporting Harvard architectures and bit variables." Scott -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist