proc main when $CARRIER call open_cap while 1 yield endwhile endproc proc open_cap if $CARRIER == 0 capture OFF exit else capture ON endif endproc