On Mon, 20 Mar 2000 00:46:49 +1100, you wrote: >At 12:58 AM 3/19/00 -0500, you wrote: > > > > >This is what I use for my 17Cxx programmer that also has the i/o lines >swapped. This is optimized for space but is considerably slower than >other solutions. However it is up to you to decide your priorities. > >;************************************** >;SPIN >;enter byte to reverse in abuff. >;exit with reversed byte in bbuff >;KnownZero must be zero of course. Code will leave knownZero as 0 > >;(Do NOT use with interrupt driven code that may use KnownZero!) > > > bsf KnownZero,3 ;count = 8 >yyr6 rrf abuff > rlf bbuff > decfsz KnownZero > goto yyr6 > >Jim .. or if you're short of registers, how about this : movlw 080 movwf dest loop rlf src rrf dest skpc ; loop until marker bit falls out the end goto loop