Files
R8Forge/drv
dsh bb1a434586 calc: stage 3 verified -- prompt, four digits, newline
drv/calc_disp.r8asm prints `> ` plus a number in decimal, twice (46 and 2047), so
the display path of the calculator is proven end to end:

    out 62 32 48 48 52 54 10 62 32 50 48 52 55 10
        >  sp  0  0  4  6  LF    >  sp  2  0  4  7  LF

tape 58382 characters, 564578 steps (two clb_digits calls dominate), tape_run and
derive agree.  This one fits under ROT-8-viz's 65536, unlike the two %rep 16/6
drivers.

The probe also pinned down which scratch really is sensitive: with cell 0 or the
four REG cells preset the output does not change (load erases, and the digit
shift chain flushes REG), but cell S+10 (the round counter, only set_1, never
cleared) and S+11 (clb_add_ip scratch) do change the first print -- "0047" and
"0000" respectively.  So "the caller must hand in clean scratch" is real, and the
two prints need the erase between them.
2026-11-11 10:59:12 +08:00
..