PBXB64 Architecture
5-Language Compiler Architecture
PBXB64 Addition
PBXB64 is the only Windows compiler that compiles five languages through a single pipeline to native x64 machine code - no GCC, no LLVM, no external dependencies. Every frontend (B64, PowerBASIC, C, PILOT, ASM) feeds into the same unified IR, optimizer, and x64 backend.
The 8-Stage Pipeline
Source → Executable
Source (.b64 / .pb / .c / .asm / .pil)
|
+--> Lexer (per-language tokenizer, ~3,000 LOC)
+--> Parser (per-language AST, ~12,000 LOC)
+--> IR Builder (unified intermediate representation)
+--> Optimizer (pass manager, CFG, dominance, ~6,000 LOC)
+--> x64 CodeGen (register allocation, instruction selection, ~14,000 LOC)
+--> Assembler (x64 encoding, fixups, ~5,000 LOC)
+--> COFF Writer (object file emission)
+--> PE Linker (import table, relocations, PE32+ image, ~3,000 LOC)
|
+--> PBXB64.exe (native PE32+ executable)
Every language follows the same path. The IR layer is the secret - it makes adding a new language as simple as writing a lexer and parser.
Same Executable, 5 Languages
All five programs compile to the same native PE32+ executable. Mix them in one project.
B64
B64 - C-like systems language
fn main(): i32 {
let x: i32 = add(40, 2);
return x; // 42
}
fn add(a: i32, b: i32): i32 {
return a + b;
}
B64 is a C-like systems language with structs, pointers, generics, and match expressions. PBXB64 Addition
PowerBASIC
PowerBASIC - native dialect
FUNCTION PBMAIN() AS LONG
LOCAL g AS LONG
g = 0
FOR i = 1 TO 3
g = g + i
NEXT
FUNCTION = g ' = 6
END FUNCTION
PowerBASIC is the primary dialect: FUNCTION/SUB, LOCAL/GLOBAL/SHARED, TYPE/UNION/ENUM, full FOR/NEXT semantics. Standard PB
C
C17 - standard subset
#include <stdio.h>
int main(void) {
printf("Hello from PBXB64 C!\n");
return 0;
}
C17 subset with full preprocessor, structs, unions, enums, switch/case, and 218 shipped C17 header files. PBXB64 Addition
x64 Assembly
x64 Assembly - direct machine code
section .text
global main
main:
mov rax, 42
ret
x64 Assembly with Intel and AT&T syntax. Native COFF/PE emission - no intermediate language. PBXB64 Addition
PILOT
PILOT - educational language
T: Hello from PILOT!
A: What is your name?
M: Welcome, $name
J: END
U: END
E:
PILOT educational language with full T:/A:/M:/Y:/N:/J:/U:/E: command set. PBXB64 Addition
Try It Yourself
CLI - compile any language
REM Compile B64
PBXB64 answer.b64 -o answer.exe
answer.exe
REM Compile PowerBASIC
PBXB64 hello.pb -o hello.exe
hello.exe
REM Compile C
PBXB64 -std=c17 hello.c -o hello.exe
hello.exe
REM Compile Assembly
PBXB64 -c hello.asm -o hello.obj
PBXB64 hello.obj -o hello.exe
REM Compile PILOT
PBXB64 hello.pil -o hello.exe
hello.exe
One command, one compiler, one binary - regardless of input language.
By The Numbers
~1 MBSingle binary (UPX'd)
PBXB64 is part of the PBX-Compiler package. Free for private use, cleanly licensed for business.