diff --git a/build.sh b/build.sh index ebd8234..6aac468 100755 --- a/build.sh +++ b/build.sh @@ -42,7 +42,7 @@ then fi echo "Assembling.." -./bin/uxnasm projects/demos/drum-rack.usm bin/boot.rom +./bin/uxnasm projects/examples/devices/screen.usm bin/boot.rom echo "Running.." if [ "${2}" = '--cli' ]; diff --git a/projects/examples/devices/console.usm b/projects/examples/devices/console.usm index a763d7e..fca01ae 100644 --- a/projects/examples/devices/console.usm +++ b/projects/examples/devices/console.usm @@ -17,9 +17,9 @@ BRK @print ( addr* -- ) &loop - ( send ) DUP2 LDA .Console/char DEO + ( send ) LDAk .Console/char DEO ( incr ) #0001 ADD2 - ( loop ) DUP2 LDA #00 NEQ ,&loop JCN + ( loop ) LDAk #00 NEQ ,&loop JCN POP2 RTN diff --git a/projects/examples/devices/file.usm b/projects/examples/devices/file.usm index 57a0721..13c39b1 100644 --- a/projects/examples/devices/file.usm +++ b/projects/examples/devices/file.usm @@ -49,10 +49,10 @@ BRK ( draw ) #41 .Screen/color DEO ( incr ) .Screen/addr DEI2 #0010 ADD2 .Screen/addr DEO2 ( incr ) SWP2 8+ SWP2 - OVR2 OVR2 LTH2 ,&hor JCN + LTH2k ,&hor JCN POP2 POP2 ( incr ) SWP2 8+ SWP2 - OVR2 OVR2 LTH2 ,&ver JCN + LTH2k ,&ver JCN POP2 POP2 ( save file ) diff --git a/projects/examples/devices/mouse.usm b/projects/examples/devices/mouse.usm index 81e940d..34dc4dc 100644 --- a/projects/examples/devices/mouse.usm +++ b/projects/examples/devices/mouse.usm @@ -73,7 +73,6 @@ BRK @draw-cursor ( -- ) ( clear last cursor ) - #fff8 .Screen/addr DEO2 .pointer/x LDZ2 .Screen/x DEO2 .pointer/y LDZ2 .Screen/y DEO2 #30 .Screen/color DEO diff --git a/projects/examples/devices/screen.usm b/projects/examples/devices/screen.usm index 87a480f..ac594f8 100644 --- a/projects/examples/devices/screen.usm +++ b/projects/examples/devices/screen.usm @@ -45,7 +45,7 @@ BRK .center/y LDZ2 #0040 SUB2 ADD2 .Screen/y DEO2 ( draw ) OVR .Screen/color DEO ( incr ) SWP #01 ADD SWP - DUP2 NEQ ,&loop JCN + NEQk ,&loop JCN POP2 RTN @@ -69,7 +69,7 @@ RTN ( draw ) #21 .Screen/color DEO ( incr ) SWP #01 ADD SWP - DUP2 LTH ,&loop JCN + LTHk ,&loop JCN POP2 RTN diff --git a/projects/examples/gui/animation.usm b/projects/examples/gui/animation.usm index 9e5d90c..0a38e46 100644 --- a/projects/examples/gui/animation.usm +++ b/projects/examples/gui/animation.usm @@ -54,13 +54,13 @@ BRK .dvd/x LDZ2 [ .dvd/x LDZ2 #0020 ADD2 ] &hor OVR2 .Screen/x DEO2 - ( draw ) DUPr STHr .Screen/color DEO + ( draw ) STHkr .Screen/color DEO ( next ) .Screen/addr DEI2 #0008 ADD2 .Screen/addr DEO2 ( incr ) SWP2 #0008 ADD2 SWP2 - OVR2 OVR2 LTH2 ,&hor JCN + LTH2k ,&hor JCN POP2 POP2 ( incr ) SWP2 #0008 ADD2 SWP2 - OVR2 OVR2 LTH2 ,&ver JCN + LTH2k ,&ver JCN POP2 POP2 ( destroy ) POPr diff --git a/projects/examples/gui/picture.usm b/projects/examples/gui/picture.usm index f09d84b..badc0c1 100644 --- a/projects/examples/gui/picture.usm +++ b/projects/examples/gui/picture.usm @@ -52,10 +52,10 @@ BRK ( draw ) .color LDZ .Screen/color DEO ( incr ) .Screen/addr DEI2 8+ .Screen/addr DEO2 ( incr ) SWP2 8+ SWP2 - OVR2 OVR2 LTH2 ,&hor JCN + LTH2k ,&hor JCN POP2 POP2 ( incr ) SWP2 8+ SWP2 - OVR2 OVR2 LTH2 ,&ver JCN + LTH2k ,&ver JCN POP2 POP2 RTN @@ -72,10 +72,10 @@ RTN ( draw ) .color LDZ .Screen/color DEO ( incr ) .Screen/addr DEI2 #0010 ADD2 .Screen/addr DEO2 ( incr ) SWP2 8+ SWP2 - OVR2 OVR2 LTH2 ,&hor JCN + LTH2k ,&hor JCN POP2 POP2 ( incr ) SWP2 8+ SWP2 - OVR2 OVR2 LTH2 ,&ver JCN + LTH2k ,&ver JCN POP2 POP2 RTN @@ -91,10 +91,10 @@ RTN ( save ) OVR2 .Screen/x DEO2 ( draw ) .color LDZ .Screen/color DEO ( incr ) SWP2 8+ SWP2 - OVR2 OVR2 LTH2 ,&hor JCN + LTH2k ,&hor JCN POP2 POP2 ( incr ) SWP2 8+ SWP2 - OVR2 OVR2 LTH2 ,&ver JCN + LTH2k ,&ver JCN POP2 POP2 RTN