{{ blink10.spin }} VAR word n PUB main outa[25..16] := %11_11111111 dira[25..16] := %11_11111111 repeat repeat n from 0 to 9 onLED(n) delay1 offLED(n) repeat n from 9 to 0 onLED(n) delay1 offLED(n) PUB onLED(i) outa[25..16] &= !(1 << i) PUB offLED(i) outa[25..16] |= 1 << i PUB delay1 waitcnt(300_000 + cnt)