Familiar instruction syntax
Write labels and processor instructions the way assembly programmers expect.
MODERN MULTI-ISA ASSEMBLER
One assembler. Multiple instruction sets.
Write x86, RISC-V, and SPIR-V with one modern language. Keep familiar instruction syntax, then use typed functions, control flow, collections, and modules to build format DSLs and complex binaries.
01 / MODERN ASSEMBLY LANGUAGE
Use assembly syntax for actual instructions and a modern compile-time language for repetition, abstraction, data processing, and binary construction.
Write labels and processor instructions the way assembly programmers expect.
Types, functions, control flow, collections, and modules replace fragile text-macro puzzles.
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
One project model and one compile-time language span x86, RISC-V, and SPIR-V while preserving what makes each instruction family different.
Build x86-64 and x86-32 machine code for systems software, tools, experiments, executables, and object files.
Assemble RV64 and RV32 instruction text with the same modern language, reusable modules, and data-generation tools.
Build SPIR-V modules and instruction streams with dedicated text and word encoding instead of forcing GPU IR into a CPU-style mode.
03 / WHAT YOU CAN BUILD
Use one language from instruction streams to generated tables, reusable DSLs, executable formats, and custom binary images.
Types, functions, control flow, strings, bytes, structs, unions, lists, and maps.
Package complex binary conventions behind readable APIs written in XIRASM itself.
Read text, bytes, JSON, and TOML, transform the data, then emit deterministic binary output.
Control regions, labels, alignment, reserves, fixups, and finalization without hiding the bytes.
04 / FORMATS AS XIRASM DSL
PE, COFF, and ELF are not opaque built-ins. The format library is XIRASM source you can use directly, study, extend, or follow to build your own format DSL.
05 / DOCUMENTATION
The guides cover the modern language, built-in APIs, executable formats, and direct binary construction.
zig build -Doptimize=ReleaseSafe
zig-out\bin\xirasm.exe hello.asm --target x86-64 -o hello.bin
ONE LANGUAGE / MULTIPLE ISAS / REAL BINARIES
From machine code to reusable format DSLs, XIRASM keeps the source readable and the output under your control.