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 / RELEASE NOTES
Release notes track user-facing language, library, tooling, and documentation changes so you can quickly judge each update.
Bulk stream write, read, and flush paths now use compact x86-64 block copies. The public IO surface and ABI behavior remain unchanged.
Measured 64 to 4096 byte copies improved by roughly 2.5 to 50 times on a Ryzen 5 5600.
Each stream expansion emits about 17 fewer bytes by replacing byte-at-a-time loops with rep movsb.
Use io_stream_write_byte and io_stream_read_byte for one-byte operations. The IO library remains experimental.
XIRASM 0.2.15 focuses on the format DSL, Win32 development support, and shorter practical documentation. ISA encoders and the assembler core remain unchanged.
PE, COFF, and ELF now use direct mutable plans. Batch imports and exports replace image0/image1 chains and repeated const rebinding, while Win32 API selections plug directly into PE imports.
Partitioned includes provide 339 DLLs, 17,105 APIs, 93,534 constants, and 21,717 ABI aggregate types. Structures preserve signed fields; GUID, IID, CLSID bytes, and COM vtable offsets are ready to use.
Start with template choice, PE, ELF, object files, and common rules. Advanced construction remains separate for users who need direct control.
06 / XIRASM 0.2.15
Each assembler archive contains the executable, Apache 2.0 license, include library, and current English and Chinese documentation. The VS Code package adds editor support and the language server.
07 / 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.