Avida instruction set

Each position in the genomic sequence of a digital organism is one of 26 possible instructions. The table below shows the alphabetical code for each instruction, its mnemonic, and a brief description of its function.

(a) nop-A No-operation instruction ; modifies other instructions
(b) nop-B No-operation instruction ; modifies other instructions
(c) nop-C No-operation instruction ; modifies other instructions
(d) if-n-equ Test if two registers contain equal values
(e) if-less Test if one register contains a lesser value than another
(f) pop Remove a number from a stack and place it in a register
(g) push Copy the value of a register onto the top of a stack
(h) swap-stk Toggle the active stack
(i) swap Swap the contents of two specified registers
(j) shift-r Shift all the bits on a register one to the right
(k) shift-l Shift all the bits on a register one to the left
(l) inc Increment a register
(m) dec Decrement a register
(n) add Calculate the sum of the values in two registers
(o) sub Calculate the difference between the values in two registers
(p) nand Perform a bitwise NAND on the values in two registers
(q) IO Output the value in a register and replace with a new input
(r) h-alloc Allocate memory for an offspring
(s) h-divide Divide off an offspring contained in memory (specified by heads)
(t) h-copy Make a copy of a single instruction in memory (specified by heads)
(u) h-search Find a pattern of nop-instruction in the genome
(v) mov-head Move a head to point to the same position as the flow-head
(w) jmp-head Move a head by a fixed amount stored in a register
(x) get-head Write the position of a specified head into a register
(y) if-label Test if a specified pattern of nops has recently been copied
(z) set-flow Move the flow-head to a specified position in memory

From the Supplementary Information for an article by Lenski, Ofria, Pennock & Adami on "The Evolutionary Origin of Complex Features" that appeared in Nature (8 May 2003), vol 423, pp 139-144.