Files
ROT-8-viz/tests
dsh a083a3422c I/O: serial ASCII by default, numeric I/O behind -n/--numbers
The library can now print decimal digits (ROT-8's clb_digits/undigits), so a tape
usually wants characters out -- and serial was the one mode you had to remember
to ask for.  Flip that around:

    rot8_test tape          serial ASCII (cell >= 8 bits)
    rot8_test -n tape       the old decimal numbers

The default follows the geometry: a serial character needs 8 bits (7 data + 1
spare), so a 1..7 bit cell gets the numeric I/O instead -- 1-bit tapes keep
working with no extra flag.  Asking for -s/--serial (or --parity/--stop/--7e1) on
such a cell is still an error (exit 2), and -n together with a serial option is
now rejected as contradictory (exit 2).

--input follows the mode: text in serial, numbers with -n.  It was already
deferred until the whole command line was parsed, so order does not matter.

Docs: the README's I/O section is rewritten around the new default, the option
table gains -n/--numbers, the examples that feed numbers now pass -n, and the
INP/OUT note at the top explains the two modes.  --7e1 is unchanged apart from
being an explicit frame on top of a default that is already serial.

Also fixes the usage() printf: the examples had seven %s and only six program
arguments, one short (a stale bug, now matched up).
2026-11-09 16:25:02 +08:00
..