Uxn is the virtual machine powering the Hundred Rabbits software.
This one-page computer, programmable in Uxntal, is an 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, and 64kb of addressable working memory. It can interface with up to 16 peripherals, such as screens and controllers. Uxn's has no registers, no undefined behaviors, and cannot error.
Shared | Memory | RAM | Data | 64kb pages |
---|---|---|---|---|
Private | Stacks | Working Stack | Data | 256 bytes |
Pointer | 1 byte | |||
Return Stack | Data | 256 bytes | ||
Pointer | 1 byte | |||
IO | Devices | Data | 256 bytes |
Emulator
Here is an implementation of a basic Uxn emulator in C89 which includes the Console device and passes the opcode tests:
cc uxnmin.c -o uxnmin view raw
Compiler
A self-hosted compiler is one written in the language it compiles. A new seed compiler can be created from its own hexadecimal dump with bootstrapping tools, uxnasm.c or xxd.
xxd -r -p drifloon.rom.txt drifloon.rom view raw
Alternatively, a new one can also be created with uxnasm.c from the source code and compared against the hexdump.
uxnasm drifloon.tal drifloon.rom view raw
The compiler is used with uxnmin to convert .tal source files into .rom binary files:
cat input.tal | uxnmin drifloon.rom > output.rom
Stack-machines programming make for an habitable bedrock abstraction for this scale of personal computing as one can comfortably write programs in assembly to tackle most computation projects with what feels like high-level abstractions.
Original illustrations created
by Rekka Bellum.
- Official Site
- Run in Browser
- Communities: Mailing List • Forum • irc.libera.chat #uxn
- Social: Discord • Github
17P04
— Uxn Specification Frozen15B13
— Uxn is born!
incoming dexe tools forth macintosh ufx format ulz format drifblim drifblim varvara playdate oscean devine lu linvega uxn devlog now lie in it hundred rabbits