
; here is the routine
; which waits till correct pattern sequence
; has been received and then quits.

make_sync:
   call read_bit
start_again:
   jnc make_sync       ; first bit must be = 1
   call read_bit
   jc start_again      ; second one must be = 0
   call read_bit
   jnc start_again     ; 3rd is not 1
   call read_bit
   jc start_again      ; 4th is not 0 
   call read_bit
   jnc start_again     ; 5th is not 1 
   call read_bit
   jnc start_again     ; 6th is not 1 
   call read_bit
   jc start_again      ; 7th is not 0 
   call read_bit
   jc start_again      ; 8th is not 0 
   call read_bit
   jc wait_again       ; 9th is not 0 
; if a program is here then
; it means that pattern
; has been passed sucessful.
; So just quit
   ret
