PBXB64 - Compiler Werkstatt
V18 — Native x86-64 Multi-Frontend Compiler

PBXB64 V18 RELEASE

PBXB64 V18 is a native Windows x64 compiler implemented in pure C17. PowerBASIC/BASIC, B64, C, ASM, COBOL, FORTH, Logo, PILOT, Rust, and SPR sources use a shared pipeline to produce native PE32+ programs. The package includes current English and German CHM help, 400 tested examples, 354 qualified PowerBASIC include files, and 34 C17 headers including H-Lib.

V18 release package 10 Language Frontends 62.5 MB All-in-One 8-Stage Pipeline Win64 Native Signed

What V18 Adds

V18 ships and qualifies the V17 feature set: a fully green 157-lane validation matrix on both Make and CMake, fixed -O2/-O3 backend regressions, stable Forth CATCH/THROW, hardened TCP/UDP runtime paths, and frontend-wide extensions ranging from MCP/JSON adapters to scientific operators and refreshed bilingual help.

157-lane validation matrix
Full Make and CMake matrices with zero unexpected failures: pb_linkrun 1,306/1,306, c_linkrun 55/55, forth_linkrun 67/67, assembly 1,996/1,996, c23_verify 137/137.
Fixed -O2/-O3 backend regressions
The incoming-argument copy stays at function entry; peephole and register allocation no longer move or fold it, and float parameters keep their ABI XMM registers.
Stable Forth catch/throw
Leaf words that call runtime helpers now receive a frame pointer, ending the stack-misalignment segfault in CATCH/THROW exception handling.
Hardened TCP/UDP NOTIFY
Randomized ports remove parallel-validation collisions in the TCP/UDP NOTIFY regression lanes.
MCP/JSON command adapters
Local MCP protocol extensions, catalog parser, HTTP/JSON-RPC adapter, JSON deep-copy, path-aware presence queries, crypto vectors, and type conversions.
Scientific extensions V18–V24
Unary operators, number theory, special functions, probability, polynomials, exact decimal, and complex numbers through the PB surface.
PowerBASIC communication stack
TCP OPEN SERVER/CLIENT, TCP SEND/RECV, UDP OPEN/SEND/RECV, NOTIFY events with WSAAsyncSelect, HOST ADDR/NAME, and PB file-number tracking.
Refreshed bilingual reference help
3,135 topics per language, EN and DE CHMs updated for all ten frontends, covering science, MCP/JSON, and 174 Forth primitives.
Per-frontend snapshot
COBOL subset 176/176, SPR text commands 164/164, C17 headers with stdbit.h/stdckdint.h, C include resolution, PB DIALOG/GRAPHIC/XPRINT, StringX/UN family.
A complete signed release bundle
Digitally signed compiler, bilingual CHM help, 400 tested examples, 354 qualified PB includes, and 34 C17 headers.
Explore All Features
Download PBX-Compiler V2 (ZIP) All-in-One: PBXA32, PBXA64, PBXB64, ScharffBasic and PBX Editor Previous bundle: V1 (optional) Online Help All Features Bundle downloads: --

PBX-Compiler V2 package: 62.5 MB (ZIP) — PBXA32, PBXA64, PBXB64 and ScharffBasic including PBX Editor, CHM help (EN+DE), 400 tested examples, 354 qualified includes, and 34 C17 headers

Digitally signed by Theo Robert Gottwald — valid Authenticode signature

Release package prepared for native Windows x64 development

10Language frontends from BASIC and C through COBOL, FORTH, Logo, Rust, and SPR
400Tested examples across all supported frontends
354Qualified PowerBASIC include files
34C17 headers, including the public H-Lib interface

V18 in Real Code

These compact examples remain part of the shipped fixture corpus: runtime expression evaluation and StringX in PowerBASIC, bounded COBOL linkage, and FORTH exception handling.

