PBXA32 - Compiler Workshop
V24 Release — Native x86-32 Compiler

PBXA32 V24

V24 — in the V8 bundle (build of 2026-10-02)

A complete x86-32 compiler pipeline written in ISO C11. From PowerBASIC source through preprocessor, lexer, parser, semantic analysis, IR, x86 code generation, COFF assembly, and PE32 linking — all in one toolchain. No C++ dependencies. No GNU extensions. Just pure standard C11 producing native Windows PE32 executables.

V24 — available in the PBX-Compiler
Download PBX-Compiler V8 (ZIP) All-in-One: PBXA32, PBXA64, PBXB64, PBXC64, ScharffBasic and PBX Editor Previous bundles: V7 · V6 · V5 · V2 · V1 (optional) Bundle downloads: -- V24 Release

PBX Compiler V8: 349,086,784 bytes (332.9 MiB / 349.1 MB). Includes PBXA32 V24, PBXA64 V10, PBXB64 V23, PBXC64 RC50, ScharffBasic and the PBX Editor with help, includes and examples.

Written in ISO C11 (no C++, no GNU)

Target: x86-32 / PE32

Historical test counts are not a current full qualification of the signed V24 executable.

PBXA32.exe UPX-packed; signature status is recorded separately (Certum, SHA-256 timestamp)

7Complete stages: Preproc → Lex → Parse → Sem → CodeGen → Asm → Link
C11Written in strict ISO C11. Portable. No external dependencies.
PE32Native x86 Windows executables. No GCC. No LLVM.
V24Current compiler identity; valid Authenticode signature

New in PBXA32 V24

Modules and classes

MODULE … END MODULE with INTERFACE/IMPLEMENTATION, USES, PRIVATE, EXPORT, initialization and finalization. Modules require --profile=pbx32; strict PBWIN remains the default. Classes support value instances, ME, methods and nested class fields.

Parsing and real PE resources

PARSE, PARSE$ and PARSECOUNT support ANY/BINARY. #RESOURCE creates an actual PE resource directory, including VERSIONINFO, ICON, BITMAP, MANIFEST, RCDATA and STRINGTABLE.

Declarations, optimization and interop

LOCAL/DIM/STATIC placement and frame hoisting, O2/O3 HIR operand ordering, typed POKE, SIZEOF/ALIGNOF/OFFSETOF and MEMCPY/MEMSET under DIM ALL. Import declarations handle optional parameters and BYVAL/BYREF/BYCOPY ASCIIZ contracts.

Preprocessor and practical limits

#IF constants, #SELECT, #ERROR/#WARN/#MESSAGE, source-position DEFINE/UNDEF semantics and include-once/cycle checks have been hardened. GLOBAL/STATIC initializers currently accept literal integers, optionally negative; other forms produce warning 3002 and zero initialization. A managed STRING local inside a block with early exit remains a known O2/O3 limitation: declare it at procedure entry.

Why PBXA32 Matters

Pure C11 Implementation

The entire compiler — lexer, parser, preprocessor, code generator, assembler, linker, and runtime — is written in standard ISO C11. No C++. No GNU extensions. Builds with any C11-compliant compiler including MinGW-w64, MSVC, and Clang.

Complete x86-32 Pipeline

The seven compiler stages form the native x86-32 pipeline. Tokenize PowerBASIC syntax, build an AST, lower to IR, generate x86 machine code, emit COFF objects, and link to PE32 — a full end-to-end compiler in C.

PowerBASIC Compatible

Supports directives (#COMPILE, #INCLUDE, #DIM), procedures (FUNCTION, SUB, CALLBACK), control flow (IF, SELECT, FOR, DO, WHILE), jumps (GOTO, GOSUB), aggregates (TYPE, UNION, ENUM), and classic type suffixes (% & && ! # $ @).

Per-Subsystem Smoke Tests

Every stage has its own dedicated smoke test. Test the lexer independently, then the parser, assembler, or linker. Isolate bugs to their layer without compiling full programs.

Quick Example

#COMPILE EXE "hello.exe" #DIM ALL FUNCTION PBMAIN() AS LONG PRINT "Hello from PBXA32!" FUNCTION = 0 END FUNCTION
pbxa32c hello.bas -o hello.exe hello.exe Hello from PBXA32!

Implemented Subsystems

StageStatusDescription
PreprocessorImplementedMacro expansion, conditional compilation (#IF/#ENDIF), file includes
LexerImplementedPowerBASIC-aware tokenizer with full numeric literal support
ParserImplementedRecursive-descent parser building full AST
SemanticImplementedType system, symbols, analyzer
IRImplementedIR module and lowering
CodeGenImplementedIR-to-x86 machine code generator
AssemblerImplementedx86/COFF assembler and object writer
LinkerImplementedPE32/i386 linker with import support
RuntimeImplementedRuntime library for compiled programs
OptimizerO2/O3 HIRV24 hardens HIR operand ordering and declaration/frame hoisting. Managed STRING inside a block with early exit remains a documented O2/O3 limit.

Architecture — From Source to PE32

Source (.bas) |-> Preprocessor (MACRO, #IF, #INCLUDE) |-> Lexer (PB tokens, identifiers, literals) |-> Parser (AST construction) |-> Semantic Analysis (type checking, symbol binding) |-> IR Lowering (unified intermediate representation) |-> x86 CodeGen (machine code generation) |-> Assembler (COFF object emission) |-> Linker (PE32 image generation)

PBXA32 now in the PBX-Compiler

PBXA32 V24 (in the V8 bundle, build of 2026-10-02) is available in the PBX-Compiler — together with PBXA64, PBXB64, ScharffBasic and the PBX Editor.

Free for private use, cleanly licensed for business

Private, non-commercial use is free. Business, team, and commercial usage goes through Smart Package Robot or by email to info@it-berater.org.

Download Activity

Daily activity for every offered download over the rolling last 28 days. Each downloadable file has its own persistent color.

Current download and release boundaries

PBX Compiler V8: 349,086,784 bytes (332.9 MiB / 349.1 MB). Includes PBXA32 V24, PBXA64 V10, PBXB64 V23, PBXC64 RC50, ScharffBasic and the PBX Editor with help, includes and examples.

The shipped executable explicitly reports PBXA32 Compiler V24 version 1.8.0.0 and has a valid signature. Its compiler payload matches the local V24 release executable before signing. Some packaged text metadata retains the earlier V4 folder label. Historical test counts are not a fresh full qualification of these signed bytes.

Current CHM referenceV8 package checksum