XXIIVV
Uxn Sticker
Uxn Sticker

Uxn is a virtual stack-machine.

This one-page computer, programmable in Uxntal, was designed with an implementation-first mindset and a focus on creating portable graphical tools and games. It lives at the heart of the Varvara personal computer.

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

Memory

Uxn utilizes two circular stacks of bytes, the return stack allows it to tunnel through 128 subroutines and find its way back. It can interface with up to 16 peripherals, such as screens, controllers, or even other Uxns. Each instance has its own stack and device memory, but share a common 64kb of addressable working memory. Any sequence of bytes is a valid program, no operations can trigger errors.

SharedMemoryRAMData64kb pages
PrivateStacksWorking StackData256 bytes
Pointer1 byte
Return StackData256 bytes
Pointer1 byte
IODevicesData256 bytes

Implementation

The instruction set has 32 stack-machine opcodes, and 4 immediate opcodes, that can be implemented in about 100 lines of C89. If you're interested in implementing your own emulator, here are some resources to get started:

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

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

Stack-machines are ideal candidates for this scale of personal computing as one can comfortably write programs directly in assembly to tackle most computation projects without having to rely on higher-level languages.

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 that can be made in such a restricted system.

An assembler for the Uxntal language, written in itself, is about 2000 bytes. Original illustrations created by Rekka Bellum.

Rostiger's Uxn Zine
Rostiger's Uxn Zine
The Sound Of Plumpkins
varvara — The Sound Of Plumpkins

incoming dexe tools markl assembly forth ufx format ulz format varvara drifblim drifblim macintosh playdate devlog uxn devlog hundred rabbits oscean