Dmitriy, outstanding! I wish John would come back but it's good to know you are still around ;-) - Tom PSBS: I think of John everytime I use his BCD routine. Heck of a way to remember a guy ;-) At 22:36 09-03-02 +0300, Dmitriy A. Kiryashov wrote: >Hi Bob and guys. > >John Payson would be offered this. > >movfw DATAIN ;abcd efgh > abcd hgfe >btfsc DATAIN,0 ;exchange e and h >xorlw 0x09 >btfsc DATAIN,3 >xorlw 0x09 >btfsc DATAIN,1 ;exchange f anf g >xorlw 0x06 >btfsc DATAIN,2 >xorlw 0x06 > >1 clock less, result in W as well. > >WBR Dmitry. ------------------------------------------------------------------------ Tom Handley New Age Communications Since '75 before "New Age" and no one around here is waiting for UFOs ;-) -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.