XXIIVV
Uxn Sticker
Uxn Sticker

Uxn is a virtual machine with 32 instructions.

This one-page computer is capable of hosting small applications, programmable in a unique language. It was designed with an implementation-first mindset with a focus on creating portable tools and games.

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

Memory

Uxn has no registers. It can tunnel through 127 subroutines and find its way back. Up to 16 devices can interface with the CPU at once; devices are peripherals such as screens, controllers, or even other uxns. It has 64kb of observable memory, programs can move stacks into addressable range to allow reading and writing directly into stack memory.

MemoryRAMData64kb
StacksWorking StackData254 bytes
Error1 byte
Pointer1 byte
Return StackData254 bytes
Error1 byte
Pointer1 byte
IODevicesData256 bytes

Design

Because Uxn was explicitly created to be hosted on pre-existing hardware, the design was advised primarily by relative software complexity; generating novel electronics is at odds with the project. Features were weighted against the relative difficulty they would add for programmers implementing their own emulators.

Stack-machines are ideal candidates for this scale of personal computing. Not only do they limit the complexity of the assembler, the resulting programs are succinct and translate well to pen & paper computing.

— fizzbuzz.rom, 99 bytes

With only 64kb of memory, it will never run Chrome, TensorFlow or a blockchain. It sucks at doing most modern computing activities. It's more about finding novel things could be made in such a small system.

While this project aspires to act as a platform that may last, it is in its infancy, the design could still change and break compatibility.

C Implementation

The VM can be implemented in about 100 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.

The Sound Of Plumpkins
varvara — The Sound Of Plumpkins

Incoming: dexe nasu tools theme snarf ufx format assembly forth drifblim varvara macintosh playdate devlog 2022 2021 hundred rabbits