Try XORLW 0xFF instead. On Fri, 28 Apr 2000, KŸbek Tony wrote: > Date: Fri, 28 Apr 2000 15:19:36 +0200 > From: KŸbek Tony > Reply-To: pic microcontroller discussion list > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: COMF W > > Hi, > this is not do-able ( like you have written ). > COMF W will be compiled as: > COMF INDF which means the ram adress pointed at by FSR > > W will be replaced by '0' by the compiler which inturn is the ramadress > for the INDF register, which uses the FSR to point to an memory location > ;-) > are we having fun yet ? ( just kidding :-) ) > > To do an COMF on the W reg without using temp ram I belive was mentioned > on the list no so long ago ( this month ), cant really remeber the > 'best' way so You better do a search to find it. > > /Tony > > > > Tony KŸbek, Flintab AB > ΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣ > E-mail: tony.kubek@flintab.com > ΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣΣ >