At 10:42 1996-06-19 +0100, Harry wrote: >Does anybody have a routine for implementing bit reversal ? >i.e. 11000000 to be converted to 00000011 > >I need the source to be in some file register TEMP. A subroutine will be >called and TEMP will return the reversed value. > How about movlw 8 movwf count next_bit: rrf temp, f ;rotate through Carry rlf temp_r, f decfsz count, f goto next_bit movf temp_r, w movwf temp /Adrian