Est. 2003 Intermediate

HotBasic

James J. Keene's self-hosting BASIC compiler for 32-bit Windows and Linux, begun in 2003 as a native-code successor to RapidQ, with GUI, CGI, DLL and OBJ output, custom objects and inline assembler

Created by James J. Keene

Paradigm Procedural, Object-Oriented (custom OBJECT types with SUB/FUNCTION methods and EXTENDS)
Typing Static: DIM ... AS type and DEFxxx statements (BYTE, WORD, SHORT, INTEGER, LONG, DWORD, INT64, SINGLE, DOUBLE, REAL10, STRING, VARIANT) plus user-defined TYPE/OBJECT types
First Appeared 2003
Latest Version HotBasic 7.2.2 for Windows (31 August 2012); 7.2.1 for Linux (August 2012)

HotBasic is a commercial BASIC compiler and language dialect written by James J. Keene, a neuroscientist turned programmer, beginning in May 2003. It started life as a native-code alternative to William Yu’s RapidQ, which bundled bytecode with an interpreter, and grew into a self-hosting compiler for 32-bit Windows and, from 2006, Linux. It can produce console, GUI and CGI programs, and DLL/.so and OBJ modules. HotBasic is unusual among hobbyist-era BASICs on three counts: a single author developed it continuously for about nine years, its runtime library was written in assembler from scratch instead of being built on the C runtime, and its marketing was aggressive and eccentric even by the standards of the small-compiler scene of the 2000s.

History & Origins

A RapidQ successor

By 2003 RapidQ had a loyal following. It was a free, semi-object-oriented BASIC with a form designer, but its author William Yu had sold the source code to REAL Software in 2000, and RapidQ “executables” were really the bytecode interpreter with the program appended to it. Keene’s first HotBasic news entry, dated 29 May 2003, states the goal directly: HotBasic was “designed as an RQ-compatible true compiler from .bas to .exe”, because “the present RapidQ compiler, rc.exe, produces ‘byte code’ which is interpreted at run time.”

Keene’s own site lists a BA from the University of Chicago and a PhD from the University of Michigan. His 1973 papers on medial thalamic neurons, one co-written with Kenneth L. Casey, are in Michigan’s Deep Blue repository, so the usual description of him as a neuroscientist fits, although the exact department of his doctorate is not documented. He later wrote that, returning to programming in 2003, he found no language or compiler that met his “minimal requirements” of simple syntax, fast execution and low RAM use, so he wrote one himself. His pages from this period were hosted under his “Net Census” site on a Dominica ISP (cwdom.dm) and on Angelfire. Over the years the hotbasic.org domain was framed onto each of these hosts in turn.

Bootstrapping

The development diary on the HotBasic news page records the bootstrap in detail:

  • June 2003: the compiler “produces working .exe files from Basic code”. Usage was already hot test, which compiles test.bas to test.exe.
  • 2 August 2003: “HotBasic compiles itself.”
  • 6 August 2003: the HotBasic-compiled compiler, now using the project’s own assembler library (HotBasic.lib) instead of the RapidQ runtime, correctly compiles programs.
  • 7 August 2003: the first beta goes out to testers by email.

Early versions generated assembly source and relied on Microsoft’s freely distributed ml.exe assembler and linker to “put the pieces together”. The news page credits Microsoft for providing those utilities as a public service.

Release and the two-track product

HotBasic 1.0 was released on 29 October 2003. From November 2003 the product came in two parallel builds. The free Trial version produced console programs only and was licensed for evaluation. The Registered version, nicknamed “Penthouse”, added GUI, DLL and OBJ application types and the full keyword set. The two were numbered separately: by the end of 2004 the Trial was at 1.6x and the Registered version at 3.6. The first registered copy was distributed on 22 November 2003. In February 2005 the two builds were brought onto the same version numbering. In January 2007 registration cost US$69 for Windows and US$59 for Linux, with discounts for owners of the other platform.

Design Philosophy

