>-----Original Message----- >From: Jinx [mailto:joecolquitt@CLEAR.NET.NZ] >Sent: 23 April 2004 09:47 >To: PICLIST@MITVMA.MIT.EDU >Subject: Re: [PIC:] 12F675 strange behaviour > > >> I presume that the recommendation is to set the flags individually, >> even though it might cost an instruction or two, for the >sake of being >> easier to read: > >In the long run you'll thank yourself for using individual >BSFs to improve readability. Unless there's a desperate need >to save time I would always use > > clrf INTCON > bsf INTCON,T0IE > bsf INTCON,GIE > >rather than > > movlw b'10100000' > movwf INTCON > >as SFR bits have descriptive names, which is half-way to a comment > You can also use this format to show bits without resorting to multiple bsf/bcf movlw (1 << T0IE) | (1 << GIE) movwf INTCON 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. ======================================================================= Any questions about Bookham's E-Mail service should be directed to postmaster@bookham.com. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.