uxn

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

commit ab108643cf9eecda4e99527c6564a9cfc11911a4
parent 0c908a937950627b2f097462cf0ec2fd25610831
Author: neauoire <aliceffekt@gmail.com>
Date:   Sun,  4 Sep 2022 13:08:38 -0700

(brainfuck.tal) Converted assci runes

Diffstat:
Mprojects/examples/exercises/brainfuck.tal | 32++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/projects/examples/exercises/brainfuck.tal b/projects/examples/exercises/brainfuck.tal @@ -8,22 +8,23 @@ [ Jump past the matching ] if the cell at the pointer is 0 ] Jump back to the matching [ if the cell at the pointer is nonzero ) -|0100 ( -> ) @reset +|0100 ( -> ) ;memory ;program &while - LDAk LIT '> NEQ ,&movr JCN [ SWP2 INC2 SWP2 ] &movr - LDAk LIT '< NEQ ,&movl JCN [ SWP2 #0001 SUB2 SWP2 ] &movl - LDAk LIT '+ NEQ ,&incr JCN [ OVR2 STH2k LDA INC STH2r STA ] &incr - LDAk LIT '- NEQ ,&decr JCN [ OVR2 STH2k LDA #01 SUB STH2r STA ] &decr - LDAk LIT '. NEQ ,&emit JCN [ OVR2 LDA #18 DEO ] &emit - LDAk LIT '[ NEQ ,&next JCN [ ,goto-next JSR ] &next - LDAk LIT '] NEQ ,&prev JCN [ ,goto-back JSR ] &prev + LDAk LIT "> NEQ ,&movr JCN [ SWP2 INC2 SWP2 ] &movr + LDAk LIT "< NEQ ,&movl JCN [ SWP2 #0001 SUB2 SWP2 ] &movl + LDAk LIT "+ NEQ ,&incr JCN [ OVR2 STH2k LDA INC STH2r STA ] &incr + LDAk LIT "- NEQ ,&decr JCN [ OVR2 STH2k LDA #01 SUB STH2r STA ] &decr + LDAk LIT ". NEQ ,&emit JCN [ OVR2 LDA #18 DEO ] &emit + LDAk LIT "[ NEQ ,&next JCN [ ,goto-next JSR ] &next + LDAk LIT "] NEQ ,&prev JCN [ ,goto-back JSR ] &prev INC2 LDAk ,&while JCN POP2 - ( halt ) #010f DEO - + ( halt ) + #010f DEO + BRK @goto-next ( -- ) @@ -32,8 +33,8 @@ BRK ( depth ) LITr 00 INC2 &loop - LDAk LIT '[ NEQ JMP INCr - LDAk LIT '] NEQ ,&no-end JCN + LDAk LIT "[ NEQ JMP INCr + LDAk LIT "] NEQ ,&no-end JCN STHkr #00 EQU ,&end JCN LITr 01 SUBr &no-end @@ -49,8 +50,8 @@ JMP2r ( depth ) LITr 00 #0001 SUB2 &loop - LDAk LIT '] NEQ JMP INCr - LDAk LIT '[ NEQ ,&no-end JCN + LDAk LIT "] NEQ JMP INCr + LDAk LIT "[ NEQ ,&no-end JCN STHkr #00 EQU ,&end JCN LITr 01 SUBr &no-end @@ -67,4 +68,4 @@ JMP2r "..+++.>>.<-.<.+++.------.------- "-.>>+.>++. $1 -@memory -\ No newline at end of file +@memory