Fixes the numbers after GOTO, GOSUB, THEN, RUN and ON ... GOTO/GOSUB; missing targets, quotes, REM and DATA are left alone. The new program is built above the old one and copied down at the end, so a step of 0, numbers past 65535, an over-long line or lack of memory change nothing. To make room without giving up --opt-code-speed: one decimal formatter (fmt_ul) shared by LIST, RENUM and number printing; fmt_num's output branches merged (same text for ~2M test values); parse_num reads the whole part and decimals in one loop. Works around an SDCC 4.5 bug that turned a 0-trip loop into a 256-trip djnz. Adds basic/test-renum.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
32 KiB
32 KiB