THOREAU BASIC 3.6 - WHAT'S NEW ============================== Release date: 28 October 2026 Previous numbered release: 3.5, 21 October 2026 Version 3.6 lifts the text-cell limit for large screens, completes FN without parentheses, adds sprite visibility queries and a sprite pause, makes program loading safe and informative, and removes both the cause and the effect of the rare JIT error "JIT regional GOSUB escaped". Two changes can affect existing programs: assigning to the name of a defined DEF FN is now an error, and LOAD, RUN file$, MERGE or CHAIN of a file with a bad line no longer changes the program. Read UPGRADING at the end of this section. TEXT AREA FOR LARGE SCREENS --------------------------- - The text grid holds 512 columns and 256 rows instead of 256 x 128. TXTMAXX and TXTMAXY report the text cells of the screen: a 3840 x 2160 screen has 480 columns and 135 rows of 8 x 16 pixels (3.5 reported 256 and 128). - LOCATE, PRINT, SCREEN(row,column), CSRLIN, POS, TXTWINDOW (also named @n windows) and scrolling use the whole screen. A window right of column 256, such as TXTWINDOW @1,1,346,TXTMAXY,TXTMAXX, works; in 3.5 it raised Illegal function call. - Screens wider or taller than 4096 pixels still use 512 columns or 256 rows. The text grid of the screen and its 16 pages takes about 10 MB more memory. FN WITHOUT PARENTHESES ---------------------- - FN name with a space calls a defined function without arguments, as FNname does: after DEF FN Pi()=3.1416, PRINT FN Pi prints 3.1416. In 3.5 it read a variable called FN, followed by Pi, and printed 0 0. Without such a function, FN remains an ordinary variable name. - Assigning to the name of a defined DEF FN, for example FNPI=2 after DEF FNPI, or READ, INPUT or FOR with that name, raises Function name cannot be used as variable name (error 2, as GW-BASIC's Syntax error). Such a variable could never be read back, because reading the name calls the function. - Other variables whose names start with FN, such as FNERR or FNAME$, remain legal, as in 3.5 (GW-BASIC rejects them). - AUDIT also reports an FN name without parentheses that is never DEFined. The AUDIT PARFOR scalar check treats FNname and FN name as calls that may have hidden effects. The JIT leaves FN name without parentheses to the interpreter; results are the same with JIT ON and OFF. SPRITE STATE AND PAUSE ---------------------- - SPRITEVISIBLE(instance) returns -1 when the instance exists and is shown, and 0 when it is hidden, deleted or was never created. SPRITEEXISTS(instance) returns -1 when the instance exists, shown or hidden. Unlike SPRITEX and SPRITEY, neither raises an error for a missing instance; numbers outside 0..65535 are Illegal function call. Both also run in JIT-compiled code. - SPRITEPAUSE ON hides all sprites at once without changing them, and SPRITEPAUSE OFF shows them again as they were. SPRITE, MOVESPRITE, SHOWSPRITE and HIDESPRITE still work during a pause and show when it ends; SPRITEVISIBLE reports each instance's own state, not the pause. SPRITEOFF, RUN, CLEAR, NEW, LOAD and the end of the program end a pause. It is separate from the pause made by STOP and Escape, so CONT does not end it. - Typical use: SPRITEPAUSE ON before switching to an options or menu page, SPRITEPAUSE OFF when the game page is shown again. LOADING PROGRAMS ---------------- - LOAD, RUN file$, MERGE and CHAIN read the whole file before they change anything. A file with a bad line leaves the current program, its variables and files as they were. In 3.5 the lines before the bad one were already loaded, so a running program that trapped the error had lost itself, and a failed CHAIN had already dropped the variables not named by COMMON. CHAIN checks the file before COMMON filtering and DELETE. - Load errors name the place, for example Line too long (file line 1234, line 5680) or Direct statement in file (file line 17). The file line counts every line of the file; the second number is the BASIC line number when the text starts with one. ERR, ERL and ERROR$ are unchanged: the location is printed after the message and is not part of it. - A UTF-8 byte-order mark at the start of a program file is skipped. It caused Direct statement in file on the first line. JIT AND GOSUB ------------- - Compiled code no longer stops a program with JIT regional GOSUB escaped. The error could appear after a program was edited or loaded again in the same session: compiled code remembered, by line position, which subroutines always end in RETURN, and that knowledge survived program changes. It is now discarded whenever the program text changes. - When compiled code calls a subroutine that leaves it without RETURN (STOP, END, a GOTO out of it, or a statement the compiler leaves to the interpreter), the rest now runs in the interpreter with the GOSUB still active, exactly as with JIT OFF. UEFI MOUSE SPEED ---------------- - The raw PS/2 mouse, used when the firmware provides no pointer driver, moved the pointer one pixel per mouse count: about 48 cm of movement for a 1920-pixel screen. Thoreau BASIC now sets the mouse to 8 counts per mm and moves the pointer like a firmware pointer: the screen's width per 50 mm of movement (the UEFI rule of 2% per mm), equally fast in both directions. - Firmware Simple Pointer movement uses the screen width for both axes too; vertical movement used the screen height and was slower on wide screens. DOCUMENTATION ------------- - COLOR lists the COLOR @n forms of named text windows and COLOR ,bg. PRINT shows the PRINT @n syntax, LOCATE @n counts from the window's corner, and TXTWINDOW, TXTMAXX and TXTMAXY name their limits. HELP shows the same. UPGRADING --------- - Rebuild the Windows/UEFI interpreter from the 3.6 sources and re-create standalone EXE/EFI applications to include these changes. Replacing the interpreter does not update previously generated applications. - A program that assigns to the name of one of its own DEF FN functions now stops with error 2; rename the variable (AUDIT already warned about it). - Programs that kept their own variable per sprite to remember SHOWSPRITE and HIDESPRITE can use SPRITEVISIBLE and SPRITEEXISTS instead. - On UEFI machines that use the raw PS/2 mouse, the pointer moves faster than in 3.5; programs that read MOUSEX/MOUSEY need no change. VERSION 3.5 CHANGES =================== Release date: 21 October 2026 Previous numbered release: 3.4.4, 19 October 2026 Version 3.5 includes all changes since the 3.4.4 release. It implements decisions on behavior that the manual left open or described differently from the implementation, and it collects the fixes from a systematic review of the 3.4.4 sources. Several changes can alter the results of existing programs: numeric literal typing, PRINT line breaks, stricter WRITE and statement syntax, and the Windows joystick slot numbering. Read UPGRADING at the end of this section before moving programs or generated applications to 3.5. NUMERIC LITERAL TYPING (BEHAVIOR CHANGE) ---------------------------------------- - In a binary arithmetic operation (+, -, *, /, \ and MOD), an unsuffixed decimal literal takes the type of the other operand. Under DEFI64, LOMEM+200000 is calculated with 64-bit integers instead of SINGLE. With X#=1, X#+2.7 uses the DOUBLE value 2.7 and prints 3.7 instead of 3.70000004768372. At ^, a literal next to a DOUBLE operand is also used as DOUBLE. - Comparisons, assignments, FOR headers, logical operators, &H/&O literals and parenthesized literals are not affected, and an operation between two literals keeps the classic rule. A literal that the other operand's integer type cannot hold (I%+100000, I%+2.5) keeps its own type. A literal is never demoted next to a SINGLE or @ operand. Unary minus is not part of the literal, so X#*(-2.7) is unchanged. - At /, a SINGLE or DOUBLE literal is never turned into an integer: L&/12345678 divides in DOUBLE. The result of IIF and the result of an operation between two literals are not literals: X#+2.7*2 adds the SINGLE 5.4. - Unsuffixed whole numbers above 2^53 that fit in 64 bits are exact 64-bit integers everywhere. The documented A&&=9223372036854775807 now stores its value instead of raising Overflow. - The interpreter, the JIT and PARFOR apply the same rule. See NUMERIC LITERALS for the complete description. PRINT, PRINT USING AND WRITE ---------------------------- - On the screen and in text windows, a PRINT item that does not fit in the rest of the row, and is not longer than a row, starts on the next row instead of being split at the right edge, as in GW-BASIC. TAB and SPC are exempt. PRINT # and CAPTURE output are not affected. - PRINT USING with an empty format string, or with a format that contains no field, raises Illegal function call (previously Syntax Error). A format followed by ; or , but no values (PRINT USING "##";) raises Missing operand, the new error 22. These errors occur before anything is printed. Any run of ^ after a numeric field still selects exponent format, with the number of carets as the exponent width. - WRITE requires one comma or semicolon between values. Juxtaposed values or a stray separator are a Syntax error; a separator at the end is Missing operand. WRITE checks its whole value list before writing anything, so an error never leaves a partial record. Output remains comma-separated. - A tab stop beyond the right edge of a text region ends the row; output continues at the start of the next row. PRINT @n to a named text window now treats CHR$(7), CHR$(9), CHR$(10) and CHR$(12) as BEL, tab, newline and clear-window, like ordinary screen output. - PRINT USING no longer prints the last digit one too low for about a third of values from 1E5 upwards, no longer drops literal text after the last field when the statement ends with ; or , and no longer crashes with more than 40 # characters after the point. A string in a numeric field is an error instead of printing 0. COMMAND PROMPT AND DIRECT MODE ------------------------------ - At every prompt the visible page temporarily becomes the active page. Ready, the typed line, direct-mode error messages and the output of typed statements appear on the page that is shown, also when the program left a hidden drawing page selected. The program's page roles are saved and are restored when the program continues, unless pages were selected explicitly at the prompt in the meantime. - GOTO, GOSUB, IF..THEN n, CHAIN, RESUME, RETURN, NEXT and WEND typed at the prompt run the program as a running program: ON ERROR trapping, STOP and CONT, ERL, timers and events work as usual. In 3.4.4 such a run had no error trapping and no CONT point. - A GOSUB typed at the prompt continues the rest of the typed line after its RETURN, as in GW-BASIC: GOSUB 100: PRINT X prints after the subroutine. RESUME typed while the program is paused in its error handler continues the program as a running program. - JIT, AUDIT and PROFILE typed at the prompt may be followed by ': statement'; the rest of the line runs. Previously it was dropped or refused. - The STOP, breakpoint and CONT NEXT messages appear on the visible page instead of being drawn into a hidden page that is being built. STATEMENT SYNTAX ---------------- - Most statements now check for invalid trailing text before they act. For example KILL, NAME, OPEN, CLOSE, SAVE, POKE, COLOR, VIEW, WINDOW, CLS, the sprite commands, INPUT, LINE INPUT and ON ERROR GOTO previously performed their action and then reported the Syntax error. Assignments and PRINT still act first. MERGE, DELETE and RENUM no longer ignore trailing text. - GOTO n and GOSUB n reject trailing text like other statements. GOTO BASE1 OFFSET jumped to BASE1 and GOSUB 100 X=7 ran X=7 after the RETURN; both are now Syntax errors. A REM after the target needs a colon: GOTO 30 REM x is a Syntax error, GOTO 30 : REM x and GOTO 30 ' x are accepted. - An ELSE without an unmatched IF before it on the same line is a Syntax error, raised like other invalid trailing text: INPUT "z";Z ELSE PRINT "b" no longer prompts first, while an assignment or PRINT in front of it still acts first. AUDIT reports the same errors as RUN. - LOCATE @n,row;col reports Syntax error instead of "Expected ,". DEF FN ------ - DEF FNname()=expr defines a function without arguments, called as FNname() or FNname, for example DEF FNDICE()=INT(6*RND+1). Passing arguments to it is Wrong number of args. The form without parentheses, DEF FNPI=3.14159, now defines a function too; FNPI previously read a variable. - Unsuffixed parameters keep the type captured when the DEF ran, also after a later DEFxxx. The body, and EVAL text and GETVAR names evaluated inside it, refer to the parameter instead of a global variable of the new default type. - A DEF FN typed at the prompt keeps its string literals; FNA$ returned garbage once the input line was reused. An overlong spaced FN name reports Identifier too long. Interpreted FN calls keep their argument storage off the C stack, so the recursion guard (Out of memory) also holds on small UEFI firmware stacks. LONG PROGRAM LINES ------------------ - Every line that fits the limits of 255 typed and 244 stored bytes can be executed. A line may hold as many tokens as it has bytes; previously a dense line was accepted but failed at run time with Too many tokens once it exceeded 127 tokens. - Lines with more than 127 tokens are always interpreted, never JIT-compiled; results are unchanged. A PARFOR body that contains such a line is rejected with a diagnostic. EVAL keeps its 127-token limit. - Expression nesting is limited to about 63 nested parentheses, about 42 nested function, array or FN calls and about 126 consecutive signs or NOTs. Deeper nesting raises Out of memory (error 7). Every expression of up to 127 tokens stays within these limits, as before. - Typed indentation is kept and counts toward the 244 stored bytes. EVENTS, TIMERS AND INLINE IF ---------------------------- - Named events, programmable timers and mouse handlers are now also dispatched between the statements of an inline IF ... THEN ... ELSE clause, as the manual describes. The handler's RETURN resumes inside the clause; the rest of the clause and the ELSE skipping continue normally. Previously dispatch waited until the clause had ended. - Ending a program inside a timer or mouse handler no longer leaves the handler marked active, which stopped later runs started at the prompt from dispatching handlers. A statement no longer runs after a failed timer or mouse dispatch, and the error is reported at the right line. CHAIN, COMMON, NEW AND LOAD --------------------------- - COMMON is declarative, as in GW-BASIC: when CHAIN runs without ALL, every COMMON statement of the current program counts, whether or not it was executed, also after END or in an untaken IF branch. Unsuffixed names take the DEFxxx type in force when CHAIN runs. Executing a COMMON again no longer raises Duplicate definition. - CHAIN checks that the file exists before discarding the current program, no longer truncates lines longer than 299 characters and expands TABs like LOAD. CHAIN, LOAD and MERGE no longer stop at a line that contains only blanks. - A plain CHAIN drops the old ON ERROR and ON BREAK targets and keeps ERR and ERROR$. CHAIN into an empty program no longer runs a line of the old program, and CHAIN to a start line that does not exist reports Undefined line number without a stale error position. - NEW inside a program ends the run with a full NEW. LOAD inside a program also resets the DATA pointer, DEF FN definitions and the ON ERROR target. FILES, PROGRAM NAMES AND LOCKS ------------------------------ - SAVE, LOAD, RUN, MERGE and CHAIN append upper-case .BAS as documented; 3.4.4 appended .bas, so DIR "*.BAS" missed saved programs. CREATEEFI and CREATEEXE append .EFI and .EXE. - On Windows, in a case-sensitive folder, LOAD, RUN, CHAIN and MERGE use an existing NAME.bas (or another case variant of the appended extension) when the appended NAME.BAS does not exist, so programs saved by 3.4.4 and earlier still load. SAVE always writes NAME.BAS. - FILES and DIR report File not found (error 53) when nothing matches or the directory does not exist, as in GW-BASIC; they returned silently. With S, a "Directory of" header is printed only for a directory that contains a match. - SESSIONLOCK compares paths by identity instead of spelling: after CHDIR the same relative name no longer looks held, and on Windows any name that reaches the held lock file (another spelling, an 8.3 name, a SUBST or mapped drive versus the UNC path, a junction or link) counts as the held path. - A file that is open in any slot cannot be opened for OUTPUT or APPEND in another slot (INPUT and RANDOM may still share it), and KILL, wildcard KILL and NAME refuse open files (File already open). NAME onto an existing file reports File already exists (error 58). CREATEEFI and CREATEEXE refuse to overwrite the running EFI image, THOREAU_GM.TBGM or a file open in a BASIC slot. PARFOR ------ - Every store to a shared array must have the PARFOR variable exactly in the same subscript position; a body that stores both A(I,J) and A(J,I) is rejected. - A shared array that the body writes may be read only in the worker's own slice. B(I)=B(I-1)+1 is rejected with a diagnostic because another worker may write B(I-1) at the same time; A(I)=A(I)*2+B(I-1) is accepted when B is only read. Arrays that are only read are unrestricted. - PROFILE EXACT and PROFILE INTERPRETER reject PARFOR with a diagnostic, as documented. NEXT I,J closing a PARFOR and an outer FOR works, and RESUME NEXT after an error in a PARFOR continues after the loop instead of rerunning the body. - GOSUB inside a PARFOR body may nest as deeply as in FOR (128 levels at top level); beyond 15 nested levels PARFOR previously failed with PARFOR worker failed. One level more than FOR allows raises Out of memory, reported at the PARFOR line. - Plain numeric variables whose names start with FN (FNK, FN1) are compiled like other scalars when no DEF FN defines that name, so loops that use them run natively and may be PARFOR bodies. - On UEFI, each PARFOR worker runs on a 512 KiB stack that Thoreau allocates instead of the firmware's application-processor stack, whose size the firmware chooses (often 32 KiB). The GM sample-bank loader's parallel decoders use the same kind of stack. SCREEN MEMORY (SCRNADR) ----------------------- - On UEFI single-page displays that present through GOP BLT or ROTATE, SCRNADR now returns the cached drawing surface (THOREAUADR("BACKBUFFER")) instead of the last presented frame, so PEEK and BSAVE see drawing at once, with JIT ON or OFF. Sprites, SPRITETEXT OVER ink and the mouse pointer are display overlays and do not appear there; POKE and BLOAD show at the next presentation. THOREAUADR("FRAMEBUFFER") remains the composed display. - Where SCRNADR is the composed page (UEFI direct GOP, multi-page setups, Windows), PEEK and BSAVE read the picture as composed at the time of the read, sprites included; on a single-page UEFI direct GOP display the visible mouse pointer reads on top of them. With JIT ON, a read after drawing under a sprite in the same compiled loop returned the raw drawn pixel. - SCREEN PAGES n starts page 0 from the drawing and the current sprites instead of a possibly outdated presented frame. On UEFI GOP-BLT displays with RGBX or bit-mask pixel formats, sprites, SPRITETEXT ink, the mouse pointer and debugger screens no longer show red and blue swapped. On UEFI single-page displays the mouse pointer no longer disappears under or after moving sprites. WINDOWS JOYSTICK SLOTS (BREAKING CHANGE) ---------------------------------------- - Slots 0..3 are XInput user indices 0..3 only; an empty XInput slot stays empty. Slots 4..15 are the connected WinMM joysticks in WinMM ID order, renumbered without gaps, leaving out XInput-class devices because they already appear in 0..3. A controller is listed once, and no device hides another. - In 3.4.3 and 3.4.4, a WinMM joystick with ID 0..3 used slot 0..3 only when XInput had no controller at that index, slots 4..15 were WinMM IDs 4..15, and an XInput pad could be listed twice. Slot numbers of WinMM devices therefore change. - All WinMM IDs are probed at the first query; afterwards one ID is re-probed every 100 ms and a device that stops answering is dropped at once, so slots 4..15 can move when devices are plugged or unplugged. Without an XInput DLL all controllers appear from slot 4. A fifth XInput-class pad is not listed. NETWORK ------- - Windows NETINFO shows the IPv4 address, subnet mask and gateway of the adapter that carries the default route (else the first configured adapter), the first system DNS server and the real Winsock state. It previously printed fixed text. - Network arguments are never shortened. An HTTPGET$ url$ longer than 2047 bytes, a headers$ longer than 4095 bytes, a DNS$ host$ longer than 2047 bytes or a TCP OPEN host$ longer than 511 bytes is String too long (error 15); CHR$(0) in these arguments is Illegal function call (error 5). The errors occur before any network action and leave NETERROR$ and HTTPSTATUS unchanged. - TCPEOF of a closed or never-opened slot is 0 in both builds. With unread data still queued, TCPEOF stays 0 until it has been read; the UEFI raw-SNP path reported -1 as soon as the peer closed. - The 1 MiB HTTPGET$ limit applies to the response body on every backend. A longer body returns "" with NETERROR$ "HTTP response exceeds 1 MiB"; the UEFI raw-SNP path counted headers and returned truncated bodies. On UEFI each DNS$, HTTPGET$ and TCP OPEN sets its own NETERROR$ text and HTTPGET$ its own HTTPSTATUS. - A DNS$ or HTTPGET$ nested inside an HTTPGET$ argument no longer changes the outer URL or sends its headers with the outer request. On Windows, TCP TIMEOUT also applies to connect and to sockets that are already open. BREAKPOINTS, OPTIONS AND CONT ----------------------------- - LOAD, NEW and a CLEAR typed at the prompt clear source-line breakpoints; BREAK CLEAR removes them. A CLEAR inside a running program, such as the common 10 CLEAR ,32768, keeps them. CONT stops at a breakpoint on the line where it resumes unless the pause was that breakpoint. - OPTION ERRORPRINT survives RUN, CLEAR and CHAIN; NEW and LOAD, including RUN file$, reset it to 0. - CLEAR accepts the GW-BASIC memory arguments CLEAR [n][,[m][,k]] and ignores them. CLEAR also resets the DATA pointer and invalidates CONT. - With JIT ON, CONT resumes an Escape break inside compiled code as with JIT OFF, and the sprite-preserving Escape pause applies. In rare cases (a break inside a cross-region GOSUB chain, recursion that holds a loop open, or very deep loop state) CONT still reports Can't continue. - The FOR limit and STEP are converted to the loop variable's type: FOR I%=1 TO 40000 is Overflow, and FOR I%=1 TO N/2 no longer runs one pass short. Keyboard INPUT accepts an empty last field and answers too many fields with ?Redo from start. - ERR uses the GW-BASIC numbers for standard errors (many were 255; Bad file name is 64). Errors while tokenizing a stored line can be trapped with ON ERROR. ROBUSTNESS AND COMPATIBILITY FIXES ---------------------------------- - Arithmetic: EXP near 709.4, SIN, COS and TAN argument reduction (also above 1.6E6), ATN, LOG, SINH and TANH are accurate to a few units in the last place. Decimal literals and PRINT round to the nearest value (8D-13 printed 8.00000000000001D-13). &H/&O literals with % or & are narrowed and range-checked (&HFFFF% is -1). VAL never raises an error, also after many leading blanks. A negative base raised to an integer power above 65536 keeps its sign. An INT64 FOR counting past -2^63 raises Overflow. Hypercomplex LOG near |z|=1, TAN/TANH of small values and LOG/SQR of tiny vector parts are fixed. - JIT and interpreter agreement: more than 25 cases where JIT ON and JIT OFF gave different results, errors or error lines are fixed, among them loop variables assigned inside a native loop, GOTO out of a native FOR, integer \ and MOD result reuse, rounding of subscripts and coordinates, signed zeros of @ arithmetic, component reads of real values, an END inside a compiled region (files are now closed) and errors in WHILE conditions. On UEFI, deeply recursive GOSUB code with JIT ON no longer stops with JIT nesting too deep; it runs as with JIT OFF up to the GOSUB limit. An error inside a subroutine called from compiled code is reported at the subroutine's line, and long chains of nested GOSUB subroutines no longer take seconds to compile. - Control flow: RETURN discards the subroutine's FOR and WHILE frames and FOR re-entry no longer leaks frames (eventual Out of memory). Program edits, DELETE, NEW and LOAD discard stale GOSUB, FOR and IF state. RESUME NEXT after an error in an IF condition or THEN clause continues at the right place. RETURN n checks its target before leaving the subroutine. CLEAR inside a handler no longer disables handlers. - Text input and output: fixed TAB(n) at the current column, CSRLIN and POS outside a text window, PRINT WRAP blank lines and parenthesized widths, INPUT and LINE INPUT in a small VIEW PRINT region (hang) and type-ahead keys lost by the break poll. INPUT assigns no field when a later field fails. TXTWINDOW and VIEW PRINT must overlap (Illegal function call). A SCREEN mode change removes named text windows instead of keeping rectangles that may not fit the new screen. - Files: PRINT #, WRITE # and PRINT # USING write CHR$(13) inside strings unchanged. APPEND overwrites a trailing ^Z. INPUT # keeps empty fields and reads a numeric prefix like VAL. LINE INPUT # reads lines longer than 255 characters. A packaged application flushes buffered output when it exits. SAVE checks its syntax before truncating the file. ABORTFILES discards a file CAPTURE. MERGE appends .BAS. - Graphics and sprites: fixed PAINT with a border color and inside a VIEW, LINE and CIRCLE with huge coordinates (hang), DRAW TA, M, error handling and strings longer than 511 bytes, WINDOW with reversed corners, BMP files with BI_BITFIELDS masks, and POKE or BLOAD into SCRNADR on a single page. VIEW and COLOR check all colors before acting; a failed LINE leaves the last point unchanged; PSET, PRESET and LINE evaluate all operands before converting coordinates. SPRITECOLLIDE returns 0 for a deleted or never-created instance. Sprites reappear after STOP and a typed GOTO; PCOPY into the active page recomposes sprites. - Sound: WAV files with an odd final chunk and MIDI files with bytes after the last track load. SOUNDACTIVE and SOUND INFO no longer count the BEEP tone as a note voice. A bare SOUND PRELOAD uses automatic workers after a failed SOUND PRELOAD n. The audio engine recovers from a worker failure without losing its state. UEFI HDA no longer loops after one FIFO underrun and works with controllers left in 64-bit DMA mode. A GM sample bank with tens of thousands of samples no longer spends up to a minute checking sample overlaps while loading. - UEFI: TIMER keeps its origin across BASIC resets and no longer jumps back. Fixed RGBX/BitMask framebuffers, absolute pointer scaling, the PS/2 mouse left streaming (locked keyboard), COMMANDLINEARG$ without the image name, NAME into another directory, KILL and FILES /S with names above U+00FF, firmware TCP and DNS tokens after timeouts, and clean exits on startup failures. The exit releases display, JIT and PARFOR memory and closes TCP slots. THOREAU.CFG: an overlong file gets its own warning, KEYB takes the whole code word, ROTATE: 90 warns, and the startup keyboard line reads Keyboard: GR (CP850, firmware) as documented. - Windows: timers no longer preempt running handlers; MOUSEPOS round trips exactly when the window is scaled; MOUSE ON/OFF, INPUT$ and the pagers no longer flood or busy-wait; paste into INPUT is faster; drive-relative names such as C:FILE no longer resolve into the temporary folder; the KEYREPEAT state no longer races between threads; Ctrl+V works after F12 and X in INPUT; XInput, iphlpapi.dll and avrt.dll load from System32 only. - Debugger and tools: RENUM no longer rewrites ON ERROR GOTO 0, now rewrites RUN n and TRON ranges, and no longer moves orphaned breakpoints onto other lines. REPLACE ...,WORD and XREF treat numbers such as 1E5 and &HFF correctly. TRACE prints {Q=6} as documented. F12 during INPUT$ and SELECTBOX opens the debugger at once; clicks, wheel and mouse motion made inside the monitor no longer reach the program. The Machine Explorer no longer writes into an active CAPTURE, and its SAVE checks the range before truncating the file. UPGRADING --------- - Rebuild the Windows/UEFI interpreter from the 3.5 sources and re-create standalone EXE/EFI applications to include these changes. Replacing the interpreter does not update previously generated applications. - Numeric literals: check calculations that combine a DOUBLE value with an unsuffixed fractional literal; they now use the DOUBLE value of the literal. Integer address arithmetic under DEFI64 no longer goes through SINGLE. Add a suffix, as in X#+2.7!, where the old SINGLE value is wanted. - Joysticks on Windows: WinMM devices have new slot numbers. Scan slots 0..15 with JOYPRESENT instead of storing slot numbers, and scan again after devices are plugged or unplugged. - PRINT: a screen layout that relied on an item being split at the right edge now sees the item start on the next row. Shorten the item, position it with LOCATE, or split the string explicitly. - WRITE: separate every value with one comma or semicolon and remove trailing separators. GOTO or GOSUB followed by REM without a colon, a stray ELSE and other invalid trailing text are now Syntax errors; run AUDIT to find them. - SCRNADR: on UEFI single-page GOP-BLT/ROTATE displays it now addresses the sprite-free drawing surface. Use THOREAUADR("FRAMEBUFFER") where the presented picture is wanted. - Programs saved by 3.4.4 and earlier end in .bas. File masks are case-sensitive, so DIR "*.BAS" does not list them; LOAD still finds them. Rename them to .BAS if needed. - The manual is THOREAU_BASIC_3.5.txt; the cumulative release notes are thoreau_basic_3.5_changes.txt. VERSION 3.4.4 CHANGES ===================== Release date: 19 October 2026 Previous numbered release: 3.4.3, 17 October 2026 Version 3.4.4 includes all changes since the original 3.4.3 release: optional debugger control and faster startup for standalone applications, more efficient full-screen CLS, UEFI directory/save-commit and mouse-wheel fixes, and universal packed RGB colors with converted demos. Some additions were first circulated in interim builds still labeled 3.4.3. GETBMP, GETSPRITE and joystick/gamepad polling belong to the original 3.4.3 release and remain available. STANDALONE DEBUGGER CONTROL (NODEBUG) ------------------------------------ - CREATEEFI file$ [NOGM] [NODEBUG] optionally disables the built-in debugger in the generated EFI application. CREATEEXE supports the same NODEBUG option for generated Windows applications. The default remains enabled. - NOGM and NODEBUG are independent, case-insensitive suffixes outside the filename expression. Either order is accepted, once each, without commas. Unknown or repeated suffixes are errors before the output is opened. - NODEBUG is saved with the embedded program and read at application startup. It does not disable the debugger in the interpreter creating the file, require a configuration file, or change soundbank inclusion. - In a NODEBUG application, F12 is silently ignored by debugger/event input during execution and input dialogs. Direct THOREAU commands, including diagnostic subcommands, report Debugger disabled in this application. The central debugger/monitor entry points are also guarded. - The setting persists across RUN, CLEAR, NEW, LOAD and CHAIN. Escape, ON BREAK, STOP, errors, SYSTEM and ordinary BASIC input retain their existing behavior. KEYDOWN remains an independent held-key query. - NODEBUG disables access, not the presence of debugger code or embedded BASIC source. It is not encryption, tamper resistance, a kiosk lock or protection against external debuggers, binary edits or memory access. - Rebuild Thoreau with these sources, then recreate the application with NODEBUG. Older generated EXE/EFI files are not changed automatically. FASTER STANDALONE STARTUP ------------------------ - Generated Windows EXE and UEFI EFI applications read embedded BASIC source through a 16 KiB buffer, avoiding a separate platform file read for every line header and line text. Import batches token/JIT/PARFOR cache and profiler invalidation rather than repeating that work for each inserted line. - This targets startup of packaged programs, especially large listings such as Cabin Writer. The existing bulk LOAD/MERGE machinery is reused; this is not a new general LOAD/MERGE optimization or a change to wavetable loading. - Program-section bounds, record validation and exact section consumption remain checked. Success and failure close the scoped import and file. Packages still embed BASIC source and the runtime. Startup time depends on program size, assets, storage and firmware; no fixed time is promised. MORE EFFICIENT FULL-SCREEN CLS ----------------------------- - Full-screen CLS fills the active page's framebuffers directly and marks sprite damage once for the cleared screen, avoiding per-pixel sprite-damage bookkeeping. Cursor, text-grid and graphics-current-point resets remain. - Active/visible page roles and sprite recomposition retain their meaning. Named/clipped text-window clears keep their existing paths. This reduces clearing overhead; no measured frame-rate multiplier is specified. UEFI DIRECTORY ENUMERATION AND SAVE COMMITS ------------------------------------------ - GETFILES for the current directory reuses its existing directory handle when the internal directory is ".", avoiding firmware-dependent Open(".") behavior, including at a volume root. The borrowed handle is kept open. Masks, flags, case preservation and skipped-name reporting are unchanged. - UEFI sibling renames now give firmware the destination leaf name rather than a full path in EFI_FILE_INFO. This fixes strict-firmware rejection of renames within subdirectories, including NAME and FILECOMMIT's staged-file promotion and previous-copy rotation. Destination filename case is kept. - This is a firmware path-compatibility fix. File permissions, read-only media, available space, device errors and flush support still apply. FILECOMMIT does not make FAT renames power-failure atomic; retain an independent recovery generation for important data. UEFI MOUSE-WHEEL HANDLING ------------------------- - Simple Pointer and raw PS/2 wheel deltas share direction normalization: the intended MOUSEWHEEL convention is increasing for up/forward and decreasing for down/backward, matching Windows. Compare successive values to obtain movement; backend reporting does not guarantee physical detents. - A nonzero Simple Pointer RelativeMovementZ is consumed even when firmware reports ResolutionZ=0. Previously the advertised capability could suppress wheel movement which firmware was actually sending. - Hardware support remains firmware-dependent. No wheel movement can be recovered when the selected backend reports none. Absolute Pointer handles X/Y and buttons, without a wheel interpretation of CurrentZ. No new direct USB HID mouse backend is added. A reported desktop UEFI wheel failure remains unresolved; the laptop fix is not a universal compatibility claim. UNAMBIGUOUS RGB COLORS (BREAKING CHANGE) --------------------------------------- - All numeric color arguments now mean packed &H000000..&HFFFFFF RGB, including 0..15. Decimal 2 and &H000002 both mean dark blue, never green. This includes text/window/selector colors and transparency keys, as well as PSET, PRESET, LINE, CIRCLE, PAINT, POLYFILL, DRAW, VIEW and GPRINT. - POINT(x,y) always returns the actual packed RGB pixel; exact matches to classic colors are no longer replaced with palette indices. It returns -1 outside the screen or active graphics VIEW. A valid POINT result can be passed straight to a drawing command without changing its color. - RGB(r,g,b) constructs an ordinary integer color from components 0..255. PALETTERGB(index) returns an ordinary integer holding the classic color at index 0..15; entry 6 is brown &HAA5500. Numeric arguments use normal BASIC rounding before range checks. The palette is fixed and independent of screen mode. Neither function adds a hidden type or compatibility flag. - Replace old palette arguments explicitly: COLOR 15,0 becomes COLOR PALETTERGB(15),0. PALETTERGB(2) is &H00AA00; raw 2 is &H000002. Use the same conversion for palette values stored in variables or DATA. Existing r,g,b component-triple forms remain valid. - DRAW C and P colors follow the same raw RGB rule. DRAW numeric literals are decimal; use =variable; for a value prepared with PALETTERGB or RGB. - Packed colors and transparency keys must be in 0..16777215; values outside that range raise Illegal function call rather than being silently masked. RGB components and PALETTERGB indices are range-checked too. Graphics GET/PUT still store full pixels and mask their bitwise operations to 24 bits. No global compatibility mode or extra POINT argument is introduced. - Interpreter, JIT and supported PARFOR graphics use the same color rules. RGB and PALETTERGB are pure conversions allowed in PARFOR; this does not make POINT or other mutable runtime queries legal inside parallel loops. Rebuild generated applications to include the change. RGB and PALETTERGB are built-in names; rename conflicting user functions or arrays. DEMO PROGRAMS AND UPGRADING -------------------------- - The demos from the supplied Windows archive have been checked and the affected palette-color arguments converted explicitly. Original filenames, capitalization and folder paths are retained for all 29 BASIC files. Only these nine files required changes: filepicker.bas ISLAND3D.BAS menu.bas octonion2d.bas octonion3d.bas olddemos/fract.bas olddemos/planets.bas pixelprose.bas TEST.BAS Packed RGB calculations and component-triple colors keep their meaning. - Review your own color constants, variables, DATA and DRAW strings. Convert a legacy palette number with PALETTERGB only where it really represents a palette index; never apply that conversion to a raw POINT result. - The manual is THOREAU_BASIC_3.4.4.txt; the cumulative release notes are thoreau_basic_3.4.4_changes.txt. Both platform sources, integrated version strings and the homepage identify the release as 3.4.4. - Rebuild the Windows/UEFI interpreter and re-create standalone EXE/EFI applications to include these changes. Replacing the interpreter does not update previously generated applications. NOGM retains its existing bank-omission behavior; NODEBUG is an independent new packaging option.