Files
Basys3Terminal/docs/basic-manual.pdf
T
brad ArantandClaude Opus 5.5 8f098b5502 BASIC: RENUM [start[,step]] renumbers lines and their references
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>
2026-11-30 13:24:56 -08:00

586 KiB