uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

commit 812148c2916e5aa177bcb91cd0cd761f48a316f9
parent 89952e8112880f2c4cc96f737577a2f43c03c2a2
Author: neauoire <aliceffekt@gmail.com>
Date:   Sat, 13 Feb 2021 19:19:13 -0800

Modified examples

Diffstat:
MREADME.md | 1-
Mbuild.sh | 2+-
Mexamples/hello.usm | 6+++---
Mexamples/line.usm | 20++++++++++----------
4 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/README.md b/README.md @@ -83,7 +83,6 @@ BRK ## TODOs -- Li1 short mode - Defines? - LDR/STR helpers - Keyboard example diff --git a/build.sh b/build.sh @@ -24,5 +24,5 @@ rm -f ./bin/emulator cc -std=c89 -DDEBUG -Wall -Wno-unknown-pragmas -Wpedantic -Wshadow -Wextra -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Wvla -g -Og -fsanitize=address -fsanitize=undefined uxn.c emulator.c -L/usr/local/lib -lSDL2 -o bin/emulator # run -./bin/assembler examples/pixels.usm bin/boot.rom +./bin/assembler examples/line.usm bin/boot.rom ./bin/emulator bin/boot.rom diff --git a/examples/hello.usm b/examples/hello.usm @@ -4,8 +4,8 @@ |0100 @RESET - #00 ,dev/w STR ( set dev/write to console ) - ,string ( add string pointer to stack ) + #00 ,dev/w STR ( set dev/write to console ) + ,string ( add string pointer to stack ) @loop DUP2 LDR IOW ( write pointer value to console ) #0001 ADD2 ( increment string pointer ) @@ -13,7 +13,7 @@ BRK -@string " Hello World " ( add string to memory ) +@string " Hello World " ( add string to memory ) |c000 @FRAME BRK |d000 @ERROR BRK diff --git a/examples/line.usm b/examples/line.usm @@ -9,26 +9,26 @@ |0100 @RESET ( set dev/write to screen ) - ,01 ,dev/w STR + #01 ,dev/w STR ( positive ) - ,01 ,color STR + #01 ,color STR +0030 ,x0 STR2 +0040 ,y0 STR2 +0100 ,x1 STR2 +0060 ,y1 STR2 ,line JSR - ,02 ,color STR + #02 ,color STR +0020 ,x0 STR2 +0010 ,y0 STR2 +0090 ,x1 STR2 +0070 ,y1 STR2 ,line JSR - ,03 ,color STR + #03 ,color STR +0010 ,x0 STR2 +0040 ,y0 STR2 +0070 ,x1 STR2 +0060 ,y1 STR2 ,line JSR ( draw control points ) - ,02 ,color STR + #02 ,color STR ,x0 LDR2 ,y0 LDR2 ,putpixel JSR ,x1 LDR2 ,y1 LDR2 ,putpixel JSR @@ -57,17 +57,17 @@ BRK RTS @redraw - ,0000 IOW2 - ,0000 IOW2 - ,00 IOW - ,01 IOW + #0000 IOW2 + #0000 IOW2 + #00 IOW + #01 IOW RTS @putpixel IOW2 ( y short ) IOW2 ( x short ) ,color LDR IOW ( color byte ) - ,00 IOW ( redraw byte ) + #00 IOW ( redraw byte ) RTS @diff16