0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-25 15:25:12 +00:00
Find a file
neauoire 72d9c98f35 *
2021-01-29 17:49:10 -08:00
.clang-format * 2021-01-29 11:35:59 -08:00
.gitignore Basic parts 2021-01-29 12:14:37 -08:00
build.sh * 2021-01-29 17:49:10 -08:00
LICENSE init 2021-01-29 11:17:59 -08:00
program.usm * 2021-01-29 17:49:10 -08:00
README.md * 2021-01-29 17:49:10 -08:00
uxn.c * 2021-01-29 13:59:16 -08:00
uxnasm.c * 2021-01-29 17:49:10 -08:00

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