TACC
One accumulator, one tape and labels to jump to. Every value passes through the accumulator.
ChuckEsoteric08, 2023 · Turing complete: yes · ●○○ easy · esolangs.org
Tested with 2 known programs · Test method
Run it
The idea
ChuckEsoteric08 made TACC in 2023 as a mix of Uppercase=Lowercase and Sreg. All the work happens in a single accumulator. The tape only stores, and the cell pointer is set either by a number in the program or from the accumulator, which is how a program reaches a cell it computed. The only test is !X, which skips the next command when the accumulator is not X, and the only jump goes to a label.
The machine
| Command | Does |
|---|---|
:X | Point at cell X |
> | Point at the cell the accumulator names |
< ^ | Load the cell into the accumulator; store the accumulator in the cell |
+X -X | Add X; take off X |
!X | Skip the next command unless the accumulator is X |
" ; | Print the accumulator as a character; read a byte into it |
[X ]X | Declare the label X; jump to it |
Cells are numbered from 1 and the pointer starts at 1. The specification says a result of -X below 0 sets the cell to 0, and this implementation takes that cell to be the accumulator, so it stops at 0. At the end of the input ; gives 0.
Example
The Hello World first writes the 13 characters into cells 1 to 13, each as a step from the one before.
The Hello World first writes the 13 characters into cells 1 to 13, each as a step from the one before. Cell 14 then counts from 1. The loop points at the cell that count names with >, prints it, and ends when the count reaches 14.
The truth machine prints what it read and jumps back to print again only while the accumulator holds 49, the code of 1.
The character printer counts from 0 and prints every code up to 255, as !256 ends it. The specification only says how ASCII prints, so a code from 128 to 255 comes out as that one byte.
Patterns it teaches
- Turing tarpit: eleven commands, one register and one kind of test.
Further
See also
Cell-based
Write your own in Run Convert a program from TACC
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: tacc.
Command line
shib run tacc -e ';
[print
"
!49
]print' --input '0'shib manual taccSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/tacc.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org