HotBasic’s documentation keeps returning to one idea: the compiler and its runtime library were written together, from scratch, so neither has to pay the cost of a general-purpose library.

  • No C runtime. String handling, array access, file I/O and math are all in HotBasic.lib, a library of hand-written assembler routines. Keene noted in 2003 that in many library calls “no arguments are passed in the conventional sense, since values are in CPU registers or at known locations.” The linker includes only the modules a program actually uses.
  • Stand-alone executables. Compiled programs need no runtime DLL, framework or installer, and HotBasic itself installs by unzipping a folder. It does not write to the Windows Registry, a point the project made repeatedly as a security and stability argument.
  • RapidQ familiarity. HotBasic kept RapidQ’s object-dot syntax (form.Caption, listbox.ItemIndex) and its CREATE ... END CREATE blocks for building forms, so existing RapidQ form designers and code could be reused. It also accepted RapidQ type names (QFileStream and so on) and converted them internally.
  • Close to the FPU. The 2003 design notes introduced an “exclusive FPU object” that exposes x87 floating-point stack operations (FPU.load, FPU.chs, and later FPU.add n) directly in BASIC. The aim was to let calculation-heavy loops keep constants loaded in the FPU registers instead of reloading them every iteration.

Key Features

Application types

A $APPTYPE directive selects the output: CONSOLE, GUI, CGI, DLL (a .so on Linux, from 2007) or OBJ for linking into programs written in other languages. Programs can call any Windows API or third-party DLL with DECLARE ... LIB, and the STD and CDECL keywords choose the calling convention.

A console program

This is the HotBasic version of the loop used in the 2006 benchmark described below, quoted from the benchmark article:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
$APPTYPE CONSOLE
DIM X AS DOUBLE
DIM Y AS DOUBLE
DIM I AS INTEGER
Y = .5
For I = 1 To 50000000
 Y = Y / 1.1234
 Y = Y * 1.1234
 X = acos(Y)
 X = asin(Y)
 X = atan(Y)
 X = cos(Y)
 X = exp(Y)
 X = ln(Y) 'natural log
 X = sin(Y)
 X = sqr(Y)
 X = tan(Y)
NEXT I
PRINT Y

HotBasic renamed RapidQ’s LOG to LN in July 2003 so that LOG could mean the base-10 logarithm.

GUI forms with CREATE blocks

CREATE works like DIM, but its blocks can nest, and nesting sets up the parent-child relationship between controls. This example is from the HotBasic manual:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
$AppType GUI: $TypeCheck ON
'CREATE and END CREATE are single-statement source code lines
CREATE form As FORM
  caption = "HotBasic Create syntax"
  width = 300
  height = 100
  CREATE ed As EDIT
    top = 10
    left = 10
    height = 20
    width = form.clientwidth - 20
    text = "Now I can use an IDE!"
    color = rgb(200,200,255)
    enabled = true
  END CREATE
  showmodal
END CREATE
END

The native object set grew steadily. It covered dozens of Windows controls (BUTTON, EDIT, RICHEDIT2, GRID, LISTVIEW, TREEVIEW, TABCONTROL, SPLITTER, SYSTRAY and others) and non-visual objects including FILE, MEMORY, LIST, SOCKET, REGISTRY, SQLDATA (ODBC), COMPORT, PRINTER and DATETIME. On Linux, GUI programs could use either a GTK mode, which called libgtk-x11-2.0 directly, or an X11 mode selected with $X11.

Custom objects

From version 2.8 (July 2004) a TYPE can contain As SUB and As FUNCTION members, which become methods once a SUB or FUNCTION of the same name is declared. The OBJECT keyword, an alias for TYPE, followed a few days later in 2.8a:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
OBJECT xyz
  CallHome as SUB
END xyz

Declare SUB CallHome (phone_number As STRING, CH_wait as LONG)
SUB CallHome
  'your method code
END SUB

DIM MyObj as xyz
MyObj.CallHome "555-1212", 10

EXTENDS (version 2.9a) lets a custom object add to or override the members of a native object such as FORM. Later versions added more object machinery: THIS and SELF (2006), _Init constructors that run on DIM/CREATE (5.2d), _Set/_Get property procedures (5.3g), and from 5.5 (December 2007) inheritance of members through UDTs nested inside UDTs.

Low-level access

HotBasic is a BASIC that does not hide the machine:

  • ASM statements insert x86 instructions inline, for example ASM mov eax,1 or ASM lea esi,i.
  • @/VARPTR, BYREF(), CODEPTR() and ARRAYREF() give pointer access.
  • PUSH, POP and STACK(n) work directly on the stack.
  • INP and OUT read and write hardware ports.
  • The integer statements INC, DEC, IMUL, IDIV, ISHL and ISHR avoid floating-point conversion.

Version 5.1 (January 2007) added CREATETHREAD, WAITTHREAD and CPUCOUNT for multi-core programs, and 5.6 (December 2007) made most math operations thread-safe.

Performance Claims, in Context

