# Machine10 executable examples Build all guests with `make` in this directory. ## Examples - `retained-counter.S`: smallest Main Machine. It verifies generation-backed retained state, increments once per turn, sets a timer on init, and cancels it on the timer event. - `q-owner-workflow.S`: on a trigger, appends the event to app-named Q, reads status, performs owner-only prefix prune, and returns the final bounded read. Install with `q:append`, `q:read`, `q:prune`, and `maxCalls: 4` as the direct app owner. - `path-workflow.S`: stores the trigger payload in app Path and reads it back. Install with `path:write`, `path:read`, and `maxCalls: 2`. - `dynamic-origin.S`: inspects an `origin10.request.v1` event, returns `200` for `/health`, and `404` otherwise. Install it before enabling Origin fallback. - `run-now-q.S`: one-off profile that appends its normalized request event to Q and returns the queue read. Use `examples/run-now.mjs`. `control-main-machine.mjs` installs the retained counter, waits for init, sends one event, and waits for that occurrence. It intentionally leaves the Main Machine installed. ```bash export JMPKIT_APP_ID='' export JMPKIT_BEARER='' npm run build:guest node examples/control-main-machine.mjs ``` Run Now uses the same environment: ```bash node examples/run-now.mjs ``` Every program is freestanding and has no libc or operating system. These examples favor explicit assembly so the public ABI remains inspectable. The C header in `include/` is suitable for a later freestanding runtime or another language compiler targeting this ABI.