mirror of https://git.sr.ht/~rabbits/uxn
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
5 years ago | |
|---|---|---|
| .clang-format | 5 years ago | |
| .gitignore | 5 years ago | |
| LICENSE | 5 years ago | |
| README.md | 5 years ago | |
| build.sh | 5 years ago | |
| program.usm | 5 years ago | |
| uxn.c | 5 years ago | |
| uxnasm.c | 5 years ago | |
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 valuepointer, pointer to an address[TODO]
Assembler
Emulator
- SDL Layer