SPLat Logo

WaitOnK ii+

WaitOnK ii+

Normal SPLat inputs are capable of latching an OFF to ON transition. This is handy for such things as reading input button presses. The WaitOnK ii instruction will stall until a transition is registered on input ii. This could be a transition that was captured and stored before the instruction is executed. If there is no such prior transition, the instruction will wait indefinitely for a new transition. In a MultiTrack task this is not a problem.

Executing the WaitOnK instruction clears the latched transition, so a new OFF to ON transition would be required for a second WaitOnK to respond.

+ From dialect 16 the address argument will be jndexed when executed inside a MultiTrack task and will be indexed if the instruction is preceded by the IasJ: precode.

Dialect exclusions: Not available in dialects before 9.

See also ResetK InputK WaitOn WaitOnT WaitOff WaitOffT WaitOnKT KBeepOn, KBeepOff GoIfInK