PowerBASIC - EVAL, BUILD$, and REGEX$
LOCAL value AS DOUBLE, result AS STRING value = EVAL("(10 - 4) * 2") result = BUILD$("value=", EVAL$("1 + 2")) result = REGEX$("([A-Z]+)-(\d+)", "ITEM-42", 2)
COBOL - linked PB buffer
#COBOL USING buf DATA DIVISION. LINKAGE SECTION. 01 BUF PIC X(20). PROCEDURE DIVISION USING BUF. MOVE "from COBOL" TO BUF. STOP RUN. #ENDCOBOL
FORTH - CATCH and THROW
: may-fail 1 THROW ; : safe-run ['] may-fail CATCH . CR ; safe-run
StringX - wildcard and replacement
IF LIKE$("Report-2026", "report-*") <> "" THEN PRINT REPLACES$("alpha-beta", "-", " ") END IF
Commands to try

Command Atlas

These command families are available in the shipped PBXB64 reference and test corpus. The linked detail pages explain syntax, types, limits, and additional examples.

Number Theory

GCD, GCD$, LCM, LCM$, FACT, FACT$, BINOM, BINOM$, MODPOW, MODPOW$, MODINV, MODINV$, ISPRIME

Special Functions

BESSELJ0, BESSELJ1, BESSELI0, BESSELI1, BETA, LBETA, DIGAMMA, TRIGAMMA, SINC, LOGISTIC, LOGIT

Probability

NORMPDF, NORMCDF, NORMINV, POISSONPMF, POISSONCDF, BINOMPMF, BINOMCDF

Polynomials and Exact Values

CHEBYSHEV, LEGENDRE, LAGUERRE, HERMITE, plus UNFSQRT$, UNFIPOW$, UNFABS$, UNFNEG$, and UNFTRUNC$

Complex Components

CADD$, CSUB$, CMUL$, CDIV$, CCONJ$, CREAL$, CIMAG$, CMAG, CPHASE, and additional component functions

MCP, HTTP, and JSON

MCP_CatalogList, MCP_CatalogGet, MCP_CatalogSearch, MCP_CatalogCall, sessions, tasks, HTTP_Execute, plus deep-merge, prune, sort, and serialization functions for JSON

Exact mathematics in the PBXB64 test corpus
LOCAL gcd AS STRING, root AS STRING gcd = GCD$(84, 30) ' 6 root = UNFSQRT$(144) ' 12 IF ISPRIME(97) THEN PRINT "prime" LOCAL c AS UNC c = VALUNC("3;4") PRINT CADD$(c, VALUNC("2;0")) ' 5;4
Local MCP/HTTP adapter
LOCAL source AS STRING, response AS STRING MCP_CatalogList("tools/list", source) response = HTTP_Execute("GET", _ "http://127.0.0.1:55457/chunked", "") ' JSON_DeepMerge, JSON_PruneNulls, and JSON_SerializePretty ' are available for the following transformation step.

Why PBXB64?

True native x64 code

No GCC, no LLVM, no C runtime dependency. The compiler emits x64 machine code directly - from source to PE32+ in a single pass. Maximum control, minimum binary size.

Multi-frontend: 10 languages

Use PowerBASIC/BASIC, B64, C, ASM, COBOL, FORTH, Logo, PILOT, Rust, and SPR through one native compiler pipeline.

Custom x64 backend

Direct instruction selection, register allocation, peephole optimization and PE32+ image generation - all written in C17. No external dependencies.

Custom PE32+ linker

Built-in linker processes COFF objects, import tables, relocations, TLS and exception data. Full PE32+ compatibility from Windows XP through Windows 11.

Quick Examples

Same algorithm - sum 1 to 5 - in every frontend.

B64

fn main(): i64 { let sum: i64 = 0; let i: i64 = 1; while i <= 5 { sum = sum + i; i = i + 1; } return sum; // 15 }

PowerBASIC

FUNCTION PBMAIN() AS LONG LOCAL sum AS LONG LOCAL i AS LONG sum = 0 FOR i = 1 TO 5 sum = sum + i NEXT FUNCTION = sum ' = 15 END FUNCTION

C

#include <stdio.h> int main(void) { int sum = 0; for (int i = 1; i <= 5; i++) { sum += i; } return sum; /* 15 */ }

LOGO

MAKE "sum 0 MAKE "i 1 REPEAT 5 [ MAKE "sum :sum + :i MAKE "i :i + 1 ] PRINT :sum

FORTH

5 4 + 3 + 2 + 1 + . \ 15

SPR

VAR.$$SUM=0 FOR.$$III|1|5|1 VIC.$$SUM|$$III NEX. ENR.

ASM

FUNCTION PBMAIN() AS LONG LOCAL sum AS LONG #ASM xor eax, eax ; sum = 0 mov ecx, 5 ; counter = 5 add_loop: add eax, ecx ; sum += counter dec ecx ; counter-- jnz add_loop ; loop until 0 mov %sum, eax ; store result #ENDASM FUNCTION = sum ' = 15 END FUNCTION

PILOT

T: "Sum 1 to 5" C: #sum=1+2+3+4+5 E:

COBOL

IDENTIFICATION DIVISION. PROGRAM-ID. QuickSum. DATA DIVISION. WORKING-STORAGE SECTION. 01 TOTAL PIC 9(2). PROCEDURE DIVISION. COMPUTE TOTAL = 1 + 2 + 3 + 4 + 5 DISPLAY TOTAL STOP RUN.

RUST

fn main() -> i64 { let mut sum: i64 = 0; let mut i: i64 = 1; loop { sum = sum + i; if i >= 5 { break; } i = i + 1; } return sum; // 15 }
One program, multiple languages, shared storage

Share Variables Across Frontends

PBXB64 V18 connects its frontends at symbol level. BRIDGE EXPORT creates typed global storage, while BRIDGE IMPORT binds external storage. C and Rust receive matching declarations; ASM and Forth access the published symbol. COBOL, SPR, and PILOT add direct, tested bindings.

PowerBASIC ↔ C, Rust, ASM, Forth

PowerBASIC exports
BRIDGE EXPORT bridge_counter AS LONG _ ALIAS "bridge_counter" bridge_counter = 41
C uses the same symbol
extern int bridge_counter; bridge_counter += 1; /* now 42 */

PBXB64 generates type-checked bridge declarations for companion sources in the same build.

COBOL ↔ PowerBASIC

COBOL owns the value
01 SHARED-COUNT PIC S9(9) VALUE 41 GLOBAL.
PowerBASIC binds and changes it
BRIDGE IMPORT shared_count AS QUAD _ ALIAS "SHARED-COUNT" PRINT shared_count shared_count = 42

The exact COBOL object symbol is preserved; BASIC reads and writes the same storage.

SPR and PILOT ↔ PB globals

SPR: two-way live bindings
VIP.$$NUM|spr_vip_num|QUAD VIP.$$TXT|spr_vip_txt|STRING VIC.$$NUM|1
PILOT: the same idea with V:
V: #NUMBER|pilot_number|QUAD C: #NUMBER = 42

Changes are immediately visible in the other language, with no serialization or helper DLL.

Current tested contract: scalar integer and floating-point types, pointers, BOOL, CURRENCY, and fixed STRINGZ * n buffers. Dynamic strings, arbitrary arrays, UDTs, and untyped aggregate writes require a dedicated bridge contract.

Production text processing without another DLL

A Superb Built-In REGEX Engine

PBXB64 V18 exposes the integrated REGEXPR 1.25 runtime through PB-compatible statements and StringX helpers. Search, validate, capture, transform, and replace structured text with groups, backreferences, bounded quantifiers, word boundaries, shortest matching, and binary-safe target strings.

Choose PB-compatible REGEXPR/REGREPL statements when positions matter, or concise StringX functions REGEX$/REGEXREPLACE$ when the text result is what you need.

See REGEX examples and details
Capture a name and reformat every match
FUNCTION PBMAIN() AS LONG LOCAL source AS STRING, pattern AS STRING LOCAL captured AS STRING, result AS STRING source = "User: Ada Lovelace, ID: 1843" pattern = "User: ([A-Za-z]+ [A-Za-z]+)" captured = REGEX$(pattern, source, 1) PRINT captured ' Ada Lovelace result = REGEXREPLACE$("([A-Za-z]+) ([A-Za-z]+)", _ "Ada Lovelace and Grace Hopper", "$2, $1") PRINT result ' Lovelace, Ada and Hopper, Grace FUNCTION = 0 END FUNCTION
When 64 bits and fixed precision are not enough

Six First-Class UN Numeric Types

UNL handles arbitrary-precision signed integers, UNF arbitrary-precision decimals, and UNB big floating-point values. UNC, UNI, and UNQ keep complex, interval, and quaternion components together as managed values.

They are superior when native types would overflow, lose required precision, or force you to maintain several components manually. Declarations, arithmetic, comparisons, calls, returns, globals, arrays, conversion, and cleanup stay inside the language.

See all six UN examples
Large integers, precise decimals, and complex numbers
LOCAL huge AS UNL, squared AS UNL LOCAL price AS UNF, tax AS UNF, total AS UNF LOCAL leftValue AS UNC, rightValue AS UNC, product AS UNC huge = VALUNL("999999999999999999999999999999") squared = huge * huge price = VALUNF("19.95") : tax = VALUNF("3.79") total = price + tax leftValue = VALUNC("1;2") : rightValue = VALUNC("3;4") product = leftValue * rightValue PRINT UNL$(squared) PRINT UNF$(total) ' 23.74 PRINT UNC$(product) ' -5;10

19 Feature Categories

Explore every feature in detail with code samples and explanations.

Architecture

Ten frontends, unified IR, custom x64 backend, built-in assembler, COFF writer, and PE32+ linker.

Explore →

Data Types

Standard PB types plus the complete UN family, native H-Lib types, DEC128, RATIONAL, COM types, and wide integers.

Explore →

Containers

22 native core families plus Safe, with auto-init/final, method dispatch, and UDT payloads.

Explore →

Science & Math

80+ functions: ATN2, HYPOT, DET, DOT, NORM, RNGSEED, RNDGAUSS, DEC128.

Explore →

Control Flow

FOR (7 types, negative STEP), WHILE, SELECT CASE, GOSUB/RETURN, ON KEY CALL.

Explore →

Networking

TCP, UDP, COMM serial, HOST ADDR/NAME. Real Win32 socket API.

Explore →

Graphics & GUI

GRAPHIC WINDOW, LINE, BOX, GUI NEW, DIALOG, CONTROL, DISPLAY.

Explore →

Inline Assembly

x64 assembly directly in PB and B64. Full instruction set, registers, memory addressing.

Explore →

B64 Language

C-like systems language with types, structs, arrays, pointers, inline asm.

Explore →

Free for private use, cleanly licensed for business

Private use is free. Business, team, and commercial usage goes through Smart Package Robot.

Download Activity

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