ACL
Advanced Computer Language. A tape of bits, sixteen hexadecimal commands, and output built up bit by bit.
Hanzlu, 2019 · Turing complete: yes · ●●● hard · esolangs.org
Tested with 3 known programs · Test method
Run it
The idea
Hanzlu made ACL in 2019 to work with binary memory at a very low level. It grew out of an earlier language of seven commands that was close to a Post–Turing machine. ACL adds input, branches, loops, a function and two output strings. Output is collected first. Bits go into a binary string, C turns that into a number or a character on a text string, and a second C prints the text. Letters other than A to F are ignored, so comments can be written in lowercase.
The machine
| Command | Does |
|---|---|
0 1 2 | Go to cell 0, move right, move left |
3 | Flip the bit |
4 | Append the bit to the binary string |
5 ... 6 ... 7 | If the bit is 1, else, end |
5 ... 8 | The same, repeated while the bit is 1 |
9 A | A random bit, an input bit |
B | Print the binary string |
C | Binary string to a character (bit 0) or a number (bit 1); with nothing there, print the text |
D ... D E | Define the function, call it |
F | Print the error code 1111 and stop |
Example
In 34344343444C the bit is flipped and appended in turn to give 1001000, which is 72, so C adds an H.
In 34344343444C the bit is flipped and appended in turn to give 1001000, which is 72, so C adds an H. The second program is a truth machine. With 0 it prints 0 and then stops with F, which also prints the error code 1111. A Collatz program for 9 runs to 1 in this way, with every number built from bits.
Further
Ideas it shows
See also
Cell-based
Write your own in Run Convert a program from ACL
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: acl.
Command line
shib run acl -e 'A54B64BF8' --input '0'shib manual aclSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/acl.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org