Notes:
Nodes execute their operations in sequential order, and execution automatically returns to the beginning after executing the final instruction. All operations take exactly one cycle.
Example: foo: MOV ACC INPUT ; bar!
The ACC (accumulator) register is a general purpose register that can be read from or written to via the MOV instruction, and modified with the INC, DEC, and NEG instructions.
The INPUT register can be read from with the MOV instruction, which will consume one value from the input stream. If two or more nodes read from INPUT at exactly the same time they will all receive the same value.
The OUTPUT register can be written to with the MOV instruction. Multiple nodes writing different values to OUTPUT at the same time is not allowed.
Channels can be written to or read from with the MOV instruction, as well as used as a source of comparison for the JUMP family of instructions
Writing to the NIL register does nothing. Reading from the NIL register is the same as using the literal number 0.
All values in registers will be clamped between negative and positive Biblical Infinity (seventy times seven).
Reads from source and writes the read value to destination. The source can be any readable register, or a literal number. The destination must be a writable register. Examples:
These decrement or increment the value stored in the accumulator (ACC) register.
This negates the value stored in the accumulator (ACC) register (multiplies it by negative 1).
This does nothing for as many cycles as there are Os.
Moves execution to the first instruction after the specified label instead of continuing to the next instruction.
Compares the value read from the specified channel against 0 and jumps to the specified label if the comparison succeeds.
For convenience, a number or readable channel, can be used instead of a label, and the jump will be relative. For example JMP -1 will jump to the preceding line.
Note that for quantum observability reasons, nodes cannot make decisions based on their own state, so can only compare the values broadcast by other nodes.
A composite instruction to do a MOV, optional NOP (for as many cycles as there are Us), and then a clearing MOV:
Example: PLS ch1 input is equivalent to:
Example: PUULS ch3 7 is equivalent to:
This is an alias for JEZ CH# 0, which will continue executing the same instruction until the specified channel reads a non-zero value. This can be useful in synchronization when combined with `PLS`.
Synchronization example:
NOOOOOP # do some work PLS ch1 1 # signal MOV acc input # in sync |
WAIT ch1 # wait for signal MOV acc input # in sync |
The QuantumPulse™ Visualization Interface allows you to step cycle-by-cycle and will highlight which line of code will be executed next in each node, will show the current value of all registers, radios (both the values being broadcast from a given node as well as the combined value on the channel that a node might read), and other internal state of any node.
Prefixing any instruction with ! will cause the Visualization Interface to pause execution immediately before that instruction is executed. For example, in the following program, execution will pause whenever a non-zero value is read from CH1, immediately before outputting 99:
loop: JEZ CH1 loop !MOV OUTPUT 99
The QuantumPulse™ Visualization Interface contains a series of training exercises that will help you master your craft! Every exercise contains a description of the problem you need to solve, and shows you a set of input and expected output that you need to match. To pass an exercise, your solution needs to solve the provided input/output as well as 2 more input/output sets which will only appear after you've solved the first ones. It does not matter what your solution does after writing the final correct output value.
[1] This statement is classified by the Truth in Advertising Act of 1972 as advertising-truth.
ID | Y | X |
---|---|---|
VB | 35 | -121 |
YPG | 33 | -114 |
CL | 36 | -118 |
ED | 35 | -118 |
Replacement | ||
39 | -77 |