> > msullivan@vax.niobrara.com (Mark K Sullivan) wrote: > > > Using the 16C5x (no ADDLW instruction), can anyone figure out how to form the > > 2's complement of W without using a file register? And I don't mean a look-up > > table ;) > > Maybe it's too early in the morning, but what's wrong with > > xorlw 0xFF > addlw 1 I guess it must have been to early in the morning (5x--no addlw). Depending upon what you mean by "without using a file register", how about: addwf 31,w ; w = f+w subwf 31,w ; w = f-(f+w) = -w