Command-Line Options

Usage

pbxa64 [options] <input files>

Options Reference

OptionDescription
-o <path>Output file path. Default depends on mode: a.exe (link), a.obj (compile-only), a.asm (assembly).
-cCompile only — produce a .o COFF object file without linking.
-SEmit assembly only — output .asm text file instead of binary. Includes comment header with compiler version and command line.
--asm:<path>Save generated assembly to file, then continue compiling and linking (unlike -S which stops). Assembly includes comment header.
--dump-tokensDump the lexer token stream to stdout. Useful for debugging lexer behavior.
--dump-ast, --emit-astDump the abstract syntax tree to stdout after parsing.
--dump-ir, --emit-irDump the intermediate representation to stdout after IR lowering.
-O0No optimization (default). Fastest compilation, no transforms applied.
-O1Basic optimization — enables simple peephole and local transforms.
-O2Aggressive optimization — enables all available optimization passes.
-O3Maximum optimization — highest optimization level.
-v, --verboseVerbose output — prints additional diagnostic information during compilation.
-h, --helpShow the help message and exit.
--versionShow version banner and exit.

Input Files

ExtensionFrontendDescription
.pbPowerBASICPrimary PowerBASIC source file
.basPowerBASICPowerBASIC source file (alternate)
.pbiPowerBASICPowerBASIC include file
.mgcMGCC-like intermediate language source

Examples

# Compile and link to executable
pbxa64 hello.pb -o hello.exe

# Compile to object file only
pbxa64 -c program.bas -o program.obj

# Generate assembly listing
pbxa64 -S program.pb -o program.asm

# Debug token stream
pbxa64 --dump-tokens hello.pb

# Debug AST
pbxa64 --dump-ast hello.pb

# Debug IR with optimization
pbxa64 --dump-ir -O1 program.mgc