Functions and control flow
Use typed values, reusable functions, conditions, and loops while assembling.
Modern assembly, without the old constraints
Write assembly directly. Use a real compile-time language when the source needs functions, loops, structured data, modules, or a small DSL.
x86.use64();
fn emit_table(count: u8) {
for value in range(0, count) {
dd(value * value);
}
}
entry:
mov eax, 42
ret
table:
emit_table(4);
The language
XIRASM does not replace instructions with a function-call syntax. It adds a modern language for the work that traditional assemblers force into fragile macros and directive tricks.
Use typed values, reusable functions, conditions, and loops while assembling.
Build tables, headers, byte sequences, structs, unions, and reserved data in source.
Organize reusable code and consume text, bytes, JSON, or TOML during assembly.
Use token matching when a project needs a concise domain-specific source form.
Instruction sets
The compile-time language, project structure, and generation tools stay consistent across supported architectures.
01
x86-64 and 32-bit x86 for systems software, tools, experiments, and native programs.
02
RV64 and RV32 using the same source language and compile-time programming model.
Native output
Produce flat binaries, native programs, libraries, and object files without treating the assembler as only the first half of the workflow.
Explore executable formatsQuick start
XIRASM targets Zig 0.17 and produces a standalone command-line assembler.
zig build -Doptimize=ReleaseFast
zig-out\bin\xirasm.exe hello.asm --target x86-64 -o hello.bin
Documentation
Ready to assemble?