User:Squidmanescape/Gray Snail Interpreter Links
Jump to navigation
Jump to search
This page exists so that I can post Gray Snail interpreters when I don't know where to post them, in case I end up changing my GitHub setup.
All of the interpreters on this page work with perfect code. Some of them do not work with imperfect code.
Autopsy
Second Attempt
POP a regA a POP a regB a POP a regC a POP a regD a POP a current aA POP a order aBCD POP a command a OUTPUT "Input Autopsy code." INPUT tempcode POP a code a "correct things" GOTO "end correction" [tempcode] "" POP command tempcode [tempcode] GOTO "valid command" [command] . GOTO "valid command" [command] ; GOTO "correct things" a a "valid command" POP a code a[code][command] GOTO "correct things" a a "end correction" POP a command a OUTPUT "This is the code: [code]" INPUT ok "begin loop" POP command code [code][command] OUTPUT "A: [regA] B: [regB] C: [regC] D: [regD] command: [command] code: [code] current register: [current]" GOTO ". command" . [command] GOTO "; command" ; [command] GOTO "begin loop" a a ". command" GOTO ". reg[current]" "one increment" POP command code [code][command] GOTO "begin loop" a a ". regA" POP a regA a[regA]1 GOTO "one increment" a a ". regB" POP a regB a[regB]1 GOTO "one increment" a a ". regC" POP a regC a[regC]1 GOTO "one increment" a a ". regD" POP a regD a[regD]1 GOTO "one increment" a a "; command" POP command code [code][command] GOTO "; reg[current]" a a "one decrement" POP current order [order][current] GOTO "begin loop" a a "; regA" GOTO "; zero" [regA] "" POP 1 regA [regA] GOTO "one decrement" a a "; regB" GOTO "; zero" [regB] "" POP 1 regB [regB] GOTO "one decrement" a a "; regC" GOTO "; zero" [regC] "" POP 1 regC [regC] GOTO "one decrement" a a "; regD" GOTO "; zero" [regD] "" POP 1 regD [regD] GOTO "one decrement" a a "; zero" POP command code [code][command] GOTO "one decrement" a a end
First Attempt
This one doesn't work with characters that aren't .
and ;
, which means it doesn't work with newlines.
POP a regA a POP a regB a POP a regC a POP a regD a POP a current aA POP a order aBCD POP a command a OUTPUT "Input Autopsy code." INPUT tempcode POP a code a "correct things" GOTO "end correction" [tempcode] "" POP command tempcode [tempcode] GOTO "valid command" [command] . GOTO "valid command" [command] ; GOTO "correct things" a a "valid command" POP a code a[code][command] GOTO "correct things" a a "end correction" POP a command a OUTPUT "This is the code: [code]" INPUT ok "begin loop" POP command code [code][command] OUTPUT "A: [regA] B: [regB] C: [regC] D: [regD] command: [command] code: [code] current register: [current]" GOTO ". reg[current]" . [command] GOTO "; reg[current]" ; [command] GOTO "begin loop" a a ". regA" POP a regA a[regA]1 POP command code [code][command] GOTO "begin loop" a a ". regB" POP a regB a[regB]1 POP command code [code][command] GOTO "begin loop" a a ". regC" POP a regC a[regC]1 POP command code [code][command] GOTO "begin loop" a a ". regD" POP a regD a[regD]1 POP command code [code][command] GOTO "begin loop" a a "; regA" POP current order [order][current] POP command code [code][command] GOTO "; zero" [regA] "" POP 1 regA [regA] GOTO "begin loop" a a "; regB" POP current order [order][current] POP command code [code][command] GOTO "; zero" [regB] "" POP 1 regB [regB] GOTO "begin loop" a a "; regC" POP current order [order][current] POP command code [code][command] GOTO "; zero" [regC] "" POP 1 regC [regC] GOTO "begin loop" a a "; regD" POP current order [order][current] POP command code [code][command] GOTO "; zero" [regD] "" POP 1 regD [regD] GOTO "begin loop" a a "; zero" POP command code [code][command] GOTO "begin loop" a a end
Bitwise Cyclic Tag
"#This provides padding for the data." POP a padding a "#This is what gets printed." POP a "printed data" a"" OUTPUT "Input program." INPUT program POP a temp a[program] "check program" GOTO "program done" [temp] "" POP char temp [temp] GOTO "check program" [char] 0 GOTO "check program" [char] 1 GOTO end "program done" OUTPUT "Input data." INPUT data POP a temp a[data] "check data" GOTO "data done" [temp] "" POP char temp [temp] GOTO "check data" [char] 0 GOTO "check data" [char] 1 GOTO end "data done" "infinite while loop" GOTO "get first char" "[printed data]" "" OUTPUT "[printed data]" INPUT ok GOTO end [data] "" "get first char" POP "first char" program [program] POP a program a"[program][first char]" GOTO "1 case" "[first char]" 1 "#This occurs for 0." POP a "printed data" a"[printed data] [first char]|[padding][data] " POP a padding a"[padding] " POP discard data [data] GOTO "infinite while loop" "1 case" POP "second char" program [program] POP a program a"[program][second char]" "#Updates the output." POP a "printed data" a"[printed data][first char][second char]|[padding][data] " POP "check if 1" data [data] GOTO "left of data is 1" "[check if 1]" 1 POP a data a"[check if 1][data]" GOTO "infinite while loop" "left of data is 1" POP a data a"[check if 1][data][second char]" GOTO "infinite while loop" end
Brainfuck
Known Issues with this Implementation (Feel Free to Add More)
- This has a bug when it tries to run rot13.b with the letter m and possibly other letters.
- It doesn't use hexadecimal.
- It doesn't have bracket checking.
"This is the number entered." POP a number a000 "#I use carry to indicate repetition for incrementing (9 to 0) and decrementing (0 to 9)." POP a carry a0 "#This is the only thing that is output. True output goes in here." POP a "true output" a"" "#This is what is to the left of the current number." POP a "left numbers" a "#This is what is to the right of the current number." POP a "right numbers" a "#This is where the commands which were already read or skipped go." POP a "left commands" a "# This is how the brackets are allowed to nest correctly." POP a "bracket stack" a "#input left bracket and right bracket" OUTPUT "Input left bracket." INPUT lb OUTPUT "Input right bracket." INPUT rb OUTPUT "Input quotation marks." INPUT qm OUTPUT "Input commands." INPUT commands "analyse commands" POP instruction commands [commands] POP a "left commands" a"[instruction][left commands]" OUTPUT "Left Commands: [left commands] Current Instruction: [instruction] Right Commands: [commands] Bracket Stack: [bracket stack] Left Numbers: [left numbers] Number: [number] Right Numbers: [right numbers] Output:[true output]" GOTO end [instruction] "" "#These are all the digits of the number." "#Temp is used in case the command is not valid." POP a temp a[number] POP hundreds temp [temp] POP tens ones [temp] GOTO "+- command" [instruction] + GOTO "+- command" [instruction] - GOTO ". command" [instruction] . GOTO ", command" [instruction] , GOTO "> command" [instruction] > GOTO "< command" [instruction] < GOTO "lb command" [instruction] [lb] GOTO "rb command" [instruction] [rb] GOTO "analyse commands" "+- command" POP a digit aones "#This will go to + 1, - 1, + 2, - 2, etc. depending on what instruction and ones are." GOTO "[instruction] [ones]" "finished with one operation" "#If carry = 0, I can stop doing this." GOTO "completely finished" [carry] 0 "#If digit is hundreds, no more changing is possible." GOTO "completely finished" [digit] hundreds "#This is in case we have just changed tens, so we have to change hundreds." GOTO "digit is tens" [digit] tens POP a digit atens GOTO "[instruction] [tens]" "digit is tens" POP a digit ahundreds GOTO "[instruction] [hundreds]" "completely finished" "#256 becomes 0 and 999 becomes 255." GOTO "to 000" [hundreds][tens][ones] 256 GOTO "to 255" [hundreds][tens][ones] 999 POP a number a[hundreds][tens][ones] "number is changed" POP a carry a0 GOTO "analyse commands" "#Number is just set to something else." "to 000" POP a number a000 GOTO "number is changed" "to 255" POP a number a255 GOTO "number is changed" ". command" GOTO "analyse commands" [hundreds][tens] 00 GOTO ". [number]" [number] 010 GOTO "analyse commands" [hundreds][tens] 01 GOTO "analyse commands" [hundreds][tens] 02 GOTO ". [number]" GOTO "analyse commands" ", command" OUTPUT "<- Delete all non-input in the input box and input a single character." INPUT char POP char temp [char] GOTO "analyse commands" [char] "" GOTO ", lb" [char] [lb] GOTO ", rb" [char] [rb] GOTO ", qm" [char] [qm] GOTO ", [char]" "> command" POP a "left numbers" a"[ones][tens][hundreds][left numbers]" GOTO "empty right" "[right numbers]" "" POP hundreds "right numbers" "[right numbers]" POP tens "right numbers" "[right numbers]" POP ones "right numbers" "[right numbers]" POP a number a"[hundreds][tens][ones]" GOTO "analyse commands" "empty right" POP a number a000 GOTO "analyse commands" "< command" POP a "right numbers" a"[hundreds][tens][ones][right numbers]" GOTO "empty left" "[left numbers]" "" POP ones "left numbers" "[left numbers]" POP tens "left numbers" "[left numbers]" POP hundreds "left numbers" "[left numbers]" POP a number a"[hundreds][tens][ones]" GOTO "analyse commands" "empty left" OUTPUT "You cannot go further left than the beginning of the tape." GOTO "end" GOTO "analyse commands" "lb command" GOTO "start lb loop" [number] 000 GOTO "analyse commands" "start lb loop" POP instruction commands [commands] POP a "left commands" a"[instruction][left commands]" GOTO "new lb" [instruction] [lb] GOTO "possibly end lb loop" [instruction] [rb] GOTO "start lb loop" "new lb" POP a "bracket stack" a"[bracket stack]a" GOTO "lb command" "possibly end lb loop" POP a "bracket stack" "[bracket stack]" GOTO "end lb loop" "[bracket stack]" "" GOTO "start lb loop" "end lb loop" GOTO "analyse commands" "rb command" GOTO "analyse commands" [number] 000 "start rb loop" POP instruction "left commands" "[left commands]" POP a commands a[instruction][commands] GOTO "new rb" [instruction] [rb] GOTO "possibly end rb loop" [instruction] [lb] GOTO "start rb loop" "new rb" POP a "bracket stack" a"[bracket stack]a" GOTO "start rb loop" "possibly end rb loop" POP a "bracket stack" "[bracket stack]" GOTO "end rb loop" "[bracket stack]" "" GOTO "start rb loop" "end rb loop" POP instruction commands [commands] POP a "left commands" a"[instruction][left commands]" GOTO "analyse commands" "#From here on out, the code consists of single commands which do one or two operations." "#The variable carry becomes 1 here." "- 0" POP a [digit] a9 POP a carry a1 GOTO "finished with one operation" "- 1" POP a [digit] a0 POP a carry a0 GOTO "finished with one operation" "- 2" POP a [digit] a1 POP a carry a0 GOTO "finished with one operation" "- 3" POP a [digit] a2 POP a carry a0 GOTO "finished with one operation" "- 4" POP a [digit] a3 POP a carry a0 GOTO "finished with one operation" "- 5" POP a [digit] a4 POP a carry a0 GOTO "finished with one operation" "- 6" POP a [digit] a5 POP a carry a0 GOTO "finished with one operation" "- 7" POP a [digit] a6 POP a carry a0 GOTO "finished with one operation" "- 8" POP a [digit] a7 POP a carry a0 GOTO "finished with one operation" "- 9" POP a [digit] a8 POP a carry a0 GOTO "finished with one operation" "#The variable carry becomes 1 here." "+ 0" POP a [digit] a1 POP a carry a0 GOTO "finished with one operation" "+ 1" POP a [digit] a2 POP a carry a0 GOTO "finished with one operation" "+ 2" POP a [digit] a3 POP a carry a0 GOTO "finished with one operation" "+ 3" POP a [digit] a4 POP a carry a0 GOTO "finished with one operation" "+ 4" POP a [digit] a5 POP a carry a0 GOTO "finished with one operation" "+ 5" POP a [digit] a6 POP a carry a0 GOTO "finished with one operation" "+ 6" POP a [digit] a7 POP a carry a0 GOTO "finished with one operation" "+ 7" POP a [digit] a8 POP a carry a0 GOTO "finished with one operation" "+ 8" POP a [digit] a9 POP a carry a0 GOTO "finished with one operation" "+ 9" POP a [digit] a0 POP a carry a1 GOTO "finished with one operation" "#These are the output commands." ". 010" POP a "true output" a"[true output] " GOTO "analyse commands" ". 030" GOTO "analyse commands" ". 031" GOTO "analyse commands" ". 032" POP a "true output" a"[true output] " GOTO "analyse commands" ". 033" POP a "true output" a"[true output]!" GOTO "analyse commands" ". 034" POP a "true output" a"[true output][qm]" GOTO "analyse commands" ". 035" POP a "true output" a"[true output]#" GOTO "analyse commands" ". 036" POP a "true output" a"[true output]$" GOTO "analyse commands" ". 037" POP a "true output" a"[true output]%" GOTO "analyse commands" ". 038" POP a "true output" a"[true output]&" GOTO "analyse commands" ". 039" POP a "true output" a"[true output]'" GOTO "analyse commands" ". 040" POP a "true output" a"[true output](" GOTO "analyse commands" ". 041" POP a "true output" a"[true output])" GOTO "analyse commands" ". 042" POP a "true output" a"[true output]*" GOTO "analyse commands" ". 043" POP a "true output" a"[true output]+" GOTO "analyse commands" ". 044" POP a "true output" a"[true output]," GOTO "analyse commands" ". 045" POP a "true output" a"[true output]-" GOTO "analyse commands" ". 046" POP a "true output" a"[true output]." GOTO "analyse commands" ". 047" POP a "true output" a"[true output]/" GOTO "analyse commands" ". 048" POP a "true output" a"[true output]0" GOTO "analyse commands" ". 049" POP a "true output" a"[true output]1" GOTO "analyse commands" ". 050" POP a "true output" a"[true output]2" GOTO "analyse commands" ". 051" POP a "true output" a"[true output]3" GOTO "analyse commands" ". 052" POP a "true output" a"[true output]4" GOTO "analyse commands" ". 053" POP a "true output" a"[true output]5" GOTO "analyse commands" ". 054" POP a "true output" a"[true output]6" GOTO "analyse commands" ". 055" POP a "true output" a"[true output]7" GOTO "analyse commands" ". 056" POP a "true output" a"[true output]8" GOTO "analyse commands" ". 057" POP a "true output" a"[true output]9" GOTO "analyse commands" ". 058" POP a "true output" a"[true output]:" GOTO "analyse commands" ". 059" POP a "true output" a"[true output];" GOTO "analyse commands" ". 060" POP a "true output" a"[true output]<" GOTO "analyse commands" ". 061" POP a "true output" a"[true output]=" GOTO "analyse commands" ". 062" POP a "true output" a"[true output]>" GOTO "analyse commands" ". 063" POP a "true output" a"[true output]?" GOTO "analyse commands" ". 064" POP a "true output" a"[true output]@" GOTO "analyse commands" ". 065" POP a "true output" a"[true output]A" GOTO "analyse commands" ". 066" POP a "true output" a"[true output]B" GOTO "analyse commands" ". 067" POP a "true output" a"[true output]C" GOTO "analyse commands" ". 068" POP a "true output" a"[true output]D" GOTO "analyse commands" ". 069" POP a "true output" a"[true output]E" GOTO "analyse commands" ". 070" POP a "true output" a"[true output]F" GOTO "analyse commands" ". 071" POP a "true output" a"[true output]G" GOTO "analyse commands" ". 072" POP a "true output" a"[true output]H" GOTO "analyse commands" ". 073" POP a "true output" a"[true output]I" GOTO "analyse commands" ". 074" POP a "true output" a"[true output]J" GOTO "analyse commands" ". 075" POP a "true output" a"[true output]K" GOTO "analyse commands" ". 076" POP a "true output" a"[true output]L" GOTO "analyse commands" ". 077" POP a "true output" a"[true output]M" GOTO "analyse commands" ". 078" POP a "true output" a"[true output]N" GOTO "analyse commands" ". 079" POP a "true output" a"[true output]O" GOTO "analyse commands" ". 080" POP a "true output" a"[true output]P" GOTO "analyse commands" ". 081" POP a "true output" a"[true output]Q" GOTO "analyse commands" ". 082" POP a "true output" a"[true output]R" GOTO "analyse commands" ". 083" POP a "true output" a"[true output]S" GOTO "analyse commands" ". 084" POP a "true output" a"[true output]T" GOTO "analyse commands" ". 085" POP a "true output" a"[true output]U" GOTO "analyse commands" ". 086" POP a "true output" a"[true output]V" GOTO "analyse commands" ". 087" POP a "true output" a"[true output]W" GOTO "analyse commands" ". 088" POP a "true output" a"[true output]X" GOTO "analyse commands" ". 089" POP a "true output" a"[true output]Y" GOTO "analyse commands" ". 090" POP a "true output" a"[true output]Z" GOTO "analyse commands" ". 091" POP a "true output" a"[true output][lb]" GOTO "analyse commands" ". 092" POP a "true output" a"[true output]\" GOTO "analyse commands" ". 093" POP a "true output" a"[true output][rb]" GOTO "analyse commands" ". 094" POP a "true output" a"[true output]^" GOTO "analyse commands" ". 095" POP a "true output" a"[true output]_" GOTO "analyse commands" ". 096" POP a "true output" a"[true output]`" GOTO "analyse commands" ". 097" POP a "true output" a"[true output]a" GOTO "analyse commands" ". 098" POP a "true output" a"[true output]b" GOTO "analyse commands" ". 099" POP a "true output" a"[true output]c" GOTO "analyse commands" ". 100" POP a "true output" a"[true output]d" GOTO "analyse commands" ". 101" POP a "true output" a"[true output]e" GOTO "analyse commands" ". 102" POP a "true output" a"[true output]f" GOTO "analyse commands" ". 103" POP a "true output" a"[true output]g" GOTO "analyse commands" ". 104" POP a "true output" a"[true output]h" GOTO "analyse commands" ". 105" POP a "true output" a"[true output]i" GOTO "analyse commands" ". 106" POP a "true output" a"[true output]j" GOTO "analyse commands" ". 107" POP a "true output" a"[true output]k" GOTO "analyse commands" ". 108" POP a "true output" a"[true output]l" GOTO "analyse commands" ". 109" POP a "true output" a"[true output]m" GOTO "analyse commands" ". 110" POP a "true output" a"[true output]n" GOTO "analyse commands" ". 111" POP a "true output" a"[true output]o" GOTO "analyse commands" ". 112" POP a "true output" a"[true output]p" GOTO "analyse commands" ". 113" POP a "true output" a"[true output]q" GOTO "analyse commands" ". 114" POP a "true output" a"[true output]r" GOTO "analyse commands" ". 115" POP a "true output" a"[true output]s" GOTO "analyse commands" ". 116" POP a "true output" a"[true output]t" GOTO "analyse commands" ". 117" POP a "true output" a"[true output]u" GOTO "analyse commands" ". 118" POP a "true output" a"[true output]v" GOTO "analyse commands" ". 119" POP a "true output" a"[true output]w" GOTO "analyse commands" ". 120" POP a "true output" a"[true output]x" GOTO "analyse commands" ". 121" POP a "true output" a"[true output]y" GOTO "analyse commands" ". 122" POP a "true output" a"[true output]z" GOTO "analyse commands" ". 123" POP a "true output" a"[true output]{" GOTO "analyse commands" ". 124" POP a "true output" a"[true output]|" GOTO "analyse commands" ". 125" POP a "true output" a"[true output]}" GOTO "analyse commands" ". 126" POP a "true output" a"[true output]~" GOTO "analyse commands" ". 127" GOTO "analyse commands" ". 128" POP a "true output" a"[true output]€" GOTO "analyse commands" ". 129" GOTO "analyse commands" ". 130" POP a "true output" a"[true output]‚" GOTO "analyse commands" ". 131" POP a "true output" a"[true output]ƒ" GOTO "analyse commands" ". 132" POP a "true output" a"[true output]„" GOTO "analyse commands" ". 133" POP a "true output" a"[true output]…" GOTO "analyse commands" ". 134" POP a "true output" a"[true output]†" GOTO "analyse commands" ". 135" POP a "true output" a"[true output]‡" GOTO "analyse commands" ". 136" POP a "true output" a"[true output]ˆ" GOTO "analyse commands" ". 137" POP a "true output" a"[true output]‰" GOTO "analyse commands" ". 138" POP a "true output" a"[true output]Š" GOTO "analyse commands" ". 139" POP a "true output" a"[true output]‹" GOTO "analyse commands" ". 140" POP a "true output" a"[true output]Œ" GOTO "analyse commands" ". 141" GOTO "analyse commands" ". 142" POP a "true output" a"[true output]Ž" GOTO "analyse commands" ". 143" GOTO "analyse commands" ". 144" GOTO "analyse commands" ". 145" POP a "true output" a"[true output]‘" GOTO "analyse commands" ". 146" POP a "true output" a"[true output]’" GOTO "analyse commands" ". 147" POP a "true output" a"[true output]“" GOTO "analyse commands" ". 148" POP a "true output" a"[true output]”" GOTO "analyse commands" ". 149" POP a "true output" a"[true output]•" GOTO "analyse commands" ". 150" POP a "true output" a"[true output]–" GOTO "analyse commands" ". 151" POP a "true output" a"[true output]—" GOTO "analyse commands" ". 152" POP a "true output" a"[true output]˜" GOTO "analyse commands" ". 153" POP a "true output" a"[true output]™" GOTO "analyse commands" ". 154" POP a "true output" a"[true output]š" GOTO "analyse commands" ". 155" POP a "true output" a"[true output]›" GOTO "analyse commands" ". 156" POP a "true output" a"[true output]œ" GOTO "analyse commands" ". 157" GOTO "analyse commands" ". 158" POP a "true output" a"[true output]ž" GOTO "analyse commands" ". 159" POP a "true output" a"[true output]Ÿ" GOTO "analyse commands" ". 160" POP a "true output" a"[true output] " GOTO "analyse commands" ". 161" POP a "true output" a"[true output]¡" GOTO "analyse commands" ". 162" POP a "true output" a"[true output]¢" GOTO "analyse commands" ". 163" POP a "true output" a"[true output]£" GOTO "analyse commands" ". 164" POP a "true output" a"[true output]¤" GOTO "analyse commands" ". 165" POP a "true output" a"[true output]¥" GOTO "analyse commands" ". 166" POP a "true output" a"[true output]¦" GOTO "analyse commands" ". 167" POP a "true output" a"[true output]§" GOTO "analyse commands" ". 168" POP a "true output" a"[true output]¨" GOTO "analyse commands" ". 169" POP a "true output" a"[true output]©" GOTO "analyse commands" ". 170" POP a "true output" a"[true output]ª" GOTO "analyse commands" ". 171" POP a "true output" a"[true output]«" GOTO "analyse commands" ". 172" POP a "true output" a"[true output]¬" GOTO "analyse commands" ". 173" POP a "true output" a"[true output]" GOTO "analyse commands" ". 174" POP a "true output" a"[true output]®" GOTO "analyse commands" ". 175" POP a "true output" a"[true output]¯" GOTO "analyse commands" ". 176" POP a "true output" a"[true output]°" GOTO "analyse commands" ". 177" POP a "true output" a"[true output]±" GOTO "analyse commands" ". 178" POP a "true output" a"[true output]²" GOTO "analyse commands" ". 179" POP a "true output" a"[true output]³" GOTO "analyse commands" ". 180" POP a "true output" a"[true output]´" GOTO "analyse commands" ". 181" POP a "true output" a"[true output]µ" GOTO "analyse commands" ". 182" POP a "true output" a"[true output]¶" GOTO "analyse commands" ". 183" POP a "true output" a"[true output]·" GOTO "analyse commands" ". 184" POP a "true output" a"[true output]¸" GOTO "analyse commands" ". 185" POP a "true output" a"[true output]¹" GOTO "analyse commands" ". 186" POP a "true output" a"[true output]º" GOTO "analyse commands" ". 187" POP a "true output" a"[true output]»" GOTO "analyse commands" ". 188" POP a "true output" a"[true output]¼" GOTO "analyse commands" ". 189" POP a "true output" a"[true output]½" GOTO "analyse commands" ". 190" POP a "true output" a"[true output]¾" GOTO "analyse commands" ". 191" POP a "true output" a"[true output]¿" GOTO "analyse commands" ". 192" POP a "true output" a"[true output]À" GOTO "analyse commands" ". 193" POP a "true output" a"[true output]Á" GOTO "analyse commands" ". 194" POP a "true output" a"[true output]Â" GOTO "analyse commands" ". 195" POP a "true output" a"[true output]Ã" GOTO "analyse commands" ". 196" POP a "true output" a"[true output]Ä" GOTO "analyse commands" ". 197" POP a "true output" a"[true output]Å" GOTO "analyse commands" ". 198" POP a "true output" a"[true output]Æ" GOTO "analyse commands" ". 199" POP a "true output" a"[true output]Ç" GOTO "analyse commands" ". 200" POP a "true output" a"[true output]È" GOTO "analyse commands" ". 201" POP a "true output" a"[true output]É" GOTO "analyse commands" ". 202" POP a "true output" a"[true output]Ê" GOTO "analyse commands" ". 203" POP a "true output" a"[true output]Ë" GOTO "analyse commands" ". 204" POP a "true output" a"[true output]Ì" GOTO "analyse commands" ". 205" POP a "true output" a"[true output]Í" GOTO "analyse commands" ". 206" POP a "true output" a"[true output]Î" GOTO "analyse commands" ". 207" POP a "true output" a"[true output]Ï" GOTO "analyse commands" ". 208" POP a "true output" a"[true output]Ð" GOTO "analyse commands" ". 209" POP a "true output" a"[true output]Ñ" GOTO "analyse commands" ". 210" POP a "true output" a"[true output]Ò" GOTO "analyse commands" ". 211" POP a "true output" a"[true output]Ó" GOTO "analyse commands" ". 212" POP a "true output" a"[true output]Ô" GOTO "analyse commands" ". 213" POP a "true output" a"[true output]Õ" GOTO "analyse commands" ". 214" POP a "true output" a"[true output]Ö" GOTO "analyse commands" ". 215" POP a "true output" a"[true output]×" GOTO "analyse commands" ". 216" POP a "true output" a"[true output]Ø" GOTO "analyse commands" ". 217" POP a "true output" a"[true output]Ù" GOTO "analyse commands" ". 218" POP a "true output" a"[true output]Ú" GOTO "analyse commands" ". 219" POP a "true output" a"[true output]Û" GOTO "analyse commands" ". 220" POP a "true output" a"[true output]Ü" GOTO "analyse commands" ". 221" POP a "true output" a"[true output]Ý" GOTO "analyse commands" ". 222" POP a "true output" a"[true output]Þ" GOTO "analyse commands" ". 223" POP a "true output" a"[true output]ß" GOTO "analyse commands" ". 224" POP a "true output" a"[true output]à" GOTO "analyse commands" ". 225" POP a "true output" a"[true output]á" GOTO "analyse commands" ". 226" POP a "true output" a"[true output]â" GOTO "analyse commands" ". 227" POP a "true output" a"[true output]ã" GOTO "analyse commands" ". 228" POP a "true output" a"[true output]ä" GOTO "analyse commands" ". 229" POP a "true output" a"[true output]å" GOTO "analyse commands" ". 230" POP a "true output" a"[true output]æ" GOTO "analyse commands" ". 231" POP a "true output" a"[true output]ç" GOTO "analyse commands" ". 232" POP a "true output" a"[true output]è" GOTO "analyse commands" ". 233" POP a "true output" a"[true output]é" GOTO "analyse commands" ". 234" POP a "true output" a"[true output]ê" GOTO "analyse commands" ". 235" POP a "true output" a"[true output]ë" GOTO "analyse commands" ". 236" POP a "true output" a"[true output]ì" GOTO "analyse commands" ". 237" POP a "true output" a"[true output]í" GOTO "analyse commands" ". 238" POP a "true output" a"[true output]î" GOTO "analyse commands" ". 239" POP a "true output" a"[true output]ï" GOTO "analyse commands" ". 240" POP a "true output" a"[true output]ð" GOTO "analyse commands" ". 241" POP a "true output" a"[true output]ñ" GOTO "analyse commands" ". 242" POP a "true output" a"[true output]ò" GOTO "analyse commands" ". 243" POP a "true output" a"[true output]ó" GOTO "analyse commands" ". 244" POP a "true output" a"[true output]ô" GOTO "analyse commands" ". 245" POP a "true output" a"[true output]õ" GOTO "analyse commands" ". 246" POP a "true output" a"[true output]ö" GOTO "analyse commands" ". 247" POP a "true output" a"[true output]÷" GOTO "analyse commands" ". 248" POP a "true output" a"[true output]ø" GOTO "analyse commands" ". 249" POP a "true output" a"[true output]ù" GOTO "analyse commands" ". 250" POP a "true output" a"[true output]ú" GOTO "analyse commands" ". 251" POP a "true output" a"[true output]û" GOTO "analyse commands" ". 252" POP a "true output" a"[true output]ü" GOTO "analyse commands" ". 253" POP a "true output" a"[true output]ý" GOTO "analyse commands" ". 254" POP a "true output" a"[true output]þ" GOTO "analyse commands" ". 255" POP a "true output" a"[true output]ÿ" GOTO "analyse commands" "#These are the input commands." ", " POP a number a010 GOTO "analyse commands" ", " POP a number a032 GOTO "analyse commands" ", !" POP a number a033 GOTO "analyse commands" ", qm" POP a number a034 GOTO "analyse commands" ", #" POP a number a035 GOTO "analyse commands" ", $" POP a number a036 GOTO "analyse commands" ", %" POP a number a037 GOTO "analyse commands" ", &" POP a number a038 GOTO "analyse commands" ", '" POP a number a039 GOTO "analyse commands" ", (" POP a number a040 GOTO "analyse commands" ", )" POP a number a041 GOTO "analyse commands" ", *" POP a number a042 GOTO "analyse commands" ", +" POP a number a043 GOTO "analyse commands" ", ," POP a number a044 GOTO "analyse commands" ", -" POP a number a045 GOTO "analyse commands" ", ." POP a number a046 GOTO "analyse commands" ", /" POP a number a047 GOTO "analyse commands" ", 0" POP a number a048 GOTO "analyse commands" ", 1" POP a number a049 GOTO "analyse commands" ", 2" POP a number a050 GOTO "analyse commands" ", 3" POP a number a051 GOTO "analyse commands" ", 4" POP a number a052 GOTO "analyse commands" ", 5" POP a number a053 GOTO "analyse commands" ", 6" POP a number a054 GOTO "analyse commands" ", 7" POP a number a055 GOTO "analyse commands" ", 8" POP a number a056 GOTO "analyse commands" ", 9" POP a number a057 GOTO "analyse commands" ", :" POP a number a058 GOTO "analyse commands" ", ;" POP a number a059 GOTO "analyse commands" ", <" POP a number a060 GOTO "analyse commands" ", =" POP a number a061 GOTO "analyse commands" ", >" POP a number a062 GOTO "analyse commands" ", ?" POP a number a063 GOTO "analyse commands" ", @" POP a number a064 GOTO "analyse commands" ", A" POP a number a065 GOTO "analyse commands" ", B" POP a number a066 GOTO "analyse commands" ", C" POP a number a067 GOTO "analyse commands" ", D" POP a number a068 GOTO "analyse commands" ", E" POP a number a069 GOTO "analyse commands" ", F" POP a number a070 GOTO "analyse commands" ", G" POP a number a071 GOTO "analyse commands" ", H" POP a number a072 GOTO "analyse commands" ", I" POP a number a073 GOTO "analyse commands" ", J" POP a number a074 GOTO "analyse commands" ", K" POP a number a075 GOTO "analyse commands" ", L" POP a number a076 GOTO "analyse commands" ", M" POP a number a077 GOTO "analyse commands" ", N" POP a number a078 GOTO "analyse commands" ", O" POP a number a079 GOTO "analyse commands" ", P" POP a number a080 GOTO "analyse commands" ", Q" POP a number a081 GOTO "analyse commands" ", R" POP a number a082 GOTO "analyse commands" ", S" POP a number a083 GOTO "analyse commands" ", T" POP a number a084 GOTO "analyse commands" ", U" POP a number a085 GOTO "analyse commands" ", V" POP a number a086 GOTO "analyse commands" ", W" POP a number a087 GOTO "analyse commands" ", X" POP a number a088 GOTO "analyse commands" ", Y" POP a number a089 GOTO "analyse commands" ", Z" POP a number a090 GOTO "analyse commands" ", lb" POP a number a091 GOTO "analyse commands" ", \" POP a number a092 GOTO "analyse commands" ", rb" POP a number a093 GOTO "analyse commands" ", ^" POP a number a094 GOTO "analyse commands" ", _" POP a number a095 GOTO "analyse commands" ", `" POP a number a096 GOTO "analyse commands" ", a" POP a number a097 GOTO "analyse commands" ", b" POP a number a098 GOTO "analyse commands" ", c" POP a number a099 GOTO "analyse commands" ", d" POP a number a100 GOTO "analyse commands" ", e" POP a number a101 GOTO "analyse commands" ", f" POP a number a102 GOTO "analyse commands" ", g" POP a number a103 GOTO "analyse commands" ", h" POP a number a104 GOTO "analyse commands" ", i" POP a number a105 GOTO "analyse commands" ", j" POP a number a106 GOTO "analyse commands" ", k" POP a number a107 GOTO "analyse commands" ", l" POP a number a108 GOTO "analyse commands" ", m" POP a number a109 GOTO "analyse commands" ", n" POP a number a110 GOTO "analyse commands" ", o" POP a number a111 GOTO "analyse commands" ", p" POP a number a112 GOTO "analyse commands" ", q" POP a number a113 GOTO "analyse commands" ", r" POP a number a114 GOTO "analyse commands" ", s" POP a number a115 GOTO "analyse commands" ", t" POP a number a116 GOTO "analyse commands" ", u" POP a number a117 GOTO "analyse commands" ", v" POP a number a118 GOTO "analyse commands" ", w" POP a number a119 GOTO "analyse commands" ", x" POP a number a120 GOTO "analyse commands" ", y" POP a number a121 GOTO "analyse commands" ", z" POP a number a122 GOTO "analyse commands" ", {" POP a number a123 GOTO "analyse commands" ", |" POP a number a124 GOTO "analyse commands" ", }" POP a number a125 GOTO "analyse commands" ", ~" POP a number a126 GOTO "analyse commands" ", €" POP a number a128 GOTO "analyse commands" ", ‚" POP a number a130 GOTO "analyse commands" ", ƒ" POP a number a131 GOTO "analyse commands" ", „" POP a number a132 GOTO "analyse commands" ", …" POP a number a133 GOTO "analyse commands" ", †" POP a number a134 GOTO "analyse commands" ", ‡" POP a number a135 GOTO "analyse commands" ", ˆ" POP a number a136 GOTO "analyse commands" ", ‰" POP a number a137 GOTO "analyse commands" ", Š" POP a number a138 GOTO "analyse commands" ", ‹" POP a number a139 GOTO "analyse commands" ", Œ" POP a number a140 GOTO "analyse commands" ", Ž" POP a number a142 GOTO "analyse commands" ", ‘" POP a number a145 GOTO "analyse commands" ", ’" POP a number a146 GOTO "analyse commands" ", “" POP a number a147 GOTO "analyse commands" ", ”" POP a number a148 GOTO "analyse commands" ", •" POP a number a149 GOTO "analyse commands" ", –" POP a number a150 GOTO "analyse commands" ", —" POP a number a151 GOTO "analyse commands" ", ˜" POP a number a152 GOTO "analyse commands" ", ™" POP a number a153 GOTO "analyse commands" ", š" POP a number a154 GOTO "analyse commands" ", ›" POP a number a155 GOTO "analyse commands" ", œ" POP a number a156 GOTO "analyse commands" ", ž" POP a number a158 GOTO "analyse commands" ", Ÿ" POP a number a159 GOTO "analyse commands" ", " POP a number a160 GOTO "analyse commands" ", ¡" POP a number a161 GOTO "analyse commands" ", ¢" POP a number a162 GOTO "analyse commands" ", £" POP a number a163 GOTO "analyse commands" ", ¤" POP a number a164 GOTO "analyse commands" ", ¥" POP a number a165 GOTO "analyse commands" ", ¦" POP a number a166 GOTO "analyse commands" ", §" POP a number a167 GOTO "analyse commands" ", ¨" POP a number a168 GOTO "analyse commands" ", ©" POP a number a169 GOTO "analyse commands" ", ª" POP a number a170 GOTO "analyse commands" ", «" POP a number a171 GOTO "analyse commands" ", ¬" POP a number a172 GOTO "analyse commands" ", ®" POP a number a174 GOTO "analyse commands" ", ¯" POP a number a175 GOTO "analyse commands" ", °" POP a number a176 GOTO "analyse commands" ", ±" POP a number a177 GOTO "analyse commands" ", ²" POP a number a178 GOTO "analyse commands" ", ³" POP a number a179 GOTO "analyse commands" ", ´" POP a number a180 GOTO "analyse commands" ", µ" POP a number a181 GOTO "analyse commands" ", ¶" POP a number a182 GOTO "analyse commands" ", ·" POP a number a183 GOTO "analyse commands" ", ¸" POP a number a184 GOTO "analyse commands" ", ¹" POP a number a185 GOTO "analyse commands" ", º" POP a number a186 GOTO "analyse commands" ", »" POP a number a187 GOTO "analyse commands" ", ¼" POP a number a188 GOTO "analyse commands" ", ½" POP a number a189 GOTO "analyse commands" ", ¾" POP a number a190 GOTO "analyse commands" ", ¿" POP a number a191 GOTO "analyse commands" ", À" POP a number a192 GOTO "analyse commands" ", Á" POP a number a193 GOTO "analyse commands" ", Â" POP a number a194 GOTO "analyse commands" ", Ã" POP a number a195 GOTO "analyse commands" ", Ä" POP a number a196 GOTO "analyse commands" ", Å" POP a number a197 GOTO "analyse commands" ", Æ" POP a number a198 GOTO "analyse commands" ", Ç" POP a number a199 GOTO "analyse commands" ", È" POP a number a200 GOTO "analyse commands" ", É" POP a number a201 GOTO "analyse commands" ", Ê" POP a number a202 GOTO "analyse commands" ", Ë" POP a number a203 GOTO "analyse commands" ", Ì" POP a number a204 GOTO "analyse commands" ", Í" POP a number a205 GOTO "analyse commands" ", Î" POP a number a206 GOTO "analyse commands" ", Ï" POP a number a207 GOTO "analyse commands" ", Ð" POP a number a208 GOTO "analyse commands" ", Ñ" POP a number a209 GOTO "analyse commands" ", Ò" POP a number a210 GOTO "analyse commands" ", Ó" POP a number a211 GOTO "analyse commands" ", Ô" POP a number a212 GOTO "analyse commands" ", Õ" POP a number a213 GOTO "analyse commands" ", Ö" POP a number a214 GOTO "analyse commands" ", ×" POP a number a215 GOTO "analyse commands" ", Ø" POP a number a216 GOTO "analyse commands" ", Ù" POP a number a217 GOTO "analyse commands" ", Ú" POP a number a218 GOTO "analyse commands" ", Û" POP a number a219 GOTO "analyse commands" ", Ü" POP a number a220 GOTO "analyse commands" ", Ý" POP a number a221 GOTO "analyse commands" ", Þ" POP a number a222 GOTO "analyse commands" ", ß" POP a number a223 GOTO "analyse commands" ", à" POP a number a224 GOTO "analyse commands" ", á" POP a number a225 GOTO "analyse commands" ", â" POP a number a226 GOTO "analyse commands" ", ã" POP a number a227 GOTO "analyse commands" ", ä" POP a number a228 GOTO "analyse commands" ", å" POP a number a229 GOTO "analyse commands" ", æ" POP a number a230 GOTO "analyse commands" ", ç" POP a number a231 GOTO "analyse commands" ", è" POP a number a232 GOTO "analyse commands" ", é" POP a number a233 GOTO "analyse commands" ", ê" POP a number a234 GOTO "analyse commands" ", ë" POP a number a235 GOTO "analyse commands" ", ì" POP a number a236 GOTO "analyse commands" ", í" POP a number a237 GOTO "analyse commands" ", î" POP a number a238 GOTO "analyse commands" ", ï" POP a number a239 GOTO "analyse commands" ", ð" POP a number a240 GOTO "analyse commands" ", ñ" POP a number a241 GOTO "analyse commands" ", ò" POP a number a242 GOTO "analyse commands" ", ó" POP a number a243 GOTO "analyse commands" ", ô" POP a number a244 GOTO "analyse commands" ", õ" POP a number a245 GOTO "analyse commands" ", ö" POP a number a246 GOTO "analyse commands" ", ÷" POP a number a247 GOTO "analyse commands" ", ø" POP a number a248 GOTO "analyse commands" ", ù" POP a number a249 GOTO "analyse commands" ", ú" POP a number a250 GOTO "analyse commands" ", û" POP a number a251 GOTO "analyse commands" ", ü" POP a number a252 GOTO "analyse commands" ", ý" POP a number a253 GOTO "analyse commands" ", þ" POP a number a254 GOTO "analyse commands" ", ÿ" POP a number a255 GOTO "analyse commands" end
Cyclic Tag (CT)
This is basically a version of the hypothetical language "CT" which can be directly turned into BCT. If you turn binary productions in a cyclic tag system into ";"-terminated strings and concatenate them, you get the input of the program. The data also has to be a binary string.
"#This provides padding for the data." POP a padding a "#This is what gets printed." POP a "printed data" a"" OUTPUT "Input program." INPUT program POP a temp a[program] "check program" GOTO "program done" [temp] "" POP char temp [temp] GOTO "check program" [char] 0 GOTO "check program" [char] 1 GOTO "check program" [char] ; GOTO end "program done" OUTPUT "Input data." INPUT data POP a temp a[data] "check data" GOTO "data done" [temp] "" POP char temp [temp] GOTO "check data" [char] 0 GOTO "check data" [char] 1 GOTO end "data done" "infinite while loop" GOTO "get first production" "[printed data]" "" OUTPUT "[printed data]" INPUT ok GOTO end [data] "" "get first production" POP a production a"" "start production loop" POP trit program [program] POP a program a"[program][trit]" GOTO "end production loop" [trit] ; POP a production a"[production][trit]" GOTO "start production loop" "end production loop" POP a "printed data" a"[printed data][padding][data] (Production: [production]) " POP a padding a"[padding] " POP checkbit data [data] GOTO "infinite while loop" [checkbit] 0 POP a data a"[data][production]" GOTO "infinite while loop" end
Deadfish
Wiki One with Comments
Unlike the one on the page, this one has comments.
"#This is the number DeadFish works on." POP a number a000 "#This shows the number during output and is updated when the command is o." POP a "show number" a "#I use carry to indicate repetition for incrementing (9 to 0) and decrementing (0 to 9)." POP a carry a0 "#This makes the code vertically smaller and easier to scroll over. #I don't want to use this except for that reason." POP a newline a" " "#This is the only thing that is output. All input goes in here." POP a "all input" a">>" "input more commands" OUTPUT "[all input]" INPUT commands "analyse commands" OUTPUT "[all input]" POP instruction commands [commands] GOTO "input more commands" [instruction] "" "#These are all the digits of the number." "#Temp is used in case the command is not valid." POP a temp a[number] POP hundreds temp [temp] POP tens temp [temp] POP ones temp [temp] GOTO "o command" [instruction] o GOTO "s command" [instruction] s GOTO "di command" [instruction] d GOTO "di command" [instruction] i "#It was not a valid command." POP a "all input" a"[all input][instruction][newline]>>" GOTO "analyse commands" "o command" GOTO "skip hundreds" [hundreds] 0 POP a "all input" a"[all input]o[newline][number][newline]>>" GOTO "analyse commands" "skip hundreds" GOTO "skip tens" [tens] 0 POP a "all input" a"[all input]o[newline][tens][ones][newline]>>" GOTO "analyse commands" "skip tens" POP a "all input" a"[all input]o[newline][ones][newline]>>" GOTO "analyse commands" "di command" POP a "all input" a"[all input][instruction][newline]>>" POP a digit aones "#This will go to i 1, d 1, i 2, d 2, etc. depending on what instruction and ones are." GOTO "[instruction] [ones]" "finished with one operation" "#If carry = 0, I can stop doing this." GOTO "completely finished" [carry] 0 "#If digit is hundreds, no more changing is possible." GOTO "completely finished" [digit] hundreds "#This is in case we have just changed tens, so we have to change hundreds." GOTO "digit is tens" [digit] tens POP a digit atens GOTO "[instruction] [tens]" "digit is tens" POP a digit ahundreds GOTO "[instruction] [hundreds]" "completely finished" "#In DeadFish implementation, 256 and 0-1 (999 in this case) become 0." GOTO "to 000" [hundreds][tens][ones] 256 GOTO "to 000" [instruction][hundreds][tens][ones] d999 POP a number a[hundreds][tens][ones] "number is changed" POP a carry a0 GOTO "analyse commands" "#Number is just set to 000." "to 000" POP a number a000 GOTO "number is changed" "#From here on out, the code consists of single commands which do one or two operations." "#The variable carry becomes 1 here." "d 0" POP a [digit] a9 POP a carry a1 GOTO "finished with one operation" "d 1" POP a [digit] a0 POP a carry a0 GOTO "finished with one operation" "d 2" POP a [digit] a1 POP a carry a0 GOTO "finished with one operation" "d 3" POP a [digit] a2 POP a carry a0 GOTO "finished with one operation" "d 4" POP a [digit] a3 POP a carry a0 GOTO "finished with one operation" "d 5" POP a [digit] a4 POP a carry a0 GOTO "finished with one operation" "d 6" POP a [digit] a5 POP a carry a0 GOTO "finished with one operation" "d 7" POP a [digit] a6 POP a carry a0 GOTO "finished with one operation" "d 8" POP a [digit] a7 POP a carry a0 GOTO "finished with one operation" "d 9" POP a [digit] a8 POP a carry a0 GOTO "finished with one operation" "#The variable carry becomes 1 here." "i 0" POP a [digit] a1 POP a carry a0 GOTO "finished with one operation" "i 1" POP a [digit] a2 POP a carry a0 GOTO "finished with one operation" "i 2" POP a [digit] a3 POP a carry a0 GOTO "finished with one operation" "i 3" POP a [digit] a4 POP a carry a0 GOTO "finished with one operation" "i 4" POP a [digit] a5 POP a carry a0 GOTO "finished with one operation" "i 5" POP a [digit] a6 POP a carry a0 GOTO "finished with one operation" "i 6" POP a [digit] a7 POP a carry a0 GOTO "finished with one operation" "i 7" POP a [digit] a8 POP a carry a0 GOTO "finished with one operation" "i 8" POP a [digit] a9 POP a carry a0 GOTO "finished with one operation" "i 9" POP a [digit] a0 POP a carry a1 GOTO "finished with one operation" "s command" POP a "all input" a"[all input]s[newline]>>" GOTO "square 0[ones]" [number] 00[ones] GOTO "square 1[ones]" [number] 01[ones] GOTO "square 2[ones]" [number] 02[ones] GOTO "square 30" [number] 030 GOTO "square 31" [number] 031 GOTO "to 000" "square 00" POP a number a000 GOTO "analyse commands" "square 01" POP a number a001 GOTO "analyse commands" "square 02" POP a number a004 GOTO "analyse commands" "square 03" POP a number a009 GOTO "analyse commands" "square 04" POP a number a016 GOTO "analyse commands" "square 05" POP a number a025 GOTO "analyse commands" "square 06" POP a number a036 GOTO "analyse commands" "square 07" POP a number a049 GOTO "analyse commands" "square 08" POP a number a064 GOTO "analyse commands" "square 09" POP a number a081 GOTO "analyse commands" "square 10" POP a number a100 GOTO "analyse commands" "square 11" POP a number a121 GOTO "analyse commands" "square 12" POP a number a144 GOTO "analyse commands" "square 13" POP a number a169 GOTO "analyse commands" "square 14" POP a number a196 GOTO "analyse commands" "square 15" POP a number a225 GOTO "analyse commands" "square 16" GOTO "to 000" "square 17" POP a number a289 GOTO "analyse commands" "square 18" POP a number a324 GOTO "analyse commands" "square 19" POP a number a361 GOTO "analyse commands" "square 20" POP a number a400 GOTO "analyse commands" "square 21" POP a number a441 GOTO "analyse commands" "square 22" POP a number a484 GOTO "analyse commands" "square 23" POP a number a529 GOTO "analyse commands" "square 24" POP a number a576 GOTO "analyse commands" "square 25" POP a number a625 GOTO "analyse commands" "square 26" POP a number a676 GOTO "analyse commands" "square 27" POP a number a729 GOTO "analyse commands" "square 28" POP a number a784 GOTO "analyse commands" "square 29" POP a number a841 GOTO "analyse commands" "square 30" POP a number a900 GOTO "analyse commands" "square 31" POP a number a961 GOTO "analyse commands" "#I put end here because the interpreter stops reading when it reaches the end of the file." end
Different Second Version
"#This is the number DeadFish works on." POP a numbers a000 "#This shows the numbers during output and is updated when the command is o." POP a "show numbers" a "#I use carry to indicate repetition for incrementing (9 to 0) and decrementing (0 to 9)." POP a carry a0 POP a "empty input" a"Enter code in the input box." "input more commands" OUTPUT "Number: [show numbers] [empty input]" INPUT commands "analyse commands" POP instruction commands [commands] GOTO "input more commands" [instruction] "" GOTO "o command" [instruction] o "#These are all the digits of the number." "#Temp is used in case the command is not valid." POP a temp a[numbers] POP hundreds temp [temp] POP tens temp [temp] POP ones temp [temp] GOTO "s command" [instruction] s GOTO "d command" [instruction] d GOTO "i command" [instruction] i "#It was not a valid command." GOTO "analyse commands" OUTPUT "[instruction] takes it here." INPUT ok "o command" POP a "show numbers" a[numbers] OUTPUT "Number: [show numbers]" GOTO "analyse commands" "s command" GOTO "possibly valid square" [hundreds] 0 GOTO "to 000" "possibly valid square" GOTO "square 00" [numbers] 000 GOTO "square 01" [numbers] 001 GOTO "square 02" [numbers] 002 GOTO "square 03" [numbers] 003 GOTO "square 04" [numbers] 004 GOTO "square 05" [numbers] 005 GOTO "square 06" [numbers] 006 GOTO "square 07" [numbers] 007 GOTO "square 08" [numbers] 008 GOTO "square 09" [numbers] 009 GOTO "square 10" [numbers] 010 GOTO "square 11" [numbers] 011 GOTO "square 12" [numbers] 012 GOTO "square 13" [numbers] 013 GOTO "square 14" [numbers] 014 GOTO "square 15" [numbers] 015 GOTO "square 16" [numbers] 016 GOTO "square 17" [numbers] 017 GOTO "square 18" [numbers] 018 GOTO "square 19" [numbers] 019 GOTO "square 20" [numbers] 020 GOTO "square 21" [numbers] 021 GOTO "square 22" [numbers] 022 GOTO "square 23" [numbers] 023 GOTO "square 24" [numbers] 024 GOTO "square 25" [numbers] 025 GOTO "square 26" [numbers] 026 GOTO "square 27" [numbers] 027 GOTO "square 28" [numbers] 028 GOTO "square 29" [numbers] 029 GOTO "square 30" [numbers] 030 GOTO "square 31" [numbers] 031 GOTO "to 000" "d command" POP a digit aones "#This will go to decrement 1, decrement 2, etc. depending on what ones is." GOTO "decrement [ones]" "finished with decrement" "#If carry = 0, I can stop decrementing." GOTO "completely finished with increment/decrement" [carry] 0 "#If digit is hundreds, no more decrementing is possible." GOTO "completely finished with increment/decrement" [digit] hundreds "#This is in case we have just decremented tens, so we have to decrement hundreds." GOTO "decrement digit is tens" [digit] tens POP a digit atens GOTO "decrement [tens]" "decrement digit is tens" POP a digit ahundreds GOTO "decrement [hundreds]" "completely finished with increment/decrement" "#In DeadFish implementation, 256 and 0-1 (999 in this case) become 0." GOTO "to 000" [hundreds][tens][ones] 256 GOTO "to 000" [hundreds][tens][ones] 999 POP a numbers a[hundreds][tens][ones] "numbers is changed" POP a carry a0 GOTO "analyse commands" "#Numbers is just set to 000." "to 000" POP a numbers a000 GOTO "numbers is changed" "i command" POP a digit aones "#This will go to increment 1, increment 2, etc. depending on what ones is." GOTO "increment [ones]" "finished with increment" "#If carry = 0, I can stop incrementing." GOTO "completely finished with increment/decrement" [carry] 0 "#I capped the amount of digits at 3." GOTO "completely finished with increment/decrement" [digit] hundreds "#This is in case we have just incremented tens, so we have to increment hundreds." GOTO "increment digit is tens" [digit] tens POP a digit atens GOTO "increment [tens]" "increment digit is tens" POP a digit ahundreds GOTO "increment [hundreds]" "#The variable carry becomes 1 here." "decrement 0" POP a [digit] a9 POP a carry a1 GOTO "finished with decrement" "decrement 1" POP a [digit] a0 POP a carry a0 GOTO "finished with decrement" "decrement 2" POP a [digit] a1 POP a carry a0 GOTO "finished with decrement" "decrement 3" POP a [digit] a2 POP a carry a0 GOTO "finished with decrement" "decrement 4" POP a [digit] a3 POP a carry a0 GOTO "finished with decrement" "decrement 5" POP a [digit] a4 POP a carry a0 GOTO "finished with decrement" "decrement 6" POP a [digit] a5 POP a carry a0 GOTO "finished with decrement" "decrement 7" POP a [digit] a6 POP a carry a0 GOTO "finished with decrement" "decrement 8" POP a [digit] a7 POP a carry a0 GOTO "finished with decrement" "decrement 9" POP a [digit] a8 POP a carry a0 GOTO "finished with decrement" "#The variable carry becomes 1 here." "increment 0" POP a [digit] a1 POP a carry a0 GOTO "finished with increment" "increment 1" POP a [digit] a2 POP a carry a0 GOTO "finished with increment" "increment 2" POP a [digit] a3 POP a carry a0 GOTO "finished with increment" "increment 3" POP a [digit] a4 POP a carry a0 GOTO "finished with increment" "increment 4" POP a [digit] a5 POP a carry a0 GOTO "finished with increment" "increment 5" POP a [digit] a6 POP a carry a0 GOTO "finished with increment" "increment 6" POP a [digit] a7 POP a carry a0 GOTO "finished with increment" "increment 7" POP a [digit] a8 POP a carry a0 GOTO "finished with increment" "increment 8" POP a [digit] a9 POP a carry a0 GOTO "finished with increment" "increment 9" POP a [digit] a0 POP a carry a1 GOTO "finished with increment" "square 00" POP a numbers a000 GOTO "analyse commands" "square 01" POP a numbers a001 GOTO "analyse commands" "square 02" POP a numbers a004 GOTO "analyse commands" "square 03" POP a numbers a009 GOTO "analyse commands" "square 04" POP a numbers a016 GOTO "analyse commands" "square 05" POP a numbers a025 GOTO "analyse commands" "square 06" POP a numbers a036 GOTO "analyse commands" "square 07" POP a numbers a049 GOTO "analyse commands" "square 08" POP a numbers a064 GOTO "analyse commands" "square 09" POP a numbers a081 GOTO "analyse commands" "square 10" POP a numbers a100 GOTO "analyse commands" "square 11" POP a numbers a121 GOTO "analyse commands" "square 12" POP a numbers a144 GOTO "analyse commands" "square 13" POP a numbers a169 GOTO "analyse commands" "square 14" POP a numbers a196 GOTO "analyse commands" "square 15" POP a numbers a225 GOTO "analyse commands" "#16 squared is 256, so that's what I put here." "#I could have stopped here and been fine." "#However, I decided to implement the others" "#because I think it runs faster." "square 17" POP a numbers a289 GOTO "analyse commands" "square 18" POP a numbers a324 GOTO "analyse commands" "square 19" POP a numbers a361 GOTO "analyse commands" "square 20" POP a numbers a400 GOTO "analyse commands" "square 21" POP a numbers a441 GOTO "analyse commands" "square 22" POP a numbers a484 GOTO "analyse commands" "square 23" POP a numbers a529 GOTO "analyse commands" "square 24" POP a numbers a576 GOTO "analyse commands" "square 25" POP a numbers a625 GOTO "analyse commands" "square 26" POP a numbers a676 GOTO "analyse commands" "square 27" POP a numbers a729 GOTO "analyse commands" "square 28" POP a numbers a784 GOTO "analyse commands" "square 29" POP a numbers a841 GOTO "analyse commands" "square 30" POP a numbers a900 GOTO "analyse commands" "square 31" POP a numbers a961 GOTO "analyse commands" end
One with >> - Style Prompts
"#This is the number DeadFish works on." POP a number a000 "#This shows the number during output and is updated when the command is o." POP a "show number" a "#I use carry to indicate repetition for incrementing (9 to 0) and decrementing (0 to 9)." POP a carry a0 "#This makes the code vertically smaller and easier to scroll over. #I don't want to use this except for that reason." POP a newline a" " "#This is the only thing that is output. All input goes in here." POP a "all input" a">>" "input more commands" OUTPUT "[all input]" INPUT commands "analyse commands" OUTPUT "[all input]" POP instruction commands [commands] GOTO "input more commands" [instruction] "" "#These are all the digits of the number." "#Temp is used in case the command is not valid." POP a temp a[number] POP hundreds temp [temp] POP tens temp [temp] POP ones temp [temp] GOTO "o command" [instruction] o GOTO "s command" [instruction] s GOTO "di command" [instruction] d GOTO "di command" [instruction] i "#It was not a valid command." POP a "all input" a"[all input][instruction][newline]>>" GOTO "analyse commands" "o command" GOTO "skip hundreds" [hundreds] 0 POP a "all input" a"[all input]o[newline][number][newline]>>" GOTO "analyse commands" "skip hundreds" GOTO "skip tens" [tens] 0 POP a "all input" a"[all input]o[newline][tens][ones][newline]>>" GOTO "analyse commands" "skip tens" POP a "all input" a"[all input]o[newline][ones][newline]>>" GOTO "analyse commands" "di command" POP a "all input" a"[all input][instruction][newline]>>" POP a digit aones "#This will go to i 1, d 1, i 2, d 2, etc. depending on what instruction and ones are." GOTO "[instruction] [ones]" "finished with one operation" "#If carry = 0, I can stop doing this." GOTO "completely finished" [carry] 0 "#If digit is hundreds, no more changing is possible." GOTO "completely finished" [digit] hundreds "#This is in case we have just changed tens, so we have to change hundreds." GOTO "digit is tens" [digit] tens POP a digit atens GOTO "[instruction] [tens]" "digit is tens" POP a digit ahundreds GOTO "[instruction] [hundreds]" "completely finished" "#In DeadFish implementation, 256 and 0-1 (999 in this case) become 0." GOTO "to 000" [hundreds][tens][ones] 256 GOTO "to 000" [instruction][hundreds][tens][ones] d999 POP a number a[hundreds][tens][ones] "number is changed" POP a carry a0 GOTO "analyse commands" "#Number is just set to 000." "to 000" POP a number a000 GOTO "number is changed" "#From here on out, the code consists of single commands which do one or two operations." "#The variable carry becomes 1 here." "d 0" POP a [digit] a9 POP a carry a1 GOTO "finished with one operation" "d 1" POP a [digit] a0 POP a carry a0 GOTO "finished with one operation" "d 2" POP a [digit] a1 POP a carry a0 GOTO "finished with one operation" "d 3" POP a [digit] a2 POP a carry a0 GOTO "finished with one operation" "d 4" POP a [digit] a3 POP a carry a0 GOTO "finished with one operation" "d 5" POP a [digit] a4 POP a carry a0 GOTO "finished with one operation" "d 6" POP a [digit] a5 POP a carry a0 GOTO "finished with one operation" "d 7" POP a [digit] a6 POP a carry a0 GOTO "finished with one operation" "d 8" POP a [digit] a7 POP a carry a0 GOTO "finished with one operation" "d 9" POP a [digit] a8 POP a carry a0 GOTO "finished with one operation" "#The variable carry becomes 1 here." "i 0" POP a [digit] a1 POP a carry a0 GOTO "finished with one operation" "i 1" POP a [digit] a2 POP a carry a0 GOTO "finished with one operation" "i 2" POP a [digit] a3 POP a carry a0 GOTO "finished with one operation" "i 3" POP a [digit] a4 POP a carry a0 GOTO "finished with one operation" "i 4" POP a [digit] a5 POP a carry a0 GOTO "finished with one operation" "i 5" POP a [digit] a6 POP a carry a0 GOTO "finished with one operation" "i 6" POP a [digit] a7 POP a carry a0 GOTO "finished with one operation" "i 7" POP a [digit] a8 POP a carry a0 GOTO "finished with one operation" "i 8" POP a [digit] a9 POP a carry a0 GOTO "finished with one operation" "i 9" POP a [digit] a0 POP a carry a1 GOTO "finished with one operation" "s command" POP a "all input" a"[all input]s[newline]>>" GOTO "square 0[ones]" [number] 00[ones] GOTO "square 1[ones]" [number] 01[ones] GOTO "square 2[ones]" [number] 02[ones] GOTO "square 30" [number] 030 GOTO "square 31" [number] 031 GOTO "to 000" "square 00" POP a number a000 GOTO "analyse commands" "square 01" POP a number a001 GOTO "analyse commands" "square 02" POP a number a004 GOTO "analyse commands" "square 03" POP a number a009 GOTO "analyse commands" "square 04" POP a number a016 GOTO "analyse commands" "square 05" POP a number a025 GOTO "analyse commands" "square 06" POP a number a036 GOTO "analyse commands" "square 07" POP a number a049 GOTO "analyse commands" "square 08" POP a number a064 GOTO "analyse commands" "square 09" POP a number a081 GOTO "analyse commands" "square 10" POP a number a100 GOTO "analyse commands" "square 11" POP a number a121 GOTO "analyse commands" "square 12" POP a number a144 GOTO "analyse commands" "square 13" POP a number a169 GOTO "analyse commands" "square 14" POP a number a196 GOTO "analyse commands" "square 15" POP a number a225 GOTO "analyse commands" "square 16" GOTO "to 000" "square 17" POP a number a289 GOTO "analyse commands" "square 18" POP a number a324 GOTO "analyse commands" "square 19" POP a number a361 GOTO "analyse commands" "square 20" POP a number a400 GOTO "analyse commands" "square 21" POP a number a441 GOTO "analyse commands" "square 22" POP a number a484 GOTO "analyse commands" "square 23" POP a number a529 GOTO "analyse commands" "square 24" POP a number a576 GOTO "analyse commands" "square 25" POP a number a625 GOTO "analyse commands" "square 26" POP a number a676 GOTO "analyse commands" "square 27" POP a number a729 GOTO "analyse commands" "square 28" POP a number a784 GOTO "analyse commands" "square 29" POP a number a841 GOTO "analyse commands" "square 30" POP a number a900 GOTO "analyse commands" "square 31" POP a number a961 GOTO "analyse commands" "#I put end here because the interpreter stops reading when it reaches the end of the file." end