# Thoreau BASIC – What if BASIC hadn't gone out of fashion?

Thoreau BASIC started as a joke. I wanted a BASIC where I could type something ridiculous like: DIM A%(12000000000) …and have it actually work. Then I kept adding things. The result is Thoreau BASIC, a free x64 BASIC interpreter inspired by GW-BASIC, running both as a normal Windows program and dir…

- **Page:** https://magpie.gallery/i/thoreau-basic-what-if-basic-hadn-t-gone-out-of-fas-6uv7
- **Type:** Link to an idea elsewhere
- **Category:** AI & dev
- **Runs on:** windows
- **Tags:** basic, interpreter, retro, uefi, programming

## Source

Web · Gorsefound: Thoreau BASIC – What if BASIC hadn't gone out of fashion?

- **Original:** https://news.ycombinator.com/item?id=49942103

> Thoreau BASIC started as a joke. I wanted a BASIC where I could type something ridiculous like: DIM A%(12000000000) …and have it actually work. Then I kept adding things. The result is Thoreau BASIC, a free x64 BASIC interpreter inspired by GW-BASIC, running both as a normal Windows program and directly on bare-metal UEFI without an operating system. Version 3.2 has become considerably more ambitious than the little interpreter I originally intended to write. The language still deliberately looks and feels like old Microsoft BASIC. Line numbers, GOTO, GOSUB, PRINT, PSET, LINE, CIRCLE, DRAW, etc. are all there. But underneath that rather innocent-looking surface is now quite a lot of machinery. Some of the current features: native x64 JIT compilation, with automatic fallback to the interpreter PARFOR for multithreaded numeric loops SSE2 / AVX2 acceleration where available 64-bit addressing and very large arrays native complex, quaternion and other hypercomplex numbers arbitrary-resolution 24-bit graphics sprites, bitmap operations, polygon filling and mouse input TCP/IP networking on Windows and UEFI an integrated profiler, debugger, tracing and program-analysis tools CREATEEXE to turn a BASIC program into a standalone Windows executable CREATEEFI to turn the same program into a directly bootable UEFI application The sound system has also grown rather out of proportion. Thoreau BASIC can now handle up to 32 live instrument channels plus 64 sound effect channels and 256 voices, with real-time pan and brightness control. NOTE and SOUNDKEY can be used more like playable synthesis primitives rather than just old-school BASIC beeps. 3.2 also expands the less glamorous but surprisingly useful parts of the environment. There is better file browsing and selection with GETFILES and SELECTBOX, longer case-preserving paths, recovery/file-flush facilities, and considerably more detailed SYSTEMINFO$ diagnostics. The latter is useful for seeing things such as available CPU capabil

## Rules for reuse

- Build your own version: don't copy another product's code, look, icons, colours or copy.
- The original belongs to its author; Magpie only links to it.
- The original content's copyright belongs to its creator. Magpie doesn't download or re-upload it; we only show the link and the official preview.
