Dmitry wrote: >John ! You are genius !!! You tell me idea how to swap bits. >And i know how to improve you solution. > > swapf source,w > btfsc source,3 > xorlw 0x88 > btfsc source,6 > xorlw 0x05 > btfsc source,4 > xorlw 0x05 > btfsc source,2 > xorlw 0x50 > btfsc source,0 > xorlw 0x50 > return > >WBR Dmitry . Well done Dmitry! *Really* impressive and going into my "snippet" bucket (who knows when you'll have to reverse bits?)! myke Check out "Programming and Customizing the PIC Microcontroller" at: http://www.myke.com