esolang

BIO

Binary IO. Two letters, two digits and three blocks of memory.

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

Tested with 4 known programs · Test method

Run it

Expected: Hi

The idea

Emil Svensson made BIO in 2008, after ABCDXYZ by ais523. The whole memory is three blocks, x, y and z, all 0 at the start. Every command is a digit, a letter and a block, so a program reads like a long list of codes such as 0ox; and 1iy;. With only three blocks you have to empty one in a loop before you can use it again, and the Hello World program spends 291 lines on twelve characters.

The machine

CommandDoes
0ob;Add 1 to block b
1ob;Take 1 from block b
0ib{ ... };Repeat the commands inside while block b is not 0
1ib;Print block b as a character

Case does not matter, spaces and line breaks do nothing and // starts a comment.

Example

Eight rounds of nine make 72, an H.

Eight rounds of nine make 72, an H. Three more rounds of eleven make 105, an i.

The sums print their results as characters too, so the addition prints the character with code 2. The subtraction counts x up while it counts y down, and it prints 3.

Further

Ideas it shows

Also in Turing tarpits

Write your own in Run Convert a program from BIO

Implementation

JavaScript interpreter, source and command line

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

Command line

shib run bio -e '0ox; 0oy;
0ix{ 1ox; 0oy; };
1iy;'
shib manual bio

Source

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

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

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