>-----Original Message----- >From: Jinx [mailto:joecolquitt@CLEAR.NET.NZ] >Sent: 23 April 2004 10:58 >To: PICLIST@MITVMA.MIT.EDU >Subject: Re: [Pic:] 12F675 strange behaviour > > >> movlw (1<> movwf INTCON > >WCW and MR-J > >How does that work ? I can see the inclusive-OR but..... (are >those left shifts ?) Yes, due to the format of the PIC bit instructions, the bit definitions are simply the bit position. By shifting 1 left by the bit position you create a simple bit mask. The OR function is used to combine multiple bitmasks together. e.g. from "P16F84.INC" GIE EQU H'0007' EEIE EQU H'0006' T0IE EQU H'0005' 1 << GIE = B'10000000' 1 << T0IE= B'00100000' IOR them B'10100000' 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.