ISCOM

ISCOM is an esoteric programming language made by User:iconmaster that stands for Iconmaster's Shameless Clone Of Migol. Needless to say, this language is a close derivative of Migol. Its goal is to be like Migol, but make more dense code.

Memory and numbers
ISCOM has an array of memory cells going forever in one direction. Each cell holds one integer value. Cells start at index 0.

Memory cells can be dereferenced by placing  around the number. Dereferences may be nested arbitrarily. Negative numbers are expressed by placing an  in front of them. There are three 'special' numbers,,  , and  , which will be discussed later.

Language description
The code consists of a space-separated series of commands, which are divided into 3 parts&mdash;assignments, operations, and conditionals.

Assignments
These are in this form: a=b

where  and   are any number. Cell  is set to.

Operations
These are of this form: a=xb where  and   are numbers, and   is an operator. They set  to. Valid operators are:

The last part can be chained, like this: a=xbxcxd... Here  is applied to the result of each previous operation.

Conditionals
These are of this form: ?axb where  and   are numbers, and   is one of the above operators. If the result of  is zero, the next command is skipped.

Flow control
The 'special' number  represents the instruction pointer. Set it to change where the IP is.

I/O
The number  represents the I/O stream. The number  represents the current I/O port. Set  to display output, and get the value of   to get input. Use  to get and set the current I/O port. Here is the preinstalled port list:

Superfluous features

 * To help with output, any character after a  is translated to its character value.
 * All characters between double quotes will be put into output, as by the translation.
 * Anything within  is ignored. This is effectively a comment system.
 * Labels: Any word starting with  is a label. If you state   and state , the program will jump to the instruction after.
 * Constants: Any word starting with  and having an   in it is a named constant. A reference to it will return the value specified, so that   will print.

The ISCOM Interpreter
Found here is the official ISCOM interpreter. This Lua script has several command-line options. It accepts ISCOM code directly from the command line. If no code is provided, it allows you to enter code interactively.

Options

 * : This option makes ISCOM get its input from a specified, rather than the arguments itself.
 * : Enters debug mode (see below).

Debug Mode
Debug mode allows you to debug code interactively. Each command to the debug console is one letter long, and may also take arguments.

Cat
@=@ #=1

Counts up forever
$=1 ;;LOOP 0=+1 @=[0] $=0 @=10 $=1 #=LOOP

Hello world
"Hello, world!" @=10

99 bottles of beer
0=99 ;;LOOP $=1 @=[0] $=0 " bottles of beer on the wall," @=10 $=1 @=[0] $=0 " bottles of beer." @=10 "You take one down, pass it around," @=10 0=-1 $=1 @=[0] $=0 " bottles of beer on the wall!" @=10 ?[0]~0 #=LOOP

File writing
Writes "Hello, files!" to the file hello.txt. $=2 "hello.txt" $=4 "Hello, files!"

Socket writing
Sends "From ISCOM Server!" to client forever, using localhost.

Client: $=7 "127.0.0.1" $=8 @=1337 $=0 0=@ $=6 @=1 ;;LOOP $=9 0=@ $=0 @=[0] #=LOOP Server: $=7 "127.0.0.1" $=8 @=1337 $=6 @=2 $=9 ;;LOOP "From ISCOM Server!" @=10 @=_1 #=LOOP