mk90.commands
Command run
Start one of the two built-in background worker types.
Synopsis
run count|pulse [count]Ordinary invocation: foreground child, PID 3; the shell waits. Not an allowed pipe producer.
Parameters
| Parameter | Meaning |
|---|---|
count|pulse | COUNT increments a counter; PULSE also beeps on each step. Names are case-insensitive. |
count | Optional number of steps, 1–9999. Omit it to run continuously. |
Description
Allocates PID slot 1 or 2 and prints its number. Each worker first sleeps for 32 RTC ticks, increments its unsigned 16-bit counter, and, for PULSE, emits a beep. A finite worker exits with code zero after its requested steps.
One step is nominally one second, plus scheduling and work delay. It is not a precision stopwatch. A completed or faulted slot can be reused and its private data is cleared.
Examples
run count 10
run pulse 3
ps
wait 1Limits and side effects
- RUN does not launch arbitrary files, shell commands or BASIC programs in the background. At most two slots are available, and a pipeline consumes one. An explicit count of zero is invalid; omission selects continuous execution.
Status and diagnostics
Success is status 0. Relevant status codes: 8, 15. See the diagnostic reference.