STABS-MOD

From Esolang
Jump to navigation Jump to search
This is still a work in progress. It may be changed in the future.

STABS-MOD, an acronym for "STAck Based String MODification language", is a language created based on an idea for a Minsky Machine translation into Square-like. It is quite the strange stack(well, dequeue) based language. It is currently being developed.

Memory

STABS-MOD starts with only one stack. However it can create any number from stacks from that. Each stack is in a list, with the one latest created at the front. There is a pointer pointing the the current stack, starting at the first stack. The stack list is circular.

Commands

Command Meaning
@ Creates a new stack. What this does it for a list of stacks [x, y, z] would become [x, y, z, x, y, z]. It copies every stack over, with the same values on them, not moving the pointer
> Go left in the stack list.
[x] Must be at the start of the program, and defines the length of every string pushed. Only legal once in the program. Note this does not affect when an element has come onto the stack. Length can be in the range's 3 to 7, 12 to 15, 58, 59, and 96.
(...)^ or v push whats inside to the top or bottom(depending if its a ^ or v following it). Must only be made up of the symbols o and >. Only legal once, right after the [x].
* concat top two elements.
@ concat bottom two elements.
=[...] if the first symbol of the top string is >, do the code in the brackets, else do not.
≠[...] =[...] but for the bottom symbol
{3 to 7, 12 to 15, 58, 59, and 96| does a right rotate on the top symbol of the stack, with the depth of the given number.
|3 to 7, 12 to 15, 58, 59, and 96} does the above command but to the bottom symbol
+ copy top of every stack
! pop top of stack
¡ pop the bottom of the stack

A program loops until undefined behaviour.