uα - Unified Assembler: One Assembly Language for Every Architecture
I'm thrilled to introduce uα (pronounced "yu-ah"), an experimental assembler project I've been working on that challenges a fundamental assumption in low-level programming: that assembly language must be architecture-specific.
The Big Idea
What if you could write assembly code once and compile it for any processor architecture? Not by hiding the hardware behind layers of abstraction, but by defining a truly unified assembly language that translates cleanly to native machine code across wildly different platforms.
That's exactly what uα does. Write your program using the Unified Assembly instruction set, and compile it to run on:
- Intel x86-64 (your desktop PC)
- 32-bit x86 (legacy systems)
- ARM processors (mobile devices, Raspberry Pi)
- ARM64 / Apple Silicon (modern Macs)
- RISC-V (emerging open-source hardware)
- 8051 microcontrollers (embedded systems)
The same source file. Different architectures. No code changes required.
Version 26: "Awesome Ada"
The current release is Version 26, codenamed "Awesome Ada" in honor of Ada Lovelace (1815–1852), widely considered the first computer programmer. She wrote the first algorithm intended for Charles Babbage's Analytical Engine—a fitting inspiration for a language that brings modern structure to low-level programming.
Why This Matters
Assembly language has always been the ultimate form of control—direct access to the hardware with zero overhead. But that power comes at a price: each processor family has its own instruction set, syntax quirks, and conventions. Want to port your code from x86 to ARM? Start rewriting.
uα bridges that gap. It provides:
Bare Metal Control — You still work with registers, memory addresses, and CPU instructions. Nothing is hidden. When you write MOV R0, R1, you're moving data between registers, just like traditional assembly.
Modern Ergonomics — But you also get namespaces, imports, standard libraries, and conditional compilation. The @IMPORT system lets you include functionality like string handling or math operations that feel high-level but execute as pure, cycle-accurate assembly.
Write Once, Run Everywhere — The Minimum Viable Instruction Set (MVIS) ensures that 37 core instructions work identically across all architectures. The compiler handles the architectural differences behind the scenes.
A Taste of the Code
Here's a simple "Hello, World!" in uα:
@IMPORT std_io
LDS R0, "Hello, World!\n"
CALL std_io.print
HLT
Compile it for any architecture:
ua hello.ua -arch x86 -sys linux -o hello # Linux on x86-64
ua hello.ua -arch arm64 -sys macos -o hello # Apple Silicon
ua hello.ua -arch mcs51 -o hello.bin # 8051 microcontroller
The same code runs on a modern MacBook Pro and a decades-old 8-bit embedded chip.
The Philosophy: No Compromises
The project is guided by a few core principles:
Zero Dependencies — Written in pure C99, uα requires no external linkers, package managers, or runtime environments. One compiler invocation is all you need to build it. It takes raw text and directly emits executable .exe, .elf, or .bin files.
Transparency over Magic — There are no hidden safety nets or runtime checks. If an 8-bit register overflows at 255, it overflows exactly as the hardware dictates. The developer is in absolute command.
Self-Hosting Vision — The ultimate goal? A compiler written entirely in uα, capable of compiling itself. A language only truly matures when it can bootstrap itself.
What's Included
uα ships with a complete standard library—written entirely in uα itself:
std_io— console input/outputstd_string— string operationsstd_math— mathematical utilitiesstd_array— fixed-size arraysstd_vector— dynamic vectorsstd_iostream— file I/O operations
The compiler includes:
- 37 portable instructions covering data movement, arithmetic, logic, control flow, and system calls
- 14 architecture-specific opcodes for specialized operations (like x86's
CPUIDor ARM'sWFI) - Conditional compilation with
@IF_ARCHand@IF_SYSdirectives - Five output modes: raw binary, Windows PE, Linux ELF, macOS Mach-O, and JIT execution
- Six CPU backends supporting everything from modern 64-bit processors to vintage 8-bit chips
Try It Yourself
The entire compiler is under 3,000 lines of C99 code. Build it with a single GCC command, then start experimenting. Write some arithmetic, compile it for different architectures, compare the machine code output. See for yourself how the same logical operations translate across wildly different hardware.
uα is about exploring an idea: that we can have both the raw power of assembly and the convenience of portable code. That we don't have to choose between control and accessibility.
What's Next?
This is an experimental project, and there's still much to explore. The instruction set continues to evolve, more standard library functions are being added, and the optimization pipeline is getting smarter.
But the core vision is clear: one assembly language, understood everywhere, giving developers bare-metal control without tying them to a single architecture.
If you've ever wondered what it would be like to program "close to the metal" but without being locked into one platform, uα is worth a look.
uα is released under the GNU General Public License v3. Full documentation, examples, and source code are available in the project repository.