Minus Basics

Minus Home
What is Minus?
Proof of Concept
Self Interpreter

In the minimalist version of Minus there is only one operator, and that is -=, which subtracts the second argument from the first.

For example if 'd' is 10 and 'e' is 4 then d-=e sets d to 6. Minus allows for the first operand to be any letter and the second operand to be any letter or a series of numbers. It is not actually necessary to accept numbers in addition to variables to become Turing complete, but it just makes the programmer's job easier.

This one operator is not enough to allow the language to do anything useful. It relies on special variables to become Turing complete. Here is a list of the basic special variables.

cLocation of current statement of execution. You can modify it to loop. It is incremented by 1 after every instruction.c-=1An infinite loop.
A-ZCapital letters deference the infinite array. To be Turing complete only 1 is needed, but having more is handy.C-=5Subtract 5 from Memory[p+2] (2 because C is 2 more than A)
pIndex in an infinite array.p-=3;F-=FMoves p to the left 3, making F now point to where C was, so this code would now set F to -8 since it was at -5 from the previous example.
oOutput that byte mod 256.o-=246Prints a newline (ascii value 10).
iInputs a byte and returns it. (EOF = -1)a-=iSame as a-=100 if the user inputs 'd' (ascii value 100).

Note that since the syntax is so simple the -= and ; are not really needed to deduce the meaning of code, they are therefor optional. And actually some unfinished interpreters require they aren't there!

Continue on to some useful extensions

Or see a simple proof that this language is Turing complete