PBXB64 includes a native x64 assembler that accepts Intel-syntax assembly and produces COFF objects or PE executables directly. No external assemblers required.
Supported Extensions
.asm and .s files are automatically routed through the native x64 assembler pipeline.
Basic Structure
section .text
global main
main:
push rbp
mov rbp, rsp
mov eax, 42
pop rbp
ret
Assembler Pipeline
.asm / .s -> ASM Lexer -> ASM Parser -> Encoder -> COFF Object -> PE Linker
Data Sections & Variables
section .data
msg: db "Hello, World!", 0
len: equ $ - msg
section .bss
buffer: resb 1024
section .text
global main
main:
lea rcx, [rel msg]
call printf
ret
Integration with Other Frontends
Assembly files can be linked seamlessly with B64, BASIC, and C object files using the PE linker:
PBXB64 main.b64 helper.asm -o program.exe PBXB64 prog.c utils.s -o mixed.exe
Syntax Notes
- Intel syntax:
instruction destination, source - Registers:
rax, rbx, rcx, rdx, rsi, rdi, rsp, rbp, r8-r15 - Modes: 64-bit (default), 32-bit (
rax->eax, etc.) - Immediate values: decimal (42), hex (0x2A), octal (0o52)
Performance Tip: Use
-O2 or higher when linking assembly with high-level code to enable cross-language inlining and register optimization.