Go to file
neauoire 099d1f0845 * 2021-01-29 21:56:19 -08:00
.clang-format * 2021-01-29 21:56:19 -08:00
.gitignore Basic parts 2021-01-29 12:14:37 -08:00
LICENSE init 2021-01-29 11:17:59 -08:00
README.md * 2021-01-29 17:49:10 -08:00
build.sh * 2021-01-29 21:56:19 -08:00
example.usm * 2021-01-29 21:56:19 -08:00
uxn.c * 2021-01-29 21:56:19 -08:00
uxnasm.c * 2021-01-29 21:56:19 -08:00

README.md

Uxn

A stack-based VM, written in ANSI C.

Build

cc uxn.c -std=c89 -Os -DNDEBUG -g0 -s -Wall -Wno-unknown-pragmas -o uxn

Assembly Syntax

: 	starting a definition
& 	obtaining pointers
( 	stack comments
` 	inlining bytecodes
' 	strings
# 	numbers
$ 	characters
~   vector
[ 12 34 ] real values
< 12 34 > relative values
( 12 34 ) deadzone
;add-two JSR

BRK

:add-two
	[ 2 ] ADD RTS

Design

CPU

  • Build stack with pointer
  • Print stack
  • Build memory

PPU

Assembly

Addressing

  • label, a named offset[TODO]
  • literal, a numeric value
  • pointer, pointer to an address[TODO]

Assembler

Emulator

  • SDL Layer