ABCD
One cell and four letters. A goes up, B goes down, C reads, D prints, and nothing ever repeats.
Billlam, 2011 · Turing complete: no · ●○○ easy · esolangs.org
Tested with 3 known programs · Test method
Run it
The idea
Billlam made ABCD in 2011 and calls it unusable for programming and totally Turing incomplete. There is one cell and no loop, so a program does each of its commands once, in order. To print a text the program counts the cell up or down to each character in turn. The Hello World is 390 letters long, and its cat is CD written out once for every character it may ever read.
Read the story
The specification gives an interpreter in C#, which can also write programs. Given a text, it prints the A or B that take the cell from one character to the next, and a D after each.
The machine
| Letter | Does |
|---|---|
A | Add 1 to the cell |
B | Take 1 from the cell |
C | Read one input character into the cell |
D | Print the cell as a character |
Every other character is ignored, so every text runs. The interpreter keeps the cell in a C# char, so it wraps at 65,536, and reading past the end of the input gives 65,535.
Example
The Hello World, in its rows of 64.
The Hello World, in its rows of 64. The last 23 B take the cell from the 33 of ! down to 10, a line feed.
A cat for three characters needs three CD.
Patterns it teaches
- Every text runs: four letters do something and the rest are ignored.
Further
See also
Also in Jokes
Write your own in Run Convert a program from ABCD
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: abcd.
Command line
shib run abcd -e 'CDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCDCD' --input 'abcdefghijklmnopqrstuvwxyz012345'shib manual abcdSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/abcd.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org