Counter equ 20 ; variable to put the counter in
; Main code here.
; At some point it'll call RoutineName
RoutineName
movlw b'01111111'
movwf Counter
RoutineLoop
Goto Transmit ; this being the routine to be done seven times
RRNFC Counter,1 ; roll the bits right, don't use carry, store result in counter?
BTFSC Counter,1 ; check counter. skip next line if it's clear?
Goto RoutineLoop ; repeat loop if there are still bits in Counter
Return ; if there are no bits in Counter return to where RoutineName was called