QuickBASIC 4.5 / DOS MZ · BCOM45 runtime · EXEPACK

QuickBASIC decompiler: DOS-era EXEs back to structured BASIC.

A QuickBASIC program is not a Windows binary at all — it is a DOS MZ image with the BCOM45 runtime linked in and, usually, Microsoft's EXEPACK compression on top. Our QuickBASIC decompiler takes it through a pipeline built just for it: unpack, disassemble the 16-bit code, name every runtime call, rebuild expressions and control flow, and write readable BASIC with real SUB and FUNCTION structure.

See a real QuickBASIC recovery, Regatta, next to its original source →

// under the hood

A pipeline for a different era

EXEPACK stores the program as a packed load image followed by the unpacker stub and its relocations; the decompiler reverses it exactly the way the stub would, restoring the original image byte for byte — 936 relocations on one benchmark. The runtime is then identified by signature: every public routine in BCOM45.LIB is fingerprinted from its first 32 bytes, with relocation positions wildcarded, and matched at each far call, so file, screen, string and math operations read as what they are — around 100% of call targets named.

One detail that defeated earlier attempts: QuickBASIC routes all floating-point math through 8087-emulator interrupts, about 1,300 of them in one small sailing game. A disassembler that treats them as ordinary interrupts loses sync for several instructions and produces phantom calls and comparisons. The engine rewrites each interrupt to the native x87 instruction it stands for, same length, and the phantoms disappear.

// what comes back

What the QuickBASIC decompiler brings back

  • ✓

    Real program structure

    SUB and FUNCTION blocks with typed, named parameters, ByRef use and return values; IF / ELSE, FOR and DO ... LOOP nested and balanced with no dangling GOTOs on every benchmark.

  • ✓

    Data and arithmetic

    DIM / REDIM, one- and two-dimensional array elements, floating point via an x87 emulator, and conditions including signed Long, string and floating compares.

  • ✓

    The BASIC you remember

    String intrinsics (CHR$, MID$, LEFT$, INSTR, LEN, VAL), graphics (LINE, CIRCLE, PAINT, PUT / GET) and I/O (PRINT, OPEN, INPUT #) as statements, not runtime calls.

  • ✓

    A report with the source

    Reconstructed .BAS source plus an analysis report; there is no project file for a DOS program.

// measured

Measured on four QuickBASIC programs

Two markers count what the engine would not guess: <expr> is a value it could not name, <cond> an unresolved condition.

ProgramSource heldSUB / FUNCTION<expr><cond>Structure
Regatta2yes1 / 2130balanced, 0 dangling
SNOWyes21 / 640balanced, 0 dangling
PHATMANno19 / 5136balanced, 0 dangling
MAINGAME (GroovBuggies)yes43 / 429814balanced, 0 dangling

See the Regatta recovery →

// the fine print

What QuickBASIC strips, and what we cover today

No identifiers survive a QuickBASIC compile

Variables, arrays and procedures come back with stable placeholder names — var_158, arr_4C, proc_DFE3 — that you rename as you read; the logic, literals and structure are real. Coverage today is QuickBASIC 4.5 compiled standalone with EXEPACK. Programs built against the BRUN runtime, QuickBASIC 4.0, BASIC PDS 7.x, or packed with LZEXE or PKLITE are assessed individually during the free evaluation.

// how to decompile your program

Three ways to get from the EXE to source

STEP 01

Confirm the format

Run the free VBScanner on the folder. It reads the file headers and tells you what built each EXE, DLL or OCX and whether it is P-Code, native or IL.

STEP 03

…or let us do it

Request a free evaluation. We examine the binary, tell you exactly what comes back, and quote a fixed price and timeline. Hand-finishing of anything the engine marks is included.

// questions

QuickBASIC decompiler questions

Does the decompiled BASIC run in QuickBASIC again?

The output is QuickBASIC syntax with real SUB and FUNCTION structure; after renaming placeholders it is meant to load in QB 4.5 or QB64. The evaluation shows you the exact output for your program first.

My EXE was compressed. Is that a problem?

Microsoft EXEPACK is unpacked automatically and exactly. LZEXE and PKLITE are handled case by case.

How do I know my DOS program is QuickBASIC?

The free VBScanner recognises the QuickBASIC runtime's own strings and the BRUN runtime name, even inside EXEPACK-compressed files.

// other formats

Every generation of Basic has its own page

Ready to decompile your QuickBASIC program?

The evaluation is free and tells you exactly what your binary yields before you spend anything. Or license the decompiler and run it in-house today.

free evaluation fixed quotes NDA available software from $299