Do
If Pind.2 = 0 Then Gosub Test
Loop

Test:
Portd.5 = 1
Waitms 100
Portd.5 = 0
Portd.6 = 1
Waitms 100
und so weiter

Return