
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 is a forth-like system with 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.
Memory | RAM | Data | 64kb |
---|---|---|---|
Stacks | Working Stack | Data | 254 bytes |
Error | 1 byte | ||
Pointer | 1 byte | ||
Return Stack | Data | 254 bytes | |
Error | 1 byte | ||
Pointer | 1 byte | ||
IO | Devices | Data | 256 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.

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.
While this project aspires to act as a platform that may last, it is in its infancy, the design may change and break compatibility.
C Implementation
The VM is 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. Try the self-hosted Drifblim assembler.
The original illustrations were created by Rekka Bellum.

15B13
— Uxn is born!
Incoming: dexe nasu tools theme snarf ufx format assembly forth drifblim varvara macintosh playdate devlog 2022 2021 hundred rabbits