HotBasic’s marketing rested heavily on speed and size, and most of the published numbers come from the project itself or its users. The most detailed is Norm Kaiser’s December 2006 article HotBasic Goes Head-to-Head With Its Competition, published on the HotBasic site and announced in a press release carried by linux.com on 24 December 2006. Kaiser also wrote the official HotBasic FAQ, so this is not an independent test.

  • What was measured: the console program shown above, 50 million iterations of two arithmetic operations and nine math-library calls on DOUBLE variables, with an equivalent program written for each competitor. The article prints the source of every version.
  • Conditions: a Compaq Presario notebook with a 1.6 GHz AMD Athlon and 512 MB of RAM. Each executable was run 10 times and the execution times averaged, using a timer program that launched each one through a shell command. The runs were done in random round-robin order so that background processes would not skew any one compiler’s results. Compiler optimization settings are not stated, and REALbasic was the time-limited trial edition.
CompilerExecutable sizeMemory usedMean run time (s)
HotBasic 5.05 KB1,044 KB30.403
Visual Basic .NET 200524 KB4,412 KB31.367
Borland C++ 5.5135 KB1,220 KB41.480
REALbasic 20061,625 KB3,744 KB71.871
Dev-C++ 4.9.9.2 (MinGW)467 KB836 KB74.737

On this one floating-point loop, HotBasic’s executable was the smallest and about 3% faster than VB .NET’s. The VB .NET figure does not include the .NET Framework, which the 24 KB assembly needs to run. The test says nothing about string handling, I/O or GUI performance, and it was never repeated independently.

Evolution

PeriodHighlights
2003 (0.8x–1.x)Self-hosting compiler, console/GUI/CGI/OBJ/DLL application types, SQLite object, Trial and Registered builds
2004 (1.6x Trial / 2.x–3.x Registered)Custom objects and EXTENDS, printer and bitmap objects, arrays of objects, COM programming through include files
2005 (3.6–4.6)First Linux ELF experiments (PE2ELF), INT64, DATE/VARIANT objects, direct .obj writing that removed the ml.exe dependency
2006 (4.6k–5.0a)COMPORT, THIS/SELF, CDECL; HotBasic Linux released 5 November
2007 (5.1–5.6)Multithreading, HotOptimize, property procedures, Linux GUI and .so output, RapidQ-to-HotBasic converter
2008–2010 (5.6a–6.4)HotIDE 3.x, NODE object, 64-bit file sizes and positions (6.0), Linux GTK dialogs and fonts
2011–2012 (6.5–7.2.2)Thread-safe SQLDATA, exception trapping (7.0), final releases in August 2012

In June 2008 Keene announced that new registrants from 1 October 2008 would pay for compiler updates. By August 2010 the site said again that “all HotBasic registered users get all future upgrades for free”.

Current Relevance

No new HotBasic release has been announced since August 2012, and the product never moved to 64-bit code: it still produces 32-bit x86 executables. In the mid-2010s Keene posted that the compiler download server had moved to “a x64 box with DSL connection” and offered to send the compiler by email on request. By 2022 the Yahoo! HotBasic group, where the community had exchanged what Keene describes as “tens of thousands of posts”, had closed. That year the forum moved to groups.io, and the original hotbasic.org domain later lapsed and was taken over by an unrelated site.

HotBasic is not entirely dormant, though. As of October 2026, Keene’s site jamesjkeene.com still offers the Windows Trial download and HotIDE, sells the Registered version for US$89 and makes the Linux version free. The groups.io forum is small but active: in mid-2026 members were working out how to run the 32-bit Linux compiler on modern 64-bit distributions, and one member reported rebuilding the runtime’s string module (hSTRING) for 64-bit Linux with the MASM-compatible JWasm and UASM assemblers. Its historical importance is as a long-lived example of a one-person native compiler. Very few people still use it.

Why It Matters

HotBasic belongs to a lineage of independent BASIC compilers (PowerBASIC, PureBasic, FreeBASIC, BCX and others) that kept a compiled BASIC alive for Windows programmers after Microsoft moved Visual Basic to .NET. Within that group it stands out in a few ways:

  • It was self-hosting from its third month. The compiler was rebuilding itself by August 2003, and every later version was compiled with HotBasic.
  • It did without the C runtime. Where most small compilers of the era translated to C or linked against the C runtime, HotBasic shipped its own assembler library and, from 2005, wrote object files directly.
  • It followed RapidQ’s model. HotBasic carried RapidQ’s object-dot, form-centric style of BASIC forward after RapidQ itself stopped being developed, giving RapidQ users a native-code path for their programs.
  • Its development record survives. The news pages log almost every build from 29 May 2003 to 2012, a rare day-by-day record of how a single developer grew a compiler, object system, GUI library and second platform port.

