Uxn Sticker

Uxn is a virtual machine with 32 instructions.

The Uxn ecosystem is a personal computing playground, created to host small tools and games, programmable in its own unique assembly language.

It was designed with an implementation-first mindset with a focus on creating portable graphical applications, the distribution of Uxn projects is akin to sharing game roms for any classic console emulator.


StacksWorking StackPointer1 byte
Data256 bytes
Return StackPointer1 byte
Data256 bytes
MemoryRAMPointer1 short
IODevicesData256 bytes

The CPU can tunnel through 128 subroutines and find its way back with its return stack. The CPU can connect to up to 16 devices at once, devices can be peripherals such as screens and controllers, or even an other Uxn CPU.


Because Uxn was explicitly created to exist as software hosted on pre-existing hardware, the design was advised primarily by relative software complexity, not by how fast it could be made to run. Features were weighted against the relative difficulty they would add for programmers implementing their own emulators.

Stack-machines, and postfix arithmetic, are ideal candidates for this scale of personal computing. Not only does it make for extremely basic compilers, the resulting programs are succinct and translate well to pen & paper computing.


With only 64kb of memory, it will never run Chrome, TensorFlow or a blockchain. It sucks at doing most modern computing, but it’s also sort of the point. It's more about finding what new things could be made in such a small system.

What's the benefit of Uxn over C, when just about everything has a C compiler?

While terminal utilities can be made portable, cross-platform graphical development is different. Even building projects for platforms with C compilers, such as Linux and Plan 9, will require a near total rewrite, whereas porting the thin layer that is the uxn emulator will allow that same rom file to be used on both systems.

C Implementation

The VM is implemented in about 140 lines of ANSI C, it lives at the core of the Varvara computer, Uxn is to Varvara, what the 6502 is to the Classic Nintendo.

static void
run(Uxn *u)
	Uint16 vec = PAGE_PROGRAM;
	uxn_eval(u, vec);
	while(uxn_eval(u, vec))

The original illustrations were created by Rekka Bellum.