XXIIVV
Uxn Sticker
Uxn Sticker

Uxn is a virtual machine with 32 instructions.

The Uxn ecosystem is a personal computing system created to host small tools and games, programmable in a unique assembly language. It was designed with an implementation-first mindset with a focus on creating portable graphical applications.

This wiki and most of the audio-visual works documented on here were created with Uxn-powered tools.

Memory

The CPU can tunnel through 127 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.

StacksWorking StackPointer1 byte
Data255 bytes
Return StackPointer1 byte
Data255 bytes
MemoryRAMPointer1 short
Data64kb
IODevicesData256 bytes

Design

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.

—fizzbuzz.rom

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.

C Implementation

The VM is implemented in about 120 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.

The original illustrations were created by Rekka Bellum.