> From: David Tait > [cut] > CLRF REVERSE ; Precondition Register to 0 > BTFSC NORMAL, 7 ; MSb set? > BSF REVERSE, 0 ; Set LSb > BTFSC NORMAL, 6 ; bit set? > BSF REVERSE, 1 ; Set bit > BTFSC NORMAL, 5 ; bit set? > BSF REVERSE, 2 ; Set bit > BTFSC NORMAL, 4 ; bit set? > BSF REVERSE, 3 ; Set bit > BTFSC NORMAL, 3 ; bit set? > BSF REVERSE, 4 ; Set bit > BTFSC NORMAL, 2 ; bit set? > BSF REVERSE, 5 ; Set bit > BTFSC NORMAL, 1 ; bit set? > BSF REVERSE, 6 ; Set bit > BTFSC NORMAL, 0 ; bit set? > BSF REVERSE, 7 ; Set bit > > But then again this might be too obvious for the PICLIST ... > > David Yes, it's too obvious. Shave one cycle with: rrf NORMAL rlf REVERSE ... (repeat 8 times total) Unfortunately, NORMAL is destroyed in the process. However, we can turn this to our advantage if we want to bit reverse TWO registers at once: just add rlf REVERSE,w at the beginning. Both NORMAL and REVERSE will be swapped and reversed at the expense of W which is now destroyed (althouh hopefully not irreparably). Regards, SJH Canberra, Australia