* Formidicae byte code Formidicae assembly code is assembled into byte code by the Formidicae assembler. Formidicae byte code is a sequence of words. Each word contains sixteen bits in bigendian byte order. States consist of two or more words. The first word contains the state operator and all operands; the remaining words contain the continuation states. A continuation state word specifies the index of the next state that should be followed after the success or failure of an operation. There are two types of operators; simple and conditional. A simple operator (turn, drop, mark, and unmark) will always succeed, and thus is always followed by only one continuation word. Conditional operations (sense, flip, move, pick-up) may fail for various reasons, and are thus followed by a second continuation word to specify the destination of a failed operation. Currently, the most words in a single state may be three, with the given ant instruction set. The four high-order bits in a state operation word contain the opcode. The remaining bits contain the operands to the operator. SENSE 0000__ddmiiiaaaa dd represents the direction -- 00 is HERE, 01 is AHEAD, 10 is LEFT, & 11 is RIGHT --; m tells whether this is testing for a pheromone; iii is the pheromone index if m is set; aaaaaa describe the attribute if m is not set. The remaining two bits are ignored/reserved. The following attributes are defined: 0000 - friend? 0001 - foe? 0010 - friend-with-food? 0011 - foe-with-food? 0100 - home? 0101 - foe-home? 0110 - foe-mark? 0111 - food? 1000 - rock? 1001 - water? Following are two state index words. TURN 0001d___________ d represents the direction; 0 is LEFT & 1 is RIGHT. Following is one state index word. MOVE 0010____________ PICK-UP 0011____________ No operands. Following are two state index words. DROP 0100____________ No operands. Following is one state index word. MARK 0101aaaaaaaaaiii UNMARK 0110_________iii iii is the index of the pheromone flag, aaa is the amount of pheromone. Following is one state index word. FLIP 0111pppppppppppp [0,pppppppppppp) is the range of the random number to generate to determine which state to jump to. * Filename conventions .ant - Formicidae code .anto - separately compiled Formicidae code .anta - assembly code generated by linking .anto files, equivalent in format to .anto files, except that there are no unresolved state indices as continuations .antc - assembled Formicidae code, suitable for simulating