XXIIVV
Uxn Sticker
Uxn Sticker15C06

Uxn is the virtual machine powering the Hundred Rabbits software.

This one-page computer, programmable in Uxntal, is an implementation-first portability layer with a focus on hosting graphical tools and games. It lives at the heart of the Varvara ecosystem.

This wiki along with most of the audio-visual projects documented on it are running on Uxn.

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. Uxn has no undefined behaviors, any sequence of bytes is a valid program.

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

Basic Emulator

Here is an implementation of a basic Uxn emulator in 150 lines of C which includes the Console device and passes the opcode tests.

cc uxnmin.c -o uxnmin view raw

Basic Assembler

Here is a self-hosted implementation of the assembler in 400 lines of Uxntal, capable of assembling itself.

cat uxnasm.tal | uxncli uxnasm.bin > uxnasm-bootstrap.rom view raw

Here is the 1.4kb binary data of the assembler above, alternatively, a new one can be created with uxnasm.c.

xxd -r -p uxnasm.rom uxnasm.tal view raw

Software is bootstrappable when it does not depend on a binary seed that cannot be built from source. Software that is not bootstrappable, even if it is free software, is a serious security risk. The goal is to start from a minimal, easily inspectable binary which should be readable as source and bootstrap into a practical user interface.

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.

Original illustrations created
by Rekka Bellum.


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

incoming dexe tools forth macintosh ufx format ulz format drifblim drifblim varvara playdate oscean devine lu linvega uxn devlog hundred rabbits