Checkout/Quick reference
Jump to navigation
Jump to search
- Back to Checkout
Command | Arguments | Description |
---|---|---|
Level 1 | ||
nop/1 | - | Waits for a small but positive time. |
discard/1 | a b | Discards b words, starting at a. |
mov/1 | a b | Takes a and stores it in memory location b. |
mov/1 | a b c | Takes a and stores it in memory location c. |
cnvi/1 | a b | Converts the float a to an int and stores it in b. |
cnvi/1 | a b c | Converts the float a to an int and stores it in c. |
cnvf/1 | a b | Converts the int a to a float and stores it in b. |
cnvf/1 | a b c | Converts the int a to a float and stores it in c. |
iszi/1 | a b | If a is the int 0, store 1 in b, 0 otherwise. |
iszi/1 | a b c | If a is the int 0, store 1 in c, 0 otherwise. |
isni/1 | a b | If a is a negative int, store 1 in b, 0 otherwise. |
isni/1 | a b c | If a is a negative int, store 1 in c, 0 otherwise. |
addi/1 | a b | Stores a+b in b as ints. |
addi/1 | a b c | Stores a+b in c as ints. |
subi/1 | a b | Stores a-b in b as ints. |
subi/1 | a b c | Stores a-b in c as ints. |
muli/1 | a b | Stores a*b in b as ints. |
muli/1 | a b c | Stores a*b in c as ints. |
divi/1 | a b | Stores a/b in b as ints, rounding towards 0. |
divi/1 | a b c | Stores a/b in c as ints, rounding towards 0. |
modi/1 | a b | Stores a%b in b as ints. |
modi/1 | a b c | Stores a%b in c as ints. |
andi/1 | a b | Stores a bitwise-and b in b as ints. |
andi/1 | a b c | Stores a bitwise-and b in c as ints. |
iori/1 | a b | Stores a bitwise-or b in b as ints. |
iori/1 | a b c | Stores a bitwise-or b in c as ints. |
xori/1 | a b | Stores a bitwise-xor b in b as ints. |
xori/1 | a b c | Stores a bitwise-xor b in c as ints. |
lshi/1 | a b | Stores a left-shifted by b in b as ints. |
lshi/1 | a b c | Stores a left-shifted by b in c as ints. |
rshi/1 | a b | Stores a right-shifted by b in b as ints. |
rshi/1 | a b c | Stores a right-shifted by b in c as ints. |
addf/1 | a b | Stores a+b in b as floats. |
addf/1 | a b c | Stores a+b in c as floats. |
subf/1 | a b | Stores a-b in b as floats. |
subf/1 | a b c | Stores a-b in c as floats. |
mulf/1 | a b | Stores a*b in b as floats. |
mulf/1 | a b c | Stores a*b in c as floats. |
divf/1 | a b | Stores a/b in b as floats. |
divf/1 | a b c | Stores a/b in c as floats. |
id/1 | a | Writes an int to a that contains the current subunit number in level 1. |
idtwo/1 | a | Writes an int to a that contains the current subunit number in level 2. |
idthree/1 | a | Writes an int to a that contains the current subunit number in level 3. |
abstain/1 | a b | If the memory in a is nonzero, execute b. This is slower than if. |
abstain/1 | a b c | If the memory in a is nonzero, execute b, else execute c. This is slower
than if. |
Level 2 | ||
nop/2 | - | Waits for all the level 1 subunits to synchronise. |
move/2 | a b c | Moves some amount of memory regulated by c from a to b. a and b have to be in level 1 and 3, or
level 3 and 5, or level 1 and 5. |
copy/2 | a b c | Copies some amount of memory regulated by c from a to b. a and b have to be in level 1 and 3,
or level 3 and 5, or level 1 and 5. |
rocopy/2 | a b c | RO-copies some amount of memory regulated by c from a to b. a and b have to be in level 1 and
3, or level 3 and 5, or level 1 and 5. |
discard/2 | a b | Discards b words of memory at location a in level 3. |
id/2 | a | Writes an int to a that contains the current subunit number in level 2. |
if/2 | a b | If a is not 0, execute b. |
if/2 | a b c | If a is not 0, execute b, else execute c. |
while/2 | a b | While a is not 0, execute b. |
Level 3 | ||
nop/3 | - | Waits for all level 2 subunits to synchronise. |
id/3 | a | Writes an int to a that contains the current subunit number in level 3. |
Level 4 | ||
nop/4 | - | Waits for all level 3 subunits to synchronise. This command is profile-
dependent. |
parloop/4 | a b c | Creates a level 3 subunits, each with b level 2 subunits, and executes c on
the level 3 subunits. |
Level 5 | ||
move/5 | a b c | Moves c words from a to b. a and b must be of level 5 or 6. |
copy/5 | a b c | Copies c words from a to b. a and b must be of level 5 or 6. |
rocopy/5 | a b c | RO-copies c words from a to b. a and b must be of level 5 or 6. |
discard/5 | a b | Discards b words at a. |
id/5 | a | Writes an int to a that contains the current subunit number in level 5. |
interleave/5 | a1 a2 a3 ... an | For each argument, creates a level 4 subunit and executes the code on the
said subunit. |
malloc/5 | a b | Allocates b words, and stores the pointer at a. This command is profile-
dependent. |
free/5 | a | Frees the memory created by malloc/5, referenced at a. This command is
profile-dependent. |
in/5 | a | Takes a word of input and stores it at a. This command is profile-
dependent. |
out/5 | a | Takes a word at a and outputs it. This command is profile-dependent. |
Level 6 | ||
nop/6 | - | Waits for all level 5 subunits to synchronise. |
discard/6 | a b | Discards b words at a. |
if/6 | a b | If a is not 0, execute b. |
if/6 | a b c | If a is not 0, execute b, else execute c. |
while/6 | a b | While a is not 0, execute b. |
interleave/6 | (system-dependent) | For each argument, create a new level 5 subunit, and execute the given code. How this command works is system-dependent. |
malloc/6 | a b | Allocates b words, and stores the pointer at a. |
free/6 | a | Frees the memory created by malloc/5, referenced at a. |