PBXB64 V4 RELEASE
PBXB64 is a native Windows compiler written in pure C17. Five languages — B64, BASIC, C, ASM, PILOT — flow through a single IR pipeline and an x64 backend to native PE32+. No GCC, no LLVM, no external toolchain. Direct x64 instruction selection, built-in assembler, built-in COFF/PE linker. FOR/NEXT fully covered for all 7 integer types plus float. 318/318 tests green, signed build, UPX-packed to ~856 KB.
Package: ~8.9 MB (ZIP) — compiler, CHM, 1233 .pbi includes, 127 samples
Digitally signed by Theo Gottwald
318/318 tests passing
Test Lane: What’s Green
The full PBXB64 build is accompanied by an automated test suite that verifies assembly generation, linker resolution, and runtime correctness for every language and feature.
Why PBXB64?
True native x64 code
No dependency on GCC, LLVM, or a C runtime. The compiler emits x64 machine code directly – from PowerBASIC or B64 source to an executable PE32+ in a single pass. Maximum control, minimum binary size, no third-party surprises.
Multi-frontend: 5 languages
Write code in B64, PowerBASIC, C (C17 subset), PILOT or raw x64 assembly – all in the same project. The compiler mixes the languages at IR level and emits a single PE. Add a new language and instantly inherit the entire native backend.
Custom x64 backend
Direct instruction selection, register allocation, peephole optimization and PE32+ image generation — written in C17. The entire backend is ~14,000 LOC in core/source/backend/x64/ plus a ~5,000-LOC native x64 assembler encoder. No external dependencies.
Custom PE32+ linker
No external linker needed. The integrated linker processes COFF objects, generates import tables, relocations, TLS and exception data. Full PE32+ compatibility from Windows XP through Windows 11.
Language Frontends in Detail
B64 (.b64)
C-like systems language with manual memory management, raw pointers, structs, function pointers and globals. Primary frontend — systems code using the same pipeline that also handles BASIC and PILOT. 13/13 link+run tests green.
PowerBASIC (.pb, .bas)
PowerBASIC-compatible dialect: FUNCTION/SUB, LOCAL/GLOBAL/SHARED, TYPE/UNION/ENUM, full FOR/NEXT semantics for all integer and float types, negative STEP, nested loops. 20/20 link+run tests green.
C (.c, .h)
C17 subset: #include, #define, #if/#ifdef/#endif, full lexer/parser, struct/union/typedef/enum, switch/case, function pointers. 33 C17 headers included. 63/63 compile tests + 1/1 link+run test green.
Inline Assembly (.asm, .s)
Direct x64 assembler with Intel and AT&T syntax. Native COFF/PE emission, no intermediate language. Full control over registers, SSE and system calls.
PILOT (.pil)
Educational language. Full T:/A:/M:/Y:/N:/J:/U:/E: command set, conditional suffixes, pattern matching. Ideal for teaching and simple scripts.
Mixed-Language Projects
PowerBASIC + inline ASM in the same module. B64 calls C functions. PILOT drives a C program. The shared IR layer makes it all possible.
Quick Examples
B64
PowerBASIC
C
V4 Highlights — FOR/NEXT Coverage
V4 fixes the long-standing “FOR-body constant-fold” problem and adds full FOR/NEXT type coverage per the PB spec. Float FOR was fully debugged in Z62 and now runs reliably.
| Category | Details |
|---|---|
| Integer FOR | 7 intlike types (LONG, INTEGER, QUAD, DWORD, WORD, BYTE, CURRENCY) — positive and negative STEP |
| Float FOR | SINGLE, DOUBLE — FOR f = 1.0 TO 3.0 — fully debugged in Z62 |
| Nested Loops | 2-deep, 3-deep, with dependent bounds FOR j = 1 TO i |
| Backend correctness | SSE movq ModRM, SSE-arith ModRM, peephole pass 4 imm64 truncation, SETCC partial-write, peephole dead-reg, PB frontend slot-float const-fold — all 5 fixed |
Architecture — From Source to Silicon
Build & Run
Build (Windows + MinGW)
Compile a PB program
Compile a B64 program
Compile a C program
What’s in the ZIP Package?
| File / Folder | Contents |
|---|---|
PBXB64.exe | 856 KB UPX-packed compiler, digitally signed (Theo Gottwald) |
PBXB64_Help.chm | Compiled Windows help with full command reference |
README.md | Release notes, license, contact |
SHA256.txt | SHA-256 hashes for integrity verification |
Includes/ | 1233 PB include files (.pbi) for Windows API, JSON, HTTP, OAuth, SMTP, COM, NetX, and more |
Samples/ | 127 example programs in 5 categories (asm, b64, basic, c, pb) |
Download PBXB64 V4 now
Full release package: compiler, CHM help, 1233 PB include files, 127 sample programs. UPX-packed to 856 KB, digitally signed by Theo Gottwald.