A terminal has to echo the line the user just typed, and that length is a cell, not
a constant; clb_puts cannot do it because .tp takes a literal address. So this one
walks MAX compile time slots and decides per slot whether to print: CNT starts as a
copy of LEN, clb_nonzero turns "CNT != 0" into the flag F, and the print happens
inside `biz F` with the countdown *inside* the guarded body as well.
That last detail is the whole bug this round: with clb_dec_ip outside the guard, a
CNT of 0 wrapped to 2047 on the first skipped cell and the rest of the buffer came
out (LEN=0 printed E F G H). The fix is also why the driver covers LEN = 3, 0 and
8 -- the zero case is what caught it.
drv/puts_dyn.r8asm 13376 chars, out 65 66 67 65 66 67 68 69 70 71 72 (ABC, nothing, ABCDEFGH)
reference machine "ABCABCDEFGH" 6306 steps
Also learnt: `copy` takes two arguments (%this is the source), and it wants a clean
buffer -- the first version passed three and then reused a dirty T, which showed up
as a countdown that started from the wrong value.
Not in asm/test.r8asm: an 8 slot version costs thousands of characters and the
flagship is about a thousand under the 65536 limit. SPEC 5.3 records the contract
and that exception; the macro count is 53.