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 |
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 |
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 |
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 |
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 } |
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 ] |
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 |
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 ) | |
( | |
@|devices ) | |
|10 @Console [ | |
&vector $2 | |
&read $1 | |
&pad $5 | |
&write $1 | |
&error $1 |
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
@font-mono ( Terminus 8x16 ) | |
0000 0000 0000 0000 0010 0800 0000 0000 | |
0000 0000 0000 0000 0000 0000 0000 0000 | |
0808 0808 0808 0808 0808 0808 0808 0808 | |
0808 0808 0808 0808 0808 0808 0808 0808 | |
0808 0808 0808 0808 0808 0808 0808 0808 | |
0808 0808 0808 0808 0808 0808 0808 0808 | |
0808 0808 0808 0808 0808 0808 0808 0808 | |
0808 0808 0808 0808 0808 0808 0808 0808 | |
&glyphs |
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
@font-mono-terminus-8-16 | |
0000 0000 0000 0000 0008 0800 0000 0000 | |
0000 0000 0000 0000 0000 0000 0000 0000 | |
0808 0808 0808 0808 0808 0808 0808 0808 | |
0808 0808 0808 0808 0808 0808 0808 0808 | |
0808 0808 0808 0808 0808 0808 0808 0808 | |
0808 0808 0808 0808 0808 0808 0808 0808 | |
0808 0807 0808 0808 0808 0808 0808 0808 | |
0808 0808 0808 0808 0808 0808 0808 0808 | |
&glyphs |