
;R0 holds the byte to be manipulated.
;Result is returned in R1

swap_bits:	mov	R2,#9
nxt_shift:	djnz	R2,shift
		jmp	end_shift
shift:		mov	A,R0
		rrc	A
		mov	R0,A
		mov	A,R1
		rlc	A
		mov	R1,A
		jmp	nxt_shift
end_shift:      ret
