The W register is really one of the harder working registers in the PIC, and it deserves a good compliment every now and then! I say we should stop asking for so much efficiency, and put xorlw 0xFF xorlw 0xFF in our main program loop so the W register knows it's doing a good job! _ / \ The Rouge Ribbon \ / Campaign: X Complement your W / \ register often! Of course, a REAL programmer would be able to compliment their hardest working register without problems: PC! It would be really neat to have a program which would take an ASM source file and insert COMF PC,1 randomly, rearranging the program as needed so it jumps to the correct location after a COMF PC,1, and still have the program run correctly (albiet a bit more slowly) Can you imagine the look on someone's face who's just dissassembled your code? "WHAT THE...?!?" Now there's real code protection. Anyone who can follow that code could rewrite it themselves. -Adam Martin Schdfer wrote: > > Paul: > > the directive < comf W > will assemble to < comf 0,1 >. This complements > the register file 00h, which is normally the INDF register and stores the > result back in INDF, whereever INDF is pointing to. > > The W-orking register can be complemented by < xorlw 0xFF >. > > martin > > ;********************************************** > ;** name: Martin Schaefer ** > ;** company: elektronik 21 GmbH, Germany ** > ;** e-mail: schaefer@elektronik21.de ** > ;**********************************************