How do I write some code to turn a led ON and OFF with this code
pub wait_press(pin, ms) | debounce, t
'' waits for (active-high) button press of ms milliseconds
dira[pin] := 0 ' set pin to input mode
debounce := 0 ' clear debounce timer
t := cnt ' sync with system cnt
repeat until (debounce == ms) ' wait specified db time
waitcnt(t += clkfreq/1_000) ' hold 1ms
debounce := ++debounce * ina[pin] ' scan input

Comments
This is a double post!