What if BASIC never went out of fashion?
What if it kept evolving?
- Booting straight into a BASIC prompt on your x64 PC.
- Or running as a Windows application
- Playing 32-channel wavetable sound.
- Running with JIT compilation and multithreading.
- Drawing in 24-bit color, with no fixed resolution limit.
And what if it still ran your GW-BASIC programs with virtually no changes?
Meet Thoreau BASIC.
BASIC as if it never stopped growing.
A free 64-bit BASIC interpreter for x64 Windows and x64 UEFI, keeping the direct, line-numbered feel of classic Microsoft BASIC while adding wavetable sound, modern graphics, networking, debugging, hypercomplex mathematics and native x64 execution.
Version 3.2 adds file and directory arrays, framed selection boxes, longer case-preserving paths, generic recovery and verified-copy commands, text statistics and expanded support diagnostics. RUN can restart a program without growing the host stack. Targeted JIT changes reduce scalar and hypercomplex overhead while retaining the existing numeric behavior. The 3.1 Opus wavetable and audio facilities remain available.
MANDELZOOM.BAS is an interactive scalar Mandelbrot example with mouse panning and zooming.
The following introductions and release sections retain the earlier history. In particular, 3.2 supersedes older uppercase directory-display and case-insensitive file-mask behavior. See FILES / DIRECTORIES for current rules.
Version 3.1 adds Opus-compressed wavetable and faster parallelloading, including a UEFI decoding fix confirmed working in VirtualBox. Everysample is expanded to PCM before playback; music never performs decompression.
LOADWAV also accepts FLAC and Ogg Opus. CAPTURE collects diagnostic output, ERROR$ exposes error messages, and SOUNDGROUP maps instruments to their groups.
Status confirmations are quiet in stored programs. LINE INPUT accepts either prompt separator, AUDIT warns about function-name conflicts, and ^ now evaluates left to right. PARFOR, graphics fills, strings and memory operations do less repeated work. Existing TBGM2/TBGM3 banks and audio slot commands remain usable.
Version 3.0 makes sampled sound a first-class part of Thoreau BASIC. The public instrument engine is a General MIDI / GS wavetable backed by THOREAU_GM.TBGM, with programs 0..127, four drum kits at 128..131, the 47 standard GM percussion keys and 14 mapped GS extra percussion keys per kit. The same BASIC-facing instrument layout is used on Windows and UEFI.
3.0 also adds asynchronous WAV and Standard MIDI File playback, MIDI controller and GS handling, reverb/chorus/delay sends, live sound diagnostics and explicit SOUND PRELOAD support. TBGM3 banks are stored losslessly and can be decompressed by multiple workers at startup; the decoded PCM remains byte-identical to the stored source audio.
The runtime receives four targeted efficiency passes as well. Registered ON ERROR, timer and mouse handlers can coexist with eligible native assignment/FOR/WHILE regions instead of automatically forcing those regions back to the interpreter.
Sprite drawing can restore and recompose a bounded dirty rectangle instead of the whole framebuffer when the changed base area is known. The audio engine reuses exact derived exponential coefficients when their exact inputs have not changed. LOAD, MERGE and CHAIN defer repeated token/JIT/profile invalidation until the scoped source import finishes