esolang

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

Expected: He!

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

CommandDoes
0 1 2Go to cell 0, move right, move left
3Flip the bit
4Append the bit to the binary string
5 ... 6 ... 7If the bit is 1, else, end
5 ... 8The same, repeated while the bit is 1
9 AA random bit, an input bit
BPrint the binary string
CBinary string to a character (bit 0) or a number (bit 1); with nothing there, print the text
D ... D EDefine the function, call it
FPrint 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.
Expected: 01111

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

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 acl

Source

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