MRJONES@NT.COM wrote: > > (assume SWITCH has been equated to a spare ram address) > > > > movf GPIO,w ; get switch valuesI'll try to follow you on t his... W = 00DC0BA0 > > movwf SWITCH ; store in ram locationSWITCH = 00DC0BA0 > > rlf SWITCH,f ; rotate left to put in bits 0 - 3SWITCH = 0DC 0BA0x where x = CARRY > movlw 0xf0 ; clear top nibble (may not need this)W = 1111 0000 > andwf SWITCH,f ;SWITCH = 0DC00000 > > swapf SWITCH,w ; swap upper and lower nibbles and put back in wW = 00000DC0 Hmmmm, I need W = DCBA0000 Did I miss something? I have been up all night and it is now 5:20AM so anything is possible. Does my BSF idea have any holes that you see? Thanks for the reply. Michael * TAKE THE '.NOSPAM' OUT OF MY ADDRESS TO REPLY ********************************************** Outside of a dog, a book is man's best friend. Inside of a dog, it's too hard to read anyway! Groucho Marx **********************************************