PBXA64 - Compiler Werkstatt
Alpha Vorschau — Nativer x86-64 Compiler

PBXA64 ALPHA

V28 — Limit Completion

A native Windows compiler that transforms PowerBASIC-compatible BASIC source code directly into PE32+ executables and DLLs. Full EXPORT/ALIAS/ORDINAL support. A hardened preprocessor with MACRO and #IF. Inline #ASM blocks that bind directly to PB symbols. V28 adds LIKE wildcard matching, PRINT USING, ARRAY DELETE/INSERT, LINE GDI drawing, and 80+ automated tests proving correctness.

Alpha — Download kommt bald
Bald erhaeltlich Help-File Download (CHM) Alpha Preview

Release: ~747 KB (exe + help + WinAPI includes)

Digitally signed by Theo Gottwald

80 automated tests passing

7Stage pipeline: Preproc → Lex → Parse → Sem → CodeGen → Asm → Link
80+Automated tests passing across all command families
EXE + DLLx64 PE32+ executables & DLLs with EXPORT/ALIAS/ORDINAL
3Language frontends: BASIC, PILOT, MGC macro language

Why PBXA64 Matters

Native x64 CodeGen

Direct assembly emission to x64 machine code. No GCC dependency. No C transpilation. No LLVM. Your BASIC becomes native PE32+ executables and DLLs through a dedicated pipeline built from the ground up.

DLL Export Engine

Full EXPORT, EXPORT ALIAS "Name", and EXPORT ORDINAL n support. Multiple #COMPILE directives in a single source file can fan out to build both EXE and DLL targets simultaneously.

#ASM With PB Symbol Binding

Inline assembly blocks that use your PowerBASIC variable and parameter names directly. The compiler resolves each symbol to its current register assignment or stack slot. No manual register tracking required.

Rich Preprocessor

#DEFINE, MACRO/MACROFUNCTION, MACROTEMP, #IF/#ENDIF, #INCLUDE ONCE, %DEF(), and conditional compilation. Full macro expansion before lexing.

Quick Example

#COMPILE EXE "hello.exe" #DIM ALL FUNCTION PBMAIN() AS LONG PRINT "Hello from PBXA64 V28!" FUNCTION = 0 END FUNCTION

DLL Example

math.dll Source

#COMPILE DLL "math.dll" #DIM ALL FUNCTION AddOne(BYVAL x AS LONG) EXPORT AS LONG FUNCTION = x + 1 END FUNCTION SUB Ping() EXPORT ALIAS "PB_Ping" END SUB

Build & Use

pbxa64 math.pb ' produces math.dll pbxa64 app.pb ' links math.dll imports ' Declare in your app: DECLARE FUNCTION AddOne LIB "math.dll" _ ALIAS "AddOne" (BYVAL x AS LONG) AS LONG

DLLs support EXPORT, EXPORT ALIAS "Name", and EXPORT ORDINAL n. Multiple #COMPILE directives in one source build both EXE and DLL.

Feature Timeline

VersionReleaseKey Features
V28Limit CompletionLIKE wildcard, PRINT USING, ARRAY DELETE/INSERT, LINE GDI drawing, hardened #ASM with PB symbol binding
V26Error, DATA, Array, File, FormatON ERROR/RESUME, DATA/READ/RESTORE, ARRAY ASSIGN/SORT/SCAN, FILECOPY/RMDIR/GETATTR, MIN/MAX/IIF, BUILD$/CLIP$, LIKE, #ASM, LINE graphics scaffold
V25Memory & String CommandsPOKE/PEEK, MKI$/MKL$/MKQ$ packing, CV* unpacking, JOIN$/SPLIT, MID$ statement, NUL$/DEC$
V24String Completion20 string commands: REPEAT$, STRDELETE$, STRINSERT$, STRREVERSE$, BIN$/OCT$, LTRIM$/RTRIM$, REPLACE$, SCAN$, TALLY, VERIFY, COMMAND$, ENVIRON$, CURDIR$, TAB$, PEEK$, INPUT$, INKEY$, WAITKEY$
V23DLL Output#COMPILE DLL, FUNCTION EXPORT/ALIAS/ORDINAL, multi-#COMPILE fan-out, .edata PE section
V22Macro Preprocessor#DEFINE, MACRO/MACROFUNCTION, MACROTEMP, #INCLUDE ONCE
V21Core Commands#IF/#ENDIF, %DEF(), INSTR/CHR$/ASC/STR$/VAL, DATE$/TIME$, SLEEP/SWAP, XOR/EQV/IMP
V10–V20FoundationPB parser, semantic analysis, x64 codegen, COFF/PE linker, PILOT, STRING/WSTRING, arrays, UDTs, file I/O, WinAPI, callbacks

Architecture — From Source to PE

Source (.pb/.bas/.pbi) |-> Preprocessor (MACRO, #IF, #INCLUDE) |-> Lexer (PB tokens, identifiers, literals) |-> Parser (AST construction) |-> Semantic Analysis (type checking, symbol binding) |-> x64 CodeGen (direct assembly emission) |-> Assembler (x64 encoding, COFF output) |-> Linker (COFF to PE32+/DLL, imports, exports)

Alpha Preview

PBXA64 is in active alpha development. The complete compiler, documentation, and test suite will be available for download with the first public alpha release.