Mov r1, 20
Mov r2, 490   # round time
mov r4, 200

start:

Mov r0, 0     # r0 is the inteval between two triggers.
                      # the first trigger starts at 10 cycles later than the beginning of the round.
round:
 wait 10
        trigger 0000001, 10
        add r0, r1, r0   # r0 will grow along 20, 40, 60, ...
        waitreg r0
        trigger 1111110, 30   # the second trigger starts at r0 cycles later
        sub r3, r2, r0
        waitreg r3           # the round has a period of 500 cycles
        bne r0, r4, round    # if r0 != r4, go back to round.

        beq r0, r0, start
        nop
        nop
