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.
- 1 Memory and numbers
- 2 Language description
- 3 Flow control
- 4 I/O
- 5 Superfluous features
- 6 The ISCOM Interpreter
- 7 Examples
- 8 See Also
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,
$, which will be discussed later.
The code consists of a space-separated series of commands, which are divided into 3 parts—assignments, operations, and conditionals.
These are in this form:
b are any number. Cell
a is set to
These are of this form:
b are numbers, and
x is an operator. They set
a x b. Valid operators are:
||division, round down|
The last part can be chained, like this:
x is applied to the result of each previous operation.
These are of this form:
b are numbers, and
x is one of the above operators. If the result of
a x b is zero, the next command is skipped.
The 'special' number
# represents the instruction pointer. Set it to change where the IP is.
@ represents the I/O stream. The number
$ represents the current I/O port.
@ to display output, and get the value of
@ to get input.
$ to get and set the current I/O port. Here is the preinstalled port list:
||Inputs and outputs to the console as characters.|
||Inputs and outputs to the console as numbers.|
||Filename specifier. Send characters to build the name of the file to open. Send a newline to clear the buffer.|
||File seeking. Send the number of where you want to seek. Get its value to find where you are in the file.|
|| Writes and reads to the file as characters. Returns |
|| Writes and reads to the file as numbers. Returns |
|| Socket type. Set to |
||Socket Address. Send characters to build the IP adress of the socket. Send a newline to clear the buffer.|
||Socket Port. Use this to set the port of the socket.|
|| Socket I/O. Use this to receive/send data from the socket. Returns |
||Sleeper. Send the amount of seconds to sleep.|
|| Random number generator. Set it to a value, and access it to get a random number between |
- 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
"abc" -> @='a @='b @='c.
- Anything within
()is ignored. This is effectively a comment system.
- Labels: Any word starting with
;;is a label. If you state
;;LABEL, 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
;;A=100 @=Awill 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.
-f file: This option makes ISCOM get its input from a specified
file, rather than the arguments itself.
-d: Enters debug mode (see below).
Debug mode allows you to debug code interactively. Each command to the debug console is one letter long, and may also take arguments.
|memory location||Get Memory||n/a||Prints the contents of the memory at that location.|
|two memory locations||Get Memory Array||n/a||Prints the contents of the memory between the two locations.|
|Operator||Do Operation||n1 n2||Prints the result of doing the specified operation on the two numbers n1 and n2.|
||Registers||n/a||Prints the contents of the IP, the port, and any tracked variables.|
||Jump||location|| Sets |
||Port||port|| Sets |
||Set Memory||loc value||Sets the memory location at loc to value.|
||List Program||[begin end]||Prints all the commands in the program. If begin is specified, prints the command at begin. If both arguments are specified, prints all the commands in between.|
||Constant||[const value]||If no arguments, prints all the constants. If const is specified, prints the value of const. If both arguments are specified, sets const to value.|
||Go||[break]||Runs the program until the breakpoint at break is reached. If break is not specified, runs through all the program.|
||Quit||n/a||Exits the ISCOM interpreter.|
||Blank state||n/a||Resets the state of the ISCOM program to the beginning.|
||Verbose||n/a||Toggles Verbose Mode. Verbose mode prints tracking data every step ran.|
||Track||label mem||Begins tracking of the memory location at mem, given a text prefix of label. If mem is not specified, clears the track called by label. If no arguments specified, clears all locations being tracked.|
Counts up forever
$=1 ;;LOOP 0=+1 @= $=0 @=10 $=1 #=LOOP
"Hello, world!" @=10
0=99 ;;LOOP $=1 @= $=0 " bottles of beer on the wall," @=10 $=1 @= $=0 " bottles of beer." @=10 "You take one down, pass it around," @=10 0=-1 $=1 @= $=0 " bottles of beer on the wall!" @=10 ?~0 #=LOOP
Writes "Hello, files!" to the file hello.txt.
$=2 "hello.txt" $=4 "Hello, files!"
Sends "From ISCOM Server!" to client forever, using localhost.
$=7 "127.0.0.1" $=8 @=1337 $=0 0=@ $=6 @=1 ;;LOOP $=9 0=@ $=0 @= #=LOOP
$=7 "127.0.0.1" $=8 @=1337 $=6 @=2 $=9 ;;LOOP "From ISCOM Server!" @=10 @=_1 #=LOOP