Its marketing is part of the story too. HotBasic’s pages declared it the “gold standard” of compilers and called its rivals “undead software”. They featured a cartoon mascot, “HotBabe” (“Miss Compiler 2003”), a “spokespig” called Maj. Hog, and a running joke about inviting Bill Gates to “HotBasic Manor”. This style gave the project a memorable identity in BASIC forums, but it also helped keep HotBasic a cult tool instead of a mainstream one.

Timeline

2003
On 29 May James J. Keene begins work on HotBasic as a RapidQ-compatible true compiler from .bas to .exe. The first working compiler is built with RapidQ; on 2 August HotBasic compiles itself, and on 7 August a beta goes to testers
2003
HotBasic 1.0 is released on 29 October and adds SQLite support plus EXIT IF and EXIT SELECT. The free console-only Trial version is completed with 1.1 on 18 November, and the first Registered ('Penthouse') version is distributed on 22 November
2004
HotBasic 2.8 (21 July) lets TYPE structures contain 'As SUB' and 'As FUNCTION' members, turning user-defined types into custom objects. HotBasic 2.9a (28 July) adds EXTENDS, so custom objects can add to or modify the native objects
2005
On 1 January the first HotBasic program built on Windows is converted to Linux ELF format with PE2ELF.exe and runs on Linux. On 26 September HotBasic 4.4b starts writing .obj files directly, so Microsoft's ml.exe assembler is no longer used
2006
HotBasic for Linux is released on 5 November. In December a console math benchmark by HotBasic user Norm Kaiser, comparing HotBasic 5.0 with VB .NET 2005, Borland C++ 5.5, Dev-C++ 4.9.9.2 and REALbasic 2006, is posted on the HotBasic site and announced in a press release on linux.com
2007
HotBasic 5.1 (18 January) adds native multithreading with CREATETHREAD, WAITTHREAD and CPUCOUNT. HotBasic Linux gains $APPTYPE GUI in April, and Linux 5.4c (3 October) can build .so shared libraries
2011
HotBasic 7.0 (13 October) adds fatal-error trapping through the hbTrap and hbError internal variables
2012
HotBasic 7.2.2 for Windows (31 August) is the last compiler release listed on the official news page; 7.2.1 for Windows and Linux appeared on 20 August
2022
With the Yahoo! HotBasic group closed, a new HotBasic forum is announced on groups.io (23 July), and the home page moves to hotbasic.us (4 August)
2026
Keene's site jamesjkeene.com still offers the Windows Trial download, sells the Registered version for US$89 and makes the Linux version free. That July, users on the groups.io forum are getting the 32-bit Linux compiler (hotx 7.2.1) to work on current 64-bit distributions

Notable Uses & Legacy

The HotBasic compiler itself

HotBasic has been self-hosting since 2 August 2003. The compiler (hot.exe on Windows, hotx on Linux) is written in HotBasic, together with a hand-written assembler runtime library, HotBasic.lib. At the time the compiler reported its own source as about 3,800 BASIC statements in 2,950 lines.

HotIDE and the HotBasic tool suite

HotIDE, Keene's development environment (color-coded editing by September 2004, then a Design Mode and a Code Index window), is a HotBasic GUI application that the news page records being recompiled with new compiler versions. The Commander Keene launcher, also written in HotBasic, shipped as both Windows and Linux executables in July 2006, partly to show that HotBasic Linux was nearly ready. Smaller companion tools came alongside them: the HotBasic Setup installer, HotOptimize (which strips unused procedures and declarations) and the HotBasic Doctor manual browser.

Binary Mechanics Lab simulator

Keene says the simulator used by his Binary Mechanics Lab (BML) is written in HotBasic, including hotspot.exe, a console program, and BMLS.exe, a GUI front end. HotBasic was originally written so that he could build software for his own experiments.

Web and network utilities

In November 2003 the Registered-version download page was served by an authentication CGI program written in HotBasic. GypsyProxy 1.3, published by Keene in June 2005, was compiled with HotBasic. A 2014 community demo by Cyril Gigez shows HotBasic making HTTP/SSL connections through WinHTTP.

Third-party developer tools

Members of the community wrote tools for the compiler, among them the HotBasic Debugger released by Fnoware in April 2007, which could be launched from HotIDE 2.8, and Stride, a structured IDE for HotBasic distributed through the user group (version 2.4 in 2016).

Language Influence

Influenced By

RapidQ BASIC

Running Today

Run examples using the official Docker image:

docker pull
Last updated: