| Suffix | Condition | b- (branch) |
b-al (branch+store) |
br- (relative) |
s- (set reg) |
|---|---|---|---|---|---|
| — | unconditional | j | jal | jr | — |
| ▸ Equality & comparison (operands: a, b) | |||||
| -eq | a == b | beq | beqal | breq | seq |
| -ne | a != b | bne | bneal | brne | sne |
| -lt | a < b | blt | bltal | brlt | slt |
| -le | a <= b | ble | bleal | brle | sle |
| -gt | a > b | bgt | bgtal | brgt | sgt |
| -ge | a >= b | bge | bgeal | brge | sge |
| ▸ Zero comparison (operand: a) | |||||
| -eqz | a == 0 | beqz | beqzal | breqz | seqz |
| -nez | a != 0 | bnez | bnezal | brnez | snez |
| -ltz | a < 0 | bltz | bltzal | brltz | sltz |
| -lez | a <= 0 | blez | blezal | brlez | slez |
| -gtz | a > 0 | bgtz | bgtzal | brgtz | sgtz |
| -gez | a >= 0 | bgez | bgezal | brgez | sgez |
| ▸ Approximate equality (operands: a, b, tolerance c) | |||||
| -ap | a ≈ b (within c) | bap | bapal | brap | sap |
| -apz | a ≈ 0 (within b) | bapz | bapzal | brapz | sapz |
| -na | a ≉ b (not approx eq) | bna | bnaal | brna | sna |
| -naz | a ≉ 0 (not approx eq) | bnaz | bnazal | brnaz | snaz |
| ▸ NaN (operand: a) | |||||
| -nan | a is NaN | bnan | — | brnan | snan |
| -nanz | a is not NaN | — | — | — | snanz |
| ▸ Device pin (operand: d = d0–d5 or db) | |||||
| -dns | device d not set | bdns | bdnsal | brdns | sdns |
| -dse | device d is set | bdse | bdseal | brdse | sdse |
b- · Branch to lines- · Set register1 (true) or 0 (false) to first arg. No jump.
sgt r0 temp 300b-al · Branch + save rab- but saves next line in ra. Return with j ra.
beqal r0 0 resetbr- · Relative branchTrue if a and b are within c relative tolerance of each other.
sap r0 100 105 0.05select · Ternaryselect r? a b c — sets r to b if a ≠ 0, else c.
alias name r?|d? — gives a register or device pin a readable name; also labels the screw on the IC housing.
define name num — replaces a name with a fixed number everywhere in the script. Numbers only.
db — built-in device pin for the IC housing itself. Use for direct I/O or debugging.
HASH("Name") — CRC-32 hash of a name. Used as device type (h) or name filter (n) in batch calls.
STR("TEXT") — hex ASCII of a string. Hex literals use $ prefix.
Read from or write to all networked devices matching a type or name hash, without looping.
| lb r? h l m | load from all devices of type hash h |
| lbn r? h n l m | as lb, filtered by name hash n |
| lbs r? h i l m | load slot i from devices of type h |
| lbns r? h n i l m | lbs filtered by name hash n |
| sb h l r? | store to all devices of type hash h |
| sbn h n l r? | as sb, filtered by name hash n |
Modes (m): Average (0) Sum (1) Minimum (2) Maximum (3)
Empty network: Avg=NaN Sum=0 Min=0 Max=−inf
512-value stack per IC. sp = stack pointer (readable/writable).
| push a | write a, increment sp |
| pop r? | read top into r, decrement sp |
| peek r? | read top, sp unchanged |
| poke addr v | write v to local stack[addr] |
| put d? addr v | write to device d's stack[addr] |
| get r? d? addr | read from device d's stack[addr] |
| putd id addr v | put via ReferenceId |
| getd r? id addr | get via ReferenceId |
yield — pause 1 tick (0.5 s). Scripts execute up to 128 lines/tick, then auto-pause until next tick; use yield to pause early.
sleep a — pause for a seconds.
abs ceil floor round trunc sqrt exp log mod pow rand
lerp a b c interpolates from a to b by ratio c (clamped 0–1)
sin cos tan asin acos atan atan2
and or xor nor not
sll srl logical (fills 0s)sla sra arithmetic (preserves sign bit)