Familiar instruction syntax
Labels and instructions are written exactly as in the assembly you already know.
MULTI-ISA ASSEMBLER
One assembler that writes multiple instruction sets.
Multi-architecture support: assembly for x86, AArch64, RISC-V, and SPIR-V. The compile-time language provides types, functions, and DSLs for batch code generation, executable format implementation, and custom instruction sets — all inside XIRASM, from source to final bytes, with no external toolchain.
01 / ASSEMBLY LANGUAGE
Processor instructions are written in assembly syntax. Batch generation, data processing, and binary construction go to the compile-time language: write functions, define types, call built-ins — the assembler computes every byte.
Labels and instructions are written exactly as in the assembly you already know.
Types, functions, control flow, collections, and modules are all available — no more wrestling with nested text macros.
Create reusable languages for formats, tables, protocols, firmware images, and project-specific rules.
x86.use64();
fn emit_square_table(count: u8) {
for value in range(0, count) {
dd(value * value);
}
}
const answer: u32 = 40 + 2;
entry:
mov eax, answer
ret
table:
emit_square_table(4);
02 / MULTI-ISA
All four instruction sets share one project model and one compile-time language; each keeps its own syntax and encoding rules, unchanged.
Generate x86-64 and x86-32 machine code directly — for systems software, tools, and experiments.
From scalar, floating-point, and SIMD to atomic, cryptographic, pointer-authentication, MOPS, and CSSC — modern ARM64 instructions, fully covered.
RV64 and RV32 both assemble with the same language and the same reusable modules.
SPIR-V has its own text syntax and word-encoding rules, handled the way GPU IR actually works — not forced into a CPU assembly model.
03 / WHAT YOU CAN BUILD
Generated tables, wrapped formats, custom images — one language end to end, with output straight to final bytes.
Types, functions, control flow, strings, bytes, structs, unions, lists, and maps.
Wrap complex binary conventions into usable APIs — the APIs are XIRASM source itself, ready to modify and reuse.
Read text, bytes, JSON, and TOML, transform them freely — the binary output is identical every time.
Regions, labels, alignment, reserves, and fixups are all under direct control, with nothing hidden in the final output.
04 / FORMATS AS XIRASM DSL
PE, COFF, ELF, Mach-O — the whole executable-format library is XIRASM source: use it as is, modify it freely, and follow it to write your own format DSLs. Executables are built by hand from end to end, with zero external tools.
05 / WHAT'S NEW
Check the highlights before upgrading; open the full history for details.
Version 0.3.1 takes two copies out of the AArch64 macro path: a capture no longer deep-copies the generated tables, and a read-only built-in borrows the collection it is handed instead of copying it first. The bytes it encodes are unchanged.
0.3.0 is the first release for actual use: the documentation and every example are assembly-verified, and Android builds an installable APK from native sources alone.
0.2.21 completes the full Android APK pipeline: resource directories compile into resources.arsc, framework resource IDs resolve by name, and archive entries support DEFLATE compression.
0.2.19 adds ARM64 encoding and the Mach-O format DSL, with release packages for three platforms.
06 / XIRASM 0.3.1
Each assembler archive contains the executable, Apache 2.0 license, include library, tests, and current English and Chinese documentation. The VS Code package adds editor support and the language server.
Native Windows console executable.
DownloadStatically linked Linux executable.
DownloadNative ARM64 executable for Apple Silicon Macs.
DownloadSyntax, diagnostics, completion, hover, and language server.
Download07 / DOCUMENTATION
Dedicated guides cover the language, built-in APIs, executable formats, and hand-built binaries.
zig build -Doptimize=ReleaseSafe
zig-out\bin\xirasm.exe hello.asm --target x86-64 -o hello.bin
ONE LANGUAGE / MULTIPLE INSTRUCTION SETS / REAL BINARIES
From machine code to reusable format DSLs, XIRASM keeps the source readable and the output under your control.