>-----Original Message----- >From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] >Sent: 27 April 2005 14:56 >To: Microcontroller discussion list - Public. >Subject: RE: [PIC] HiTech C and Local Variables > > >Hi Mauricio, > >Thanks for your post. TBH I've been doing that for the last >few days. (divide and conquer - the most basic debug approach >of course.) It's proving extremely hard to pin down though. >Keep plugging away I know! ;) > >The fact that no one so far has said "yes, HiTech C can cause >trouble sometimes with local vars" indicates at least it is >probably my fault and not the compiler, so I am in a position >to deal with it I think. > >James James, Yes, Hitech can cause trouble sometimes with local vars! However, only under very specific circumstances. If you enable optimisations, the compiler attempts to use as many redundant (for that function) SFR's as possible to contain local variables, such as PRODH, PRODL, FSRx etc. If you include inline assembly that uses these registeres, the compiler can't "see" it, so local variables can get scrubbed unintentionaly. Regards Mike ======================================================================= This e-mail is intended for the person it is addressed to only. The information contained in it may be confidential and/or protected by law. If you are not the intended recipient of this message, you must not make any use of this information, or copy or show it to any person. Please contact us immediately to tell us that you have received this e-mail, and return the original to us. Any use, forwarding, printing or copying of this message is strictly prohibited. No part of this message can be considered a request for goods or services. ======================================================================= -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist