> John Payson, I'm NOT John Payson > Are you sure this works? I've tried it with CC5X > and haven't sucess. > > uns8 source; > MOVLW (0b.1101.1001); // this value is just > for test > MOVWF (source); > BTFSC (source.0); > XORLW (0x41); // 0100.0001 > BTFSC (source.6); > XORLW (0x41); // 0100.0001 > BTFSC (source.1); > XORLW (0x22); // 0010.0001 > BTFSC (source.5); > XORLW (0x22); // 0010.0001 > BTFSC (source.2); > XORLW (0x14); // 0001.0100 > BTFSC (source.4); > XORLW (0x14); // 0001.0100 > > It is very ingenious, but seens to have a bug > somewhere. Well it doesn't have a bug, it was intended to reverse seven bits and not eight. I'm no Payson, but it looks like for one more cycle you could do this: rrf source,w rrf source,w btfsc source,0 xorlw h'41' btfsc source,6 xorlw h'41' btfsc source,1 xorlw h'22' btfsc source,5 xorlw h'22' btfsc source,2 xorlw h'14' btfsc source,4 xorlw h'14' .lo ===== __________________________________________________ Do You Yahoo!? Bid and sell for free at http://auctions.yahoo.com