SLOW ACV MAMMALIAN

From Esolang
Jump to: navigation, search

SLOW ACV MAMMALIAN is a language devised thrown together in 2012, in the space of a couple of hours, by user:tzxn3. It operates with an information pointer and a series of twenty-three "arrays", each of which can contain an unbounded number of cells/variables. Each cell can store any value from 0-255. The pointer points at a specific array rather than a specific cell: it cannot trivially target an arbitrary cell. Variable x exists independently of the arrays and pointer, and is special in that the value it can store is unbounded.

What can be done in this language remains to be seen. Expect an interpreter soon when the author feels like debugging his horrible code.

There are ten instructions in SLOW ACV MAMMALIAN, none of which take any arguments.

Before any program is run, the environment is initialised so that every array contains a single null item and x = 0.

Command Description
SEED where arrayi is a given array (0 >= i <= 22), add (i + 1) to the first value in the array, and repeat for all 23 arrays
EXCRETE push value of variable x (modulo 255) to the top of the array under the pointer, set variable x to 0
CONSUME remove value from centre of the array under the pointer and put its value in variable x; if there is an even number of values in the array, choose the first of the two central values
FISSION remove value from centre of current array, divide it by two, copy the result to the start and end of the current array
SPRINT move the pointer the number of spaces to the right corresponding to the value stored in the (value in x)th variable in the array under the pointer; if the array has less than x variables, treat this as a NOP; if array 22 is passed, then wrap around
LEAPFROG if the last value in the array under the pointer is not 0, jump to the (x - first value in array)th instruction in the program
DIGEST perform bitwise XOR with arguments being value in x and the sum of all values in the array under the pointer; store result in x
CONFLAGRATE consider all stacks concatenated as a list (starts at beginning of array 0 and ends at end of array 22); let n be the number of variables in all of the stacks combined; let ai be a variable at position i in the list; if ai > a(n - i), do ai / a(n - i), truncate the result, subtract it from variable ai and add it to variable a(n - i); if ai < a(n - i), do a(n - i) modulo ai, add it to variable ai and subtract it from variable a(n - i); repeat until halfway down the list; put the values resulting variables in the list back into the equivalent variables in the stacks
ACCEPT take an ASCII character from input, XOR its value with x, push the result onto the top of array 0
PRONOUNCE print ASCII character corresponding to x modulo 255