esolang

EXCON

Eight bits, a pointer that can only go left, and an exclamation mark to print them.

Emil Svensson, 2008 · Turing complete: no · ●○○ easy · esolangs.org

Tested with 3 known programs · Test method

Run it

Expected: A

The idea

Emil Svensson designed EXCON in 2008. The name is short for exclamation mark colon, which the specification calls a lame abbreviation. The whole memory is one byte, written as eight binary digits, and every character a program prints is built in that byte one bit at a time.

Read the story

There is no loop, no jump and no input. A program runs once from left to right, and esolangs.org files it under unusable for programming.

The machine

CommandDoes
:Set all eight digits to 0 and put the pointer back on the right-most one
^Flip the digit at the pointer
<Move the pointer one digit left
!Print the eight digits as one character

Every other character is a comment. The pointer starts on the right-most digit, which is worth 1; the left-most is worth 128. The specification calls moving the pointer more than 8 steps a fault. Its Ruby interpreter lets the pointer go on, and a ^ out there flips a digit counted back from the right end, as a negative index does in Ruby.

Example

The letter A is 01000001, so a program flips the right-most digit, moves six places left and flips again.

The letter A is 01000001, so a program flips the right-most digit, moves six places left and flips again.

The Hello World builds each letter in a fresh pool. The second l needs only a !, since the pool still holds the first.

Expected: Hello World!

Patterns it teaches

Further

Also in Turing tarpits

Write your own in Run Convert a program from EXCON

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: excon.

Command line

shib run excon -e ':^<<<<<<^!'
shib manual excon

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/excon.js

Docs: Kernel instructions · The .shib format · Command line · Adding a language

Source esolangs.org (CC0) · Edit on esolangs.org