uxn

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

commit 39c47c9571d22f920a0014d49cbfa2590fa5f187
parent 71371f86c8fd0f4f5818066532c02518c4afcf61
Author: neauoire <aliceffekt@gmail.com>
Date:   Fri, 19 Mar 2021 20:38:20 -0700

Fixed broken example

Diffstat:
Mbuild.sh | 2+-
Mprojects/examples/dev.controller.usm | 13++++++-------
Mprojects/examples/gui.editor.usm | 2+-
3 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/build.sh b/build.sh @@ -20,5 +20,5 @@ cc -std=c89 -DDEBUG -Wall -Wno-unknown-pragmas -Wpedantic -Wshadow -Wextra -Werr # cc uxn.c emulator.c -std=c89 -Os -DNDEBUG -g0 -s -Wall -Wno-unknown-pragmas -L/usr/local/lib -lSDL2 -o bin/emulator # run -./bin/assembler projects/software/noodle.usm bin/boot.rom +./bin/assembler projects/software/left.usm bin/boot.rom ./bin/emulator bin/boot.rom diff --git a/projects/examples/dev.controller.usm b/projects/examples/dev.controller.usm @@ -3,7 +3,6 @@ %++ { #0001 ADD2 } %-- { #0001 SUB2 } %2/ { #0002 DIV2 } -%JMC2 { ROT JMP2? POP2 } ;slime { color 1 } @@ -27,21 +26,21 @@ BRK ( hold ctrl key to change slime color ) ~Controller.buttons #0f AND - DUP #01 NEQ ,$no-ctrl JMC2 #05 =slime $no-ctrl - DUP #02 NEQ ,$no-alt JMC2 #0f =slime $no-alt + DUP #01 NEQ ,$no-ctrl ROT JMP2? #05 =slime $no-ctrl + DUP #02 NEQ ,$no-alt ROT JMP2? #0f =slime $no-alt POP ( clear ) #10 =Sprite.color ( detect movement ) ~Controller.buttons #f0 AND - DUP #04 SHR #01 AND #01 NEQ ,$no-up JMC2 + DUP #04 SHR #01 AND #01 NEQ ,$no-up ROT JMP2? ( move ) ~Sprite.y -- =Sprite.y ,up_icn =Sprite.addr $no-up - DUP #05 SHR #01 AND #01 NEQ ,$no-down JMC2 + DUP #05 SHR #01 AND #01 NEQ ,$no-down ROT JMP2? ( move ) ~Sprite.y ++ =Sprite.y ,down_icn =Sprite.addr $no-down - DUP #06 SHR #01 AND #01 NEQ ,$no-left JMC2 + DUP #06 SHR #01 AND #01 NEQ ,$no-left ROT JMP2? ( move ) ~Sprite.x -- =Sprite.x ,left_icn =Sprite.addr $no-left - DUP #07 SHR #01 AND #01 NEQ ,$no-right JMC2 + DUP #07 SHR #01 AND #01 NEQ ,$no-right ROT JMP2? ( move ) ~Sprite.x ++ =Sprite.x ,right_icn =Sprite.addr $no-right POP diff --git a/projects/examples/gui.editor.usm b/projects/examples/gui.editor.usm @@ -47,7 +47,7 @@ BRK ( load ) ~editor.addr ~Mouse.y ~editor.y1 SUB2 #0008 DIV2 ADD2 LDR ( mask ) #01 #07 ~Mouse.x ~editor.x1 SUB2 #0008 DIV2 SWP POP SUB SHL - XOR + ORA ( save ) ~editor.addr ~Mouse.y ~editor.y1 SUB2 #0008 DIV2 ADD2 STR ,draw-window JSR2