XI/XIRASM View on GitHub

Modern assembly, without the old constraints

One assembler.
x86 to RISC-V.

Write assembly directly. Use a real compile-time language when the source needs functions, loops, structured data, modules, or a small DSL.

X86 / X86-64 RV32 / RV64 PE / COFF / ELF 0.2.0
examples/table.asm compile-time generation
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);

Assembly stays assembly.
Everything around it gets better.

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.

01

Functions and control flow

Use typed values, reusable functions, conditions, and loops while assembling.

02

Structured binary data

Build tables, headers, byte sequences, structs, unions, and reserved data in source.

03

Modules and data-driven builds

Organize reusable code and consume text, bytes, JSON, or TOML during assembly.

04

Small source DSLs

Use token matching when a project needs a concise domain-specific source form.

Change the target.
Keep the language.

The compile-time language, project structure, and generation tools stay consistent across supported architectures.

01

x86

x86-64 and 32-bit x86 for systems software, tools, experiments, and native programs.

x86-64x86-32

02

RISC-V

RV64 and RV32 using the same source language and compile-time programming model.

RV64RV32

From source to a useful file.

Produce flat binaries, native programs, libraries, and object files without treating the assembler as only the first half of the workflow.

Explore executable formats
PE Windows EXE and DLL PE32 / PE64
COFF Windows object files COFF32 / COFF64
ELF Linux executables, PIEs, objects, and shared libraries ELF32 / ELF64
RAW Flat and application-specific binaries Direct bytes

Build it. Assemble something.

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

Learn the language.
Then build what you need.

Modern source.
Direct control.

Open XIRASM on GitHub