View chromatic-scale.tal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | |
QWERTY from G2 to G5: | |
2 3 5 6 7 9 0 = | C#4 D#4 F#4 G#4 A#4 C#5 D#5 F#5 | |
q w e r t y u i o p [ ] | C4 D4 E4 F4 G4 A4 B4 C5 D5 E5 F5 G5 | |
s d g h k l ; | G#2 A#2 C#3 D#3 F#3 G#3 A#3 | |
z x c v b n m , . / | G2 A2 B2 C3 D3 E3 F3 G3 A3 B3 | |
) | |
.Controller/key DEI |
View hellox3.tal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|10 @Console &vector $2 &read $1 &pad $5 &write $1 &error $1 | |
|0100 @on-reset ( -> ) | |
#03 #00 | |
&for | |
( send ) ;hello-word print-text | |
( loop ) INC GTHk ?&for | |
POP2 |
View macOS-uxn.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/build.sh b/build.sh | |
index 28682b5..88076e8 100755 | |
--- a/build.sh | |
+++ b/build.sh | |
@@ -67,7 +67,7 @@ fi | |
mkdir -p bin | |
CC="${CC:-cc}" | |
-CFLAGS="${CFLAGS:--std=c89 -Wall -Wno-unknown-pragmas}" | |
+CFLAGS="${CFLAGS:--std=c89 -Wall -Wno-unknown-pragmas -D_DARWIN_C_SOURCE}" |
View gist:28039305bb0a685e69e84b11a85aeab0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | |
LDA I | |
CMP J | |
BEQ EQL | |
BGE LBL | |
) | |
|10 @Console &vector $2 &read $1 &pad $5 &write $1 &error $1 |
View verbose-if.tal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@foo ( a b -- bool ) [ | |
( if ) [ ( a b ) EQU ] ?&then [ | |
( else ) [ | |
#00 ( return false ) | |
RTN | |
] &then [ | |
#01 ( return true ) | |
] | |
] | |
RTN |
View if-then-else.tal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@foo ( a b -- bool ) | |
( if ) [ ( a b ) EQU ] ?&then | |
( else ) | |
#00 ( return false ) | |
!&end | |
&then | |
#01 ( return true ) | |
&end | |
( endif ) | |
RTN |
View console.rom.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ roms uxncli console.rom | |
Welcome to Uxn! | |
hello | |
You said: hello | |
this is great | |
You said: this | |
You said: is | |
You said: great |
View real.tal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( hello.tal ) | |
|00 @System [ &vector $2 &wst $1 &rst $1 &pad $4 &r $2 &g $2 &b $2 &debug $1 &halt $1 ] | |
|10 @Console [ &vector $2 &read $1 &pad $5 &write $1 &error $1 ] | |
%HALT { #01 .System/halt DEO } | |
%DEBUG { #01 .System/debug DEO } | |
%RTN { JMP2r } | |
%\s { 20 } | |
%\n { 0a } |
View draw.tal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( draw.tal | |
Simple drawing tool. ) | |
( | |
@|devices ) | |
|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] | |
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ] | |
|90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &wheel $1 ] |
View for-loop.tal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;list print-digits | |
BRK | |
@print-digits ( list* -- ) | |
LDA2k SWP2 INC2 INC2 | |
&loop | |
LDAk LIT "0 ADD #18 DEO | |
INC2 GTH2k ?&loop |
NewerOlder