Skip to content
Manic Microbes

The genome language · ISA version 13

A genome that survives being cut about.

A genome is a flat array of bytes with no parse step, no identifiers and no addresses in it. Every one of those absences is deliberate, and each of them was arrived at by getting it wrong first.

How a byte becomes an instruction

The opcode is byte % 64. Four distinct byte values therefore decode to the same instruction, which is codon degeneracy: a large fraction of point mutations are synonymous and change nothing at all.

That matters more than it sounds. Synonymous sites let neutral variation pile up quietly in a lineage until some later mutation makes it matter, which is both a smoother search landscape and a molecular clock the phylogeny layer can read.

0x02
0x42
0x82
0xC2
% 64
IMM
The opcode is byte % 64, so four distinct byte values decode to each of the 64 instructions. This is codon degeneracy: a large fraction of point mutations are synonymous, and the neutral variation they leave behind is both a smoother search landscape and a molecular clock the phylogeny layer can read.

Addressing

Nothing holds an address.

Several instructions are followed by a template: the run of NOP0 and NOP1 instructions immediately after them, up to eight. A template has a value, read least-significant bit first, and a length.

Templates do three jobs. As a literal, appending one more letter is a small numeric change, so numbers are incrementally mutable rather than all-or-nothing. As a jump target, the instruction searches outward for the complementary pattern rather than for an address. As a promoter, it names a gene that EXPRESS binds by closest match rather than by exact name.

Because addresses are patterns rather than positions, a genome is position-independent. Duplicate a chunk, move it, or splice fifty bytes into the middle, and the jumps still land. A damaged template finds a slightly wrong target instead of crashing — which is the difference between a mutation being a variation and a mutation being rubble.

Genes work the same way. A gene block begins with GENE and a template, which is its promoter. Delete a gene and its callers are not orphaned — they bind the next best match. Duplicate a gene and mutate its promoter and you have a paralog expressed under different conditions, which is roughly how biological novelty actually arises.

JMPF
1011
NOP1 NOP0 NOP1 NOP1
searches for the complement ↓
found at 0x2f
0100
execution resumes just past it
A jump does not carry an address. It carries a pattern, and scans outward for its complement — the same mechanism as base pairing. Insert fifty bytes in the middle of a genome and every jump still lands, which is why duplication and translocation produce working variants instead of rubble.

Zero-length templates

A template of zero length suppresses its instruction’s search or bind — the jump does not jump — but the documented stack effect still happens. Otherwise deleting a single NOP would silently change the stack balance of everything downstream, which is exactly the kind of cliff the rest of the design works to avoid.

Totality

64 opcodes, and none of them can fail.

Every instruction is defined for every input in every machine state. There is no illegal encoding, no fault, no trap.

The stacks are circular, so popping an empty one yields zero and pushing a full one overwrites the oldest entry. Addresses wrap to their range. Division by zero yields zero. Arithmetic saturates rather than wrapping — a one-bit mutation should not flip a cell from very fast forward to very fast reverse, because that is a cliff evolution has to climb.

Any sequence of bytes is therefore a legal program, and that is the property that turns random mutation into a search instead of a demolition. If a mutated genome could crash, most mutations would be lethal for a boring reason, and the population would spend its time avoiding invalid programs instead of finding better ones.

How that is checked

Ten million random byte arrays, each executed for a hundred thousand instructions from a randomised starting state. Zero panics, zero hangs. The worst a program can do is waste energy and die of it.

Writing a cell

You do not write bytes.

There is an assembler. Labels compile to templates, and a named promoter compiles to a bit pattern through a stable hash rather than to a symbol-table entry — so the name is a convenience for you and the binding is still associative for the cell.

It refuses to assemble a source where an explicitly written template of fewer than eight letters would be silently extended by the letters after it. That is the easiest mistake to make in hand-written assembly here, and the engine’s behaviour — taking the maximal run — is correct, so the assembler catches it rather than the semantics changing.

genome
; A cell that swims up a gradient, and photosynthesises when it stops finding one.

        GENE    #sense
        ZERO                    ; chemical 0
        IMM     %0              ; sensor slot
        OGET                    ; ( -- concentration )
        DUP
        IMM     %0011           ; threshold = 12
        CMP
        JMPZ    hungry          ; nothing here worth chasing
        EXPRESS #swim
        RET

hungry:
        EXPRESS #bask
        RET
Assembly, disassembly and reassembly are byte-identical for any genome — so you can pull the genome out of any living cell, read it, change it, and put it back while the world is still running.
The Manic Microbes genome pane reading a live cell's assembly: the instruction pointer stopped on COPYB, the loop instruction showing its resolved target, a gene-size breakdown, and diagnostics reporting the genome's size against its nucleus.
The same thing from inside the microscope, on a cell that is currently alive. The instruction pointer has stopped on COPYB — this cell is halfway through copying itself — and LOOPLN is showing the byte it will jump back to, resolved from the template rather than written down anywhere. The diagnostics on the right add up the four genes and then say the thing that actually matters: fits its nucleus, so it copies whole into every daughter.