Thoreau BASIC


What if BASIC never went out of fashion?

What if it kept evolving?

And what if it kept the familiar GW-BASIC language, with explicit palette conversion for modern RGB graphics?

Meet Thoreau BASIC.

BASIC as if it never stopped growing.

Version 3.5 · 21 October 2026 · Free

Download 3.5 What it is Example Documentation itch.io Contact

Download

Windows x64 · ZIP

UEFI x64 · ZIP

Plain-text documentation

3.5 release notes

THOREAU_GM.TBGM · losslessly compressed wavetable · 513.5 MB

New in 3.5

3.5 is a correctness release. It settles behavior the manual left open, makes compiled code agree with the interpreter, and collects the fixes from a systematic review of the previous sources.

Numbers mean what you write. In arithmetic, an unsuffixed literal now takes the type of the other operand: X#+2.7 adds the double-precision 2.7 instead of 2.70000004768372, and under DEFI64 LOMEM+200000 is calculated exactly in 64-bit integers. Whole numbers above 253 are exact 64-bit integers, so A&&=9223372036854775807 stores its value. Write a suffix (2.7!) where the old single-precision value is wanted.

Check existing programs. Literal typing, PRINT line breaks, stricter WRITE and statement syntax can change the results of existing programs. On Windows, WinMM joysticks get new slot numbers: slots 0–3 are XInput only, and every controller is listed once. Read UPGRADING in the release notes, and re-create standalone EXE/EFI applications to include the new runtime.

Also included from 3.4.x

Colors have one meaning everywhere: packed 24-bit RGB, built with RGB(r,g,b) or converted from a classic palette index with PALETTERGB(index). CREATEEXE and CREATEEFI accept NODEBUG for packaged applications. GETBMP and GETSPRITE capture drawn rectangles as bitmaps and sprites, and gamepads and joysticks have a polling interface (JOYAXIS, JOYBUTTON, JOYHAT and more) with XInput and WinMM on Windows and experimental generic USB HID support on UEFI. Screen pages, named callbacks and SELECTBOX remain available.

See the manual and 3.5 release notes for the complete changes, syntax, controller mappings and platform limits.

What it is

Thoreau BASIC starts from GW-BASIC-style syntax but is not trapped in 1983. It has 64-bit memory, 24-bit graphics, sprites, mouse and joystick input, TCP/IP and HTTP, a complete GM/GS wavetable with MIDI/WAV/FLAC/Opus playback, complex/quaternion/octonion values, a debugger, profiler, source tools, multicore PARFOR, and native x64 JIT compilation with automatic loop SIMD.

The same BASIC language runs as a normal Windows program or directly from UEFI firmware without an operating system. BASIC programs can also be packaged as standalone Windows EXE or bootable EFI applications.

Still BASIC

10 CLS
20 PRINT "HELLO FROM THOREAU BASIC"
30 FOR I=1 TO 5
40 PRINT I
50 NEXT I
60 END
RUN

And now the orchestra is BASIC too:

SOUND PRELOAD
LOADMID 0,"BALLADE.MID"
PLAYMID 0

Graphics, networking and sound remain ordinary BASIC commands, not separate frameworks.

BASIC without an operating system

The UEFI build boots directly on x64 machines. It uses GOP graphics, firmware or raw HID keyboard input, mouse support with fallbacks, networking through firmware protocols or Thoreau's own SNP-based stack, HDA/Azalia PCM sound where available, and the same interpreter/JIT and GM wavetable used by the Windows version.

The UEFI build also includes experimental USB HID gamepad/joystick polling. It requires a compatible controller exposed by the firmware and connected at application startup; it is not a universal controller driver.

Project

The project page and downloads are on itch.io.

Contact

info@thoreaubasic.com

Bug reports, compatibility notes and strange BASIC edge cases are very welcome.

To support development, PayPal is available. No nag screens, no locked features.