<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://stationeers-wiki.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Veriszg</id>
	<title>Stationeers Community Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://stationeers-wiki.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Veriszg"/>
	<link rel="alternate" type="text/html" href="https://stationeers-wiki.com/Special:Contributions/Veriszg"/>
	<updated>2026-04-05T02:19:39Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://stationeers-wiki.com/index.php?title=IC10/instructions&amp;diff=25503</id>
		<title>IC10/instructions</title>
		<link rel="alternate" type="text/html" href="https://stationeers-wiki.com/index.php?title=IC10/instructions&amp;diff=25503"/>
		<updated>2026-01-12T21:24:02Z</updated>

		<summary type="html">&lt;p&gt;Veriszg: /* Bitwise */ confirmed &amp;quot;ins&amp;quot; command bugged in stable, but correct in beta, updated desc&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
See [[IC10]] for the primary page for the IC10 instruction set. This page lists all available instructions&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Utility ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=alias|description=Labels register or device reference with name, device references also affect what shows on the screws on the IC base.|syntax=alias str r?{{!}}d?&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
alias dAutoHydro1 d0&lt;br /&gt;
alias vTemperature r0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=define|description=Creates a label that will be replaced throughout the program with the provided value.|syntax=define str num&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
define ultimateAnswer 42&lt;br /&gt;
move r0 ultimateAnswer # Store 42 in register 0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=hcf|description=Halt and catch fire|syntax=hcf}}&lt;br /&gt;
{{ICInstruction|instruction=sleep|description=Pauses execution on the IC for a seconds|syntax=sleep a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=yield|description=Pauses execution for 1 tick|syntax=yield}}&lt;br /&gt;
&lt;br /&gt;
== Mathematical ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=abs|description=Register = the absolute value of a|syntax=abs r? a(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
define negativeNumber -10&lt;br /&gt;
abs r0 negativeNumber # Compute the absolute value of -10 and store it in register 0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=add|description=Register = a + b.|syntax=add r? a(r?{{!}}num) b(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|add r0 r0 1 # increment r0 by one}}&lt;br /&gt;
{{ICCode|&lt;br /&gt;
define num1 10&lt;br /&gt;
define num2 20&lt;br /&gt;
add r0 num1 num2 # Add 10 and 20 and store the result in register 0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=ceil|description=Register = smallest integer greater than a|syntax=ceil r? a(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
define floatNumber 10.3&lt;br /&gt;
ceil r0 floatNumber # Compute the ceiling of 10.3 and store it in register 0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=div|description=Register = a / b|syntax=div r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=pow|description=Stores the result of raising a to the power of b in the register. Follows IEEE-754 standard for floating point arithmetic.|syntax=pow r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=exp|description=exp(a) or e^a|syntax=exp r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=floor|description=Register = largest integer less than a|syntax=floor r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=log|description=base e log(a) or ln(a)|syntax=log r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=max|description=Register = max of a or b|syntax=max r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=min|description=Register = min of a or b|syntax=min r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=mod|description=Register = a mod b (note: NOT a % b)|syntax=mod r? a(r?{{!}}num) b(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
mod r0 10 20 # Expected: r0 = 10&lt;br /&gt;
mod r1 22 20 # Expected: r1 = 2&lt;br /&gt;
mod r2 22 -20 # Expected: r2 = 18&lt;br /&gt;
mod r2 22 -10 # Expected: r2 = 18&lt;br /&gt;
mod r2 -7 4 # Expected: r2 = 1&lt;br /&gt;
mod r2 -7 9 # Expected: r2 = 2&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=move|description=Register = provided num or register value.|syntax=move r? a(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|move r0 42 # Store 42 in register 0}}}}&lt;br /&gt;
{{ICInstruction|instruction=mul|description=Register = a * b|syntax=mul r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=rand|description=Register = a random value x with 0 &amp;lt;= x &amp;lt; 1|syntax=rand r?}}&lt;br /&gt;
{{ICInstruction|instruction=round|description=Register = a rounded to nearest integer|syntax=round r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sqrt|description=Register = square root of a|syntax=sqrt r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sub|description=Register = a - b.|syntax=sub r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=trunc|description=Register = a with fractional part removed|syntax=trunc r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=lerp|description=Linearly interpolates between a and b by the ratio c, and places the result in the register provided. The ratio c will be clamped between 0 and 1.|syntax=lerp r? a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
=== Mathematical / Trigonometric ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=acos|description=Returns the angle (radians) whos cos is the specified value|syntax=acos r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=asin|description=Returns the angle (radians) whos sine is the specified value|syntax=asin r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=atan|description=Returns the angle (radians) whos tan is the specified value|syntax=atan r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=atan2|description=Returns the angle (radians) whose tangent is the quotient of two specified values: a (y) and b (x)|syntax=atan2 r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=cos|description=Returns the cosine of the specified angle (radians)|syntax=cos r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sin|description=Returns the sine of the specified angle (radians)|syntax=sin r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=tan|description=Returns the tan of the specified angle (radians) |syntax=tan r? a(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
== Stack ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=clr|description=Clears the stack memory for the provided device.|syntax=clr d?}}&lt;br /&gt;
{{ICInstruction|instruction=clrd|description=Seeks directly for the provided device id and clears the stack memory of that device|syntax=clrd id(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=get|description=Using the provided device, attempts to read the stack value at the provided address, and places it in the register.|syntax=get r? device(d?{{!}}r?{{!}}id) address(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=getd|description=Seeks directly for the provided device id, attempts to read the stack value at the provided address, and places it in the register.|syntax=getd r? id(r?{{!}}id) address(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=peek|description=Register = the value at the top of the stack|syntax=peek r?}}&lt;br /&gt;
{{ICInstruction|instruction=poke|description=Stores the provided value at the provided address in the stack.|syntax=poke address(r?{{!}}num) value(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=pop|description=Register = the value at the top of the stack and decrements sp|syntax=pop r?}}&lt;br /&gt;
{{ICInstruction|instruction=push|description=Pushes the value of a to the stack at sp and increments sp|syntax=push a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=put|description=Using the provided device, attempts to write the provided value to the stack at the provided address.|syntax=put device(d?{{!}}r?{{!}}id) address(r?{{!}}num) value(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=putd|description=Seeks directly for the provided device id, attempts to write the provided value to the stack at the provided address.|syntax=putd id(r?{{!}}id) address(r?{{!}}num) value(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
== Slot/Logic ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=l|description=Loads device LogicType to register by housing index value.|syntax=l r? device(d?{{!}}r?{{!}}id) logicType&lt;br /&gt;
|example=&lt;br /&gt;
Read from the device on d0 into register 0&lt;br /&gt;
{{ICCode|l r0 d0 Setting}}&lt;br /&gt;
Read the pressure from a sensor&lt;br /&gt;
{{ICCode|l r1 d5 Pressure}}&lt;br /&gt;
This also works with aliases. For example:&lt;br /&gt;
{{ICCode|&lt;br /&gt;
alias Sensor d0&lt;br /&gt;
l r0 Sensor Temperature&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=lr|description=Loads reagent of device&#039;s ReagentMode where a hash of the reagent type to check for. ReagentMode can be either Contents (0), Required (1), Recipe (2). Can use either the word, or the number.|syntax=lr r? device(d?{{!}}r?{{!}}id) reagentMode int}}&lt;br /&gt;
{{ICInstruction|instruction=ls|description=Loads slot LogicSlotType on device to register.|syntax=ls r? device(d?{{!}}r?{{!}}id) slotIndex logicSlotType&lt;br /&gt;
|example=&lt;br /&gt;
Read from the second slot of device on d0, stores 1 in r0 if it&#039;s occupied, 0 otherwise.&lt;br /&gt;
{{ICCode|ls r0 d0 2 Occupied}}&lt;br /&gt;
And here is the code to read the charge of an AIMeE:&lt;br /&gt;
{{ICCode|&lt;br /&gt;
alias robot d0&lt;br /&gt;
alias charge r10&lt;br /&gt;
ls charge robot 0 Charge&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=s|description=Stores register value to LogicType on device by housing index value.|syntax=s device(d?{{!}}r?{{!}}id) logicType r?&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
s d0 Setting r0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=ss|description=Stores register value to device stored in a slot LogicSlotType on device.|syntax=ss device(d?{{!}}r?{{!}}id) slotIndex logicSlotType r?}}&lt;br /&gt;
{{ICInstruction|instruction=rmap|description=Given a reagent hash, store the corresponding prefab hash that the device expects to fulfill the reagent requirement. For example, on an autolathe, the hash for Iron will store the hash for ItemIronIngot.|syntax=rmap r? d? reagentHash(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
=== Slot/Logic / Batched ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=lb|description=Loads LogicType from all output network devices with provided type hash using the provide batch mode. Average (0), Sum (1), Minimum (2), Maximum (3). Can use either the word, or the number.|syntax=lb r? deviceHash logicType batchMode&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|lb r0 HASH(&amp;quot;StructureWallLight&amp;quot;) On Sum}}}}&lt;br /&gt;
{{ICInstruction|instruction=lbn|description=Loads LogicType from all output network devices with provided type and name hashes using the provide batch mode. Average (0), Sum (1), Minimum (2), Maximum (3). Can use either the word, or the number.|syntax=lbn r? deviceHash nameHash logicType batchMode}}&lt;br /&gt;
{{ICInstruction|instruction=lbns|description=Loads LogicSlotType from slotIndex from all output network devices with provided type and name hashes using the provide batch mode. Average (0), Sum (1), Minimum (2), Maximum (3). Can use either the word, or the number.|syntax=lbns r? deviceHash nameHash slotIndex logicSlotType batchMode}}&lt;br /&gt;
{{ICInstruction|instruction=lbs|description=Loads LogicSlotType from slotIndex from all output network devices with provided type hash using the provide batch mode. Average (0), Sum (1), Minimum (2), Maximum (3). Can use either the word, or the number.|syntax=lbs r? deviceHash slotIndex logicSlotType batchMode}}&lt;br /&gt;
{{ICInstruction|instruction=sb|description=Stores register value to LogicType on all output network devices with provided type hash.|syntax=sb deviceHash logicType r?&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|sb HASH(&amp;quot;StructureWallLight&amp;quot;) On 1}}}}&lt;br /&gt;
{{ICInstruction|instruction=sbn|description=Stores register value to LogicType on all output network devices with provided type hash and name.|syntax=sbn deviceHash nameHash logicType r?}}&lt;br /&gt;
{{ICInstruction|instruction=sbs|description=Stores register value to LogicSlotType on all output network devices with provided type hash in the provided slot.|syntax=sbs deviceHash slotIndex logicSlotType r?}}&lt;br /&gt;
&lt;br /&gt;
== Bitwise ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=and|description=Performs a bitwise logical AND operation on the binary representation of two values. Each bit of the result is determined by evaluating the corresponding bits of the input values. If both bits are 1, the resulting bit is set to 1. Otherwise the resulting bit is set to 0.|syntax=and r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=nor|description=Performs a bitwise logical NOR (NOT OR) operation on the binary representation of two values. Each bit of the result is determined by evaluating the corresponding bits of the input values. If both bits are 0, the resulting bit is set to 1. Otherwise, if at least one bit is 1, the resulting bit is set to 0.|syntax=nor r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=not|description=Performs a bitwise logical NOT operation flipping each bit of the input value, resulting in a binary complement. If a bit is 1, it becomes 0, and if a bit is 0, it becomes 1.|syntax=not r? a(r?{{!}}num)&lt;br /&gt;
|note=&lt;br /&gt;
This is a bitwise operation, the NOT of 1 =&amp;gt; -2, etc. You may want to use seqz instead}}&lt;br /&gt;
{{ICInstruction|instruction=or|description=Performs a bitwise logical OR operation on the binary representation of two values. Each bit of the result is determined by evaluating the corresponding bits of the input values. If either bit is 1, the resulting bit is set to 1. If both bits are 0, the resulting bit is set to 0.|syntax=or r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sla|description=Performs a bitwise arithmetic left shift operation on the binary representation of a value. It shifts the bits to the left and fills the vacated rightmost bits with zeros (note that this is indistinguishable from &#039;sll&#039;).|syntax=sla r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sll|description=Performs a bitwise logical left shift operation on the binary representation of a value. It shifts the bits to the left and fills the vacated rightmost bits with zeros.|syntax=sll r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sra|description=Performs a bitwise arithmetic right shift operation on the binary representation of a value. It shifts the bits to the right and fills the vacated leftmost bits with a copy of the sign bit (the most significant bit).|syntax=sra r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=srl|description=Performs a bitwise logical right shift operation on the binary representation of a value. It shifts the bits to the right and fills the vacated leftmost bits with zeros|syntax=srl r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=xor|description=Performs a bitwise logical XOR (exclusive OR) operation on the binary representation of two values. Each bit of the result is determined by evaluating the corresponding bits of the input values. If the bits are different (one bit is 0 and the other is 1), the resulting bit is set to 1. If the bits are the same (both 0 or both 1), the resulting bit is set to 0.|syntax=xor r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=ext|description=Extracts a bit field from source value, beginning at bit offset for length bits and places result in the provided register. Payload cannot exceed 53 bits in final length.|syntax=ext r? source(r?{{!}}num) offset(r?{{!}}num) length(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=ins|description=Inserts a bit field into the provided register, beginning at bit offset for length bits. Payload cannot exceed 53 bits in final length. NOTE: As of 2026-01-12, stable version has a bug with parameter order (uses offset-length-field instead of field-offset-length). Beta version has correct order.&lt;br /&gt;
|syntax=ins r? field(r?{{!}}num) offset(r?{{!}}num) length(r?{{!}}num)&lt;br /&gt;
|example= &lt;br /&gt;
{{ICCode|move r0 $DE0000EF&lt;br /&gt;
move r1 $ADBE&lt;br /&gt;
ins r0 r1 8 16 #inserts field r1 at bit 8 for 16 bits, result: $DEADBEEF}}}}&lt;br /&gt;
&lt;br /&gt;
== Comparison ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=select|description=Register = b if a is non-zero, otherwise c|syntax=select r? a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
&amp;lt;b&amp;gt;1)&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
move r0 &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;quot;&amp;gt;0&amp;lt;/s&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
select &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;gt;r1&amp;lt;/s&amp;gt; r0 10 &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;gt;200&amp;lt;/s&amp;gt;&lt;br /&gt;
{{ICCode|&lt;br /&gt;
move r0 0&lt;br /&gt;
select r1 r0 10 200&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;br/&amp;gt;after run, &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;quot;&amp;gt;r1 = 200&amp;lt;/s&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;b&amp;gt;2)&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
move r0 &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;quot;&amp;gt;5&amp;lt;/s&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
select &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;gt;r1&amp;lt;/s&amp;gt; r0 &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;gt;10&amp;lt;/s&amp;gt; 200&lt;br /&gt;
{{ICCode|&lt;br /&gt;
move r0 1&lt;br /&gt;
select r1 r0 10 100&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;br/&amp;gt;after run, &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;quot;&amp;gt;r1 = 10&amp;lt;/s&amp;gt;&lt;br /&gt;
|note=&lt;br /&gt;
This operation can be used as a simple ternary condition}}&lt;br /&gt;
&lt;br /&gt;
=== Comparison / Device Pin ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=sdns|description=Register = 1 if device is not set, otherwise 0|syntax=sdns r? device(d?{{!}}r?{{!}}id)}}&lt;br /&gt;
{{ICInstruction|instruction=sdse|description=Register = 1 if device is set, otherwise 0.|syntax=sdse r? device(d?{{!}}r?{{!}}id)}}&lt;br /&gt;
&lt;br /&gt;
=== Comparison / Value ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=sap|description=Register = 1 if abs(a - b) &amp;lt;= max(c * max(abs(a), abs(b)), float.epsilon * 8), otherwise 0|syntax=sap r? a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
Set register to 1 if a and b are close enough to each other with the scaling factor of c. Equivalent to Python [https://docs.python.org/3/library/math.html#math.isclose math.isclose]}}&lt;br /&gt;
{{ICInstruction|instruction=sapz|description=Register = 1 if abs(a) &amp;lt;= max(b * abs(a), float.epsilon * 8), otherwise 0|syntax=sapz r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=seq|description=Register = 1 if a == b, otherwise 0|syntax=seq r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=seqz|description=Register = 1 if a == 0, otherwise 0|syntax=seqz r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sge|description=Register = 1 if a &amp;gt;= b, otherwise 0|syntax=sge r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sgez|description=Register = 1 if a &amp;gt;= 0, otherwise 0|syntax=sgez r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sgt|description=Register = 1 if a &amp;gt; b, otherwise 0|syntax=sgt r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sgtz|description=Register = 1 if a &amp;gt; 0, otherwise 0|syntax=sgtz r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sle|description=Register = 1 if a &amp;lt;= b, otherwise 0|syntax=sle r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=slez|description=Register = 1 if a &amp;lt;= 0, otherwise 0|syntax=slez r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=slt|description=Register = 1 if a &amp;lt; b, otherwise 0|syntax=slt r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sltz|description=Register = 1 if a &amp;lt; 0, otherwise 0|syntax=sltz r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sna|description=Register = 1 if abs(a - b) &amp;gt; max(c * max(abs(a), abs(b)), float.epsilon * 8), otherwise 0|syntax=sna r? a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=snan|description=Register = 1 if a is NaN, otherwise 0|syntax=snan r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=snanz|description=Register = 0 if a is NaN, otherwise 1|syntax=snanz r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=snaz|description=Register = 1 if abs(a) &amp;gt; max(b * abs(a), float.epsilon), otherwise 0|syntax=snaz r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sne|description=Register = 1 if a != b, otherwise 0|syntax=sne r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=snez|description=Register = 1 if a != 0, otherwise 0|syntax=snez r? a(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
== Branching ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=j|description=Jump execution to line a|syntax=j int&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|j 0 # jump line 0}}&lt;br /&gt;
{{ICCode|&lt;br /&gt;
j label # jump to a label&lt;br /&gt;
&lt;br /&gt;
label:&lt;br /&gt;
# your code here&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=jal|description=Jump execution to line a and store next line number in ra|syntax=jal int&lt;br /&gt;
|example=&lt;br /&gt;
jal provides a way to do function calls in IC10 mips&lt;br /&gt;
&lt;br /&gt;
{{ICCode|&lt;br /&gt;
move r0 1000&lt;br /&gt;
move r1 0&lt;br /&gt;
start:&lt;br /&gt;
jal average&lt;br /&gt;
s db Setting r0&lt;br /&gt;
yield&lt;br /&gt;
j start&lt;br /&gt;
&lt;br /&gt;
average:&lt;br /&gt;
add r0 r0 r1&lt;br /&gt;
div r0 r0 2&lt;br /&gt;
j ra # jump back&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=jr|description=Relative jump to line a|syntax=jr int}}&lt;br /&gt;
&lt;br /&gt;
=== Branching / Device Pin ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=bdnvl|description=Will branch to line a if the provided device not valid for a load instruction for the provided logic type.|syntax=bdnvl device(d?{{!}}r?{{!}}id) logicType a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bdnvs|description=Will branch to line a if the provided device not valid for a store instruction for the provided logic type.|syntax=bdnvs device(d?{{!}}r?{{!}}id) logicType a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bdns|description=Branch to line a if device d isn&#039;t set|syntax=bdns d? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bdnsal|description=Jump execution to line a and store next line number if device is not set|syntax=bdnsal d? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bdse|description=Branch to line a if device d is set|syntax=bdse d? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bdseal|description=Jump execution to line a and store next line number if device is set|syntax=bdseal d? a(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
#Store line number and jump to line 32 if d0 is assigned.&lt;br /&gt;
bdseal d0 32&lt;br /&gt;
}}&lt;br /&gt;
{{ICCode|&lt;br /&gt;
#Store line in ra and jump to label HarvestCrop if device d0 is assigned.&lt;br /&gt;
bdseal d0 HarvestCrop&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=brdns|description=Relative branch to line a if device is not set|syntax=brdns d? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brdse|description=Relative branch to line a if device is set|syntax=brdse d? a(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
=== Branching / Comparison ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=bap|description=Branch to line d if abs(a - b) &amp;lt;= max(c * max(abs(a), abs(b)), float.epsilon * 8)|syntax=bap a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
Branch if a and b are close enough to each other with the scaling factor of c. Equivalent to Python [https://docs.python.org/3/library/math.html#math.isclose math.isclose]}}&lt;br /&gt;
{{ICInstruction|instruction=brap|description=Relative branch to line d if abs(a - b) &amp;lt;= max(c * max(abs(a), abs(b)), float.epsilon * 8)|syntax=brap a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bapal|description=Branch to line c if a != b and store next line number in ra|syntax=bapal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bapz|description=Branch to line c if abs(a) &amp;lt;= max(b * abs(a), float.epsilon * 8)|syntax=bapz a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brapz|description=Relative branch to line c if abs(a) &amp;lt;= max(b * abs(a), float.epsilon * 8)|syntax=brapz a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bapzal|description=Branch to line c if abs(a) &amp;lt;= max(b * abs(a), float.epsilon * 8) and store next line number in ra|syntax=bapzal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=beq|description=Branch to line c if a == b|syntax=beq a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=breq|description=Relative branch to line c if a == b|syntax=breq a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=beqal|description=Branch to line c if a == b and store next line number in ra|syntax=beqal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=beqz|description=Branch to line b if a == 0|syntax=beqz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=breqz|description=Relative branch to line b if a == 0|syntax=breqz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=beqzal|description=Branch to line b if a == 0 and store next line number in ra|syntax=beqzal a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bge|description=Branch to line c if a &amp;gt;= b|syntax=bge a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brge|description=Relative branch to line c if a &amp;gt;= b|syntax=brge a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgeal|description=Branch to line c if a &amp;gt;= b and store next line number in ra|syntax=bgeal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgez|description=Branch to line b if a &amp;gt;= 0|syntax=bgez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brgez|description=Relative branch to line b if a &amp;gt;= 0|syntax=brgez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgezal|description=Branch to line b if a &amp;gt;= 0 and store next line number in ra|syntax=bgezal a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgt|description=Branch to line c if a &amp;gt; b|syntax=bgt a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
An example of a &#039;&#039;&#039;Schmitt&#039;&#039;&#039; trigger, turning on a device if the temperature is too low, and turning it off if it&#039;s too high and finally&lt;br /&gt;
doing nothing if the temperature is within the desired range.&lt;br /&gt;
{{ICCode|&lt;br /&gt;
alias sensor d0&lt;br /&gt;
alias device d1&lt;br /&gt;
&lt;br /&gt;
define mintemp 293.15&lt;br /&gt;
define maxtemp 298.15&lt;br /&gt;
&lt;br /&gt;
start:&lt;br /&gt;
yield&lt;br /&gt;
l r0 sensor Temperature&lt;br /&gt;
# If the temperature &amp;lt; mintemp, turn on the device&lt;br /&gt;
blt r0 mintemp turnOn&lt;br /&gt;
# If the temperature &amp;gt; maxtemp, turn off the device&lt;br /&gt;
bgt r0 maxtemp turnOff&lt;br /&gt;
j start&lt;br /&gt;
&lt;br /&gt;
turnOn:&lt;br /&gt;
s device On 1&lt;br /&gt;
j start&lt;br /&gt;
turnOff:&lt;br /&gt;
s device On 0&lt;br /&gt;
j start&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=brgt|description=relative branch to line c if a &amp;gt; b|syntax=brgt a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgtal|description=Branch to line c if a &amp;gt; b and store next line number in ra|syntax=bgtal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgtz|description=Branch to line b if a &amp;gt; 0|syntax=bgtz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brgtz|description=Relative branch to line b if a &amp;gt; 0|syntax=brgtz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgtzal|description=Branch to line b if a &amp;gt; 0 and store next line number in ra|syntax=bgtzal a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=ble|description=Branch to line c if a &amp;lt;= b|syntax=ble a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brle|description=Relative branch to line c if a &amp;lt;= b|syntax=brle a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bleal|description=Branch to line c if a &amp;lt;= b and store next line number in ra|syntax=bleal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=blez|description=Branch to line b if a &amp;lt;= 0|syntax=blez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brlez|description=Relative branch to line b if a &amp;lt;= 0|syntax=brlez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=blezal|description=Branch to line b if a &amp;lt;= 0 and store next line number in ra|syntax=blezal a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=blt|description=Branch to line c if a &amp;lt; b|syntax=blt a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
An example of a &#039;&#039;&#039;Schmitt&#039;&#039;&#039; trigger, turning on a device if the temperature is too low, and turning it off if it&#039;s too high and finally&lt;br /&gt;
doing nothing if the temperature is within the desired range.&lt;br /&gt;
{{ICCode|&lt;br /&gt;
alias sensor d0&lt;br /&gt;
alias device d1&lt;br /&gt;
&lt;br /&gt;
define mintemp 293.15&lt;br /&gt;
define maxtemp 298.15&lt;br /&gt;
&lt;br /&gt;
start:&lt;br /&gt;
yield&lt;br /&gt;
l r0 sensor Temperature&lt;br /&gt;
# If the temperature &amp;lt; mintemp, turn on the device&lt;br /&gt;
blt r0 mintemp turnOn&lt;br /&gt;
# If the temperature &amp;gt; maxtemp, turn off the device&lt;br /&gt;
bgt r0 maxtemp turnOff&lt;br /&gt;
j start&lt;br /&gt;
&lt;br /&gt;
turnOn:&lt;br /&gt;
s device On 1&lt;br /&gt;
j start&lt;br /&gt;
turnOff:&lt;br /&gt;
s device On 0&lt;br /&gt;
j start&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=brlt|description=Relative branch to line c if a &amp;lt; b|syntax=brlt a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bltal|description=Branch to line c if a &amp;lt; b and store next line number in ra|syntax=bltal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bltz|description=Branch to line b if a &amp;lt; 0|syntax=bltz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brltz|description=Relative branch to line b if a &amp;lt; 0|syntax=brltz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bltzal|description=Branch to line b if a &amp;lt; 0 and store next line number in ra|syntax=bltzal a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bna|description=Branch to line d if abs(a - b) &amp;gt; max(c * max(abs(a), abs(b)), float.epsilon * 8)|syntax=bna a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brna|description=Relative branch to line d if abs(a - b) &amp;gt; max(c * max(abs(a), abs(b)), float.epsilon * 8)|syntax=brna a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnaal|description=Branch to line d if abs(a - b) &amp;lt;= max(c * max(abs(a), abs(b)), float.epsilon * 8) and store next line number in ra|syntax=bnaal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnan|description=Branch to line b if a is not a number (NaN)|syntax=bnan a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brnan|description=Relative branch to line b if a is not a number (NaN)|syntax=brnan a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnaz|description=Branch to line c if abs(a) &amp;gt; max (b * abs(a), float.epsilon * 8)|syntax=bnaz a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brnaz|description=Relative branch to line c if abs(a) &amp;gt; max(b * abs(a), float.epsilon * 8)|syntax=brnaz a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnazal|description=Branch to line c if abs(a) &amp;gt; max (b * abs(a), float.epsilon * 8) and store next line number in ra|syntax=bnazal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bne|description=Branch to line c if a != b|syntax=bne a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brne|description=Relative branch to line c if a != b|syntax=brne a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bneal|description=Branch to line c if a != b and store next line number in ra|syntax=bneal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnez|description=branch to line b if a != 0|syntax=bnez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brnez|description=Relative branch to line b if a != 0|syntax=brnez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnezal|description=Branch to line b if a != 0 and store next line number in ra|syntax=bnezal a(r?{{!}}num) b(r?{{!}}num)}}&lt;/div&gt;</summary>
		<author><name>Veriszg</name></author>
	</entry>
	<entry>
		<id>https://stationeers-wiki.com/index.php?title=IC10/instructions&amp;diff=25502</id>
		<title>IC10/instructions</title>
		<link rel="alternate" type="text/html" href="https://stationeers-wiki.com/index.php?title=IC10/instructions&amp;diff=25502"/>
		<updated>2026-01-12T21:03:22Z</updated>

		<summary type="html">&lt;p&gt;Veriszg: /* Bitwise */ ext&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
See [[IC10]] for the primary page for the IC10 instruction set. This page lists all available instructions&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Utility ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=alias|description=Labels register or device reference with name, device references also affect what shows on the screws on the IC base.|syntax=alias str r?{{!}}d?&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
alias dAutoHydro1 d0&lt;br /&gt;
alias vTemperature r0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=define|description=Creates a label that will be replaced throughout the program with the provided value.|syntax=define str num&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
define ultimateAnswer 42&lt;br /&gt;
move r0 ultimateAnswer # Store 42 in register 0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=hcf|description=Halt and catch fire|syntax=hcf}}&lt;br /&gt;
{{ICInstruction|instruction=sleep|description=Pauses execution on the IC for a seconds|syntax=sleep a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=yield|description=Pauses execution for 1 tick|syntax=yield}}&lt;br /&gt;
&lt;br /&gt;
== Mathematical ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=abs|description=Register = the absolute value of a|syntax=abs r? a(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
define negativeNumber -10&lt;br /&gt;
abs r0 negativeNumber # Compute the absolute value of -10 and store it in register 0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=add|description=Register = a + b.|syntax=add r? a(r?{{!}}num) b(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|add r0 r0 1 # increment r0 by one}}&lt;br /&gt;
{{ICCode|&lt;br /&gt;
define num1 10&lt;br /&gt;
define num2 20&lt;br /&gt;
add r0 num1 num2 # Add 10 and 20 and store the result in register 0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=ceil|description=Register = smallest integer greater than a|syntax=ceil r? a(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
define floatNumber 10.3&lt;br /&gt;
ceil r0 floatNumber # Compute the ceiling of 10.3 and store it in register 0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=div|description=Register = a / b|syntax=div r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=pow|description=Stores the result of raising a to the power of b in the register. Follows IEEE-754 standard for floating point arithmetic.|syntax=pow r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=exp|description=exp(a) or e^a|syntax=exp r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=floor|description=Register = largest integer less than a|syntax=floor r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=log|description=base e log(a) or ln(a)|syntax=log r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=max|description=Register = max of a or b|syntax=max r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=min|description=Register = min of a or b|syntax=min r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=mod|description=Register = a mod b (note: NOT a % b)|syntax=mod r? a(r?{{!}}num) b(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
mod r0 10 20 # Expected: r0 = 10&lt;br /&gt;
mod r1 22 20 # Expected: r1 = 2&lt;br /&gt;
mod r2 22 -20 # Expected: r2 = 18&lt;br /&gt;
mod r2 22 -10 # Expected: r2 = 18&lt;br /&gt;
mod r2 -7 4 # Expected: r2 = 1&lt;br /&gt;
mod r2 -7 9 # Expected: r2 = 2&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=move|description=Register = provided num or register value.|syntax=move r? a(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|move r0 42 # Store 42 in register 0}}}}&lt;br /&gt;
{{ICInstruction|instruction=mul|description=Register = a * b|syntax=mul r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=rand|description=Register = a random value x with 0 &amp;lt;= x &amp;lt; 1|syntax=rand r?}}&lt;br /&gt;
{{ICInstruction|instruction=round|description=Register = a rounded to nearest integer|syntax=round r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sqrt|description=Register = square root of a|syntax=sqrt r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sub|description=Register = a - b.|syntax=sub r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=trunc|description=Register = a with fractional part removed|syntax=trunc r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=lerp|description=Linearly interpolates between a and b by the ratio c, and places the result in the register provided. The ratio c will be clamped between 0 and 1.|syntax=lerp r? a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
=== Mathematical / Trigonometric ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=acos|description=Returns the angle (radians) whos cos is the specified value|syntax=acos r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=asin|description=Returns the angle (radians) whos sine is the specified value|syntax=asin r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=atan|description=Returns the angle (radians) whos tan is the specified value|syntax=atan r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=atan2|description=Returns the angle (radians) whose tangent is the quotient of two specified values: a (y) and b (x)|syntax=atan2 r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=cos|description=Returns the cosine of the specified angle (radians)|syntax=cos r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sin|description=Returns the sine of the specified angle (radians)|syntax=sin r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=tan|description=Returns the tan of the specified angle (radians) |syntax=tan r? a(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
== Stack ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=clr|description=Clears the stack memory for the provided device.|syntax=clr d?}}&lt;br /&gt;
{{ICInstruction|instruction=clrd|description=Seeks directly for the provided device id and clears the stack memory of that device|syntax=clrd id(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=get|description=Using the provided device, attempts to read the stack value at the provided address, and places it in the register.|syntax=get r? device(d?{{!}}r?{{!}}id) address(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=getd|description=Seeks directly for the provided device id, attempts to read the stack value at the provided address, and places it in the register.|syntax=getd r? id(r?{{!}}id) address(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=peek|description=Register = the value at the top of the stack|syntax=peek r?}}&lt;br /&gt;
{{ICInstruction|instruction=poke|description=Stores the provided value at the provided address in the stack.|syntax=poke address(r?{{!}}num) value(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=pop|description=Register = the value at the top of the stack and decrements sp|syntax=pop r?}}&lt;br /&gt;
{{ICInstruction|instruction=push|description=Pushes the value of a to the stack at sp and increments sp|syntax=push a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=put|description=Using the provided device, attempts to write the provided value to the stack at the provided address.|syntax=put device(d?{{!}}r?{{!}}id) address(r?{{!}}num) value(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=putd|description=Seeks directly for the provided device id, attempts to write the provided value to the stack at the provided address.|syntax=putd id(r?{{!}}id) address(r?{{!}}num) value(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
== Slot/Logic ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=l|description=Loads device LogicType to register by housing index value.|syntax=l r? device(d?{{!}}r?{{!}}id) logicType&lt;br /&gt;
|example=&lt;br /&gt;
Read from the device on d0 into register 0&lt;br /&gt;
{{ICCode|l r0 d0 Setting}}&lt;br /&gt;
Read the pressure from a sensor&lt;br /&gt;
{{ICCode|l r1 d5 Pressure}}&lt;br /&gt;
This also works with aliases. For example:&lt;br /&gt;
{{ICCode|&lt;br /&gt;
alias Sensor d0&lt;br /&gt;
l r0 Sensor Temperature&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=lr|description=Loads reagent of device&#039;s ReagentMode where a hash of the reagent type to check for. ReagentMode can be either Contents (0), Required (1), Recipe (2). Can use either the word, or the number.|syntax=lr r? device(d?{{!}}r?{{!}}id) reagentMode int}}&lt;br /&gt;
{{ICInstruction|instruction=ls|description=Loads slot LogicSlotType on device to register.|syntax=ls r? device(d?{{!}}r?{{!}}id) slotIndex logicSlotType&lt;br /&gt;
|example=&lt;br /&gt;
Read from the second slot of device on d0, stores 1 in r0 if it&#039;s occupied, 0 otherwise.&lt;br /&gt;
{{ICCode|ls r0 d0 2 Occupied}}&lt;br /&gt;
And here is the code to read the charge of an AIMeE:&lt;br /&gt;
{{ICCode|&lt;br /&gt;
alias robot d0&lt;br /&gt;
alias charge r10&lt;br /&gt;
ls charge robot 0 Charge&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=s|description=Stores register value to LogicType on device by housing index value.|syntax=s device(d?{{!}}r?{{!}}id) logicType r?&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
s d0 Setting r0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=ss|description=Stores register value to device stored in a slot LogicSlotType on device.|syntax=ss device(d?{{!}}r?{{!}}id) slotIndex logicSlotType r?}}&lt;br /&gt;
{{ICInstruction|instruction=rmap|description=Given a reagent hash, store the corresponding prefab hash that the device expects to fulfill the reagent requirement. For example, on an autolathe, the hash for Iron will store the hash for ItemIronIngot.|syntax=rmap r? d? reagentHash(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
=== Slot/Logic / Batched ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=lb|description=Loads LogicType from all output network devices with provided type hash using the provide batch mode. Average (0), Sum (1), Minimum (2), Maximum (3). Can use either the word, or the number.|syntax=lb r? deviceHash logicType batchMode&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|lb r0 HASH(&amp;quot;StructureWallLight&amp;quot;) On Sum}}}}&lt;br /&gt;
{{ICInstruction|instruction=lbn|description=Loads LogicType from all output network devices with provided type and name hashes using the provide batch mode. Average (0), Sum (1), Minimum (2), Maximum (3). Can use either the word, or the number.|syntax=lbn r? deviceHash nameHash logicType batchMode}}&lt;br /&gt;
{{ICInstruction|instruction=lbns|description=Loads LogicSlotType from slotIndex from all output network devices with provided type and name hashes using the provide batch mode. Average (0), Sum (1), Minimum (2), Maximum (3). Can use either the word, or the number.|syntax=lbns r? deviceHash nameHash slotIndex logicSlotType batchMode}}&lt;br /&gt;
{{ICInstruction|instruction=lbs|description=Loads LogicSlotType from slotIndex from all output network devices with provided type hash using the provide batch mode. Average (0), Sum (1), Minimum (2), Maximum (3). Can use either the word, or the number.|syntax=lbs r? deviceHash slotIndex logicSlotType batchMode}}&lt;br /&gt;
{{ICInstruction|instruction=sb|description=Stores register value to LogicType on all output network devices with provided type hash.|syntax=sb deviceHash logicType r?&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|sb HASH(&amp;quot;StructureWallLight&amp;quot;) On 1}}}}&lt;br /&gt;
{{ICInstruction|instruction=sbn|description=Stores register value to LogicType on all output network devices with provided type hash and name.|syntax=sbn deviceHash nameHash logicType r?}}&lt;br /&gt;
{{ICInstruction|instruction=sbs|description=Stores register value to LogicSlotType on all output network devices with provided type hash in the provided slot.|syntax=sbs deviceHash slotIndex logicSlotType r?}}&lt;br /&gt;
&lt;br /&gt;
== Bitwise ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=and|description=Performs a bitwise logical AND operation on the binary representation of two values. Each bit of the result is determined by evaluating the corresponding bits of the input values. If both bits are 1, the resulting bit is set to 1. Otherwise the resulting bit is set to 0.|syntax=and r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=nor|description=Performs a bitwise logical NOR (NOT OR) operation on the binary representation of two values. Each bit of the result is determined by evaluating the corresponding bits of the input values. If both bits are 0, the resulting bit is set to 1. Otherwise, if at least one bit is 1, the resulting bit is set to 0.|syntax=nor r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=not|description=Performs a bitwise logical NOT operation flipping each bit of the input value, resulting in a binary complement. If a bit is 1, it becomes 0, and if a bit is 0, it becomes 1.|syntax=not r? a(r?{{!}}num)&lt;br /&gt;
|note=&lt;br /&gt;
This is a bitwise operation, the NOT of 1 =&amp;gt; -2, etc. You may want to use seqz instead}}&lt;br /&gt;
{{ICInstruction|instruction=or|description=Performs a bitwise logical OR operation on the binary representation of two values. Each bit of the result is determined by evaluating the corresponding bits of the input values. If either bit is 1, the resulting bit is set to 1. If both bits are 0, the resulting bit is set to 0.|syntax=or r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sla|description=Performs a bitwise arithmetic left shift operation on the binary representation of a value. It shifts the bits to the left and fills the vacated rightmost bits with zeros (note that this is indistinguishable from &#039;sll&#039;).|syntax=sla r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sll|description=Performs a bitwise logical left shift operation on the binary representation of a value. It shifts the bits to the left and fills the vacated rightmost bits with zeros.|syntax=sll r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sra|description=Performs a bitwise arithmetic right shift operation on the binary representation of a value. It shifts the bits to the right and fills the vacated leftmost bits with a copy of the sign bit (the most significant bit).|syntax=sra r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=srl|description=Performs a bitwise logical right shift operation on the binary representation of a value. It shifts the bits to the right and fills the vacated leftmost bits with zeros|syntax=srl r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=xor|description=Performs a bitwise logical XOR (exclusive OR) operation on the binary representation of two values. Each bit of the result is determined by evaluating the corresponding bits of the input values. If the bits are different (one bit is 0 and the other is 1), the resulting bit is set to 1. If the bits are the same (both 0 or both 1), the resulting bit is set to 0.|syntax=xor r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=ext|description=Extracts a bit field from source value, beginning at bit offset for length bits and places result in the provided register. Payload cannot exceed 53 bits in final length.|syntax=ext r? source(r?{{!}}num) offset(r?{{!}}num) length(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=ins|description=Inserts a bit field into the provided register, beginning at bit offset for length bits. Payload cannot exceed 53 bits in final length. WARNING: Parameters order differs from documentation - offset and length come before field value.&lt;br /&gt;
|syntax=ins r? offset(r?{{!}}num) length(r?{{!}}num) field(r?{{!}}num)&lt;br /&gt;
|example= &lt;br /&gt;
{{ICCode|move r0 $DE0000EF&lt;br /&gt;
move r1 $ADBE&lt;br /&gt;
ins r0 8 16 r1 #inserts 16 bits of r1 starting at bit 8, result: $DEADBEEF}}}}&lt;br /&gt;
&lt;br /&gt;
== Comparison ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=select|description=Register = b if a is non-zero, otherwise c|syntax=select r? a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
&amp;lt;b&amp;gt;1)&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
move r0 &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;quot;&amp;gt;0&amp;lt;/s&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
select &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;gt;r1&amp;lt;/s&amp;gt; r0 10 &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;gt;200&amp;lt;/s&amp;gt;&lt;br /&gt;
{{ICCode|&lt;br /&gt;
move r0 0&lt;br /&gt;
select r1 r0 10 200&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;br/&amp;gt;after run, &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;quot;&amp;gt;r1 = 200&amp;lt;/s&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;b&amp;gt;2)&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
move r0 &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;quot;&amp;gt;5&amp;lt;/s&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
select &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;gt;r1&amp;lt;/s&amp;gt; r0 &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;gt;10&amp;lt;/s&amp;gt; 200&lt;br /&gt;
{{ICCode|&lt;br /&gt;
move r0 1&lt;br /&gt;
select r1 r0 10 100&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;br/&amp;gt;after run, &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;quot;&amp;gt;r1 = 10&amp;lt;/s&amp;gt;&lt;br /&gt;
|note=&lt;br /&gt;
This operation can be used as a simple ternary condition}}&lt;br /&gt;
&lt;br /&gt;
=== Comparison / Device Pin ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=sdns|description=Register = 1 if device is not set, otherwise 0|syntax=sdns r? device(d?{{!}}r?{{!}}id)}}&lt;br /&gt;
{{ICInstruction|instruction=sdse|description=Register = 1 if device is set, otherwise 0.|syntax=sdse r? device(d?{{!}}r?{{!}}id)}}&lt;br /&gt;
&lt;br /&gt;
=== Comparison / Value ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=sap|description=Register = 1 if abs(a - b) &amp;lt;= max(c * max(abs(a), abs(b)), float.epsilon * 8), otherwise 0|syntax=sap r? a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
Set register to 1 if a and b are close enough to each other with the scaling factor of c. Equivalent to Python [https://docs.python.org/3/library/math.html#math.isclose math.isclose]}}&lt;br /&gt;
{{ICInstruction|instruction=sapz|description=Register = 1 if abs(a) &amp;lt;= max(b * abs(a), float.epsilon * 8), otherwise 0|syntax=sapz r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=seq|description=Register = 1 if a == b, otherwise 0|syntax=seq r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=seqz|description=Register = 1 if a == 0, otherwise 0|syntax=seqz r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sge|description=Register = 1 if a &amp;gt;= b, otherwise 0|syntax=sge r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sgez|description=Register = 1 if a &amp;gt;= 0, otherwise 0|syntax=sgez r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sgt|description=Register = 1 if a &amp;gt; b, otherwise 0|syntax=sgt r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sgtz|description=Register = 1 if a &amp;gt; 0, otherwise 0|syntax=sgtz r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sle|description=Register = 1 if a &amp;lt;= b, otherwise 0|syntax=sle r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=slez|description=Register = 1 if a &amp;lt;= 0, otherwise 0|syntax=slez r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=slt|description=Register = 1 if a &amp;lt; b, otherwise 0|syntax=slt r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sltz|description=Register = 1 if a &amp;lt; 0, otherwise 0|syntax=sltz r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sna|description=Register = 1 if abs(a - b) &amp;gt; max(c * max(abs(a), abs(b)), float.epsilon * 8), otherwise 0|syntax=sna r? a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=snan|description=Register = 1 if a is NaN, otherwise 0|syntax=snan r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=snanz|description=Register = 0 if a is NaN, otherwise 1|syntax=snanz r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=snaz|description=Register = 1 if abs(a) &amp;gt; max(b * abs(a), float.epsilon), otherwise 0|syntax=snaz r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sne|description=Register = 1 if a != b, otherwise 0|syntax=sne r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=snez|description=Register = 1 if a != 0, otherwise 0|syntax=snez r? a(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
== Branching ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=j|description=Jump execution to line a|syntax=j int&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|j 0 # jump line 0}}&lt;br /&gt;
{{ICCode|&lt;br /&gt;
j label # jump to a label&lt;br /&gt;
&lt;br /&gt;
label:&lt;br /&gt;
# your code here&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=jal|description=Jump execution to line a and store next line number in ra|syntax=jal int&lt;br /&gt;
|example=&lt;br /&gt;
jal provides a way to do function calls in IC10 mips&lt;br /&gt;
&lt;br /&gt;
{{ICCode|&lt;br /&gt;
move r0 1000&lt;br /&gt;
move r1 0&lt;br /&gt;
start:&lt;br /&gt;
jal average&lt;br /&gt;
s db Setting r0&lt;br /&gt;
yield&lt;br /&gt;
j start&lt;br /&gt;
&lt;br /&gt;
average:&lt;br /&gt;
add r0 r0 r1&lt;br /&gt;
div r0 r0 2&lt;br /&gt;
j ra # jump back&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=jr|description=Relative jump to line a|syntax=jr int}}&lt;br /&gt;
&lt;br /&gt;
=== Branching / Device Pin ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=bdnvl|description=Will branch to line a if the provided device not valid for a load instruction for the provided logic type.|syntax=bdnvl device(d?{{!}}r?{{!}}id) logicType a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bdnvs|description=Will branch to line a if the provided device not valid for a store instruction for the provided logic type.|syntax=bdnvs device(d?{{!}}r?{{!}}id) logicType a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bdns|description=Branch to line a if device d isn&#039;t set|syntax=bdns d? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bdnsal|description=Jump execution to line a and store next line number if device is not set|syntax=bdnsal d? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bdse|description=Branch to line a if device d is set|syntax=bdse d? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bdseal|description=Jump execution to line a and store next line number if device is set|syntax=bdseal d? a(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
#Store line number and jump to line 32 if d0 is assigned.&lt;br /&gt;
bdseal d0 32&lt;br /&gt;
}}&lt;br /&gt;
{{ICCode|&lt;br /&gt;
#Store line in ra and jump to label HarvestCrop if device d0 is assigned.&lt;br /&gt;
bdseal d0 HarvestCrop&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=brdns|description=Relative branch to line a if device is not set|syntax=brdns d? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brdse|description=Relative branch to line a if device is set|syntax=brdse d? a(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
=== Branching / Comparison ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=bap|description=Branch to line d if abs(a - b) &amp;lt;= max(c * max(abs(a), abs(b)), float.epsilon * 8)|syntax=bap a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
Branch if a and b are close enough to each other with the scaling factor of c. Equivalent to Python [https://docs.python.org/3/library/math.html#math.isclose math.isclose]}}&lt;br /&gt;
{{ICInstruction|instruction=brap|description=Relative branch to line d if abs(a - b) &amp;lt;= max(c * max(abs(a), abs(b)), float.epsilon * 8)|syntax=brap a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bapal|description=Branch to line c if a != b and store next line number in ra|syntax=bapal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bapz|description=Branch to line c if abs(a) &amp;lt;= max(b * abs(a), float.epsilon * 8)|syntax=bapz a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brapz|description=Relative branch to line c if abs(a) &amp;lt;= max(b * abs(a), float.epsilon * 8)|syntax=brapz a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bapzal|description=Branch to line c if abs(a) &amp;lt;= max(b * abs(a), float.epsilon * 8) and store next line number in ra|syntax=bapzal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=beq|description=Branch to line c if a == b|syntax=beq a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=breq|description=Relative branch to line c if a == b|syntax=breq a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=beqal|description=Branch to line c if a == b and store next line number in ra|syntax=beqal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=beqz|description=Branch to line b if a == 0|syntax=beqz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=breqz|description=Relative branch to line b if a == 0|syntax=breqz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=beqzal|description=Branch to line b if a == 0 and store next line number in ra|syntax=beqzal a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bge|description=Branch to line c if a &amp;gt;= b|syntax=bge a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brge|description=Relative branch to line c if a &amp;gt;= b|syntax=brge a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgeal|description=Branch to line c if a &amp;gt;= b and store next line number in ra|syntax=bgeal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgez|description=Branch to line b if a &amp;gt;= 0|syntax=bgez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brgez|description=Relative branch to line b if a &amp;gt;= 0|syntax=brgez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgezal|description=Branch to line b if a &amp;gt;= 0 and store next line number in ra|syntax=bgezal a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgt|description=Branch to line c if a &amp;gt; b|syntax=bgt a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
An example of a &#039;&#039;&#039;Schmitt&#039;&#039;&#039; trigger, turning on a device if the temperature is too low, and turning it off if it&#039;s too high and finally&lt;br /&gt;
doing nothing if the temperature is within the desired range.&lt;br /&gt;
{{ICCode|&lt;br /&gt;
alias sensor d0&lt;br /&gt;
alias device d1&lt;br /&gt;
&lt;br /&gt;
define mintemp 293.15&lt;br /&gt;
define maxtemp 298.15&lt;br /&gt;
&lt;br /&gt;
start:&lt;br /&gt;
yield&lt;br /&gt;
l r0 sensor Temperature&lt;br /&gt;
# If the temperature &amp;lt; mintemp, turn on the device&lt;br /&gt;
blt r0 mintemp turnOn&lt;br /&gt;
# If the temperature &amp;gt; maxtemp, turn off the device&lt;br /&gt;
bgt r0 maxtemp turnOff&lt;br /&gt;
j start&lt;br /&gt;
&lt;br /&gt;
turnOn:&lt;br /&gt;
s device On 1&lt;br /&gt;
j start&lt;br /&gt;
turnOff:&lt;br /&gt;
s device On 0&lt;br /&gt;
j start&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=brgt|description=relative branch to line c if a &amp;gt; b|syntax=brgt a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgtal|description=Branch to line c if a &amp;gt; b and store next line number in ra|syntax=bgtal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgtz|description=Branch to line b if a &amp;gt; 0|syntax=bgtz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brgtz|description=Relative branch to line b if a &amp;gt; 0|syntax=brgtz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgtzal|description=Branch to line b if a &amp;gt; 0 and store next line number in ra|syntax=bgtzal a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=ble|description=Branch to line c if a &amp;lt;= b|syntax=ble a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brle|description=Relative branch to line c if a &amp;lt;= b|syntax=brle a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bleal|description=Branch to line c if a &amp;lt;= b and store next line number in ra|syntax=bleal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=blez|description=Branch to line b if a &amp;lt;= 0|syntax=blez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brlez|description=Relative branch to line b if a &amp;lt;= 0|syntax=brlez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=blezal|description=Branch to line b if a &amp;lt;= 0 and store next line number in ra|syntax=blezal a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=blt|description=Branch to line c if a &amp;lt; b|syntax=blt a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
An example of a &#039;&#039;&#039;Schmitt&#039;&#039;&#039; trigger, turning on a device if the temperature is too low, and turning it off if it&#039;s too high and finally&lt;br /&gt;
doing nothing if the temperature is within the desired range.&lt;br /&gt;
{{ICCode|&lt;br /&gt;
alias sensor d0&lt;br /&gt;
alias device d1&lt;br /&gt;
&lt;br /&gt;
define mintemp 293.15&lt;br /&gt;
define maxtemp 298.15&lt;br /&gt;
&lt;br /&gt;
start:&lt;br /&gt;
yield&lt;br /&gt;
l r0 sensor Temperature&lt;br /&gt;
# If the temperature &amp;lt; mintemp, turn on the device&lt;br /&gt;
blt r0 mintemp turnOn&lt;br /&gt;
# If the temperature &amp;gt; maxtemp, turn off the device&lt;br /&gt;
bgt r0 maxtemp turnOff&lt;br /&gt;
j start&lt;br /&gt;
&lt;br /&gt;
turnOn:&lt;br /&gt;
s device On 1&lt;br /&gt;
j start&lt;br /&gt;
turnOff:&lt;br /&gt;
s device On 0&lt;br /&gt;
j start&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=brlt|description=Relative branch to line c if a &amp;lt; b|syntax=brlt a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bltal|description=Branch to line c if a &amp;lt; b and store next line number in ra|syntax=bltal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bltz|description=Branch to line b if a &amp;lt; 0|syntax=bltz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brltz|description=Relative branch to line b if a &amp;lt; 0|syntax=brltz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bltzal|description=Branch to line b if a &amp;lt; 0 and store next line number in ra|syntax=bltzal a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bna|description=Branch to line d if abs(a - b) &amp;gt; max(c * max(abs(a), abs(b)), float.epsilon * 8)|syntax=bna a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brna|description=Relative branch to line d if abs(a - b) &amp;gt; max(c * max(abs(a), abs(b)), float.epsilon * 8)|syntax=brna a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnaal|description=Branch to line d if abs(a - b) &amp;lt;= max(c * max(abs(a), abs(b)), float.epsilon * 8) and store next line number in ra|syntax=bnaal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnan|description=Branch to line b if a is not a number (NaN)|syntax=bnan a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brnan|description=Relative branch to line b if a is not a number (NaN)|syntax=brnan a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnaz|description=Branch to line c if abs(a) &amp;gt; max (b * abs(a), float.epsilon * 8)|syntax=bnaz a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brnaz|description=Relative branch to line c if abs(a) &amp;gt; max(b * abs(a), float.epsilon * 8)|syntax=brnaz a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnazal|description=Branch to line c if abs(a) &amp;gt; max (b * abs(a), float.epsilon * 8) and store next line number in ra|syntax=bnazal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bne|description=Branch to line c if a != b|syntax=bne a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brne|description=Relative branch to line c if a != b|syntax=brne a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bneal|description=Branch to line c if a != b and store next line number in ra|syntax=bneal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnez|description=branch to line b if a != 0|syntax=bnez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brnez|description=Relative branch to line b if a != 0|syntax=brnez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnezal|description=Branch to line b if a != 0 and store next line number in ra|syntax=bnezal a(r?{{!}}num) b(r?{{!}}num)}}&lt;/div&gt;</summary>
		<author><name>Veriszg</name></author>
	</entry>
	<entry>
		<id>https://stationeers-wiki.com/index.php?title=IC10/instructions&amp;diff=25501</id>
		<title>IC10/instructions</title>
		<link rel="alternate" type="text/html" href="https://stationeers-wiki.com/index.php?title=IC10/instructions&amp;diff=25501"/>
		<updated>2026-01-12T21:01:31Z</updated>

		<summary type="html">&lt;p&gt;Veriszg: /* Bitwise */ revert, game is bugged, ins and ext have different parameters&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
See [[IC10]] for the primary page for the IC10 instruction set. This page lists all available instructions&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Utility ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=alias|description=Labels register or device reference with name, device references also affect what shows on the screws on the IC base.|syntax=alias str r?{{!}}d?&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
alias dAutoHydro1 d0&lt;br /&gt;
alias vTemperature r0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=define|description=Creates a label that will be replaced throughout the program with the provided value.|syntax=define str num&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
define ultimateAnswer 42&lt;br /&gt;
move r0 ultimateAnswer # Store 42 in register 0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=hcf|description=Halt and catch fire|syntax=hcf}}&lt;br /&gt;
{{ICInstruction|instruction=sleep|description=Pauses execution on the IC for a seconds|syntax=sleep a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=yield|description=Pauses execution for 1 tick|syntax=yield}}&lt;br /&gt;
&lt;br /&gt;
== Mathematical ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=abs|description=Register = the absolute value of a|syntax=abs r? a(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
define negativeNumber -10&lt;br /&gt;
abs r0 negativeNumber # Compute the absolute value of -10 and store it in register 0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=add|description=Register = a + b.|syntax=add r? a(r?{{!}}num) b(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|add r0 r0 1 # increment r0 by one}}&lt;br /&gt;
{{ICCode|&lt;br /&gt;
define num1 10&lt;br /&gt;
define num2 20&lt;br /&gt;
add r0 num1 num2 # Add 10 and 20 and store the result in register 0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=ceil|description=Register = smallest integer greater than a|syntax=ceil r? a(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
define floatNumber 10.3&lt;br /&gt;
ceil r0 floatNumber # Compute the ceiling of 10.3 and store it in register 0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=div|description=Register = a / b|syntax=div r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=pow|description=Stores the result of raising a to the power of b in the register. Follows IEEE-754 standard for floating point arithmetic.|syntax=pow r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=exp|description=exp(a) or e^a|syntax=exp r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=floor|description=Register = largest integer less than a|syntax=floor r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=log|description=base e log(a) or ln(a)|syntax=log r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=max|description=Register = max of a or b|syntax=max r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=min|description=Register = min of a or b|syntax=min r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=mod|description=Register = a mod b (note: NOT a % b)|syntax=mod r? a(r?{{!}}num) b(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
mod r0 10 20 # Expected: r0 = 10&lt;br /&gt;
mod r1 22 20 # Expected: r1 = 2&lt;br /&gt;
mod r2 22 -20 # Expected: r2 = 18&lt;br /&gt;
mod r2 22 -10 # Expected: r2 = 18&lt;br /&gt;
mod r2 -7 4 # Expected: r2 = 1&lt;br /&gt;
mod r2 -7 9 # Expected: r2 = 2&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=move|description=Register = provided num or register value.|syntax=move r? a(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|move r0 42 # Store 42 in register 0}}}}&lt;br /&gt;
{{ICInstruction|instruction=mul|description=Register = a * b|syntax=mul r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=rand|description=Register = a random value x with 0 &amp;lt;= x &amp;lt; 1|syntax=rand r?}}&lt;br /&gt;
{{ICInstruction|instruction=round|description=Register = a rounded to nearest integer|syntax=round r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sqrt|description=Register = square root of a|syntax=sqrt r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sub|description=Register = a - b.|syntax=sub r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=trunc|description=Register = a with fractional part removed|syntax=trunc r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=lerp|description=Linearly interpolates between a and b by the ratio c, and places the result in the register provided. The ratio c will be clamped between 0 and 1.|syntax=lerp r? a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
=== Mathematical / Trigonometric ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=acos|description=Returns the angle (radians) whos cos is the specified value|syntax=acos r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=asin|description=Returns the angle (radians) whos sine is the specified value|syntax=asin r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=atan|description=Returns the angle (radians) whos tan is the specified value|syntax=atan r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=atan2|description=Returns the angle (radians) whose tangent is the quotient of two specified values: a (y) and b (x)|syntax=atan2 r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=cos|description=Returns the cosine of the specified angle (radians)|syntax=cos r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sin|description=Returns the sine of the specified angle (radians)|syntax=sin r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=tan|description=Returns the tan of the specified angle (radians) |syntax=tan r? a(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
== Stack ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=clr|description=Clears the stack memory for the provided device.|syntax=clr d?}}&lt;br /&gt;
{{ICInstruction|instruction=clrd|description=Seeks directly for the provided device id and clears the stack memory of that device|syntax=clrd id(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=get|description=Using the provided device, attempts to read the stack value at the provided address, and places it in the register.|syntax=get r? device(d?{{!}}r?{{!}}id) address(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=getd|description=Seeks directly for the provided device id, attempts to read the stack value at the provided address, and places it in the register.|syntax=getd r? id(r?{{!}}id) address(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=peek|description=Register = the value at the top of the stack|syntax=peek r?}}&lt;br /&gt;
{{ICInstruction|instruction=poke|description=Stores the provided value at the provided address in the stack.|syntax=poke address(r?{{!}}num) value(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=pop|description=Register = the value at the top of the stack and decrements sp|syntax=pop r?}}&lt;br /&gt;
{{ICInstruction|instruction=push|description=Pushes the value of a to the stack at sp and increments sp|syntax=push a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=put|description=Using the provided device, attempts to write the provided value to the stack at the provided address.|syntax=put device(d?{{!}}r?{{!}}id) address(r?{{!}}num) value(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=putd|description=Seeks directly for the provided device id, attempts to write the provided value to the stack at the provided address.|syntax=putd id(r?{{!}}id) address(r?{{!}}num) value(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
== Slot/Logic ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=l|description=Loads device LogicType to register by housing index value.|syntax=l r? device(d?{{!}}r?{{!}}id) logicType&lt;br /&gt;
|example=&lt;br /&gt;
Read from the device on d0 into register 0&lt;br /&gt;
{{ICCode|l r0 d0 Setting}}&lt;br /&gt;
Read the pressure from a sensor&lt;br /&gt;
{{ICCode|l r1 d5 Pressure}}&lt;br /&gt;
This also works with aliases. For example:&lt;br /&gt;
{{ICCode|&lt;br /&gt;
alias Sensor d0&lt;br /&gt;
l r0 Sensor Temperature&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=lr|description=Loads reagent of device&#039;s ReagentMode where a hash of the reagent type to check for. ReagentMode can be either Contents (0), Required (1), Recipe (2). Can use either the word, or the number.|syntax=lr r? device(d?{{!}}r?{{!}}id) reagentMode int}}&lt;br /&gt;
{{ICInstruction|instruction=ls|description=Loads slot LogicSlotType on device to register.|syntax=ls r? device(d?{{!}}r?{{!}}id) slotIndex logicSlotType&lt;br /&gt;
|example=&lt;br /&gt;
Read from the second slot of device on d0, stores 1 in r0 if it&#039;s occupied, 0 otherwise.&lt;br /&gt;
{{ICCode|ls r0 d0 2 Occupied}}&lt;br /&gt;
And here is the code to read the charge of an AIMeE:&lt;br /&gt;
{{ICCode|&lt;br /&gt;
alias robot d0&lt;br /&gt;
alias charge r10&lt;br /&gt;
ls charge robot 0 Charge&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=s|description=Stores register value to LogicType on device by housing index value.|syntax=s device(d?{{!}}r?{{!}}id) logicType r?&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
s d0 Setting r0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=ss|description=Stores register value to device stored in a slot LogicSlotType on device.|syntax=ss device(d?{{!}}r?{{!}}id) slotIndex logicSlotType r?}}&lt;br /&gt;
{{ICInstruction|instruction=rmap|description=Given a reagent hash, store the corresponding prefab hash that the device expects to fulfill the reagent requirement. For example, on an autolathe, the hash for Iron will store the hash for ItemIronIngot.|syntax=rmap r? d? reagentHash(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
=== Slot/Logic / Batched ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=lb|description=Loads LogicType from all output network devices with provided type hash using the provide batch mode. Average (0), Sum (1), Minimum (2), Maximum (3). Can use either the word, or the number.|syntax=lb r? deviceHash logicType batchMode&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|lb r0 HASH(&amp;quot;StructureWallLight&amp;quot;) On Sum}}}}&lt;br /&gt;
{{ICInstruction|instruction=lbn|description=Loads LogicType from all output network devices with provided type and name hashes using the provide batch mode. Average (0), Sum (1), Minimum (2), Maximum (3). Can use either the word, or the number.|syntax=lbn r? deviceHash nameHash logicType batchMode}}&lt;br /&gt;
{{ICInstruction|instruction=lbns|description=Loads LogicSlotType from slotIndex from all output network devices with provided type and name hashes using the provide batch mode. Average (0), Sum (1), Minimum (2), Maximum (3). Can use either the word, or the number.|syntax=lbns r? deviceHash nameHash slotIndex logicSlotType batchMode}}&lt;br /&gt;
{{ICInstruction|instruction=lbs|description=Loads LogicSlotType from slotIndex from all output network devices with provided type hash using the provide batch mode. Average (0), Sum (1), Minimum (2), Maximum (3). Can use either the word, or the number.|syntax=lbs r? deviceHash slotIndex logicSlotType batchMode}}&lt;br /&gt;
{{ICInstruction|instruction=sb|description=Stores register value to LogicType on all output network devices with provided type hash.|syntax=sb deviceHash logicType r?&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|sb HASH(&amp;quot;StructureWallLight&amp;quot;) On 1}}}}&lt;br /&gt;
{{ICInstruction|instruction=sbn|description=Stores register value to LogicType on all output network devices with provided type hash and name.|syntax=sbn deviceHash nameHash logicType r?}}&lt;br /&gt;
{{ICInstruction|instruction=sbs|description=Stores register value to LogicSlotType on all output network devices with provided type hash in the provided slot.|syntax=sbs deviceHash slotIndex logicSlotType r?}}&lt;br /&gt;
&lt;br /&gt;
== Bitwise ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=and|description=Performs a bitwise logical AND operation on the binary representation of two values. Each bit of the result is determined by evaluating the corresponding bits of the input values. If both bits are 1, the resulting bit is set to 1. Otherwise the resulting bit is set to 0.|syntax=and r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=nor|description=Performs a bitwise logical NOR (NOT OR) operation on the binary representation of two values. Each bit of the result is determined by evaluating the corresponding bits of the input values. If both bits are 0, the resulting bit is set to 1. Otherwise, if at least one bit is 1, the resulting bit is set to 0.|syntax=nor r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=not|description=Performs a bitwise logical NOT operation flipping each bit of the input value, resulting in a binary complement. If a bit is 1, it becomes 0, and if a bit is 0, it becomes 1.|syntax=not r? a(r?{{!}}num)&lt;br /&gt;
|note=&lt;br /&gt;
This is a bitwise operation, the NOT of 1 =&amp;gt; -2, etc. You may want to use seqz instead}}&lt;br /&gt;
{{ICInstruction|instruction=or|description=Performs a bitwise logical OR operation on the binary representation of two values. Each bit of the result is determined by evaluating the corresponding bits of the input values. If either bit is 1, the resulting bit is set to 1. If both bits are 0, the resulting bit is set to 0.|syntax=or r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sla|description=Performs a bitwise arithmetic left shift operation on the binary representation of a value. It shifts the bits to the left and fills the vacated rightmost bits with zeros (note that this is indistinguishable from &#039;sll&#039;).|syntax=sla r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sll|description=Performs a bitwise logical left shift operation on the binary representation of a value. It shifts the bits to the left and fills the vacated rightmost bits with zeros.|syntax=sll r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sra|description=Performs a bitwise arithmetic right shift operation on the binary representation of a value. It shifts the bits to the right and fills the vacated leftmost bits with a copy of the sign bit (the most significant bit).|syntax=sra r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=srl|description=Performs a bitwise logical right shift operation on the binary representation of a value. It shifts the bits to the right and fills the vacated leftmost bits with zeros|syntax=srl r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=xor|description=Performs a bitwise logical XOR (exclusive OR) operation on the binary representation of two values. Each bit of the result is determined by evaluating the corresponding bits of the input values. If the bits are different (one bit is 0 and the other is 1), the resulting bit is set to 1. If the bits are the same (both 0 or both 1), the resulting bit is set to 0.|syntax=xor r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=ext|description=Extracts a bit field from a, beginning at b for c length and placed in the provided register. Payload cannot exceed 53 bits in final length.|syntax=ext r? a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=ins|description=Inserts a bit field into the provided register, beginning at bit offset for length bits. Payload cannot exceed 53 bits in final length. WARNING: Parameters order differs from documentation - offset and length come before field value.&lt;br /&gt;
|syntax=ins r? offset(r?{{!}}num) length(r?{{!}}num) field(r?{{!}}num)&lt;br /&gt;
|example= &lt;br /&gt;
{{ICCode|move r0 $DE0000EF&lt;br /&gt;
move r1 $ADBE&lt;br /&gt;
ins r0 8 16 r1 #inserts 16 bits of r1 starting at bit 8, result: $DEADBEEF}}}}&lt;br /&gt;
&lt;br /&gt;
== Comparison ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=select|description=Register = b if a is non-zero, otherwise c|syntax=select r? a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
&amp;lt;b&amp;gt;1)&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
move r0 &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;quot;&amp;gt;0&amp;lt;/s&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
select &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;gt;r1&amp;lt;/s&amp;gt; r0 10 &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;gt;200&amp;lt;/s&amp;gt;&lt;br /&gt;
{{ICCode|&lt;br /&gt;
move r0 0&lt;br /&gt;
select r1 r0 10 200&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;br/&amp;gt;after run, &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;quot;&amp;gt;r1 = 200&amp;lt;/s&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;b&amp;gt;2)&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
move r0 &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;quot;&amp;gt;5&amp;lt;/s&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
select &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;gt;r1&amp;lt;/s&amp;gt; r0 &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;gt;10&amp;lt;/s&amp;gt; 200&lt;br /&gt;
{{ICCode|&lt;br /&gt;
move r0 1&lt;br /&gt;
select r1 r0 10 100&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;br/&amp;gt;after run, &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;quot;&amp;gt;r1 = 10&amp;lt;/s&amp;gt;&lt;br /&gt;
|note=&lt;br /&gt;
This operation can be used as a simple ternary condition}}&lt;br /&gt;
&lt;br /&gt;
=== Comparison / Device Pin ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=sdns|description=Register = 1 if device is not set, otherwise 0|syntax=sdns r? device(d?{{!}}r?{{!}}id)}}&lt;br /&gt;
{{ICInstruction|instruction=sdse|description=Register = 1 if device is set, otherwise 0.|syntax=sdse r? device(d?{{!}}r?{{!}}id)}}&lt;br /&gt;
&lt;br /&gt;
=== Comparison / Value ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=sap|description=Register = 1 if abs(a - b) &amp;lt;= max(c * max(abs(a), abs(b)), float.epsilon * 8), otherwise 0|syntax=sap r? a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
Set register to 1 if a and b are close enough to each other with the scaling factor of c. Equivalent to Python [https://docs.python.org/3/library/math.html#math.isclose math.isclose]}}&lt;br /&gt;
{{ICInstruction|instruction=sapz|description=Register = 1 if abs(a) &amp;lt;= max(b * abs(a), float.epsilon * 8), otherwise 0|syntax=sapz r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=seq|description=Register = 1 if a == b, otherwise 0|syntax=seq r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=seqz|description=Register = 1 if a == 0, otherwise 0|syntax=seqz r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sge|description=Register = 1 if a &amp;gt;= b, otherwise 0|syntax=sge r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sgez|description=Register = 1 if a &amp;gt;= 0, otherwise 0|syntax=sgez r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sgt|description=Register = 1 if a &amp;gt; b, otherwise 0|syntax=sgt r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sgtz|description=Register = 1 if a &amp;gt; 0, otherwise 0|syntax=sgtz r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sle|description=Register = 1 if a &amp;lt;= b, otherwise 0|syntax=sle r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=slez|description=Register = 1 if a &amp;lt;= 0, otherwise 0|syntax=slez r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=slt|description=Register = 1 if a &amp;lt; b, otherwise 0|syntax=slt r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sltz|description=Register = 1 if a &amp;lt; 0, otherwise 0|syntax=sltz r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sna|description=Register = 1 if abs(a - b) &amp;gt; max(c * max(abs(a), abs(b)), float.epsilon * 8), otherwise 0|syntax=sna r? a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=snan|description=Register = 1 if a is NaN, otherwise 0|syntax=snan r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=snanz|description=Register = 0 if a is NaN, otherwise 1|syntax=snanz r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=snaz|description=Register = 1 if abs(a) &amp;gt; max(b * abs(a), float.epsilon), otherwise 0|syntax=snaz r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sne|description=Register = 1 if a != b, otherwise 0|syntax=sne r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=snez|description=Register = 1 if a != 0, otherwise 0|syntax=snez r? a(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
== Branching ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=j|description=Jump execution to line a|syntax=j int&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|j 0 # jump line 0}}&lt;br /&gt;
{{ICCode|&lt;br /&gt;
j label # jump to a label&lt;br /&gt;
&lt;br /&gt;
label:&lt;br /&gt;
# your code here&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=jal|description=Jump execution to line a and store next line number in ra|syntax=jal int&lt;br /&gt;
|example=&lt;br /&gt;
jal provides a way to do function calls in IC10 mips&lt;br /&gt;
&lt;br /&gt;
{{ICCode|&lt;br /&gt;
move r0 1000&lt;br /&gt;
move r1 0&lt;br /&gt;
start:&lt;br /&gt;
jal average&lt;br /&gt;
s db Setting r0&lt;br /&gt;
yield&lt;br /&gt;
j start&lt;br /&gt;
&lt;br /&gt;
average:&lt;br /&gt;
add r0 r0 r1&lt;br /&gt;
div r0 r0 2&lt;br /&gt;
j ra # jump back&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=jr|description=Relative jump to line a|syntax=jr int}}&lt;br /&gt;
&lt;br /&gt;
=== Branching / Device Pin ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=bdnvl|description=Will branch to line a if the provided device not valid for a load instruction for the provided logic type.|syntax=bdnvl device(d?{{!}}r?{{!}}id) logicType a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bdnvs|description=Will branch to line a if the provided device not valid for a store instruction for the provided logic type.|syntax=bdnvs device(d?{{!}}r?{{!}}id) logicType a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bdns|description=Branch to line a if device d isn&#039;t set|syntax=bdns d? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bdnsal|description=Jump execution to line a and store next line number if device is not set|syntax=bdnsal d? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bdse|description=Branch to line a if device d is set|syntax=bdse d? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bdseal|description=Jump execution to line a and store next line number if device is set|syntax=bdseal d? a(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
#Store line number and jump to line 32 if d0 is assigned.&lt;br /&gt;
bdseal d0 32&lt;br /&gt;
}}&lt;br /&gt;
{{ICCode|&lt;br /&gt;
#Store line in ra and jump to label HarvestCrop if device d0 is assigned.&lt;br /&gt;
bdseal d0 HarvestCrop&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=brdns|description=Relative branch to line a if device is not set|syntax=brdns d? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brdse|description=Relative branch to line a if device is set|syntax=brdse d? a(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
=== Branching / Comparison ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=bap|description=Branch to line d if abs(a - b) &amp;lt;= max(c * max(abs(a), abs(b)), float.epsilon * 8)|syntax=bap a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
Branch if a and b are close enough to each other with the scaling factor of c. Equivalent to Python [https://docs.python.org/3/library/math.html#math.isclose math.isclose]}}&lt;br /&gt;
{{ICInstruction|instruction=brap|description=Relative branch to line d if abs(a - b) &amp;lt;= max(c * max(abs(a), abs(b)), float.epsilon * 8)|syntax=brap a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bapal|description=Branch to line c if a != b and store next line number in ra|syntax=bapal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bapz|description=Branch to line c if abs(a) &amp;lt;= max(b * abs(a), float.epsilon * 8)|syntax=bapz a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brapz|description=Relative branch to line c if abs(a) &amp;lt;= max(b * abs(a), float.epsilon * 8)|syntax=brapz a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bapzal|description=Branch to line c if abs(a) &amp;lt;= max(b * abs(a), float.epsilon * 8) and store next line number in ra|syntax=bapzal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=beq|description=Branch to line c if a == b|syntax=beq a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=breq|description=Relative branch to line c if a == b|syntax=breq a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=beqal|description=Branch to line c if a == b and store next line number in ra|syntax=beqal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=beqz|description=Branch to line b if a == 0|syntax=beqz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=breqz|description=Relative branch to line b if a == 0|syntax=breqz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=beqzal|description=Branch to line b if a == 0 and store next line number in ra|syntax=beqzal a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bge|description=Branch to line c if a &amp;gt;= b|syntax=bge a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brge|description=Relative branch to line c if a &amp;gt;= b|syntax=brge a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgeal|description=Branch to line c if a &amp;gt;= b and store next line number in ra|syntax=bgeal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgez|description=Branch to line b if a &amp;gt;= 0|syntax=bgez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brgez|description=Relative branch to line b if a &amp;gt;= 0|syntax=brgez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgezal|description=Branch to line b if a &amp;gt;= 0 and store next line number in ra|syntax=bgezal a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgt|description=Branch to line c if a &amp;gt; b|syntax=bgt a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
An example of a &#039;&#039;&#039;Schmitt&#039;&#039;&#039; trigger, turning on a device if the temperature is too low, and turning it off if it&#039;s too high and finally&lt;br /&gt;
doing nothing if the temperature is within the desired range.&lt;br /&gt;
{{ICCode|&lt;br /&gt;
alias sensor d0&lt;br /&gt;
alias device d1&lt;br /&gt;
&lt;br /&gt;
define mintemp 293.15&lt;br /&gt;
define maxtemp 298.15&lt;br /&gt;
&lt;br /&gt;
start:&lt;br /&gt;
yield&lt;br /&gt;
l r0 sensor Temperature&lt;br /&gt;
# If the temperature &amp;lt; mintemp, turn on the device&lt;br /&gt;
blt r0 mintemp turnOn&lt;br /&gt;
# If the temperature &amp;gt; maxtemp, turn off the device&lt;br /&gt;
bgt r0 maxtemp turnOff&lt;br /&gt;
j start&lt;br /&gt;
&lt;br /&gt;
turnOn:&lt;br /&gt;
s device On 1&lt;br /&gt;
j start&lt;br /&gt;
turnOff:&lt;br /&gt;
s device On 0&lt;br /&gt;
j start&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=brgt|description=relative branch to line c if a &amp;gt; b|syntax=brgt a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgtal|description=Branch to line c if a &amp;gt; b and store next line number in ra|syntax=bgtal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgtz|description=Branch to line b if a &amp;gt; 0|syntax=bgtz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brgtz|description=Relative branch to line b if a &amp;gt; 0|syntax=brgtz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgtzal|description=Branch to line b if a &amp;gt; 0 and store next line number in ra|syntax=bgtzal a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=ble|description=Branch to line c if a &amp;lt;= b|syntax=ble a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brle|description=Relative branch to line c if a &amp;lt;= b|syntax=brle a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bleal|description=Branch to line c if a &amp;lt;= b and store next line number in ra|syntax=bleal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=blez|description=Branch to line b if a &amp;lt;= 0|syntax=blez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brlez|description=Relative branch to line b if a &amp;lt;= 0|syntax=brlez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=blezal|description=Branch to line b if a &amp;lt;= 0 and store next line number in ra|syntax=blezal a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=blt|description=Branch to line c if a &amp;lt; b|syntax=blt a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
An example of a &#039;&#039;&#039;Schmitt&#039;&#039;&#039; trigger, turning on a device if the temperature is too low, and turning it off if it&#039;s too high and finally&lt;br /&gt;
doing nothing if the temperature is within the desired range.&lt;br /&gt;
{{ICCode|&lt;br /&gt;
alias sensor d0&lt;br /&gt;
alias device d1&lt;br /&gt;
&lt;br /&gt;
define mintemp 293.15&lt;br /&gt;
define maxtemp 298.15&lt;br /&gt;
&lt;br /&gt;
start:&lt;br /&gt;
yield&lt;br /&gt;
l r0 sensor Temperature&lt;br /&gt;
# If the temperature &amp;lt; mintemp, turn on the device&lt;br /&gt;
blt r0 mintemp turnOn&lt;br /&gt;
# If the temperature &amp;gt; maxtemp, turn off the device&lt;br /&gt;
bgt r0 maxtemp turnOff&lt;br /&gt;
j start&lt;br /&gt;
&lt;br /&gt;
turnOn:&lt;br /&gt;
s device On 1&lt;br /&gt;
j start&lt;br /&gt;
turnOff:&lt;br /&gt;
s device On 0&lt;br /&gt;
j start&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=brlt|description=Relative branch to line c if a &amp;lt; b|syntax=brlt a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bltal|description=Branch to line c if a &amp;lt; b and store next line number in ra|syntax=bltal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bltz|description=Branch to line b if a &amp;lt; 0|syntax=bltz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brltz|description=Relative branch to line b if a &amp;lt; 0|syntax=brltz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bltzal|description=Branch to line b if a &amp;lt; 0 and store next line number in ra|syntax=bltzal a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bna|description=Branch to line d if abs(a - b) &amp;gt; max(c * max(abs(a), abs(b)), float.epsilon * 8)|syntax=bna a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brna|description=Relative branch to line d if abs(a - b) &amp;gt; max(c * max(abs(a), abs(b)), float.epsilon * 8)|syntax=brna a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnaal|description=Branch to line d if abs(a - b) &amp;lt;= max(c * max(abs(a), abs(b)), float.epsilon * 8) and store next line number in ra|syntax=bnaal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnan|description=Branch to line b if a is not a number (NaN)|syntax=bnan a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brnan|description=Relative branch to line b if a is not a number (NaN)|syntax=brnan a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnaz|description=Branch to line c if abs(a) &amp;gt; max (b * abs(a), float.epsilon * 8)|syntax=bnaz a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brnaz|description=Relative branch to line c if abs(a) &amp;gt; max(b * abs(a), float.epsilon * 8)|syntax=brnaz a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnazal|description=Branch to line c if abs(a) &amp;gt; max (b * abs(a), float.epsilon * 8) and store next line number in ra|syntax=bnazal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bne|description=Branch to line c if a != b|syntax=bne a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brne|description=Relative branch to line c if a != b|syntax=brne a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bneal|description=Branch to line c if a != b and store next line number in ra|syntax=bneal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnez|description=branch to line b if a != 0|syntax=bnez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brnez|description=Relative branch to line b if a != 0|syntax=brnez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnezal|description=Branch to line b if a != 0 and store next line number in ra|syntax=bnezal a(r?{{!}}num) b(r?{{!}}num)}}&lt;/div&gt;</summary>
		<author><name>Veriszg</name></author>
	</entry>
	<entry>
		<id>https://stationeers-wiki.com/index.php?title=IC10/instructions&amp;diff=25500</id>
		<title>IC10/instructions</title>
		<link rel="alternate" type="text/html" href="https://stationeers-wiki.com/index.php?title=IC10/instructions&amp;diff=25500"/>
		<updated>2026-01-12T20:11:47Z</updated>

		<summary type="html">&lt;p&gt;Veriszg: /* Bitwise */ ins example corrected so parameters are as in the game&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
See [[IC10]] for the primary page for the IC10 instruction set. This page lists all available instructions&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Utility ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=alias|description=Labels register or device reference with name, device references also affect what shows on the screws on the IC base.|syntax=alias str r?{{!}}d?&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
alias dAutoHydro1 d0&lt;br /&gt;
alias vTemperature r0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=define|description=Creates a label that will be replaced throughout the program with the provided value.|syntax=define str num&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
define ultimateAnswer 42&lt;br /&gt;
move r0 ultimateAnswer # Store 42 in register 0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=hcf|description=Halt and catch fire|syntax=hcf}}&lt;br /&gt;
{{ICInstruction|instruction=sleep|description=Pauses execution on the IC for a seconds|syntax=sleep a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=yield|description=Pauses execution for 1 tick|syntax=yield}}&lt;br /&gt;
&lt;br /&gt;
== Mathematical ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=abs|description=Register = the absolute value of a|syntax=abs r? a(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
define negativeNumber -10&lt;br /&gt;
abs r0 negativeNumber # Compute the absolute value of -10 and store it in register 0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=add|description=Register = a + b.|syntax=add r? a(r?{{!}}num) b(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|add r0 r0 1 # increment r0 by one}}&lt;br /&gt;
{{ICCode|&lt;br /&gt;
define num1 10&lt;br /&gt;
define num2 20&lt;br /&gt;
add r0 num1 num2 # Add 10 and 20 and store the result in register 0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=ceil|description=Register = smallest integer greater than a|syntax=ceil r? a(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
define floatNumber 10.3&lt;br /&gt;
ceil r0 floatNumber # Compute the ceiling of 10.3 and store it in register 0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=div|description=Register = a / b|syntax=div r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=pow|description=Stores the result of raising a to the power of b in the register. Follows IEEE-754 standard for floating point arithmetic.|syntax=pow r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=exp|description=exp(a) or e^a|syntax=exp r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=floor|description=Register = largest integer less than a|syntax=floor r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=log|description=base e log(a) or ln(a)|syntax=log r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=max|description=Register = max of a or b|syntax=max r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=min|description=Register = min of a or b|syntax=min r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=mod|description=Register = a mod b (note: NOT a % b)|syntax=mod r? a(r?{{!}}num) b(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
mod r0 10 20 # Expected: r0 = 10&lt;br /&gt;
mod r1 22 20 # Expected: r1 = 2&lt;br /&gt;
mod r2 22 -20 # Expected: r2 = 18&lt;br /&gt;
mod r2 22 -10 # Expected: r2 = 18&lt;br /&gt;
mod r2 -7 4 # Expected: r2 = 1&lt;br /&gt;
mod r2 -7 9 # Expected: r2 = 2&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=move|description=Register = provided num or register value.|syntax=move r? a(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|move r0 42 # Store 42 in register 0}}}}&lt;br /&gt;
{{ICInstruction|instruction=mul|description=Register = a * b|syntax=mul r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=rand|description=Register = a random value x with 0 &amp;lt;= x &amp;lt; 1|syntax=rand r?}}&lt;br /&gt;
{{ICInstruction|instruction=round|description=Register = a rounded to nearest integer|syntax=round r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sqrt|description=Register = square root of a|syntax=sqrt r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sub|description=Register = a - b.|syntax=sub r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=trunc|description=Register = a with fractional part removed|syntax=trunc r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=lerp|description=Linearly interpolates between a and b by the ratio c, and places the result in the register provided. The ratio c will be clamped between 0 and 1.|syntax=lerp r? a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
=== Mathematical / Trigonometric ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=acos|description=Returns the angle (radians) whos cos is the specified value|syntax=acos r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=asin|description=Returns the angle (radians) whos sine is the specified value|syntax=asin r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=atan|description=Returns the angle (radians) whos tan is the specified value|syntax=atan r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=atan2|description=Returns the angle (radians) whose tangent is the quotient of two specified values: a (y) and b (x)|syntax=atan2 r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=cos|description=Returns the cosine of the specified angle (radians)|syntax=cos r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sin|description=Returns the sine of the specified angle (radians)|syntax=sin r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=tan|description=Returns the tan of the specified angle (radians) |syntax=tan r? a(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
== Stack ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=clr|description=Clears the stack memory for the provided device.|syntax=clr d?}}&lt;br /&gt;
{{ICInstruction|instruction=clrd|description=Seeks directly for the provided device id and clears the stack memory of that device|syntax=clrd id(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=get|description=Using the provided device, attempts to read the stack value at the provided address, and places it in the register.|syntax=get r? device(d?{{!}}r?{{!}}id) address(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=getd|description=Seeks directly for the provided device id, attempts to read the stack value at the provided address, and places it in the register.|syntax=getd r? id(r?{{!}}id) address(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=peek|description=Register = the value at the top of the stack|syntax=peek r?}}&lt;br /&gt;
{{ICInstruction|instruction=poke|description=Stores the provided value at the provided address in the stack.|syntax=poke address(r?{{!}}num) value(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=pop|description=Register = the value at the top of the stack and decrements sp|syntax=pop r?}}&lt;br /&gt;
{{ICInstruction|instruction=push|description=Pushes the value of a to the stack at sp and increments sp|syntax=push a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=put|description=Using the provided device, attempts to write the provided value to the stack at the provided address.|syntax=put device(d?{{!}}r?{{!}}id) address(r?{{!}}num) value(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=putd|description=Seeks directly for the provided device id, attempts to write the provided value to the stack at the provided address.|syntax=putd id(r?{{!}}id) address(r?{{!}}num) value(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
== Slot/Logic ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=l|description=Loads device LogicType to register by housing index value.|syntax=l r? device(d?{{!}}r?{{!}}id) logicType&lt;br /&gt;
|example=&lt;br /&gt;
Read from the device on d0 into register 0&lt;br /&gt;
{{ICCode|l r0 d0 Setting}}&lt;br /&gt;
Read the pressure from a sensor&lt;br /&gt;
{{ICCode|l r1 d5 Pressure}}&lt;br /&gt;
This also works with aliases. For example:&lt;br /&gt;
{{ICCode|&lt;br /&gt;
alias Sensor d0&lt;br /&gt;
l r0 Sensor Temperature&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=lr|description=Loads reagent of device&#039;s ReagentMode where a hash of the reagent type to check for. ReagentMode can be either Contents (0), Required (1), Recipe (2). Can use either the word, or the number.|syntax=lr r? device(d?{{!}}r?{{!}}id) reagentMode int}}&lt;br /&gt;
{{ICInstruction|instruction=ls|description=Loads slot LogicSlotType on device to register.|syntax=ls r? device(d?{{!}}r?{{!}}id) slotIndex logicSlotType&lt;br /&gt;
|example=&lt;br /&gt;
Read from the second slot of device on d0, stores 1 in r0 if it&#039;s occupied, 0 otherwise.&lt;br /&gt;
{{ICCode|ls r0 d0 2 Occupied}}&lt;br /&gt;
And here is the code to read the charge of an AIMeE:&lt;br /&gt;
{{ICCode|&lt;br /&gt;
alias robot d0&lt;br /&gt;
alias charge r10&lt;br /&gt;
ls charge robot 0 Charge&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=s|description=Stores register value to LogicType on device by housing index value.|syntax=s device(d?{{!}}r?{{!}}id) logicType r?&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
s d0 Setting r0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=ss|description=Stores register value to device stored in a slot LogicSlotType on device.|syntax=ss device(d?{{!}}r?{{!}}id) slotIndex logicSlotType r?}}&lt;br /&gt;
{{ICInstruction|instruction=rmap|description=Given a reagent hash, store the corresponding prefab hash that the device expects to fulfill the reagent requirement. For example, on an autolathe, the hash for Iron will store the hash for ItemIronIngot.|syntax=rmap r? d? reagentHash(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
=== Slot/Logic / Batched ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=lb|description=Loads LogicType from all output network devices with provided type hash using the provide batch mode. Average (0), Sum (1), Minimum (2), Maximum (3). Can use either the word, or the number.|syntax=lb r? deviceHash logicType batchMode&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|lb r0 HASH(&amp;quot;StructureWallLight&amp;quot;) On Sum}}}}&lt;br /&gt;
{{ICInstruction|instruction=lbn|description=Loads LogicType from all output network devices with provided type and name hashes using the provide batch mode. Average (0), Sum (1), Minimum (2), Maximum (3). Can use either the word, or the number.|syntax=lbn r? deviceHash nameHash logicType batchMode}}&lt;br /&gt;
{{ICInstruction|instruction=lbns|description=Loads LogicSlotType from slotIndex from all output network devices with provided type and name hashes using the provide batch mode. Average (0), Sum (1), Minimum (2), Maximum (3). Can use either the word, or the number.|syntax=lbns r? deviceHash nameHash slotIndex logicSlotType batchMode}}&lt;br /&gt;
{{ICInstruction|instruction=lbs|description=Loads LogicSlotType from slotIndex from all output network devices with provided type hash using the provide batch mode. Average (0), Sum (1), Minimum (2), Maximum (3). Can use either the word, or the number.|syntax=lbs r? deviceHash slotIndex logicSlotType batchMode}}&lt;br /&gt;
{{ICInstruction|instruction=sb|description=Stores register value to LogicType on all output network devices with provided type hash.|syntax=sb deviceHash logicType r?&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|sb HASH(&amp;quot;StructureWallLight&amp;quot;) On 1}}}}&lt;br /&gt;
{{ICInstruction|instruction=sbn|description=Stores register value to LogicType on all output network devices with provided type hash and name.|syntax=sbn deviceHash nameHash logicType r?}}&lt;br /&gt;
{{ICInstruction|instruction=sbs|description=Stores register value to LogicSlotType on all output network devices with provided type hash in the provided slot.|syntax=sbs deviceHash slotIndex logicSlotType r?}}&lt;br /&gt;
&lt;br /&gt;
== Bitwise ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=and|description=Performs a bitwise logical AND operation on the binary representation of two values. Each bit of the result is determined by evaluating the corresponding bits of the input values. If both bits are 1, the resulting bit is set to 1. Otherwise the resulting bit is set to 0.|syntax=and r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=nor|description=Performs a bitwise logical NOR (NOT OR) operation on the binary representation of two values. Each bit of the result is determined by evaluating the corresponding bits of the input values. If both bits are 0, the resulting bit is set to 1. Otherwise, if at least one bit is 1, the resulting bit is set to 0.|syntax=nor r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=not|description=Performs a bitwise logical NOT operation flipping each bit of the input value, resulting in a binary complement. If a bit is 1, it becomes 0, and if a bit is 0, it becomes 1.|syntax=not r? a(r?{{!}}num)&lt;br /&gt;
|note=&lt;br /&gt;
This is a bitwise operation, the NOT of 1 =&amp;gt; -2, etc. You may want to use seqz instead}}&lt;br /&gt;
{{ICInstruction|instruction=or|description=Performs a bitwise logical OR operation on the binary representation of two values. Each bit of the result is determined by evaluating the corresponding bits of the input values. If either bit is 1, the resulting bit is set to 1. If both bits are 0, the resulting bit is set to 0.|syntax=or r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sla|description=Performs a bitwise arithmetic left shift operation on the binary representation of a value. It shifts the bits to the left and fills the vacated rightmost bits with zeros (note that this is indistinguishable from &#039;sll&#039;).|syntax=sla r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sll|description=Performs a bitwise logical left shift operation on the binary representation of a value. It shifts the bits to the left and fills the vacated rightmost bits with zeros.|syntax=sll r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sra|description=Performs a bitwise arithmetic right shift operation on the binary representation of a value. It shifts the bits to the right and fills the vacated leftmost bits with a copy of the sign bit (the most significant bit).|syntax=sra r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=srl|description=Performs a bitwise logical right shift operation on the binary representation of a value. It shifts the bits to the right and fills the vacated leftmost bits with zeros|syntax=srl r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=xor|description=Performs a bitwise logical XOR (exclusive OR) operation on the binary representation of two values. Each bit of the result is determined by evaluating the corresponding bits of the input values. If the bits are different (one bit is 0 and the other is 1), the resulting bit is set to 1. If the bits are the same (both 0 or both 1), the resulting bit is set to 0.|syntax=xor r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=ext|description=Extracts a bit field from a, beginning at b for c length and placed in the provided register. Payload cannot exceed 53 bits in final length.|syntax=ext r? a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=ins|description=Inserts a bit field of a into the provided register, beginning at b for c length. Payload cannot exceed 53 bits in final length.&lt;br /&gt;
|syntax=ins r? a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)&lt;br /&gt;
|example= &lt;br /&gt;
{{ICCode|move r0 $DE0000EF&lt;br /&gt;
move r1 $ADBE&lt;br /&gt;
ins r0 r1 8 16 #expected value of r0 is $DEADBEEF}}}}&lt;br /&gt;
&lt;br /&gt;
== Comparison ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=select|description=Register = b if a is non-zero, otherwise c|syntax=select r? a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
&amp;lt;b&amp;gt;1)&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
move r0 &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;quot;&amp;gt;0&amp;lt;/s&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
select &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;gt;r1&amp;lt;/s&amp;gt; r0 10 &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;gt;200&amp;lt;/s&amp;gt;&lt;br /&gt;
{{ICCode|&lt;br /&gt;
move r0 0&lt;br /&gt;
select r1 r0 10 200&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;br/&amp;gt;after run, &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;quot;&amp;gt;r1 = 200&amp;lt;/s&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;b&amp;gt;2)&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
move r0 &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;quot;&amp;gt;5&amp;lt;/s&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
select &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;gt;r1&amp;lt;/s&amp;gt; r0 &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;gt;10&amp;lt;/s&amp;gt; 200&lt;br /&gt;
{{ICCode|&lt;br /&gt;
move r0 1&lt;br /&gt;
select r1 r0 10 100&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;br/&amp;gt;after run, &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;quot;&amp;gt;r1 = 10&amp;lt;/s&amp;gt;&lt;br /&gt;
|note=&lt;br /&gt;
This operation can be used as a simple ternary condition}}&lt;br /&gt;
&lt;br /&gt;
=== Comparison / Device Pin ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=sdns|description=Register = 1 if device is not set, otherwise 0|syntax=sdns r? device(d?{{!}}r?{{!}}id)}}&lt;br /&gt;
{{ICInstruction|instruction=sdse|description=Register = 1 if device is set, otherwise 0.|syntax=sdse r? device(d?{{!}}r?{{!}}id)}}&lt;br /&gt;
&lt;br /&gt;
=== Comparison / Value ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=sap|description=Register = 1 if abs(a - b) &amp;lt;= max(c * max(abs(a), abs(b)), float.epsilon * 8), otherwise 0|syntax=sap r? a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
Set register to 1 if a and b are close enough to each other with the scaling factor of c. Equivalent to Python [https://docs.python.org/3/library/math.html#math.isclose math.isclose]}}&lt;br /&gt;
{{ICInstruction|instruction=sapz|description=Register = 1 if abs(a) &amp;lt;= max(b * abs(a), float.epsilon * 8), otherwise 0|syntax=sapz r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=seq|description=Register = 1 if a == b, otherwise 0|syntax=seq r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=seqz|description=Register = 1 if a == 0, otherwise 0|syntax=seqz r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sge|description=Register = 1 if a &amp;gt;= b, otherwise 0|syntax=sge r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sgez|description=Register = 1 if a &amp;gt;= 0, otherwise 0|syntax=sgez r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sgt|description=Register = 1 if a &amp;gt; b, otherwise 0|syntax=sgt r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sgtz|description=Register = 1 if a &amp;gt; 0, otherwise 0|syntax=sgtz r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sle|description=Register = 1 if a &amp;lt;= b, otherwise 0|syntax=sle r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=slez|description=Register = 1 if a &amp;lt;= 0, otherwise 0|syntax=slez r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=slt|description=Register = 1 if a &amp;lt; b, otherwise 0|syntax=slt r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sltz|description=Register = 1 if a &amp;lt; 0, otherwise 0|syntax=sltz r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sna|description=Register = 1 if abs(a - b) &amp;gt; max(c * max(abs(a), abs(b)), float.epsilon * 8), otherwise 0|syntax=sna r? a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=snan|description=Register = 1 if a is NaN, otherwise 0|syntax=snan r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=snanz|description=Register = 0 if a is NaN, otherwise 1|syntax=snanz r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=snaz|description=Register = 1 if abs(a) &amp;gt; max(b * abs(a), float.epsilon), otherwise 0|syntax=snaz r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sne|description=Register = 1 if a != b, otherwise 0|syntax=sne r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=snez|description=Register = 1 if a != 0, otherwise 0|syntax=snez r? a(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
== Branching ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=j|description=Jump execution to line a|syntax=j int&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|j 0 # jump line 0}}&lt;br /&gt;
{{ICCode|&lt;br /&gt;
j label # jump to a label&lt;br /&gt;
&lt;br /&gt;
label:&lt;br /&gt;
# your code here&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=jal|description=Jump execution to line a and store next line number in ra|syntax=jal int&lt;br /&gt;
|example=&lt;br /&gt;
jal provides a way to do function calls in IC10 mips&lt;br /&gt;
&lt;br /&gt;
{{ICCode|&lt;br /&gt;
move r0 1000&lt;br /&gt;
move r1 0&lt;br /&gt;
start:&lt;br /&gt;
jal average&lt;br /&gt;
s db Setting r0&lt;br /&gt;
yield&lt;br /&gt;
j start&lt;br /&gt;
&lt;br /&gt;
average:&lt;br /&gt;
add r0 r0 r1&lt;br /&gt;
div r0 r0 2&lt;br /&gt;
j ra # jump back&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=jr|description=Relative jump to line a|syntax=jr int}}&lt;br /&gt;
&lt;br /&gt;
=== Branching / Device Pin ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=bdnvl|description=Will branch to line a if the provided device not valid for a load instruction for the provided logic type.|syntax=bdnvl device(d?{{!}}r?{{!}}id) logicType a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bdnvs|description=Will branch to line a if the provided device not valid for a store instruction for the provided logic type.|syntax=bdnvs device(d?{{!}}r?{{!}}id) logicType a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bdns|description=Branch to line a if device d isn&#039;t set|syntax=bdns d? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bdnsal|description=Jump execution to line a and store next line number if device is not set|syntax=bdnsal d? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bdse|description=Branch to line a if device d is set|syntax=bdse d? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bdseal|description=Jump execution to line a and store next line number if device is set|syntax=bdseal d? a(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
#Store line number and jump to line 32 if d0 is assigned.&lt;br /&gt;
bdseal d0 32&lt;br /&gt;
}}&lt;br /&gt;
{{ICCode|&lt;br /&gt;
#Store line in ra and jump to label HarvestCrop if device d0 is assigned.&lt;br /&gt;
bdseal d0 HarvestCrop&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=brdns|description=Relative branch to line a if device is not set|syntax=brdns d? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brdse|description=Relative branch to line a if device is set|syntax=brdse d? a(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
=== Branching / Comparison ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=bap|description=Branch to line d if abs(a - b) &amp;lt;= max(c * max(abs(a), abs(b)), float.epsilon * 8)|syntax=bap a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
Branch if a and b are close enough to each other with the scaling factor of c. Equivalent to Python [https://docs.python.org/3/library/math.html#math.isclose math.isclose]}}&lt;br /&gt;
{{ICInstruction|instruction=brap|description=Relative branch to line d if abs(a - b) &amp;lt;= max(c * max(abs(a), abs(b)), float.epsilon * 8)|syntax=brap a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bapal|description=Branch to line c if a != b and store next line number in ra|syntax=bapal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bapz|description=Branch to line c if abs(a) &amp;lt;= max(b * abs(a), float.epsilon * 8)|syntax=bapz a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brapz|description=Relative branch to line c if abs(a) &amp;lt;= max(b * abs(a), float.epsilon * 8)|syntax=brapz a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bapzal|description=Branch to line c if abs(a) &amp;lt;= max(b * abs(a), float.epsilon * 8) and store next line number in ra|syntax=bapzal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=beq|description=Branch to line c if a == b|syntax=beq a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=breq|description=Relative branch to line c if a == b|syntax=breq a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=beqal|description=Branch to line c if a == b and store next line number in ra|syntax=beqal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=beqz|description=Branch to line b if a == 0|syntax=beqz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=breqz|description=Relative branch to line b if a == 0|syntax=breqz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=beqzal|description=Branch to line b if a == 0 and store next line number in ra|syntax=beqzal a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bge|description=Branch to line c if a &amp;gt;= b|syntax=bge a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brge|description=Relative branch to line c if a &amp;gt;= b|syntax=brge a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgeal|description=Branch to line c if a &amp;gt;= b and store next line number in ra|syntax=bgeal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgez|description=Branch to line b if a &amp;gt;= 0|syntax=bgez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brgez|description=Relative branch to line b if a &amp;gt;= 0|syntax=brgez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgezal|description=Branch to line b if a &amp;gt;= 0 and store next line number in ra|syntax=bgezal a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgt|description=Branch to line c if a &amp;gt; b|syntax=bgt a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
An example of a &#039;&#039;&#039;Schmitt&#039;&#039;&#039; trigger, turning on a device if the temperature is too low, and turning it off if it&#039;s too high and finally&lt;br /&gt;
doing nothing if the temperature is within the desired range.&lt;br /&gt;
{{ICCode|&lt;br /&gt;
alias sensor d0&lt;br /&gt;
alias device d1&lt;br /&gt;
&lt;br /&gt;
define mintemp 293.15&lt;br /&gt;
define maxtemp 298.15&lt;br /&gt;
&lt;br /&gt;
start:&lt;br /&gt;
yield&lt;br /&gt;
l r0 sensor Temperature&lt;br /&gt;
# If the temperature &amp;lt; mintemp, turn on the device&lt;br /&gt;
blt r0 mintemp turnOn&lt;br /&gt;
# If the temperature &amp;gt; maxtemp, turn off the device&lt;br /&gt;
bgt r0 maxtemp turnOff&lt;br /&gt;
j start&lt;br /&gt;
&lt;br /&gt;
turnOn:&lt;br /&gt;
s device On 1&lt;br /&gt;
j start&lt;br /&gt;
turnOff:&lt;br /&gt;
s device On 0&lt;br /&gt;
j start&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=brgt|description=relative branch to line c if a &amp;gt; b|syntax=brgt a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgtal|description=Branch to line c if a &amp;gt; b and store next line number in ra|syntax=bgtal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgtz|description=Branch to line b if a &amp;gt; 0|syntax=bgtz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brgtz|description=Relative branch to line b if a &amp;gt; 0|syntax=brgtz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgtzal|description=Branch to line b if a &amp;gt; 0 and store next line number in ra|syntax=bgtzal a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=ble|description=Branch to line c if a &amp;lt;= b|syntax=ble a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brle|description=Relative branch to line c if a &amp;lt;= b|syntax=brle a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bleal|description=Branch to line c if a &amp;lt;= b and store next line number in ra|syntax=bleal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=blez|description=Branch to line b if a &amp;lt;= 0|syntax=blez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brlez|description=Relative branch to line b if a &amp;lt;= 0|syntax=brlez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=blezal|description=Branch to line b if a &amp;lt;= 0 and store next line number in ra|syntax=blezal a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=blt|description=Branch to line c if a &amp;lt; b|syntax=blt a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
An example of a &#039;&#039;&#039;Schmitt&#039;&#039;&#039; trigger, turning on a device if the temperature is too low, and turning it off if it&#039;s too high and finally&lt;br /&gt;
doing nothing if the temperature is within the desired range.&lt;br /&gt;
{{ICCode|&lt;br /&gt;
alias sensor d0&lt;br /&gt;
alias device d1&lt;br /&gt;
&lt;br /&gt;
define mintemp 293.15&lt;br /&gt;
define maxtemp 298.15&lt;br /&gt;
&lt;br /&gt;
start:&lt;br /&gt;
yield&lt;br /&gt;
l r0 sensor Temperature&lt;br /&gt;
# If the temperature &amp;lt; mintemp, turn on the device&lt;br /&gt;
blt r0 mintemp turnOn&lt;br /&gt;
# If the temperature &amp;gt; maxtemp, turn off the device&lt;br /&gt;
bgt r0 maxtemp turnOff&lt;br /&gt;
j start&lt;br /&gt;
&lt;br /&gt;
turnOn:&lt;br /&gt;
s device On 1&lt;br /&gt;
j start&lt;br /&gt;
turnOff:&lt;br /&gt;
s device On 0&lt;br /&gt;
j start&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=brlt|description=Relative branch to line c if a &amp;lt; b|syntax=brlt a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bltal|description=Branch to line c if a &amp;lt; b and store next line number in ra|syntax=bltal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bltz|description=Branch to line b if a &amp;lt; 0|syntax=bltz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brltz|description=Relative branch to line b if a &amp;lt; 0|syntax=brltz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bltzal|description=Branch to line b if a &amp;lt; 0 and store next line number in ra|syntax=bltzal a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bna|description=Branch to line d if abs(a - b) &amp;gt; max(c * max(abs(a), abs(b)), float.epsilon * 8)|syntax=bna a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brna|description=Relative branch to line d if abs(a - b) &amp;gt; max(c * max(abs(a), abs(b)), float.epsilon * 8)|syntax=brna a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnaal|description=Branch to line d if abs(a - b) &amp;lt;= max(c * max(abs(a), abs(b)), float.epsilon * 8) and store next line number in ra|syntax=bnaal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnan|description=Branch to line b if a is not a number (NaN)|syntax=bnan a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brnan|description=Relative branch to line b if a is not a number (NaN)|syntax=brnan a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnaz|description=Branch to line c if abs(a) &amp;gt; max (b * abs(a), float.epsilon * 8)|syntax=bnaz a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brnaz|description=Relative branch to line c if abs(a) &amp;gt; max(b * abs(a), float.epsilon * 8)|syntax=brnaz a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnazal|description=Branch to line c if abs(a) &amp;gt; max (b * abs(a), float.epsilon * 8) and store next line number in ra|syntax=bnazal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bne|description=Branch to line c if a != b|syntax=bne a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brne|description=Relative branch to line c if a != b|syntax=brne a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bneal|description=Branch to line c if a != b and store next line number in ra|syntax=bneal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnez|description=branch to line b if a != 0|syntax=bnez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brnez|description=Relative branch to line b if a != 0|syntax=brnez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnezal|description=Branch to line b if a != 0 and store next line number in ra|syntax=bnezal a(r?{{!}}num) b(r?{{!}}num)}}&lt;/div&gt;</summary>
		<author><name>Veriszg</name></author>
	</entry>
	<entry>
		<id>https://stationeers-wiki.com/index.php?title=IC10/instructions&amp;diff=25499</id>
		<title>IC10/instructions</title>
		<link rel="alternate" type="text/html" href="https://stationeers-wiki.com/index.php?title=IC10/instructions&amp;diff=25499"/>
		<updated>2026-01-12T20:08:10Z</updated>

		<summary type="html">&lt;p&gt;Veriszg: /* Bitwise */ ins had an error, corrected desc&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
See [[IC10]] for the primary page for the IC10 instruction set. This page lists all available instructions&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Utility ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=alias|description=Labels register or device reference with name, device references also affect what shows on the screws on the IC base.|syntax=alias str r?{{!}}d?&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
alias dAutoHydro1 d0&lt;br /&gt;
alias vTemperature r0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=define|description=Creates a label that will be replaced throughout the program with the provided value.|syntax=define str num&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
define ultimateAnswer 42&lt;br /&gt;
move r0 ultimateAnswer # Store 42 in register 0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=hcf|description=Halt and catch fire|syntax=hcf}}&lt;br /&gt;
{{ICInstruction|instruction=sleep|description=Pauses execution on the IC for a seconds|syntax=sleep a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=yield|description=Pauses execution for 1 tick|syntax=yield}}&lt;br /&gt;
&lt;br /&gt;
== Mathematical ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=abs|description=Register = the absolute value of a|syntax=abs r? a(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
define negativeNumber -10&lt;br /&gt;
abs r0 negativeNumber # Compute the absolute value of -10 and store it in register 0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=add|description=Register = a + b.|syntax=add r? a(r?{{!}}num) b(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|add r0 r0 1 # increment r0 by one}}&lt;br /&gt;
{{ICCode|&lt;br /&gt;
define num1 10&lt;br /&gt;
define num2 20&lt;br /&gt;
add r0 num1 num2 # Add 10 and 20 and store the result in register 0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=ceil|description=Register = smallest integer greater than a|syntax=ceil r? a(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
define floatNumber 10.3&lt;br /&gt;
ceil r0 floatNumber # Compute the ceiling of 10.3 and store it in register 0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=div|description=Register = a / b|syntax=div r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=pow|description=Stores the result of raising a to the power of b in the register. Follows IEEE-754 standard for floating point arithmetic.|syntax=pow r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=exp|description=exp(a) or e^a|syntax=exp r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=floor|description=Register = largest integer less than a|syntax=floor r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=log|description=base e log(a) or ln(a)|syntax=log r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=max|description=Register = max of a or b|syntax=max r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=min|description=Register = min of a or b|syntax=min r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=mod|description=Register = a mod b (note: NOT a % b)|syntax=mod r? a(r?{{!}}num) b(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
mod r0 10 20 # Expected: r0 = 10&lt;br /&gt;
mod r1 22 20 # Expected: r1 = 2&lt;br /&gt;
mod r2 22 -20 # Expected: r2 = 18&lt;br /&gt;
mod r2 22 -10 # Expected: r2 = 18&lt;br /&gt;
mod r2 -7 4 # Expected: r2 = 1&lt;br /&gt;
mod r2 -7 9 # Expected: r2 = 2&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=move|description=Register = provided num or register value.|syntax=move r? a(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|move r0 42 # Store 42 in register 0}}}}&lt;br /&gt;
{{ICInstruction|instruction=mul|description=Register = a * b|syntax=mul r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=rand|description=Register = a random value x with 0 &amp;lt;= x &amp;lt; 1|syntax=rand r?}}&lt;br /&gt;
{{ICInstruction|instruction=round|description=Register = a rounded to nearest integer|syntax=round r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sqrt|description=Register = square root of a|syntax=sqrt r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sub|description=Register = a - b.|syntax=sub r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=trunc|description=Register = a with fractional part removed|syntax=trunc r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=lerp|description=Linearly interpolates between a and b by the ratio c, and places the result in the register provided. The ratio c will be clamped between 0 and 1.|syntax=lerp r? a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
=== Mathematical / Trigonometric ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=acos|description=Returns the angle (radians) whos cos is the specified value|syntax=acos r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=asin|description=Returns the angle (radians) whos sine is the specified value|syntax=asin r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=atan|description=Returns the angle (radians) whos tan is the specified value|syntax=atan r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=atan2|description=Returns the angle (radians) whose tangent is the quotient of two specified values: a (y) and b (x)|syntax=atan2 r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=cos|description=Returns the cosine of the specified angle (radians)|syntax=cos r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sin|description=Returns the sine of the specified angle (radians)|syntax=sin r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=tan|description=Returns the tan of the specified angle (radians) |syntax=tan r? a(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
== Stack ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=clr|description=Clears the stack memory for the provided device.|syntax=clr d?}}&lt;br /&gt;
{{ICInstruction|instruction=clrd|description=Seeks directly for the provided device id and clears the stack memory of that device|syntax=clrd id(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=get|description=Using the provided device, attempts to read the stack value at the provided address, and places it in the register.|syntax=get r? device(d?{{!}}r?{{!}}id) address(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=getd|description=Seeks directly for the provided device id, attempts to read the stack value at the provided address, and places it in the register.|syntax=getd r? id(r?{{!}}id) address(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=peek|description=Register = the value at the top of the stack|syntax=peek r?}}&lt;br /&gt;
{{ICInstruction|instruction=poke|description=Stores the provided value at the provided address in the stack.|syntax=poke address(r?{{!}}num) value(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=pop|description=Register = the value at the top of the stack and decrements sp|syntax=pop r?}}&lt;br /&gt;
{{ICInstruction|instruction=push|description=Pushes the value of a to the stack at sp and increments sp|syntax=push a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=put|description=Using the provided device, attempts to write the provided value to the stack at the provided address.|syntax=put device(d?{{!}}r?{{!}}id) address(r?{{!}}num) value(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=putd|description=Seeks directly for the provided device id, attempts to write the provided value to the stack at the provided address.|syntax=putd id(r?{{!}}id) address(r?{{!}}num) value(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
== Slot/Logic ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=l|description=Loads device LogicType to register by housing index value.|syntax=l r? device(d?{{!}}r?{{!}}id) logicType&lt;br /&gt;
|example=&lt;br /&gt;
Read from the device on d0 into register 0&lt;br /&gt;
{{ICCode|l r0 d0 Setting}}&lt;br /&gt;
Read the pressure from a sensor&lt;br /&gt;
{{ICCode|l r1 d5 Pressure}}&lt;br /&gt;
This also works with aliases. For example:&lt;br /&gt;
{{ICCode|&lt;br /&gt;
alias Sensor d0&lt;br /&gt;
l r0 Sensor Temperature&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=lr|description=Loads reagent of device&#039;s ReagentMode where a hash of the reagent type to check for. ReagentMode can be either Contents (0), Required (1), Recipe (2). Can use either the word, or the number.|syntax=lr r? device(d?{{!}}r?{{!}}id) reagentMode int}}&lt;br /&gt;
{{ICInstruction|instruction=ls|description=Loads slot LogicSlotType on device to register.|syntax=ls r? device(d?{{!}}r?{{!}}id) slotIndex logicSlotType&lt;br /&gt;
|example=&lt;br /&gt;
Read from the second slot of device on d0, stores 1 in r0 if it&#039;s occupied, 0 otherwise.&lt;br /&gt;
{{ICCode|ls r0 d0 2 Occupied}}&lt;br /&gt;
And here is the code to read the charge of an AIMeE:&lt;br /&gt;
{{ICCode|&lt;br /&gt;
alias robot d0&lt;br /&gt;
alias charge r10&lt;br /&gt;
ls charge robot 0 Charge&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=s|description=Stores register value to LogicType on device by housing index value.|syntax=s device(d?{{!}}r?{{!}}id) logicType r?&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
s d0 Setting r0&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=ss|description=Stores register value to device stored in a slot LogicSlotType on device.|syntax=ss device(d?{{!}}r?{{!}}id) slotIndex logicSlotType r?}}&lt;br /&gt;
{{ICInstruction|instruction=rmap|description=Given a reagent hash, store the corresponding prefab hash that the device expects to fulfill the reagent requirement. For example, on an autolathe, the hash for Iron will store the hash for ItemIronIngot.|syntax=rmap r? d? reagentHash(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
=== Slot/Logic / Batched ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=lb|description=Loads LogicType from all output network devices with provided type hash using the provide batch mode. Average (0), Sum (1), Minimum (2), Maximum (3). Can use either the word, or the number.|syntax=lb r? deviceHash logicType batchMode&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|lb r0 HASH(&amp;quot;StructureWallLight&amp;quot;) On Sum}}}}&lt;br /&gt;
{{ICInstruction|instruction=lbn|description=Loads LogicType from all output network devices with provided type and name hashes using the provide batch mode. Average (0), Sum (1), Minimum (2), Maximum (3). Can use either the word, or the number.|syntax=lbn r? deviceHash nameHash logicType batchMode}}&lt;br /&gt;
{{ICInstruction|instruction=lbns|description=Loads LogicSlotType from slotIndex from all output network devices with provided type and name hashes using the provide batch mode. Average (0), Sum (1), Minimum (2), Maximum (3). Can use either the word, or the number.|syntax=lbns r? deviceHash nameHash slotIndex logicSlotType batchMode}}&lt;br /&gt;
{{ICInstruction|instruction=lbs|description=Loads LogicSlotType from slotIndex from all output network devices with provided type hash using the provide batch mode. Average (0), Sum (1), Minimum (2), Maximum (3). Can use either the word, or the number.|syntax=lbs r? deviceHash slotIndex logicSlotType batchMode}}&lt;br /&gt;
{{ICInstruction|instruction=sb|description=Stores register value to LogicType on all output network devices with provided type hash.|syntax=sb deviceHash logicType r?&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|sb HASH(&amp;quot;StructureWallLight&amp;quot;) On 1}}}}&lt;br /&gt;
{{ICInstruction|instruction=sbn|description=Stores register value to LogicType on all output network devices with provided type hash and name.|syntax=sbn deviceHash nameHash logicType r?}}&lt;br /&gt;
{{ICInstruction|instruction=sbs|description=Stores register value to LogicSlotType on all output network devices with provided type hash in the provided slot.|syntax=sbs deviceHash slotIndex logicSlotType r?}}&lt;br /&gt;
&lt;br /&gt;
== Bitwise ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=and|description=Performs a bitwise logical AND operation on the binary representation of two values. Each bit of the result is determined by evaluating the corresponding bits of the input values. If both bits are 1, the resulting bit is set to 1. Otherwise the resulting bit is set to 0.|syntax=and r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=nor|description=Performs a bitwise logical NOR (NOT OR) operation on the binary representation of two values. Each bit of the result is determined by evaluating the corresponding bits of the input values. If both bits are 0, the resulting bit is set to 1. Otherwise, if at least one bit is 1, the resulting bit is set to 0.|syntax=nor r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=not|description=Performs a bitwise logical NOT operation flipping each bit of the input value, resulting in a binary complement. If a bit is 1, it becomes 0, and if a bit is 0, it becomes 1.|syntax=not r? a(r?{{!}}num)&lt;br /&gt;
|note=&lt;br /&gt;
This is a bitwise operation, the NOT of 1 =&amp;gt; -2, etc. You may want to use seqz instead}}&lt;br /&gt;
{{ICInstruction|instruction=or|description=Performs a bitwise logical OR operation on the binary representation of two values. Each bit of the result is determined by evaluating the corresponding bits of the input values. If either bit is 1, the resulting bit is set to 1. If both bits are 0, the resulting bit is set to 0.|syntax=or r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sla|description=Performs a bitwise arithmetic left shift operation on the binary representation of a value. It shifts the bits to the left and fills the vacated rightmost bits with zeros (note that this is indistinguishable from &#039;sll&#039;).|syntax=sla r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sll|description=Performs a bitwise logical left shift operation on the binary representation of a value. It shifts the bits to the left and fills the vacated rightmost bits with zeros.|syntax=sll r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sra|description=Performs a bitwise arithmetic right shift operation on the binary representation of a value. It shifts the bits to the right and fills the vacated leftmost bits with a copy of the sign bit (the most significant bit).|syntax=sra r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=srl|description=Performs a bitwise logical right shift operation on the binary representation of a value. It shifts the bits to the right and fills the vacated leftmost bits with zeros|syntax=srl r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=xor|description=Performs a bitwise logical XOR (exclusive OR) operation on the binary representation of two values. Each bit of the result is determined by evaluating the corresponding bits of the input values. If the bits are different (one bit is 0 and the other is 1), the resulting bit is set to 1. If the bits are the same (both 0 or both 1), the resulting bit is set to 0.|syntax=xor r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=ext|description=Extracts a bit field from a, beginning at b for c length and placed in the provided register. Payload cannot exceed 53 bits in final length.|syntax=ext r? a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=ins|description=Inserts a bit field of a into the provided register, beginning at b for c length. Payload cannot exceed 53 bits in final length.&lt;br /&gt;
|syntax=ins r? a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)&lt;br /&gt;
|example= &lt;br /&gt;
{{ICCode|move r0 $DE0000EF&lt;br /&gt;
move r1 $ADBE&lt;br /&gt;
ins r0 8 16 r1 #expected value of r0 is $DEADBEEF}}}}&lt;br /&gt;
&lt;br /&gt;
== Comparison ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=select|description=Register = b if a is non-zero, otherwise c|syntax=select r? a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
&amp;lt;b&amp;gt;1)&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
move r0 &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;quot;&amp;gt;0&amp;lt;/s&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
select &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;gt;r1&amp;lt;/s&amp;gt; r0 10 &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;gt;200&amp;lt;/s&amp;gt;&lt;br /&gt;
{{ICCode|&lt;br /&gt;
move r0 0&lt;br /&gt;
select r1 r0 10 200&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;br/&amp;gt;after run, &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;quot;&amp;gt;r1 = 200&amp;lt;/s&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;b&amp;gt;2)&amp;lt;/b&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
move r0 &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;quot;&amp;gt;5&amp;lt;/s&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
select &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;gt;r1&amp;lt;/s&amp;gt; r0 &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;gt;10&amp;lt;/s&amp;gt; 200&lt;br /&gt;
{{ICCode|&lt;br /&gt;
move r0 1&lt;br /&gt;
select r1 r0 10 100&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;br/&amp;gt;after run, &amp;lt;s style=&amp;quot;text-decoration-line:underline;text-decoration-color:red;&amp;quot;&amp;gt;r1 = 10&amp;lt;/s&amp;gt;&lt;br /&gt;
|note=&lt;br /&gt;
This operation can be used as a simple ternary condition}}&lt;br /&gt;
&lt;br /&gt;
=== Comparison / Device Pin ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=sdns|description=Register = 1 if device is not set, otherwise 0|syntax=sdns r? device(d?{{!}}r?{{!}}id)}}&lt;br /&gt;
{{ICInstruction|instruction=sdse|description=Register = 1 if device is set, otherwise 0.|syntax=sdse r? device(d?{{!}}r?{{!}}id)}}&lt;br /&gt;
&lt;br /&gt;
=== Comparison / Value ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=sap|description=Register = 1 if abs(a - b) &amp;lt;= max(c * max(abs(a), abs(b)), float.epsilon * 8), otherwise 0|syntax=sap r? a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
Set register to 1 if a and b are close enough to each other with the scaling factor of c. Equivalent to Python [https://docs.python.org/3/library/math.html#math.isclose math.isclose]}}&lt;br /&gt;
{{ICInstruction|instruction=sapz|description=Register = 1 if abs(a) &amp;lt;= max(b * abs(a), float.epsilon * 8), otherwise 0|syntax=sapz r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=seq|description=Register = 1 if a == b, otherwise 0|syntax=seq r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=seqz|description=Register = 1 if a == 0, otherwise 0|syntax=seqz r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sge|description=Register = 1 if a &amp;gt;= b, otherwise 0|syntax=sge r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sgez|description=Register = 1 if a &amp;gt;= 0, otherwise 0|syntax=sgez r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sgt|description=Register = 1 if a &amp;gt; b, otherwise 0|syntax=sgt r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sgtz|description=Register = 1 if a &amp;gt; 0, otherwise 0|syntax=sgtz r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sle|description=Register = 1 if a &amp;lt;= b, otherwise 0|syntax=sle r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=slez|description=Register = 1 if a &amp;lt;= 0, otherwise 0|syntax=slez r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=slt|description=Register = 1 if a &amp;lt; b, otherwise 0|syntax=slt r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sltz|description=Register = 1 if a &amp;lt; 0, otherwise 0|syntax=sltz r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sna|description=Register = 1 if abs(a - b) &amp;gt; max(c * max(abs(a), abs(b)), float.epsilon * 8), otherwise 0|syntax=sna r? a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=snan|description=Register = 1 if a is NaN, otherwise 0|syntax=snan r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=snanz|description=Register = 0 if a is NaN, otherwise 1|syntax=snanz r? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=snaz|description=Register = 1 if abs(a) &amp;gt; max(b * abs(a), float.epsilon), otherwise 0|syntax=snaz r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=sne|description=Register = 1 if a != b, otherwise 0|syntax=sne r? a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=snez|description=Register = 1 if a != 0, otherwise 0|syntax=snez r? a(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
== Branching ==&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=j|description=Jump execution to line a|syntax=j int&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|j 0 # jump line 0}}&lt;br /&gt;
{{ICCode|&lt;br /&gt;
j label # jump to a label&lt;br /&gt;
&lt;br /&gt;
label:&lt;br /&gt;
# your code here&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=jal|description=Jump execution to line a and store next line number in ra|syntax=jal int&lt;br /&gt;
|example=&lt;br /&gt;
jal provides a way to do function calls in IC10 mips&lt;br /&gt;
&lt;br /&gt;
{{ICCode|&lt;br /&gt;
move r0 1000&lt;br /&gt;
move r1 0&lt;br /&gt;
start:&lt;br /&gt;
jal average&lt;br /&gt;
s db Setting r0&lt;br /&gt;
yield&lt;br /&gt;
j start&lt;br /&gt;
&lt;br /&gt;
average:&lt;br /&gt;
add r0 r0 r1&lt;br /&gt;
div r0 r0 2&lt;br /&gt;
j ra # jump back&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=jr|description=Relative jump to line a|syntax=jr int}}&lt;br /&gt;
&lt;br /&gt;
=== Branching / Device Pin ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=bdnvl|description=Will branch to line a if the provided device not valid for a load instruction for the provided logic type.|syntax=bdnvl device(d?{{!}}r?{{!}}id) logicType a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bdnvs|description=Will branch to line a if the provided device not valid for a store instruction for the provided logic type.|syntax=bdnvs device(d?{{!}}r?{{!}}id) logicType a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bdns|description=Branch to line a if device d isn&#039;t set|syntax=bdns d? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bdnsal|description=Jump execution to line a and store next line number if device is not set|syntax=bdnsal d? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bdse|description=Branch to line a if device d is set|syntax=bdse d? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bdseal|description=Jump execution to line a and store next line number if device is set|syntax=bdseal d? a(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
{{ICCode|&lt;br /&gt;
#Store line number and jump to line 32 if d0 is assigned.&lt;br /&gt;
bdseal d0 32&lt;br /&gt;
}}&lt;br /&gt;
{{ICCode|&lt;br /&gt;
#Store line in ra and jump to label HarvestCrop if device d0 is assigned.&lt;br /&gt;
bdseal d0 HarvestCrop&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=brdns|description=Relative branch to line a if device is not set|syntax=brdns d? a(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brdse|description=Relative branch to line a if device is set|syntax=brdse d? a(r?{{!}}num)}}&lt;br /&gt;
&lt;br /&gt;
=== Branching / Comparison ===&lt;br /&gt;
&lt;br /&gt;
{{ICInstruction|instruction=bap|description=Branch to line d if abs(a - b) &amp;lt;= max(c * max(abs(a), abs(b)), float.epsilon * 8)|syntax=bap a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
Branch if a and b are close enough to each other with the scaling factor of c. Equivalent to Python [https://docs.python.org/3/library/math.html#math.isclose math.isclose]}}&lt;br /&gt;
{{ICInstruction|instruction=brap|description=Relative branch to line d if abs(a - b) &amp;lt;= max(c * max(abs(a), abs(b)), float.epsilon * 8)|syntax=brap a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bapal|description=Branch to line c if a != b and store next line number in ra|syntax=bapal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bapz|description=Branch to line c if abs(a) &amp;lt;= max(b * abs(a), float.epsilon * 8)|syntax=bapz a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brapz|description=Relative branch to line c if abs(a) &amp;lt;= max(b * abs(a), float.epsilon * 8)|syntax=brapz a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bapzal|description=Branch to line c if abs(a) &amp;lt;= max(b * abs(a), float.epsilon * 8) and store next line number in ra|syntax=bapzal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=beq|description=Branch to line c if a == b|syntax=beq a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=breq|description=Relative branch to line c if a == b|syntax=breq a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=beqal|description=Branch to line c if a == b and store next line number in ra|syntax=beqal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=beqz|description=Branch to line b if a == 0|syntax=beqz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=breqz|description=Relative branch to line b if a == 0|syntax=breqz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=beqzal|description=Branch to line b if a == 0 and store next line number in ra|syntax=beqzal a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bge|description=Branch to line c if a &amp;gt;= b|syntax=bge a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brge|description=Relative branch to line c if a &amp;gt;= b|syntax=brge a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgeal|description=Branch to line c if a &amp;gt;= b and store next line number in ra|syntax=bgeal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgez|description=Branch to line b if a &amp;gt;= 0|syntax=bgez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brgez|description=Relative branch to line b if a &amp;gt;= 0|syntax=brgez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgezal|description=Branch to line b if a &amp;gt;= 0 and store next line number in ra|syntax=bgezal a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgt|description=Branch to line c if a &amp;gt; b|syntax=bgt a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
An example of a &#039;&#039;&#039;Schmitt&#039;&#039;&#039; trigger, turning on a device if the temperature is too low, and turning it off if it&#039;s too high and finally&lt;br /&gt;
doing nothing if the temperature is within the desired range.&lt;br /&gt;
{{ICCode|&lt;br /&gt;
alias sensor d0&lt;br /&gt;
alias device d1&lt;br /&gt;
&lt;br /&gt;
define mintemp 293.15&lt;br /&gt;
define maxtemp 298.15&lt;br /&gt;
&lt;br /&gt;
start:&lt;br /&gt;
yield&lt;br /&gt;
l r0 sensor Temperature&lt;br /&gt;
# If the temperature &amp;lt; mintemp, turn on the device&lt;br /&gt;
blt r0 mintemp turnOn&lt;br /&gt;
# If the temperature &amp;gt; maxtemp, turn off the device&lt;br /&gt;
bgt r0 maxtemp turnOff&lt;br /&gt;
j start&lt;br /&gt;
&lt;br /&gt;
turnOn:&lt;br /&gt;
s device On 1&lt;br /&gt;
j start&lt;br /&gt;
turnOff:&lt;br /&gt;
s device On 0&lt;br /&gt;
j start&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=brgt|description=relative branch to line c if a &amp;gt; b|syntax=brgt a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgtal|description=Branch to line c if a &amp;gt; b and store next line number in ra|syntax=bgtal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgtz|description=Branch to line b if a &amp;gt; 0|syntax=bgtz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brgtz|description=Relative branch to line b if a &amp;gt; 0|syntax=brgtz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bgtzal|description=Branch to line b if a &amp;gt; 0 and store next line number in ra|syntax=bgtzal a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=ble|description=Branch to line c if a &amp;lt;= b|syntax=ble a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brle|description=Relative branch to line c if a &amp;lt;= b|syntax=brle a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bleal|description=Branch to line c if a &amp;lt;= b and store next line number in ra|syntax=bleal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=blez|description=Branch to line b if a &amp;lt;= 0|syntax=blez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brlez|description=Relative branch to line b if a &amp;lt;= 0|syntax=brlez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=blezal|description=Branch to line b if a &amp;lt;= 0 and store next line number in ra|syntax=blezal a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=blt|description=Branch to line c if a &amp;lt; b|syntax=blt a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)&lt;br /&gt;
|example=&lt;br /&gt;
An example of a &#039;&#039;&#039;Schmitt&#039;&#039;&#039; trigger, turning on a device if the temperature is too low, and turning it off if it&#039;s too high and finally&lt;br /&gt;
doing nothing if the temperature is within the desired range.&lt;br /&gt;
{{ICCode|&lt;br /&gt;
alias sensor d0&lt;br /&gt;
alias device d1&lt;br /&gt;
&lt;br /&gt;
define mintemp 293.15&lt;br /&gt;
define maxtemp 298.15&lt;br /&gt;
&lt;br /&gt;
start:&lt;br /&gt;
yield&lt;br /&gt;
l r0 sensor Temperature&lt;br /&gt;
# If the temperature &amp;lt; mintemp, turn on the device&lt;br /&gt;
blt r0 mintemp turnOn&lt;br /&gt;
# If the temperature &amp;gt; maxtemp, turn off the device&lt;br /&gt;
bgt r0 maxtemp turnOff&lt;br /&gt;
j start&lt;br /&gt;
&lt;br /&gt;
turnOn:&lt;br /&gt;
s device On 1&lt;br /&gt;
j start&lt;br /&gt;
turnOff:&lt;br /&gt;
s device On 0&lt;br /&gt;
j start&lt;br /&gt;
}}}}&lt;br /&gt;
{{ICInstruction|instruction=brlt|description=Relative branch to line c if a &amp;lt; b|syntax=brlt a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bltal|description=Branch to line c if a &amp;lt; b and store next line number in ra|syntax=bltal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bltz|description=Branch to line b if a &amp;lt; 0|syntax=bltz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brltz|description=Relative branch to line b if a &amp;lt; 0|syntax=brltz a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bltzal|description=Branch to line b if a &amp;lt; 0 and store next line number in ra|syntax=bltzal a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bna|description=Branch to line d if abs(a - b) &amp;gt; max(c * max(abs(a), abs(b)), float.epsilon * 8)|syntax=bna a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brna|description=Relative branch to line d if abs(a - b) &amp;gt; max(c * max(abs(a), abs(b)), float.epsilon * 8)|syntax=brna a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnaal|description=Branch to line d if abs(a - b) &amp;lt;= max(c * max(abs(a), abs(b)), float.epsilon * 8) and store next line number in ra|syntax=bnaal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num) d(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnan|description=Branch to line b if a is not a number (NaN)|syntax=bnan a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brnan|description=Relative branch to line b if a is not a number (NaN)|syntax=brnan a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnaz|description=Branch to line c if abs(a) &amp;gt; max (b * abs(a), float.epsilon * 8)|syntax=bnaz a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brnaz|description=Relative branch to line c if abs(a) &amp;gt; max(b * abs(a), float.epsilon * 8)|syntax=brnaz a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnazal|description=Branch to line c if abs(a) &amp;gt; max (b * abs(a), float.epsilon * 8) and store next line number in ra|syntax=bnazal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bne|description=Branch to line c if a != b|syntax=bne a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brne|description=Relative branch to line c if a != b|syntax=brne a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bneal|description=Branch to line c if a != b and store next line number in ra|syntax=bneal a(r?{{!}}num) b(r?{{!}}num) c(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnez|description=branch to line b if a != 0|syntax=bnez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=brnez|description=Relative branch to line b if a != 0|syntax=brnez a(r?{{!}}num) b(r?{{!}}num)}}&lt;br /&gt;
{{ICInstruction|instruction=bnezal|description=Branch to line b if a != 0 and store next line number in ra|syntax=bnezal a(r?{{!}}num) b(r?{{!}}num)}}&lt;/div&gt;</summary>
		<author><name>Veriszg</name></author>
	</entry>
	<entry>
		<id>https://stationeers-wiki.com/index.php?title=Sorter&amp;diff=25331</id>
		<title>Sorter</title>
		<link rel="alternate" type="text/html" href="https://stationeers-wiki.com/index.php?title=Sorter&amp;diff=25331"/>
		<updated>2026-01-04T12:10:44Z</updated>

		<summary type="html">&lt;p&gt;Veriszg: ic10 edit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Structurebox&lt;br /&gt;
| name = Sorter&lt;br /&gt;
| image = [[File:StructureSorter.png]]&lt;br /&gt;
| prefab_hash = -1009150565&lt;br /&gt;
| prefab_name = StructureSorter&lt;br /&gt;
| power_usage = 5W&lt;br /&gt;
| placed_on_grid = Small Grid&lt;br /&gt;
| decon_with_tool1 = [[Hand Drill]]&lt;br /&gt;
| placed_with_item = [[Kit (Sorter)]]&lt;br /&gt;
| item_rec1 = [[Kit (Sorter)]]&lt;br /&gt;
}}&lt;br /&gt;
{{Distinguish|Logic Sorter}}&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;lt;q&amp;gt;No amount of automation is complete without some way of moving different items to different parts of a system. The [[Xigo (Faction)|Xigo]] A2B sorter can be programmed via a computer with a [[Sorter Motherboard]] to direct various items into different chute networks. Filtered items are always passed out the righthand side of the sorter, while non filtered items continue straight through.&amp;lt;/q&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;- Stationpedia&#039;&#039;&#039;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mode 0 (Split):&#039;&#039;&#039; Items alternate between output lanes automatically. The Output property switches between 0 and 1 after each item.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mode 1 (Filter):&#039;&#039;&#039; Requires a [[computer]] with a [[Motherboard|Motherboard (Sorter)]]. Whitelisted items exit one lane, all others exit the alternate lane. When facing the output side (power switch on your right), whitelisted items exit left, rejected items exit right. &#039;&#039;&#039;Note:&#039;&#039;&#039; Some players report issues with the Motherboard (Sorter) interface. Consider using Mode 2 (Logic) with [[IC10]] as a more reliable alternative.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mode 2 (Logic):&#039;&#039;&#039; The sorter waits for [[IC10]] or logic chips to set the Output parameter (0 or 1) before releasing each item. After the item exits, Output resets to -1 automatically. Your controller must set Output for every item - this is intended behavior, not a bug. See [[#Example IC10 sorting script|Example IC10 sorting script]] below for a working implementation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Output orientation:&#039;&#039;&#039; When facing outputs with power switch on your right: Output 0 exits right (near power switch), Output 1 exits left.&lt;br /&gt;
&lt;br /&gt;
{{Data Network Header}}&lt;br /&gt;
&lt;br /&gt;
{{Data Parameters|&lt;br /&gt;
{{Data Parameters/row|Power|Boolean|w=0|Can be read to return if the Sorter is correctly powered or not, set via the power system, return 1 if powered and 0 if not|multiple=2|0|Unpowered|1|Powered}}&lt;br /&gt;
{{Data Parameters/row|Mode|Integer|The mode of the Sorter, &#039;&#039;&#039;Split&#039;&#039;&#039; does alternate outputs, &#039;&#039;&#039;Filter&#039;&#039;&#039; decides output via [[Motherboard (Sorter)]], &#039;&#039;&#039;Logic&#039;&#039;&#039; determines output via parameter &#039;&#039;&#039;Output&#039;&#039;&#039;|multiple=3|0|Split|1|Filter|2|Logic}}&lt;br /&gt;
{{Data Parameters/row|Error|Boolean|w=0|1 if device is in error state, otherwise 0|multiple=2|0|&amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;|1|Error}}&lt;br /&gt;
{{Data Parameters/row|Lock|Boolean|Disable manual operation of the Sorter.|multiple=2|0|Unlocked|1|Locked}}&lt;br /&gt;
{{Data Parameters/row|On|Boolean|The current state of the Sorter.|multiple=2|0|Off|1|On}}&lt;br /&gt;
{{Data Parameters/row|RequiredPower|Integer|w=0|Idle operating power quantity, does not necessarily include extra demand power}}&lt;br /&gt;
{{Data Parameters/row|ClearMemory|Integer|r=0|When set to 1, clears the counter memory (e.g. ExportCount). Will set itself back to 0 when actioned}}&lt;br /&gt;
{{Data Parameters/row|ExportCount|Integer|w=0|How many items exported since last ClearMemory}}&lt;br /&gt;
{{Data Parameters/row|ImportCount|Integer|w=0|How many items imported since last ClearMemory}}&lt;br /&gt;
{{Data Parameters/row|Output|Integer|&amp;lt;div&amp;gt;Decides which side the next item will be sent to.&amp;lt;br&amp;gt;&lt;br /&gt;
In &#039;&#039;&#039;Logic&#039;&#039;&#039; mode, defaults to -1 after action. In &#039;&#039;&#039;Split&#039;&#039;&#039; mode, alternates between 0 and 1 after action. Does nothing in &#039;&#039;&#039;Filter&#039;&#039;&#039; mode.&amp;lt;br&amp;gt;&lt;br /&gt;
When set to 0 the item will exit the output slot closest to the power switch.  When set to 1, the item will exit the slot furthest from the power switch.&amp;lt;/div&amp;gt;|multiple=3|-1|Unset|0|Straight (Near Power Switch)|1|Side}}&lt;br /&gt;
{{Data Parameters/row|PrefabHash|Integer|w=0|The hash of the structure}}&lt;br /&gt;
{{Data Parameters/row|ReferenceId|Integer|w=0|Unique Reference Identifier for this object}}&lt;br /&gt;
{{Data Parameters/row|NameHash|Integer|w=0|Provides the hash value for the name of the object as a 32 bit integer.}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Data Slots ===&lt;br /&gt;
These are all parameters, that can be read with a [[Kit_(Logic_I/O)#Slots_Reader|Slots Reader]]. The outputs are listed in the order a Slots Reader&#039;s &amp;quot;VAR&amp;quot; setting cycles through them.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Number || Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Import || Import slot.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Export (accept) || Export slot.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Export (reject) || Export slot.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Data Disk || Diskslot&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Data Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| MaxQuantity || Integer || Returns maximum stacksize.&lt;br /&gt;
|-&lt;br /&gt;
| Damage || Integer || Item durability in percent.&lt;br /&gt;
|-&lt;br /&gt;
| Class || Integer || Item class ID.&lt;br /&gt;
|-&lt;br /&gt;
| Quantity || Integer || Size of stack.&lt;br /&gt;
|-&lt;br /&gt;
| PrefabHash || Integer || Returns [[ItemHash]] of item in slot.&lt;br /&gt;
|-&lt;br /&gt;
| Occupied || Boolean || Returns whether the slot occupied. (0 for no, 1 for yes).&lt;br /&gt;
|-&lt;br /&gt;
| OccupantHash || Integer || Returns [[ItemHash]] of item in slot.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Item Slot Classes / Types ==&lt;br /&gt;
&lt;br /&gt;
Reading the &#039;&#039;class&#039;&#039; attribute of the input slot will give one of the following values:&lt;br /&gt;
&lt;br /&gt;
Note that you can use &amp;lt;pre style=&amp;quot;display: inline&amp;quot;&amp;gt;SlotClass.&amp;lt;Item&amp;gt;&amp;lt;/pre&amp;gt; directly in IC code instead of the numeric value&lt;br /&gt;
*NOTE The classes listed in this section are FilterSlotTypeCompare and NOT sorting class.  &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Item values and descriptions&lt;br /&gt;
! Item !! Value !! Description !! Item !! Value !! Description !! Item !! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| None || 0 || || Helmet || 1 || || Suit || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
| Back || 3 || || GasFilter || 4 || || GasCanister || 5 ||&lt;br /&gt;
|-&lt;br /&gt;
| Motherboard || 6 || || Circuitboard || 7 || || DataDisk || 8 ||&lt;br /&gt;
|-&lt;br /&gt;
| Organ || 9 || || Ore || 10 || Includes reagent mixes from recycler and ices || Plant || 11 ||&lt;br /&gt;
|-&lt;br /&gt;
| Uniform || 12 || || Entity || 13 || || Battery || 14 ||&lt;br /&gt;
|-&lt;br /&gt;
| Egg || 15 || || Belt || 16 || || Tool || 17 ||&lt;br /&gt;
|-&lt;br /&gt;
| Appliance || 18 || || Ingot || 19 || || Torpedo || 20 ||&lt;br /&gt;
|-&lt;br /&gt;
| Cartridge || 21 || || AccessCard || 22 || || Magazine || 23 ||&lt;br /&gt;
|-&lt;br /&gt;
| Circuit || 24 || || Bottle || 25 || This refers to Paint Can || ProgrammableChip || 26 ||&lt;br /&gt;
|-&lt;br /&gt;
| Glasses || 27 || || CreditCard || 28 || || DirtCanister || 29 ||&lt;br /&gt;
|-&lt;br /&gt;
| SensorProcessingUnit || 30 || || LiquidCanister || 31 || || LiquidBottle || 32 ||&lt;br /&gt;
|-&lt;br /&gt;
| Wreckage || 33 || || SoundCartridge || 34 || || DrillHead || 35 ||&lt;br /&gt;
|-&lt;br /&gt;
| ScanningHead || 36 || || Flare || 37 || || Blocked || 38 ||&lt;br /&gt;
|-&lt;br /&gt;
| SuitMod || 39 || || Crate || 40 || || Portables || 41 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example IC10 sorting script ===&lt;br /&gt;
&lt;br /&gt;
Basic ingot sorter - filters one item type to the left output, rejects everything else to the right.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Ingot Sorter Controller&lt;br /&gt;
# When facing outputs (power switch on right): matched items exit left, rejected exit right&lt;br /&gt;
# Setup:&lt;br /&gt;
# 1. Connect d0 to the sorter&lt;br /&gt;
# 2. Change hTarget to match your desired ingot&lt;br /&gt;
&lt;br /&gt;
define hTarget HASH(&amp;quot;ItemIronIngot&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
alias dSorter d0&lt;br /&gt;
alias vHash r0&lt;br /&gt;
alias vOutput r1&lt;br /&gt;
&lt;br /&gt;
s dSorter Mode 2 # Logic mode&lt;br /&gt;
s dSorter On 1 # Turn on&lt;br /&gt;
&lt;br /&gt;
main:&lt;br /&gt;
  ls vHash dSorter 0 OccupantHash # Read import slot&lt;br /&gt;
  beqz vHash skip # Empty - skip processing&lt;br /&gt;
  &lt;br /&gt;
  seq vOutput vHash hTarget # 1=match, 0=reject&lt;br /&gt;
  s dSorter Output vOutput&lt;br /&gt;
  &lt;br /&gt;
  skip:&lt;br /&gt;
  yield&lt;br /&gt;
j main&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Machines]]&lt;br /&gt;
[[Category:Import/Export]]&lt;/div&gt;</summary>
		<author><name>Veriszg</name></author>
	</entry>
	<entry>
		<id>https://stationeers-wiki.com/index.php?title=Sorter&amp;diff=25330</id>
		<title>Sorter</title>
		<link rel="alternate" type="text/html" href="https://stationeers-wiki.com/index.php?title=Sorter&amp;diff=25330"/>
		<updated>2026-01-04T11:49:02Z</updated>

		<summary type="html">&lt;p&gt;Veriszg: IC10 edit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Structurebox&lt;br /&gt;
| name = Sorter&lt;br /&gt;
| image = [[File:StructureSorter.png]]&lt;br /&gt;
| prefab_hash = -1009150565&lt;br /&gt;
| prefab_name = StructureSorter&lt;br /&gt;
| power_usage = 5W&lt;br /&gt;
| placed_on_grid = Small Grid&lt;br /&gt;
| decon_with_tool1 = [[Hand Drill]]&lt;br /&gt;
| placed_with_item = [[Kit (Sorter)]]&lt;br /&gt;
| item_rec1 = [[Kit (Sorter)]]&lt;br /&gt;
}}&lt;br /&gt;
{{Distinguish|Logic Sorter}}&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;lt;q&amp;gt;No amount of automation is complete without some way of moving different items to different parts of a system. The [[Xigo (Faction)|Xigo]] A2B sorter can be programmed via a computer with a [[Sorter Motherboard]] to direct various items into different chute networks. Filtered items are always passed out the righthand side of the sorter, while non filtered items continue straight through.&amp;lt;/q&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;- Stationpedia&#039;&#039;&#039;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mode 0 (Split):&#039;&#039;&#039; Items alternate between output lanes automatically. The Output property switches between 0 and 1 after each item.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mode 1 (Filter):&#039;&#039;&#039; Requires a [[computer]] with a [[Motherboard|Motherboard (Sorter)]]. Whitelisted items exit one lane, all others exit the alternate lane. When facing the output side (power switch on your right), whitelisted items exit left, rejected items exit right. &#039;&#039;&#039;Note:&#039;&#039;&#039; Some players report issues with the Motherboard (Sorter) interface. Consider using Mode 2 (Logic) with [[IC10]] as a more reliable alternative.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mode 2 (Logic):&#039;&#039;&#039; The sorter waits for [[IC10]] or logic chips to set the Output parameter (0 or 1) before releasing each item. After the item exits, Output resets to -1 automatically. Your controller must set Output for every item - this is intended behavior, not a bug. See [[#Example IC10 sorting script|Example IC10 sorting script]] below for a working implementation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Output orientation:&#039;&#039;&#039; When facing outputs with power switch on your right: Output 0 exits right (near power switch), Output 1 exits left.&lt;br /&gt;
&lt;br /&gt;
{{Data Network Header}}&lt;br /&gt;
&lt;br /&gt;
{{Data Parameters|&lt;br /&gt;
{{Data Parameters/row|Power|Boolean|w=0|Can be read to return if the Sorter is correctly powered or not, set via the power system, return 1 if powered and 0 if not|multiple=2|0|Unpowered|1|Powered}}&lt;br /&gt;
{{Data Parameters/row|Mode|Integer|The mode of the Sorter, &#039;&#039;&#039;Split&#039;&#039;&#039; does alternate outputs, &#039;&#039;&#039;Filter&#039;&#039;&#039; decides output via [[Motherboard (Sorter)]], &#039;&#039;&#039;Logic&#039;&#039;&#039; determines output via parameter &#039;&#039;&#039;Output&#039;&#039;&#039;|multiple=3|0|Split|1|Filter|2|Logic}}&lt;br /&gt;
{{Data Parameters/row|Error|Boolean|w=0|1 if device is in error state, otherwise 0|multiple=2|0|&amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;|1|Error}}&lt;br /&gt;
{{Data Parameters/row|Lock|Boolean|Disable manual operation of the Sorter.|multiple=2|0|Unlocked|1|Locked}}&lt;br /&gt;
{{Data Parameters/row|On|Boolean|The current state of the Sorter.|multiple=2|0|Off|1|On}}&lt;br /&gt;
{{Data Parameters/row|RequiredPower|Integer|w=0|Idle operating power quantity, does not necessarily include extra demand power}}&lt;br /&gt;
{{Data Parameters/row|ClearMemory|Integer|r=0|When set to 1, clears the counter memory (e.g. ExportCount). Will set itself back to 0 when actioned}}&lt;br /&gt;
{{Data Parameters/row|ExportCount|Integer|w=0|How many items exported since last ClearMemory}}&lt;br /&gt;
{{Data Parameters/row|ImportCount|Integer|w=0|How many items imported since last ClearMemory}}&lt;br /&gt;
{{Data Parameters/row|Output|Integer|&amp;lt;div&amp;gt;Decides which side the next item will be sent to.&amp;lt;br&amp;gt;&lt;br /&gt;
In &#039;&#039;&#039;Logic&#039;&#039;&#039; mode, defaults to -1 after action. In &#039;&#039;&#039;Split&#039;&#039;&#039; mode, alternates between 0 and 1 after action. Does nothing in &#039;&#039;&#039;Filter&#039;&#039;&#039; mode.&amp;lt;br&amp;gt;&lt;br /&gt;
When set to 0 the item will exit the output slot closest to the power switch.  When set to 1, the item will exit the slot furthest from the power switch.&amp;lt;/div&amp;gt;|multiple=3|-1|Unset|0|Straight (Near Power Switch)|1|Side}}&lt;br /&gt;
{{Data Parameters/row|PrefabHash|Integer|w=0|The hash of the structure}}&lt;br /&gt;
{{Data Parameters/row|ReferenceId|Integer|w=0|Unique Reference Identifier for this object}}&lt;br /&gt;
{{Data Parameters/row|NameHash|Integer|w=0|Provides the hash value for the name of the object as a 32 bit integer.}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Data Slots ===&lt;br /&gt;
These are all parameters, that can be read with a [[Kit_(Logic_I/O)#Slots_Reader|Slots Reader]]. The outputs are listed in the order a Slots Reader&#039;s &amp;quot;VAR&amp;quot; setting cycles through them.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Number || Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Import || Import slot.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Export (accept) || Export slot.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Export (reject) || Export slot.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Data Disk || Diskslot&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Data Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| MaxQuantity || Integer || Returns maximum stacksize.&lt;br /&gt;
|-&lt;br /&gt;
| Damage || Integer || Item durability in percent.&lt;br /&gt;
|-&lt;br /&gt;
| Class || Integer || Item class ID.&lt;br /&gt;
|-&lt;br /&gt;
| Quantity || Integer || Size of stack.&lt;br /&gt;
|-&lt;br /&gt;
| PrefabHash || Integer || Returns [[ItemHash]] of item in slot.&lt;br /&gt;
|-&lt;br /&gt;
| Occupied || Boolean || Returns whether the slot occupied. (0 for no, 1 for yes).&lt;br /&gt;
|-&lt;br /&gt;
| OccupantHash || Integer || Returns [[ItemHash]] of item in slot.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Item Slot Classes / Types ==&lt;br /&gt;
&lt;br /&gt;
Reading the &#039;&#039;class&#039;&#039; attribute of the input slot will give one of the following values:&lt;br /&gt;
&lt;br /&gt;
Note that you can use &amp;lt;pre style=&amp;quot;display: inline&amp;quot;&amp;gt;SlotClass.&amp;lt;Item&amp;gt;&amp;lt;/pre&amp;gt; directly in IC code instead of the numeric value&lt;br /&gt;
*NOTE The classes listed in this section are FilterSlotTypeCompare and NOT sorting class.  &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Item values and descriptions&lt;br /&gt;
! Item !! Value !! Description !! Item !! Value !! Description !! Item !! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| None || 0 || || Helmet || 1 || || Suit || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
| Back || 3 || || GasFilter || 4 || || GasCanister || 5 ||&lt;br /&gt;
|-&lt;br /&gt;
| Motherboard || 6 || || Circuitboard || 7 || || DataDisk || 8 ||&lt;br /&gt;
|-&lt;br /&gt;
| Organ || 9 || || Ore || 10 || Includes reagent mixes from recycler and ices || Plant || 11 ||&lt;br /&gt;
|-&lt;br /&gt;
| Uniform || 12 || || Entity || 13 || || Battery || 14 ||&lt;br /&gt;
|-&lt;br /&gt;
| Egg || 15 || || Belt || 16 || || Tool || 17 ||&lt;br /&gt;
|-&lt;br /&gt;
| Appliance || 18 || || Ingot || 19 || || Torpedo || 20 ||&lt;br /&gt;
|-&lt;br /&gt;
| Cartridge || 21 || || AccessCard || 22 || || Magazine || 23 ||&lt;br /&gt;
|-&lt;br /&gt;
| Circuit || 24 || || Bottle || 25 || This refers to Paint Can || ProgrammableChip || 26 ||&lt;br /&gt;
|-&lt;br /&gt;
| Glasses || 27 || || CreditCard || 28 || || DirtCanister || 29 ||&lt;br /&gt;
|-&lt;br /&gt;
| SensorProcessingUnit || 30 || || LiquidCanister || 31 || || LiquidBottle || 32 ||&lt;br /&gt;
|-&lt;br /&gt;
| Wreckage || 33 || || SoundCartridge || 34 || || DrillHead || 35 ||&lt;br /&gt;
|-&lt;br /&gt;
| ScanningHead || 36 || || Flare || 37 || || Blocked || 38 ||&lt;br /&gt;
|-&lt;br /&gt;
| SuitMod || 39 || || Crate || 40 || || Portables || 41 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example IC10 sorting script ===&lt;br /&gt;
&lt;br /&gt;
Basic ingot sorter - filters one item type to the left output, rejects everything else to the right.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Ingot Sorter Controller&lt;br /&gt;
# When facing outputs (power switch on right): matched items exit left, rejected exit right&lt;br /&gt;
# Setup:&lt;br /&gt;
# 1. Connect d0 to the sorter&lt;br /&gt;
# 2. Change hTarget to match your desired ingot&lt;br /&gt;
&lt;br /&gt;
define hTarget HASH(&amp;quot;ItemIronIngot&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
alias dSorter d0&lt;br /&gt;
alias vHash r0&lt;br /&gt;
alias vOutput r1&lt;br /&gt;
&lt;br /&gt;
main:&lt;br /&gt;
  # needed after reloading the game&lt;br /&gt;
  s dSorter Mode 2 # Logic mode&lt;br /&gt;
  s dSorter On 1 # Turn on&lt;br /&gt;
&lt;br /&gt;
  # main function&lt;br /&gt;
  ls vHash dSorter 0 OccupantHash # Read import slot&lt;br /&gt;
  beqz vHash skip # Empty - skip processing&lt;br /&gt;
  &lt;br /&gt;
  seq vOutput vHash hTarget # 1=match, 0=reject&lt;br /&gt;
  s dSorter Output vOutput&lt;br /&gt;
  &lt;br /&gt;
  skip:&lt;br /&gt;
  yield&lt;br /&gt;
j main&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Machines]]&lt;br /&gt;
[[Category:Import/Export]]&lt;/div&gt;</summary>
		<author><name>Veriszg</name></author>
	</entry>
	<entry>
		<id>https://stationeers-wiki.com/index.php?title=Gas&amp;diff=25319</id>
		<title>Gas</title>
		<link rel="alternate" type="text/html" href="https://stationeers-wiki.com/index.php?title=Gas&amp;diff=25319"/>
		<updated>2026-01-02T19:53:19Z</updated>

		<summary type="html">&lt;p&gt;Veriszg: typo (reddig-&amp;gt;reddit)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
{{Disambiguation}}&lt;br /&gt;
In older versions of Stationeers, Gas was a generalized term for fluid substances, derived from ices or gained by other means, that can be transported and manipulated to change their energetic form (phase) through the combination of pressure and temperature. Newer versions now have gasses and liquids handled completely separately.&lt;br /&gt;
&lt;br /&gt;
This is opposed to solid resources, processed irreversibly from ores into pure ingots and alloys, used directly for crafting purposes. Gases have a great variety of uses - some are required for creation of livable pressurized environments, while others are toxic and dangerous and meant for controlled industrial processes, or outright waste product with limited utility.&lt;br /&gt;
&lt;br /&gt;
Naturally, gases can exist as a constituence of a planetary atmosphere, available in a virtually infinite amount and possible to capture through the use of appropriate atmospheric devices, can be pressurized, filtered, and stored. Planets or moons that have a below-zero or vacuum conditions will also contain frozen gas deposits in a form of ice, which can be melted by the use of a [[Furnace]] or [[Ice Crusher]]. Also, mined ice nuggets appear similar to metallic ores, however they will begin to melt if exposed to a warm environment while held in arms or regular containers. &lt;br /&gt;
&lt;br /&gt;
Small amount of gases can be acquired from smelting solid materials into ingots, as each type of ore contains its own impurities, although these gases mostly seen as an impediment to efficient smelting due to low output.&amp;lt;br&amp;gt;&lt;br /&gt;
Finally, gases can be purchased from [[traders]] in various forms and at different temperatures. Some traders will also buy gases and mixtures that they need with certain temperature conditions, or even pay you a small fee for disposing of their own waste gases. &lt;br /&gt;
&lt;br /&gt;
Current variety of gases include:&lt;br /&gt;
* [[Special:MyLanguage/Carbon Dioxide|Carbon Dioxide (CO&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;)]] - Inert gas, a non-toxic byproduct of burning organic fuels, breathed by most growing plants as source of Carbon.&lt;br /&gt;
* [[Special:MyLanguage/Nitrogen|Nitrogen (N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;)]] - Heavy gas, usable as a stable pressure agent due to its exceptionally low freezing temperature.&lt;br /&gt;
* [[Special:MyLanguage/Nitrous Oxide|Nitrous Oxide (N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O)]] - Commonly known as &amp;quot;Nitro&amp;quot;, a loose chemical composite of Nitrogen and Oxygen, used as powerful fuel oxidizer and general anesthetic. &lt;br /&gt;
* [[Special:MyLanguage/Oxygen|Oxygen (O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;)]] - Highly-reactive gas used for respiration by animal life and as conventional fuel oxidizer.&lt;br /&gt;
* [[Special:MyLanguage/Pollutant|Pollutants (X)]] - Ambiguous compound of highly-toxic radicals, a waste byproduct from burning or processing of impure organic fuel.&lt;br /&gt;
* [[Special:MyLanguage/Volatiles|Volatiles (CH&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;)+]] - Generic composite of simple organic compounds used as a fuel in smelting, power generation, and chemistry.&lt;br /&gt;
* [[Special:MyLanguage/Water|Water (H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O)]] - Pure compound used for hydration, farming, and as coolant, originally designed as inherently liquid substance.&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
==Properties==&lt;br /&gt;
Gases and their liquid analogues are presented in the parametric form - that means that they exist as a property of a given atmosphere&#039; grid cell, interior grid cell of an enclosed room, composite [[pipe]] network, atmospheric device, or portable container. To further understand the behavior of gases within different spaces, check [[Atmosphere]] and [[Pipe]] pages. It is technically possible to convert gases down into their solid state (i.e. a physical item), however that action has limited practical use, beyond perhaps hand measuring of specific quantities, and no dedicated devices exist for doing so.&lt;br /&gt;
&lt;br /&gt;
Each different gas have a number of properties, which define its thermodynamic behavior and conditions for phase changes. Leveraging the property values and their differences between gases is an important part of atmospheric management and temperature conditioning required for surviving extreme environments and utilizing advanced technologies:&lt;br /&gt;
* &#039;&#039;&#039;Melting Point&#039;&#039;&#039; - Temperature boundary between solid and liquid states. Liquids cooled to this temperature will begin freezing. This will create ice chunks converting up to 50 mol of liquid into a 50g stack of pure ice. Liquids freezing within containers or pipes will cause them to burst irreversibly. A player should make sure never to cool the gas down to this value.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Boiling Point&#039;&#039;&#039; - Temperature boundary between liquid and gaseous states at standard 1 atm (100 kPa) of pressure. Higher pressures impede evaporation, raising this value and allowing to form liquids at higher temperatures. Most atmospheric devices are designed to work with gases, while liquified substances are very compact. Player should control pressure and temperature to prevent gases and liquids reaching this value unintentionally. Not available for substances, that will remain in gaseous phase at 100 kPa regardless of temperature.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Minimum Condensation Pressure&#039;&#039;&#039; - a Pressure value corresponding to the Melting Point Temperature, which is necessary for the liquid to begin freezing. Most liquified gases will freeze up when cooled below their melting point regardless, but for &#039;&#039;some&#039;&#039; gases a low pressure environment can be sustained to keep a liquid in a super-cooled state without allowing it to crystallize, which is useful for storage of few particular substances.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Maximum Liquid Temperature&#039;&#039;&#039; - a Temperature value, above which the substance cannot remain in liquid state within working pressure range, usually sampled at high pressure (6 MPa). Exponentially higher pressures are capable of keeping the liquid from evaporating, but the requirements are unrealistic for physical limitations of Stationeers&#039; equipment. Its a practical heat boundary, under which a given substance can be either gas, liquid, or both based on the imposed pressure level, all the way down to the melting point boundary.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Molar Heat Capacity&#039;&#039;&#039; - The thermal capacity of 1 mol of the gas, that it has to absorb/radiate to raise/lower its temperature by 1 K. The greater this value, the more heat a cold gas can absorb to cool another gas, and inversely, the more heat has to be drawn out to cool it. Particularly important value for an efficient coolant.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Molar Heat of Fusion&#039;&#039;&#039; - The amount of thermal energy that a mol of frozen substance would need to absorb to change into a liquid, and the amount of same energy a liquid will release into environment when turning into ice. Given that frozen substances are rarely used as anything beyond a raw source material for gases, this value has little importance.&lt;br /&gt;
 &lt;br /&gt;
* &#039;&#039;&#039;Molar Latent Heat&#039;&#039;&#039; - The amount of thermal energy that a mol of liquid substance would need to absorb to change into a gas, and the amount of same energy a gas would release when turning into a liquid. This value is something that is often leveraged in AC or any temperature control systems, by forcing phase changes at specific points of a system through applied pressure. It is also likely responsible for the majority of confusing and frustrating emergencies for inexperienced Stationeers, where temperatures suddenly spike or drop to dangerous levels, seemingly for no reason.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Molar Liquid Volume&#039;&#039;&#039; - Volume in Liters that a mol of substance occupy in liquid form. Since liquified gases produce no Pressure, this value defines how much of a given liquified gas can be stored in a liquid container or pipe network of a certain capacity.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Molar Mass&#039;&#039;&#039; - Net mass of a mol of substance in any phase state. Largely redundant parameter that becomes important when dealing in Rocketry, since the rocket engines have specific limits to what mass they&#039;re able to carry into space against a local gravity, and excessive amount of fuel/payload can make a lift-off impossible. &lt;br /&gt;
&lt;br /&gt;
== Phase Change ==&lt;br /&gt;
The summary of the aforementioned properties define how a given gas behaves depending on the temperature and pressure at which it is contained. By accessing in-game Stationpedia, a player can find a phase diagram for any such gas in a logarithmic scale. A more readable version for all gases is here:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Gases-phase-change-diagram.png|1200px|center|Gases diagram]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Interactive version: [https://gralewski.github.io/stationeers-gas-phase-diagram-by-zgralewski.htm Here], Reddit post: [https://www.reddit.com/r/Stationeers/comments/1pzrojd/comment/nwtdvrh/ Here]&lt;br /&gt;
&lt;br /&gt;
The left part of each diagram correlates to substance&#039;s solid (ice) state. A vertical blue cut-off indicates its melting point.&lt;br /&gt;
Next goes the dynamic curve (main section), which separates the possible conditions for a liquid state (above the curve) and a gas state (below the curve), the curve itself being the phase change boundary between the two.&lt;br /&gt;
Finally, the curve terminates by an abrupt vertical spike - this is a Maximum Liquid Temperature boundary, after which the substance will almost always remain as gas. &lt;br /&gt;
&lt;br /&gt;
A more complex phase change diagram can be located [https://www.desmos.com/calculator/voj4scjipd Here]&lt;br /&gt;
&lt;br /&gt;
Known gas properties:&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Filter Color !! Molar Heat Capacity&amp;lt;br&amp;gt;(J⋅K&amp;lt;sup&amp;gt;−1&amp;lt;/sup&amp;gt;⋅mol&amp;lt;sup&amp;gt;−1&amp;lt;/sup&amp;gt;) !! Molar Heat of Fusion&amp;lt;br&amp;gt;(kJ⋅K&amp;lt;sup&amp;gt;−1&amp;lt;/sup&amp;gt;⋅mol&amp;lt;sup&amp;gt;−1&amp;lt;/sup&amp;gt;) !! data-sort-type=&amp;quot;number&amp;quot; | Melting Point&amp;lt;br&amp;gt;(K / °C) !! data-sort-type=&amp;quot;number&amp;quot; | Boiling Point at 100 kPa&amp;lt;br&amp;gt;(K / °C) !! data-sort-type=&amp;quot;number&amp;quot; | Minimum Condensation&amp;lt;br&amp;gt;(kPa at K / °C) !! data-sort-type=&amp;quot;number&amp;quot; | Maximum Liquid Temperature&amp;lt;br&amp;gt;(K / °C at kPa) !! Molar Latent Heat&amp;lt;br&amp;gt; (kJ / mol) !! Liquid Molar Volume&amp;lt;br&amp;gt;(L / mol) !! Molar Mass&amp;lt;br&amp;gt;(g / mol)&lt;br /&gt;
|-&lt;br /&gt;
| [[Carbon Dioxide]] (CO&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;) || Gray || 28.2 || 0.6 || 218 / -55.3 || N/A || 517 at 218 / -55.3 || 265 / -8.1 at 6000 || 0.6 || 0.04 || 44&lt;br /&gt;
|-&lt;br /&gt;
| [[Nitrogen]] (N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;) || Black || 20.6 || 0.5 || 40 / -233 || 75 / -198 || 6.3 at 40 / -233 || 190 / -83 at 6000 || 0.5 || 0.0348 || 64&amp;lt;!--That&#039;s correct on ingame files as of 0.2.6091.26702, can be looked up on  Scripts.Atmospherics.Mole:MolarMass()--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[Nitrous Oxide]] (N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O) || Green || 37.2 || 4 || 252 / -21 || N/A || 800 at 252 / -21 || 431 / 158 at 2000 || 4 || 0.026 || 46&lt;br /&gt;
|-&lt;br /&gt;
| [[Oxygen]] (O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;) || White || 21.1 || 0.8 || 56.4 / -217 || 90 / -183 || 6.3 at 56.4 / -217 || 162 / -111 at 6000 || 0.8 || 0.03 || 16&lt;br /&gt;
|-&lt;br /&gt;
| [[Pollutant]] (X) || Yellow || 24.8 || 2 || 173 / -99.8 || N/A || 1800 at 173 / -99.8 || 425 / 152 at 6000 || 2 || 0.04 || 28&lt;br /&gt;
|-&lt;br /&gt;
| [[Volatiles]] (H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;) || Red || 20.4 || 1 || 81.6 / -192 || 112 / -162 || 6.3 at 81.6 / -192 || 195 / -78.1 at 6000 || 1 || 0.04 || 16&lt;br /&gt;
|-&lt;br /&gt;
| [[Water]] (H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;0) || Blue || 72 || 8 || 273 / 0 || 373 / 100 || 6.3 at 273 / 0 || 643 / 370 at 6000 || 8 || 0.018 || 18&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Mixtures==&lt;br /&gt;
While the gases can exist in any arbitrary number of combinations, there are specific functional mixtures produced manually - this is done by filtering and isolating individual component gases and then mixing them in proper ratio using a [[Gas Mixer]]. Such specific mixtures are commonly referenced by their separate names for all associated cases, without mentioning their constituents:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Contents !! Tank Color !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| [[Fuel]] || 67% H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, 33% O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; || Orange || Combustible mixture with Autoignition at 573.15 K / 300 °C&lt;br /&gt;
|-&lt;br /&gt;
| [[HydroNox]] || 50% H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, 50% N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O || N/A || Combustible mixture with Autoignition at 323.15 K / 50 °C&lt;br /&gt;
|-&lt;br /&gt;
| [[Air]] || 75% N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, 25% O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; || White || Well above 16 kPa of minimum O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; pressure required for human breathing, but prevents runaway combustion by spark)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Simulation Mechanics==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! Concept &lt;br /&gt;
! Simulated &lt;br /&gt;
! Notes&lt;br /&gt;
|- &lt;br /&gt;
| Ideal Gas Law (PV=nRT) &lt;br /&gt;
| Partial &lt;br /&gt;
| Pressure will change with temperature, volume, and mols; temperature will not change with pressure, volume, or mols&lt;br /&gt;
|- &lt;br /&gt;
| Adiabatic Heating and Cooling &lt;br /&gt;
| No &lt;br /&gt;
| Compressing or expanding a gas will not affect its temperature or the temperature around it&lt;br /&gt;
|- &lt;br /&gt;
| Thermal Conductivity &lt;br /&gt;
| No &lt;br /&gt;
| Rate of energy transfer is the same for all substances&lt;br /&gt;
|- &lt;br /&gt;
| Thermal Radiation &lt;br /&gt;
| Partial &lt;br /&gt;
| Radiated heat is not absorbed by nearby objects&lt;br /&gt;
|- &lt;br /&gt;
| Phase Change &lt;br /&gt;
| Partial &lt;br /&gt;
| Gas/Liquid have simplified graph; Solid has a fixed temperature; Plasma is ignored&lt;br /&gt;
|- &lt;br /&gt;
| Fluid Dynamics &lt;br /&gt;
| No &lt;br /&gt;
| &#039;Convection&#039; parts work in pressurized environment, other parts work in vacuum&lt;br /&gt;
|- &lt;br /&gt;
| Gas Stoichiometry &lt;br /&gt;
| No &lt;br /&gt;
| The various reactions are arbitrary and vary depending on device used for different products from the same reactants&lt;br /&gt;
|- &lt;br /&gt;
| Gravity/Density &lt;br /&gt;
| No &lt;br /&gt;
| Gas/Liquid is present in all directions&lt;br /&gt;
|- &lt;br /&gt;
| Environment Volume &lt;br /&gt;
| Yes &lt;br /&gt;
| Each environment cube acts as a single point with fixed volume&lt;br /&gt;
|- &lt;br /&gt;
| Saturation&lt;br /&gt;
| No&lt;br /&gt;
| Mixture and % do not affect condensation/evaporation&lt;br /&gt;
|-&lt;br /&gt;
| Pipe Volume &lt;br /&gt;
| Yes &lt;br /&gt;
| Each pipe network acts as a single point with fixed volume depending on number of pipes segments&lt;br /&gt;
|- &lt;br /&gt;
| Flow Direction &lt;br /&gt;
| Partial &lt;br /&gt;
| All pumps and mixer act as check valve, passive check valve available, other valves are not one-way; no flow within each connected pipe network&lt;br /&gt;
|- &lt;br /&gt;
| Pipe Integrity &lt;br /&gt;
| Yes &lt;br /&gt;
| Liquid pipes hold low pressure, but may contain both liquid and gas without consequence; Gas pipes hold high pressure, but stress and break with too much liquid&lt;br /&gt;
|- &lt;br /&gt;
| Heat Transfer &lt;br /&gt;
| Partial &lt;br /&gt;
| Liquid temperature is controlled by gas temperature (if no gas, liquid heater will not function)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Gas]][[Category:Liquid]]&lt;/div&gt;</summary>
		<author><name>Veriszg</name></author>
	</entry>
	<entry>
		<id>https://stationeers-wiki.com/index.php?title=Gas&amp;diff=25318</id>
		<title>Gas</title>
		<link rel="alternate" type="text/html" href="https://stationeers-wiki.com/index.php?title=Gas&amp;diff=25318"/>
		<updated>2026-01-02T19:52:40Z</updated>

		<summary type="html">&lt;p&gt;Veriszg: reddit post link for anyone to comment or add features&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
{{Disambiguation}}&lt;br /&gt;
In older versions of Stationeers, Gas was a generalized term for fluid substances, derived from ices or gained by other means, that can be transported and manipulated to change their energetic form (phase) through the combination of pressure and temperature. Newer versions now have gasses and liquids handled completely separately.&lt;br /&gt;
&lt;br /&gt;
This is opposed to solid resources, processed irreversibly from ores into pure ingots and alloys, used directly for crafting purposes. Gases have a great variety of uses - some are required for creation of livable pressurized environments, while others are toxic and dangerous and meant for controlled industrial processes, or outright waste product with limited utility.&lt;br /&gt;
&lt;br /&gt;
Naturally, gases can exist as a constituence of a planetary atmosphere, available in a virtually infinite amount and possible to capture through the use of appropriate atmospheric devices, can be pressurized, filtered, and stored. Planets or moons that have a below-zero or vacuum conditions will also contain frozen gas deposits in a form of ice, which can be melted by the use of a [[Furnace]] or [[Ice Crusher]]. Also, mined ice nuggets appear similar to metallic ores, however they will begin to melt if exposed to a warm environment while held in arms or regular containers. &lt;br /&gt;
&lt;br /&gt;
Small amount of gases can be acquired from smelting solid materials into ingots, as each type of ore contains its own impurities, although these gases mostly seen as an impediment to efficient smelting due to low output.&amp;lt;br&amp;gt;&lt;br /&gt;
Finally, gases can be purchased from [[traders]] in various forms and at different temperatures. Some traders will also buy gases and mixtures that they need with certain temperature conditions, or even pay you a small fee for disposing of their own waste gases. &lt;br /&gt;
&lt;br /&gt;
Current variety of gases include:&lt;br /&gt;
* [[Special:MyLanguage/Carbon Dioxide|Carbon Dioxide (CO&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;)]] - Inert gas, a non-toxic byproduct of burning organic fuels, breathed by most growing plants as source of Carbon.&lt;br /&gt;
* [[Special:MyLanguage/Nitrogen|Nitrogen (N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;)]] - Heavy gas, usable as a stable pressure agent due to its exceptionally low freezing temperature.&lt;br /&gt;
* [[Special:MyLanguage/Nitrous Oxide|Nitrous Oxide (N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O)]] - Commonly known as &amp;quot;Nitro&amp;quot;, a loose chemical composite of Nitrogen and Oxygen, used as powerful fuel oxidizer and general anesthetic. &lt;br /&gt;
* [[Special:MyLanguage/Oxygen|Oxygen (O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;)]] - Highly-reactive gas used for respiration by animal life and as conventional fuel oxidizer.&lt;br /&gt;
* [[Special:MyLanguage/Pollutant|Pollutants (X)]] - Ambiguous compound of highly-toxic radicals, a waste byproduct from burning or processing of impure organic fuel.&lt;br /&gt;
* [[Special:MyLanguage/Volatiles|Volatiles (CH&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;)+]] - Generic composite of simple organic compounds used as a fuel in smelting, power generation, and chemistry.&lt;br /&gt;
* [[Special:MyLanguage/Water|Water (H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O)]] - Pure compound used for hydration, farming, and as coolant, originally designed as inherently liquid substance.&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
==Properties==&lt;br /&gt;
Gases and their liquid analogues are presented in the parametric form - that means that they exist as a property of a given atmosphere&#039; grid cell, interior grid cell of an enclosed room, composite [[pipe]] network, atmospheric device, or portable container. To further understand the behavior of gases within different spaces, check [[Atmosphere]] and [[Pipe]] pages. It is technically possible to convert gases down into their solid state (i.e. a physical item), however that action has limited practical use, beyond perhaps hand measuring of specific quantities, and no dedicated devices exist for doing so.&lt;br /&gt;
&lt;br /&gt;
Each different gas have a number of properties, which define its thermodynamic behavior and conditions for phase changes. Leveraging the property values and their differences between gases is an important part of atmospheric management and temperature conditioning required for surviving extreme environments and utilizing advanced technologies:&lt;br /&gt;
* &#039;&#039;&#039;Melting Point&#039;&#039;&#039; - Temperature boundary between solid and liquid states. Liquids cooled to this temperature will begin freezing. This will create ice chunks converting up to 50 mol of liquid into a 50g stack of pure ice. Liquids freezing within containers or pipes will cause them to burst irreversibly. A player should make sure never to cool the gas down to this value.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Boiling Point&#039;&#039;&#039; - Temperature boundary between liquid and gaseous states at standard 1 atm (100 kPa) of pressure. Higher pressures impede evaporation, raising this value and allowing to form liquids at higher temperatures. Most atmospheric devices are designed to work with gases, while liquified substances are very compact. Player should control pressure and temperature to prevent gases and liquids reaching this value unintentionally. Not available for substances, that will remain in gaseous phase at 100 kPa regardless of temperature.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Minimum Condensation Pressure&#039;&#039;&#039; - a Pressure value corresponding to the Melting Point Temperature, which is necessary for the liquid to begin freezing. Most liquified gases will freeze up when cooled below their melting point regardless, but for &#039;&#039;some&#039;&#039; gases a low pressure environment can be sustained to keep a liquid in a super-cooled state without allowing it to crystallize, which is useful for storage of few particular substances.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Maximum Liquid Temperature&#039;&#039;&#039; - a Temperature value, above which the substance cannot remain in liquid state within working pressure range, usually sampled at high pressure (6 MPa). Exponentially higher pressures are capable of keeping the liquid from evaporating, but the requirements are unrealistic for physical limitations of Stationeers&#039; equipment. Its a practical heat boundary, under which a given substance can be either gas, liquid, or both based on the imposed pressure level, all the way down to the melting point boundary.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Molar Heat Capacity&#039;&#039;&#039; - The thermal capacity of 1 mol of the gas, that it has to absorb/radiate to raise/lower its temperature by 1 K. The greater this value, the more heat a cold gas can absorb to cool another gas, and inversely, the more heat has to be drawn out to cool it. Particularly important value for an efficient coolant.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Molar Heat of Fusion&#039;&#039;&#039; - The amount of thermal energy that a mol of frozen substance would need to absorb to change into a liquid, and the amount of same energy a liquid will release into environment when turning into ice. Given that frozen substances are rarely used as anything beyond a raw source material for gases, this value has little importance.&lt;br /&gt;
 &lt;br /&gt;
* &#039;&#039;&#039;Molar Latent Heat&#039;&#039;&#039; - The amount of thermal energy that a mol of liquid substance would need to absorb to change into a gas, and the amount of same energy a gas would release when turning into a liquid. This value is something that is often leveraged in AC or any temperature control systems, by forcing phase changes at specific points of a system through applied pressure. It is also likely responsible for the majority of confusing and frustrating emergencies for inexperienced Stationeers, where temperatures suddenly spike or drop to dangerous levels, seemingly for no reason.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Molar Liquid Volume&#039;&#039;&#039; - Volume in Liters that a mol of substance occupy in liquid form. Since liquified gases produce no Pressure, this value defines how much of a given liquified gas can be stored in a liquid container or pipe network of a certain capacity.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Molar Mass&#039;&#039;&#039; - Net mass of a mol of substance in any phase state. Largely redundant parameter that becomes important when dealing in Rocketry, since the rocket engines have specific limits to what mass they&#039;re able to carry into space against a local gravity, and excessive amount of fuel/payload can make a lift-off impossible. &lt;br /&gt;
&lt;br /&gt;
== Phase Change ==&lt;br /&gt;
The summary of the aforementioned properties define how a given gas behaves depending on the temperature and pressure at which it is contained. By accessing in-game Stationpedia, a player can find a phase diagram for any such gas in a logarithmic scale. A more readable version for all gases is here:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Gases-phase-change-diagram.png|1200px|center|Gases diagram]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Interactive version: [https://gralewski.github.io/stationeers-gas-phase-diagram-by-zgralewski.htm Here], Reddig post: [https://www.reddit.com/r/Stationeers/comments/1pzrojd/comment/nwtdvrh/ Here]&lt;br /&gt;
&lt;br /&gt;
The left part of each diagram correlates to substance&#039;s solid (ice) state. A vertical blue cut-off indicates its melting point.&lt;br /&gt;
Next goes the dynamic curve (main section), which separates the possible conditions for a liquid state (above the curve) and a gas state (below the curve), the curve itself being the phase change boundary between the two.&lt;br /&gt;
Finally, the curve terminates by an abrupt vertical spike - this is a Maximum Liquid Temperature boundary, after which the substance will almost always remain as gas. &lt;br /&gt;
&lt;br /&gt;
A more complex phase change diagram can be located [https://www.desmos.com/calculator/voj4scjipd Here]&lt;br /&gt;
&lt;br /&gt;
Known gas properties:&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Filter Color !! Molar Heat Capacity&amp;lt;br&amp;gt;(J⋅K&amp;lt;sup&amp;gt;−1&amp;lt;/sup&amp;gt;⋅mol&amp;lt;sup&amp;gt;−1&amp;lt;/sup&amp;gt;) !! Molar Heat of Fusion&amp;lt;br&amp;gt;(kJ⋅K&amp;lt;sup&amp;gt;−1&amp;lt;/sup&amp;gt;⋅mol&amp;lt;sup&amp;gt;−1&amp;lt;/sup&amp;gt;) !! data-sort-type=&amp;quot;number&amp;quot; | Melting Point&amp;lt;br&amp;gt;(K / °C) !! data-sort-type=&amp;quot;number&amp;quot; | Boiling Point at 100 kPa&amp;lt;br&amp;gt;(K / °C) !! data-sort-type=&amp;quot;number&amp;quot; | Minimum Condensation&amp;lt;br&amp;gt;(kPa at K / °C) !! data-sort-type=&amp;quot;number&amp;quot; | Maximum Liquid Temperature&amp;lt;br&amp;gt;(K / °C at kPa) !! Molar Latent Heat&amp;lt;br&amp;gt; (kJ / mol) !! Liquid Molar Volume&amp;lt;br&amp;gt;(L / mol) !! Molar Mass&amp;lt;br&amp;gt;(g / mol)&lt;br /&gt;
|-&lt;br /&gt;
| [[Carbon Dioxide]] (CO&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;) || Gray || 28.2 || 0.6 || 218 / -55.3 || N/A || 517 at 218 / -55.3 || 265 / -8.1 at 6000 || 0.6 || 0.04 || 44&lt;br /&gt;
|-&lt;br /&gt;
| [[Nitrogen]] (N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;) || Black || 20.6 || 0.5 || 40 / -233 || 75 / -198 || 6.3 at 40 / -233 || 190 / -83 at 6000 || 0.5 || 0.0348 || 64&amp;lt;!--That&#039;s correct on ingame files as of 0.2.6091.26702, can be looked up on  Scripts.Atmospherics.Mole:MolarMass()--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[Nitrous Oxide]] (N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O) || Green || 37.2 || 4 || 252 / -21 || N/A || 800 at 252 / -21 || 431 / 158 at 2000 || 4 || 0.026 || 46&lt;br /&gt;
|-&lt;br /&gt;
| [[Oxygen]] (O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;) || White || 21.1 || 0.8 || 56.4 / -217 || 90 / -183 || 6.3 at 56.4 / -217 || 162 / -111 at 6000 || 0.8 || 0.03 || 16&lt;br /&gt;
|-&lt;br /&gt;
| [[Pollutant]] (X) || Yellow || 24.8 || 2 || 173 / -99.8 || N/A || 1800 at 173 / -99.8 || 425 / 152 at 6000 || 2 || 0.04 || 28&lt;br /&gt;
|-&lt;br /&gt;
| [[Volatiles]] (H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;) || Red || 20.4 || 1 || 81.6 / -192 || 112 / -162 || 6.3 at 81.6 / -192 || 195 / -78.1 at 6000 || 1 || 0.04 || 16&lt;br /&gt;
|-&lt;br /&gt;
| [[Water]] (H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;0) || Blue || 72 || 8 || 273 / 0 || 373 / 100 || 6.3 at 273 / 0 || 643 / 370 at 6000 || 8 || 0.018 || 18&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Mixtures==&lt;br /&gt;
While the gases can exist in any arbitrary number of combinations, there are specific functional mixtures produced manually - this is done by filtering and isolating individual component gases and then mixing them in proper ratio using a [[Gas Mixer]]. Such specific mixtures are commonly referenced by their separate names for all associated cases, without mentioning their constituents:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Contents !! Tank Color !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| [[Fuel]] || 67% H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, 33% O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; || Orange || Combustible mixture with Autoignition at 573.15 K / 300 °C&lt;br /&gt;
|-&lt;br /&gt;
| [[HydroNox]] || 50% H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, 50% N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O || N/A || Combustible mixture with Autoignition at 323.15 K / 50 °C&lt;br /&gt;
|-&lt;br /&gt;
| [[Air]] || 75% N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, 25% O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; || White || Well above 16 kPa of minimum O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; pressure required for human breathing, but prevents runaway combustion by spark)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Simulation Mechanics==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! Concept &lt;br /&gt;
! Simulated &lt;br /&gt;
! Notes&lt;br /&gt;
|- &lt;br /&gt;
| Ideal Gas Law (PV=nRT) &lt;br /&gt;
| Partial &lt;br /&gt;
| Pressure will change with temperature, volume, and mols; temperature will not change with pressure, volume, or mols&lt;br /&gt;
|- &lt;br /&gt;
| Adiabatic Heating and Cooling &lt;br /&gt;
| No &lt;br /&gt;
| Compressing or expanding a gas will not affect its temperature or the temperature around it&lt;br /&gt;
|- &lt;br /&gt;
| Thermal Conductivity &lt;br /&gt;
| No &lt;br /&gt;
| Rate of energy transfer is the same for all substances&lt;br /&gt;
|- &lt;br /&gt;
| Thermal Radiation &lt;br /&gt;
| Partial &lt;br /&gt;
| Radiated heat is not absorbed by nearby objects&lt;br /&gt;
|- &lt;br /&gt;
| Phase Change &lt;br /&gt;
| Partial &lt;br /&gt;
| Gas/Liquid have simplified graph; Solid has a fixed temperature; Plasma is ignored&lt;br /&gt;
|- &lt;br /&gt;
| Fluid Dynamics &lt;br /&gt;
| No &lt;br /&gt;
| &#039;Convection&#039; parts work in pressurized environment, other parts work in vacuum&lt;br /&gt;
|- &lt;br /&gt;
| Gas Stoichiometry &lt;br /&gt;
| No &lt;br /&gt;
| The various reactions are arbitrary and vary depending on device used for different products from the same reactants&lt;br /&gt;
|- &lt;br /&gt;
| Gravity/Density &lt;br /&gt;
| No &lt;br /&gt;
| Gas/Liquid is present in all directions&lt;br /&gt;
|- &lt;br /&gt;
| Environment Volume &lt;br /&gt;
| Yes &lt;br /&gt;
| Each environment cube acts as a single point with fixed volume&lt;br /&gt;
|- &lt;br /&gt;
| Saturation&lt;br /&gt;
| No&lt;br /&gt;
| Mixture and % do not affect condensation/evaporation&lt;br /&gt;
|-&lt;br /&gt;
| Pipe Volume &lt;br /&gt;
| Yes &lt;br /&gt;
| Each pipe network acts as a single point with fixed volume depending on number of pipes segments&lt;br /&gt;
|- &lt;br /&gt;
| Flow Direction &lt;br /&gt;
| Partial &lt;br /&gt;
| All pumps and mixer act as check valve, passive check valve available, other valves are not one-way; no flow within each connected pipe network&lt;br /&gt;
|- &lt;br /&gt;
| Pipe Integrity &lt;br /&gt;
| Yes &lt;br /&gt;
| Liquid pipes hold low pressure, but may contain both liquid and gas without consequence; Gas pipes hold high pressure, but stress and break with too much liquid&lt;br /&gt;
|- &lt;br /&gt;
| Heat Transfer &lt;br /&gt;
| Partial &lt;br /&gt;
| Liquid temperature is controlled by gas temperature (if no gas, liquid heater will not function)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Gas]][[Category:Liquid]]&lt;/div&gt;</summary>
		<author><name>Veriszg</name></author>
	</entry>
	<entry>
		<id>https://stationeers-wiki.com/index.php?title=Sorter&amp;diff=25294</id>
		<title>Sorter</title>
		<link rel="alternate" type="text/html" href="https://stationeers-wiki.com/index.php?title=Sorter&amp;diff=25294"/>
		<updated>2026-01-01T23:08:07Z</updated>

		<summary type="html">&lt;p&gt;Veriszg: /* Description */ (today&amp;#039;s edits were mine, too) - added hint to Mode1 so that people try to use ic10 because sorter motherboard glitches&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Structurebox&lt;br /&gt;
| name = Sorter&lt;br /&gt;
| image = [[File:StructureSorter.png]]&lt;br /&gt;
| prefab_hash = -1009150565&lt;br /&gt;
| prefab_name = StructureSorter&lt;br /&gt;
| power_usage = 5W&lt;br /&gt;
| placed_on_grid = Small Grid&lt;br /&gt;
| decon_with_tool1 = [[Hand Drill]]&lt;br /&gt;
| placed_with_item = [[Kit (Sorter)]]&lt;br /&gt;
| item_rec1 = [[Kit (Sorter)]]&lt;br /&gt;
}}&lt;br /&gt;
{{Distinguish|Logic Sorter}}&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;lt;q&amp;gt;No amount of automation is complete without some way of moving different items to different parts of a system. The [[Xigo (Faction)|Xigo]] A2B sorter can be programmed via a computer with a [[Sorter Motherboard]] to direct various items into different chute networks. Filtered items are always passed out the righthand side of the sorter, while non filtered items continue straight through.&amp;lt;/q&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;- Stationpedia&#039;&#039;&#039;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mode 0 (Split):&#039;&#039;&#039; Items alternate between output lanes automatically. The Output property switches between 0 and 1 after each item.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mode 1 (Filter):&#039;&#039;&#039; Requires a [[computer]] with a [[Motherboard|Motherboard (Sorter)]]. Whitelisted items exit one lane, all others exit the alternate lane. When facing the output side (power switch on your right), whitelisted items exit left, rejected items exit right. &#039;&#039;&#039;Note:&#039;&#039;&#039; Some players report issues with the Motherboard (Sorter) interface. Consider using Mode 2 (Logic) with [[IC10]] as a more reliable alternative.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mode 2 (Logic):&#039;&#039;&#039; The sorter waits for [[IC10]] or logic chips to set the Output parameter (0 or 1) before releasing each item. After the item exits, Output resets to -1 automatically. Your controller must set Output for every item - this is intended behavior, not a bug. See [[#Example IC10 sorting script|Example IC10 sorting script]] below for a working implementation.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Output orientation:&#039;&#039;&#039; When facing outputs with power switch on your right: Output 0 exits right (near power switch), Output 1 exits left.&lt;br /&gt;
&lt;br /&gt;
{{Data Network Header}}&lt;br /&gt;
&lt;br /&gt;
{{Data Parameters|&lt;br /&gt;
{{Data Parameters/row|Power|Boolean|w=0|Can be read to return if the Sorter is correctly powered or not, set via the power system, return 1 if powered and 0 if not|multiple=2|0|Unpowered|1|Powered}}&lt;br /&gt;
{{Data Parameters/row|Mode|Integer|The mode of the Sorter, &#039;&#039;&#039;Split&#039;&#039;&#039; does alternate outputs, &#039;&#039;&#039;Filter&#039;&#039;&#039; decides output via [[Motherboard (Sorter)]], &#039;&#039;&#039;Logic&#039;&#039;&#039; determines output via parameter &#039;&#039;&#039;Output&#039;&#039;&#039;|multiple=3|0|Split|1|Filter|2|Logic}}&lt;br /&gt;
{{Data Parameters/row|Error|Boolean|w=0|1 if device is in error state, otherwise 0|multiple=2|0|&amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;|1|Error}}&lt;br /&gt;
{{Data Parameters/row|Lock|Boolean|Disable manual operation of the Sorter.|multiple=2|0|Unlocked|1|Locked}}&lt;br /&gt;
{{Data Parameters/row|On|Boolean|The current state of the Sorter.|multiple=2|0|Off|1|On}}&lt;br /&gt;
{{Data Parameters/row|RequiredPower|Integer|w=0|Idle operating power quantity, does not necessarily include extra demand power}}&lt;br /&gt;
{{Data Parameters/row|ClearMemory|Integer|r=0|When set to 1, clears the counter memory (e.g. ExportCount). Will set itself back to 0 when actioned}}&lt;br /&gt;
{{Data Parameters/row|ExportCount|Integer|w=0|How many items exported since last ClearMemory}}&lt;br /&gt;
{{Data Parameters/row|ImportCount|Integer|w=0|How many items imported since last ClearMemory}}&lt;br /&gt;
{{Data Parameters/row|Output|Integer|&amp;lt;div&amp;gt;Decides which side the next item will be sent to.&amp;lt;br&amp;gt;&lt;br /&gt;
In &#039;&#039;&#039;Logic&#039;&#039;&#039; mode, defaults to -1 after action. In &#039;&#039;&#039;Split&#039;&#039;&#039; mode, alternates between 0 and 1 after action. Does nothing in &#039;&#039;&#039;Filter&#039;&#039;&#039; mode.&amp;lt;br&amp;gt;&lt;br /&gt;
When set to 0 the item will exit the output slot closest to the power switch.  When set to 1, the item will exit the slot furthest from the power switch.&amp;lt;/div&amp;gt;|multiple=3|-1|Unset|0|Straight (Near Power Switch)|1|Side}}&lt;br /&gt;
{{Data Parameters/row|PrefabHash|Integer|w=0|The hash of the structure}}&lt;br /&gt;
{{Data Parameters/row|ReferenceId|Integer|w=0|Unique Reference Identifier for this object}}&lt;br /&gt;
{{Data Parameters/row|NameHash|Integer|w=0|Provides the hash value for the name of the object as a 32 bit integer.}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Data Slots ===&lt;br /&gt;
These are all parameters, that can be read with a [[Kit_(Logic_I/O)#Slots_Reader|Slots Reader]]. The outputs are listed in the order a Slots Reader&#039;s &amp;quot;VAR&amp;quot; setting cycles through them.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Number || Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Import || Import slot.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Export (accept) || Export slot.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Export (reject) || Export slot.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Data Disk || Diskslot&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Data Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| MaxQuantity || Integer || Returns maximum stacksize.&lt;br /&gt;
|-&lt;br /&gt;
| Damage || Integer || Item durability in percent.&lt;br /&gt;
|-&lt;br /&gt;
| Class || Integer || Item class ID.&lt;br /&gt;
|-&lt;br /&gt;
| Quantity || Integer || Size of stack.&lt;br /&gt;
|-&lt;br /&gt;
| PrefabHash || Integer || Returns [[ItemHash]] of item in slot.&lt;br /&gt;
|-&lt;br /&gt;
| Occupied || Boolean || Returns whether the slot occupied. (0 for no, 1 for yes).&lt;br /&gt;
|-&lt;br /&gt;
| OccupantHash || Integer || Returns [[ItemHash]] of item in slot.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Item Slot Classes / Types ==&lt;br /&gt;
&lt;br /&gt;
Reading the &#039;&#039;class&#039;&#039; attribute of the input slot will give one of the following values:&lt;br /&gt;
&lt;br /&gt;
Note that you can use &amp;lt;pre style=&amp;quot;display: inline&amp;quot;&amp;gt;SlotClass.&amp;lt;Item&amp;gt;&amp;lt;/pre&amp;gt; directly in IC code instead of the numeric value&lt;br /&gt;
*NOTE The classes listed in this section are FilterSlotTypeCompare and NOT sorting class.  &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Item values and descriptions&lt;br /&gt;
! Item !! Value !! Description !! Item !! Value !! Description !! Item !! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| None || 0 || || Helmet || 1 || || Suit || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
| Back || 3 || || GasFilter || 4 || || GasCanister || 5 ||&lt;br /&gt;
|-&lt;br /&gt;
| Motherboard || 6 || || Circuitboard || 7 || || DataDisk || 8 ||&lt;br /&gt;
|-&lt;br /&gt;
| Organ || 9 || || Ore || 10 || Includes reagent mixes from recycler and ices || Plant || 11 ||&lt;br /&gt;
|-&lt;br /&gt;
| Uniform || 12 || || Entity || 13 || || Battery || 14 ||&lt;br /&gt;
|-&lt;br /&gt;
| Egg || 15 || || Belt || 16 || || Tool || 17 ||&lt;br /&gt;
|-&lt;br /&gt;
| Appliance || 18 || || Ingot || 19 || || Torpedo || 20 ||&lt;br /&gt;
|-&lt;br /&gt;
| Cartridge || 21 || || AccessCard || 22 || || Magazine || 23 ||&lt;br /&gt;
|-&lt;br /&gt;
| Circuit || 24 || || Bottle || 25 || This refers to Paint Can || ProgrammableChip || 26 ||&lt;br /&gt;
|-&lt;br /&gt;
| Glasses || 27 || || CreditCard || 28 || || DirtCanister || 29 ||&lt;br /&gt;
|-&lt;br /&gt;
| SensorProcessingUnit || 30 || || LiquidCanister || 31 || || LiquidBottle || 32 ||&lt;br /&gt;
|-&lt;br /&gt;
| Wreckage || 33 || || SoundCartridge || 34 || || DrillHead || 35 ||&lt;br /&gt;
|-&lt;br /&gt;
| ScanningHead || 36 || || Flare || 37 || || Blocked || 38 ||&lt;br /&gt;
|-&lt;br /&gt;
| SuitMod || 39 || || Crate || 40 || || Portables || 41 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Example IC10 sorting script ===&lt;br /&gt;
&lt;br /&gt;
Basic ingot sorter - filters one item type to the left output, rejects everything else to the right.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Ingot Sorter Controller&lt;br /&gt;
# When facing outputs (power switch on right): matched items exit left, rejected exit right&lt;br /&gt;
# Setup:&lt;br /&gt;
# 1. Connect d0 to the sorter&lt;br /&gt;
# 2. Change hTarget to match your desired ingot&lt;br /&gt;
&lt;br /&gt;
define hTarget HASH(&amp;quot;ItemIronIngot&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
alias dSorter d0&lt;br /&gt;
alias vHash r0&lt;br /&gt;
alias vOutput r1&lt;br /&gt;
&lt;br /&gt;
s dSorter Mode 2 # Logic mode&lt;br /&gt;
s dSorter On 1&lt;br /&gt;
&lt;br /&gt;
main:&lt;br /&gt;
  ls vHash dSorter 0 OccupantHash # Read import slot&lt;br /&gt;
  beqz vHash skip # Empty - skip processing&lt;br /&gt;
  &lt;br /&gt;
  seq vOutput vHash hTarget # 1=match, 0=reject&lt;br /&gt;
  s dSorter Output vOutput&lt;br /&gt;
  &lt;br /&gt;
  skip:&lt;br /&gt;
  yield&lt;br /&gt;
j main&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Machines]]&lt;br /&gt;
[[Category:Import/Export]]&lt;/div&gt;</summary>
		<author><name>Veriszg</name></author>
	</entry>
	<entry>
		<id>https://stationeers-wiki.com/index.php?title=Gas&amp;diff=25259</id>
		<title>Gas</title>
		<link rel="alternate" type="text/html" href="https://stationeers-wiki.com/index.php?title=Gas&amp;diff=25259"/>
		<updated>2025-12-29T09:21:13Z</updated>

		<summary type="html">&lt;p&gt;Veriszg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
{{Disambiguation}}&lt;br /&gt;
In older versions of Stationeers, Gas was a generalized term for fluid substances, derived from ices or gained by other means, that can be transported and manipulated to change their energetic form (phase) through the combination of pressure and temperature. Newer versions now have gasses and liquids handled completely separately.&lt;br /&gt;
&lt;br /&gt;
This is opposed to solid resources, processed irreversibly from ores into pure ingots and alloys, used directly for crafting purposes. Gases have a great variety of uses - some are required for creation of livable pressurized environments, while others are toxic and dangerous and meant for controlled industrial processes, or outright waste product with limited utility.&lt;br /&gt;
&lt;br /&gt;
Naturally, gases can exist as a constituence of a planetary atmosphere, available in a virtually infinite amount and possible to capture through the use of appropriate atmospheric devices, can be pressurized, filtered, and stored. Planets or moons that have a below-zero or vacuum conditions will also contain frozen gas deposits in a form of ice, which can be melted by the use of a [[Furnace]] or [[Ice Crusher]]. Also, mined ice nuggets appear similar to metallic ores, however they will begin to melt if exposed to a warm environment while held in arms or regular containers. &lt;br /&gt;
&lt;br /&gt;
Small amount of gases can be acquired from smelting solid materials into ingots, as each type of ore contains its own impurities, although these gases mostly seen as an impediment to efficient smelting due to low output.&amp;lt;br&amp;gt;&lt;br /&gt;
Finally, gases can be purchased from [[traders]] in various forms and at different temperatures. Some traders will also buy gases and mixtures that they need with certain temperature conditions, or even pay you a small fee for disposing of their own waste gases. &lt;br /&gt;
&lt;br /&gt;
Current variety of gases include:&lt;br /&gt;
* [[Special:MyLanguage/Carbon Dioxide|Carbon Dioxide (CO&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;)]] - Inert gas, a non-toxic byproduct of burning organic fuels, breathed by most growing plants as source of Carbon.&lt;br /&gt;
* [[Special:MyLanguage/Nitrogen|Nitrogen (N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;)]] - Heavy gas, usable as a stable pressure agent due to its exceptionally low freezing temperature.&lt;br /&gt;
* [[Special:MyLanguage/Nitrous Oxide|Nitrous Oxide (N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O)]] - Commonly known as &amp;quot;Nitro&amp;quot;, a loose chemical composite of Nitrogen and Oxygen, used as powerful fuel oxidizer and general anesthetic. &lt;br /&gt;
* [[Special:MyLanguage/Oxygen|Oxygen (O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;)]] - Highly-reactive gas used for respiration by animal life and as conventional fuel oxidizer.&lt;br /&gt;
* [[Special:MyLanguage/Pollutant|Pollutants (X)]] - Ambiguous compound of highly-toxic radicals, a waste byproduct from burning or processing of impure organic fuel.&lt;br /&gt;
* [[Special:MyLanguage/Volatiles|Volatiles (CH&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;)+]] - Generic composite of simple organic compounds used as a fuel in smelting, power generation, and chemistry.&lt;br /&gt;
* [[Special:MyLanguage/Water|Water (H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O)]] - Pure compound used for hydration, farming, and as coolant, originally designed as inherently liquid substance.&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
==Properties==&lt;br /&gt;
Gases and their liquid analogues are presented in the parametric form - that means that they exist as a property of a given atmosphere&#039; grid cell, interior grid cell of an enclosed room, composite [[pipe]] network, atmospheric device, or portable container. To further understand the behavior of gases within different spaces, check [[Atmosphere]] and [[Pipe]] pages. It is technically possible to convert gases down into their solid state (i.e. a physical item), however that action has limited practical use, beyond perhaps hand measuring of specific quantities, and no dedicated devices exist for doing so.&lt;br /&gt;
&lt;br /&gt;
Each different gas have a number of properties, which define its thermodynamic behavior and conditions for phase changes. Leveraging the property values and their differences between gases is an important part of atmospheric management and temperature conditioning required for surviving extreme environments and utilizing advanced technologies:&lt;br /&gt;
* &#039;&#039;&#039;Melting Point&#039;&#039;&#039; - Temperature boundary between solid and liquid states. Liquids cooled to this temperature will begin freezing. This will create ice chunks converting up to 50 mol of liquid into a 50g stack of pure ice. Liquids freezing within containers or pipes will cause them to burst irreversibly. A player should make sure never to cool the gas down to this value.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Boiling Point&#039;&#039;&#039; - Temperature boundary between liquid and gaseous states at standard 1 atm (100 kPa) of pressure. Higher pressures impede evaporation, raising this value and allowing to form liquids at higher temperatures. Most atmospheric devices are designed to work with gases, while liquified substances are very compact. Player should control pressure and temperature to prevent gases and liquids reaching this value unintentionally. Not available for substances, that will remain in gaseous phase at 100 kPa regardless of temperature.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Minimum Condensation Pressure&#039;&#039;&#039; - a Pressure value corresponding to the Melting Point Temperature, which is necessary for the liquid to begin freezing. Most liquified gases will freeze up when cooled below their melting point regardless, but for &#039;&#039;some&#039;&#039; gases a low pressure environment can be sustained to keep a liquid in a super-cooled state without allowing it to crystallize, which is useful for storage of few particular substances.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Maximum Liquid Temperature&#039;&#039;&#039; - a Temperature value, above which the substance cannot remain in liquid state within working pressure range, usually sampled at high pressure (6 MPa). Exponentially higher pressures are capable of keeping the liquid from evaporating, but the requirements are unrealistic for physical limitations of Stationeers&#039; equipment. Its a practical heat boundary, under which a given substance can be either gas, liquid, or both based on the imposed pressure level, all the way down to the melting point boundary.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Molar Heat Capacity&#039;&#039;&#039; - The thermal capacity of 1 mol of the gas, that it has to absorb/radiate to raise/lower its temperature by 1 K. The greater this value, the more heat a cold gas can absorb to cool another gas, and inversely, the more heat has to be drawn out to cool it. Particularly important value for an efficient coolant.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Molar Heat of Fusion&#039;&#039;&#039; - The amount of thermal energy that a mol of frozen substance would need to absorb to change into a liquid, and the amount of same energy a liquid will release into environment when turning into ice. Given that frozen substances are rarely used as anything beyond a raw source material for gases, this value has little importance.&lt;br /&gt;
 &lt;br /&gt;
* &#039;&#039;&#039;Molar Latent Heat&#039;&#039;&#039; - The amount of thermal energy that a mol of liquid substance would need to absorb to change into a gas, and the amount of same energy a gas would release when turning into a liquid. This value is something that is often leveraged in AC or any temperature control systems, by forcing phase changes at specific points of a system through applied pressure. It is also likely responsible for the majority of confusing and frustrating emergencies for inexperienced Stationeers, where temperatures suddenly spike or drop to dangerous levels, seemingly for no reason.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Molar Liquid Volume&#039;&#039;&#039; - Volume in Liters that a mol of substance occupy in liquid form. Since liquified gases produce no Pressure, this value defines how much of a given liquified gas can be stored in a liquid container or pipe network of a certain capacity.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Molar Mass&#039;&#039;&#039; - Net mass of a mol of substance in any phase state. Largely redundant parameter that becomes important when dealing in Rocketry, since the rocket engines have specific limits to what mass they&#039;re able to carry into space against a local gravity, and excessive amount of fuel/payload can make a lift-off impossible. &lt;br /&gt;
&lt;br /&gt;
== Phase Change ==&lt;br /&gt;
The summary of the aforementioned properties define how a given gas behaves depending on the temperature and pressure at which it is contained. By accessing in-game Stationpedia, a player can find a phase diagram for any such gas in a logarithmic scale. A more readable version for all gases is here:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Gases-phase-change-diagram.png|1200px|center|Gases diagram]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Interactive version: [https://gralewski.github.io/stationeers-gas-phase-diagram-by-zgralewski.htm Here]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left part of each diagram correlates to substance&#039;s solid (ice) state. A vertical blue cut-off indicates its melting point.&lt;br /&gt;
Next goes the dynamic curve (main section), which separates the possible conditions for a liquid state (above the curve) and a gas state (below the curve), the curve itself being the phase change boundary between the two.&lt;br /&gt;
Finally, the curve terminates by an abrupt vertical spike - this is a Maximum Liquid Temperature boundary, after which the substance will almost always remain as gas. &lt;br /&gt;
&lt;br /&gt;
A more complex phase change diagram can be located [https://www.desmos.com/calculator/voj4scjipd Here]&lt;br /&gt;
&lt;br /&gt;
Known gas properties:&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Filter Color !! Molar Heat Capacity&amp;lt;br&amp;gt;(J⋅K&amp;lt;sup&amp;gt;−1&amp;lt;/sup&amp;gt;⋅mol&amp;lt;sup&amp;gt;−1&amp;lt;/sup&amp;gt;) !! Molar Heat of Fusion&amp;lt;br&amp;gt;(kJ⋅K&amp;lt;sup&amp;gt;−1&amp;lt;/sup&amp;gt;⋅mol&amp;lt;sup&amp;gt;−1&amp;lt;/sup&amp;gt;) !! data-sort-type=&amp;quot;number&amp;quot; | Melting Point&amp;lt;br&amp;gt;(K / °C) !! data-sort-type=&amp;quot;number&amp;quot; | Boiling Point at 100 kPa&amp;lt;br&amp;gt;(K / °C) !! data-sort-type=&amp;quot;number&amp;quot; | Minimum Condensation&amp;lt;br&amp;gt;(kPa at K / °C) !! data-sort-type=&amp;quot;number&amp;quot; | Maximum Liquid Temperature&amp;lt;br&amp;gt;(K / °C at kPa) !! Molar Latent Heat&amp;lt;br&amp;gt; (kJ / mol) !! Liquid Molar Volume&amp;lt;br&amp;gt;(L / mol) !! Molar Mass&amp;lt;br&amp;gt;(g / mol)&lt;br /&gt;
|-&lt;br /&gt;
| [[Carbon Dioxide]] (CO&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;) || Gray || 28.2 || 0.6 || 218 / -55.3 || N/A || 517 at 218 / -55.3 || 265 / -8.1 at 6000 || 0.6 || 0.04 || 44&lt;br /&gt;
|-&lt;br /&gt;
| [[Nitrogen]] (N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;) || Black || 20.6 || 0.5 || 40 / -233 || 75 / -198 || 6.3 at 40 / -233 || 190 / -83 at 6000 || 0.5 || 0.0348 || 64&amp;lt;!--That&#039;s correct on ingame files as of 0.2.6091.26702, can be looked up on  Scripts.Atmospherics.Mole:MolarMass()--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[Nitrous Oxide]] (N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O) || Green || 37.2 || 4 || 252 / -21 || N/A || 800 at 252 / -21 || 431 / 158 at 2000 || 4 || 0.026 || 46&lt;br /&gt;
|-&lt;br /&gt;
| [[Oxygen]] (O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;) || White || 21.1 || 0.8 || 56.4 / -217 || 90 / -183 || 6.3 at 56.4 / -217 || 162 / -111 at 6000 || 0.8 || 0.03 || 16&lt;br /&gt;
|-&lt;br /&gt;
| [[Pollutant]] (X) || Yellow || 24.8 || 2 || 173 / -99.8 || N/A || 1800 at 173 / -99.8 || 425 / 152 at 6000 || 2 || 0.04 || 28&lt;br /&gt;
|-&lt;br /&gt;
| [[Volatiles]] (H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;) || Red || 20.4 || 1 || 81.6 / -192 || 112 / -162 || 6.3 at 81.6 / -192 || 195 / -78.1 at 6000 || 1 || 0.04 || 16&lt;br /&gt;
|-&lt;br /&gt;
| [[Water]] (H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;0) || Blue || 72 || 8 || 273 / 0 || 373 / 100 || 6.3 at 273 / 0 || 643 / 370 at 6000 || 8 || 0.018 || 18&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Mixtures==&lt;br /&gt;
While the gases can exist in any arbitrary number of combinations, there are specific functional mixtures produced manually - this is done by filtering and isolating individual component gases and then mixing them in proper ratio using a [[Gas Mixer]]. Such specific mixtures are commonly referenced by their separate names for all associated cases, without mentioning their constituents:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Contents !! Tank Color !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| [[Fuel]] || 67% H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, 33% O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; || Orange || Combustible mixture with Autoignition at 573.15 K / 300 °C&lt;br /&gt;
|-&lt;br /&gt;
| [[HydroNox]] || 50% H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, 50% N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O || N/A || Combustible mixture with Autoignition at 323.15 K / 50 °C&lt;br /&gt;
|-&lt;br /&gt;
| [[Air]] || 75% N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, 25% O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; || White || Well above 16 kPa of minimum O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; pressure required for human breathing, but prevents runaway combustion by spark)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Simulation Mechanics==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! Concept &lt;br /&gt;
! Simulated &lt;br /&gt;
! Notes&lt;br /&gt;
|- &lt;br /&gt;
| Ideal Gas Law (PV=nRT) &lt;br /&gt;
| Partial &lt;br /&gt;
| Pressure will change with temperature, volume, and mols; temperature will not change with pressure, volume, or mols&lt;br /&gt;
|- &lt;br /&gt;
| Adiabatic Heating and Cooling &lt;br /&gt;
| No &lt;br /&gt;
| Compressing or expanding a gas will not affect its temperature or the temperature around it&lt;br /&gt;
|- &lt;br /&gt;
| Thermal Conductivity &lt;br /&gt;
| No &lt;br /&gt;
| Rate of energy transfer is the same for all substances&lt;br /&gt;
|- &lt;br /&gt;
| Thermal Radiation &lt;br /&gt;
| Partial &lt;br /&gt;
| Radiated heat is not absorbed by nearby objects&lt;br /&gt;
|- &lt;br /&gt;
| Phase Change &lt;br /&gt;
| Partial &lt;br /&gt;
| Gas/Liquid have simplified graph; Solid has a fixed temperature; Plasma is ignored&lt;br /&gt;
|- &lt;br /&gt;
| Fluid Dynamics &lt;br /&gt;
| No &lt;br /&gt;
| &#039;Convection&#039; parts work in pressurized environment, other parts work in vacuum&lt;br /&gt;
|- &lt;br /&gt;
| Gas Stoichiometry &lt;br /&gt;
| No &lt;br /&gt;
| The various reactions are arbitrary and vary depending on device used for different products from the same reactants&lt;br /&gt;
|- &lt;br /&gt;
| Gravity/Density &lt;br /&gt;
| No &lt;br /&gt;
| Gas/Liquid is present in all directions&lt;br /&gt;
|- &lt;br /&gt;
| Environment Volume &lt;br /&gt;
| Yes &lt;br /&gt;
| Each environment cube acts as a single point with fixed volume&lt;br /&gt;
|- &lt;br /&gt;
| Saturation&lt;br /&gt;
| No&lt;br /&gt;
| Mixture and % do not affect condensation/evaporation&lt;br /&gt;
|-&lt;br /&gt;
| Pipe Volume &lt;br /&gt;
| Yes &lt;br /&gt;
| Each pipe network acts as a single point with fixed volume depending on number of pipes segments&lt;br /&gt;
|- &lt;br /&gt;
| Flow Direction &lt;br /&gt;
| Partial &lt;br /&gt;
| All pumps and mixer act as check valve, passive check valve available, other valves are not one-way; no flow within each connected pipe network&lt;br /&gt;
|- &lt;br /&gt;
| Pipe Integrity &lt;br /&gt;
| Yes &lt;br /&gt;
| Liquid pipes hold low pressure, but may contain both liquid and gas without consequence; Gas pipes hold high pressure, but stress and break with too much liquid&lt;br /&gt;
|- &lt;br /&gt;
| Heat Transfer &lt;br /&gt;
| Partial &lt;br /&gt;
| Liquid temperature is controlled by gas temperature (if no gas, liquid heater will not function)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Gas]][[Category:Liquid]]&lt;/div&gt;</summary>
		<author><name>Veriszg</name></author>
	</entry>
	<entry>
		<id>https://stationeers-wiki.com/index.php?title=Gas&amp;diff=25258</id>
		<title>Gas</title>
		<link rel="alternate" type="text/html" href="https://stationeers-wiki.com/index.php?title=Gas&amp;diff=25258"/>
		<updated>2025-12-29T09:19:20Z</updated>

		<summary type="html">&lt;p&gt;Veriszg: image edit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
{{Disambiguation}}&lt;br /&gt;
In older versions of Stationeers, Gas was a generalized term for fluid substances, derived from ices or gained by other means, that can be transported and manipulated to change their energetic form (phase) through the combination of pressure and temperature. Newer versions now have gasses and liquids handled completely separately.&lt;br /&gt;
&lt;br /&gt;
This is opposed to solid resources, processed irreversibly from ores into pure ingots and alloys, used directly for crafting purposes. Gases have a great variety of uses - some are required for creation of livable pressurized environments, while others are toxic and dangerous and meant for controlled industrial processes, or outright waste product with limited utility.&lt;br /&gt;
&lt;br /&gt;
Naturally, gases can exist as a constituence of a planetary atmosphere, available in a virtually infinite amount and possible to capture through the use of appropriate atmospheric devices, can be pressurized, filtered, and stored. Planets or moons that have a below-zero or vacuum conditions will also contain frozen gas deposits in a form of ice, which can be melted by the use of a [[Furnace]] or [[Ice Crusher]]. Also, mined ice nuggets appear similar to metallic ores, however they will begin to melt if exposed to a warm environment while held in arms or regular containers. &lt;br /&gt;
&lt;br /&gt;
Small amount of gases can be acquired from smelting solid materials into ingots, as each type of ore contains its own impurities, although these gases mostly seen as an impediment to efficient smelting due to low output.&amp;lt;br&amp;gt;&lt;br /&gt;
Finally, gases can be purchased from [[traders]] in various forms and at different temperatures. Some traders will also buy gases and mixtures that they need with certain temperature conditions, or even pay you a small fee for disposing of their own waste gases. &lt;br /&gt;
&lt;br /&gt;
Current variety of gases include:&lt;br /&gt;
* [[Special:MyLanguage/Carbon Dioxide|Carbon Dioxide (CO&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;)]] - Inert gas, a non-toxic byproduct of burning organic fuels, breathed by most growing plants as source of Carbon.&lt;br /&gt;
* [[Special:MyLanguage/Nitrogen|Nitrogen (N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;)]] - Heavy gas, usable as a stable pressure agent due to its exceptionally low freezing temperature.&lt;br /&gt;
* [[Special:MyLanguage/Nitrous Oxide|Nitrous Oxide (N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O)]] - Commonly known as &amp;quot;Nitro&amp;quot;, a loose chemical composite of Nitrogen and Oxygen, used as powerful fuel oxidizer and general anesthetic. &lt;br /&gt;
* [[Special:MyLanguage/Oxygen|Oxygen (O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;)]] - Highly-reactive gas used for respiration by animal life and as conventional fuel oxidizer.&lt;br /&gt;
* [[Special:MyLanguage/Pollutant|Pollutants (X)]] - Ambiguous compound of highly-toxic radicals, a waste byproduct from burning or processing of impure organic fuel.&lt;br /&gt;
* [[Special:MyLanguage/Volatiles|Volatiles (CH&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;)+]] - Generic composite of simple organic compounds used as a fuel in smelting, power generation, and chemistry.&lt;br /&gt;
* [[Special:MyLanguage/Water|Water (H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O)]] - Pure compound used for hydration, farming, and as coolant, originally designed as inherently liquid substance.&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
==Properties==&lt;br /&gt;
Gases and their liquid analogues are presented in the parametric form - that means that they exist as a property of a given atmosphere&#039; grid cell, interior grid cell of an enclosed room, composite [[pipe]] network, atmospheric device, or portable container. To further understand the behavior of gases within different spaces, check [[Atmosphere]] and [[Pipe]] pages. It is technically possible to convert gases down into their solid state (i.e. a physical item), however that action has limited practical use, beyond perhaps hand measuring of specific quantities, and no dedicated devices exist for doing so.&lt;br /&gt;
&lt;br /&gt;
Each different gas have a number of properties, which define its thermodynamic behavior and conditions for phase changes. Leveraging the property values and their differences between gases is an important part of atmospheric management and temperature conditioning required for surviving extreme environments and utilizing advanced technologies:&lt;br /&gt;
* &#039;&#039;&#039;Melting Point&#039;&#039;&#039; - Temperature boundary between solid and liquid states. Liquids cooled to this temperature will begin freezing. This will create ice chunks converting up to 50 mol of liquid into a 50g stack of pure ice. Liquids freezing within containers or pipes will cause them to burst irreversibly. A player should make sure never to cool the gas down to this value.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Boiling Point&#039;&#039;&#039; - Temperature boundary between liquid and gaseous states at standard 1 atm (100 kPa) of pressure. Higher pressures impede evaporation, raising this value and allowing to form liquids at higher temperatures. Most atmospheric devices are designed to work with gases, while liquified substances are very compact. Player should control pressure and temperature to prevent gases and liquids reaching this value unintentionally. Not available for substances, that will remain in gaseous phase at 100 kPa regardless of temperature.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Minimum Condensation Pressure&#039;&#039;&#039; - a Pressure value corresponding to the Melting Point Temperature, which is necessary for the liquid to begin freezing. Most liquified gases will freeze up when cooled below their melting point regardless, but for &#039;&#039;some&#039;&#039; gases a low pressure environment can be sustained to keep a liquid in a super-cooled state without allowing it to crystallize, which is useful for storage of few particular substances.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Maximum Liquid Temperature&#039;&#039;&#039; - a Temperature value, above which the substance cannot remain in liquid state within working pressure range, usually sampled at high pressure (6 MPa). Exponentially higher pressures are capable of keeping the liquid from evaporating, but the requirements are unrealistic for physical limitations of Stationeers&#039; equipment. Its a practical heat boundary, under which a given substance can be either gas, liquid, or both based on the imposed pressure level, all the way down to the melting point boundary.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Molar Heat Capacity&#039;&#039;&#039; - The thermal capacity of 1 mol of the gas, that it has to absorb/radiate to raise/lower its temperature by 1 K. The greater this value, the more heat a cold gas can absorb to cool another gas, and inversely, the more heat has to be drawn out to cool it. Particularly important value for an efficient coolant.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Molar Heat of Fusion&#039;&#039;&#039; - The amount of thermal energy that a mol of frozen substance would need to absorb to change into a liquid, and the amount of same energy a liquid will release into environment when turning into ice. Given that frozen substances are rarely used as anything beyond a raw source material for gases, this value has little importance.&lt;br /&gt;
 &lt;br /&gt;
* &#039;&#039;&#039;Molar Latent Heat&#039;&#039;&#039; - The amount of thermal energy that a mol of liquid substance would need to absorb to change into a gas, and the amount of same energy a gas would release when turning into a liquid. This value is something that is often leveraged in AC or any temperature control systems, by forcing phase changes at specific points of a system through applied pressure. It is also likely responsible for the majority of confusing and frustrating emergencies for inexperienced Stationeers, where temperatures suddenly spike or drop to dangerous levels, seemingly for no reason.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Molar Liquid Volume&#039;&#039;&#039; - Volume in Liters that a mol of substance occupy in liquid form. Since liquified gases produce no Pressure, this value defines how much of a given liquified gas can be stored in a liquid container or pipe network of a certain capacity.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Molar Mass&#039;&#039;&#039; - Net mass of a mol of substance in any phase state. Largely redundant parameter that becomes important when dealing in Rocketry, since the rocket engines have specific limits to what mass they&#039;re able to carry into space against a local gravity, and excessive amount of fuel/payload can make a lift-off impossible. &lt;br /&gt;
&lt;br /&gt;
== Phase Change ==&lt;br /&gt;
The summary of the aforementioned properties define how a given gas behaves depending on the temperature and pressure at which it is contained. By accessing in-game Stationpedia, a player can find a phase diagram for any such gas in a logarithmic scale. A composite diagram for all gases looks like this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Gases-phase-change-diagram.png|1200px|center|Gases diagram]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Interactive version: [https://gralewski.github.io/stationeers-gas-phase-diagram-by-zgralewski.htm Here]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left part of each diagram correlates to substance&#039;s solid (ice) state. A vertical blue cut-off indicates its melting point.&lt;br /&gt;
Next goes the dynamic curve (main section), which separates the possible conditions for a liquid state (above the curve) and a gas state (below the curve), the curve itself being the phase change boundary between the two.&lt;br /&gt;
Finally, the curve terminates by an abrupt vertical spike - this is a Maximum Liquid Temperature boundary, after which the substance will almost always remain as gas. &lt;br /&gt;
&lt;br /&gt;
A more complex phase change diagram can be located [https://www.desmos.com/calculator/voj4scjipd Here]&lt;br /&gt;
&lt;br /&gt;
Known gas properties:&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Filter Color !! Molar Heat Capacity&amp;lt;br&amp;gt;(J⋅K&amp;lt;sup&amp;gt;−1&amp;lt;/sup&amp;gt;⋅mol&amp;lt;sup&amp;gt;−1&amp;lt;/sup&amp;gt;) !! Molar Heat of Fusion&amp;lt;br&amp;gt;(kJ⋅K&amp;lt;sup&amp;gt;−1&amp;lt;/sup&amp;gt;⋅mol&amp;lt;sup&amp;gt;−1&amp;lt;/sup&amp;gt;) !! data-sort-type=&amp;quot;number&amp;quot; | Melting Point&amp;lt;br&amp;gt;(K / °C) !! data-sort-type=&amp;quot;number&amp;quot; | Boiling Point at 100 kPa&amp;lt;br&amp;gt;(K / °C) !! data-sort-type=&amp;quot;number&amp;quot; | Minimum Condensation&amp;lt;br&amp;gt;(kPa at K / °C) !! data-sort-type=&amp;quot;number&amp;quot; | Maximum Liquid Temperature&amp;lt;br&amp;gt;(K / °C at kPa) !! Molar Latent Heat&amp;lt;br&amp;gt; (kJ / mol) !! Liquid Molar Volume&amp;lt;br&amp;gt;(L / mol) !! Molar Mass&amp;lt;br&amp;gt;(g / mol)&lt;br /&gt;
|-&lt;br /&gt;
| [[Carbon Dioxide]] (CO&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;) || Gray || 28.2 || 0.6 || 218 / -55.3 || N/A || 517 at 218 / -55.3 || 265 / -8.1 at 6000 || 0.6 || 0.04 || 44&lt;br /&gt;
|-&lt;br /&gt;
| [[Nitrogen]] (N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;) || Black || 20.6 || 0.5 || 40 / -233 || 75 / -198 || 6.3 at 40 / -233 || 190 / -83 at 6000 || 0.5 || 0.0348 || 64&amp;lt;!--That&#039;s correct on ingame files as of 0.2.6091.26702, can be looked up on  Scripts.Atmospherics.Mole:MolarMass()--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[Nitrous Oxide]] (N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O) || Green || 37.2 || 4 || 252 / -21 || N/A || 800 at 252 / -21 || 431 / 158 at 2000 || 4 || 0.026 || 46&lt;br /&gt;
|-&lt;br /&gt;
| [[Oxygen]] (O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;) || White || 21.1 || 0.8 || 56.4 / -217 || 90 / -183 || 6.3 at 56.4 / -217 || 162 / -111 at 6000 || 0.8 || 0.03 || 16&lt;br /&gt;
|-&lt;br /&gt;
| [[Pollutant]] (X) || Yellow || 24.8 || 2 || 173 / -99.8 || N/A || 1800 at 173 / -99.8 || 425 / 152 at 6000 || 2 || 0.04 || 28&lt;br /&gt;
|-&lt;br /&gt;
| [[Volatiles]] (H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;) || Red || 20.4 || 1 || 81.6 / -192 || 112 / -162 || 6.3 at 81.6 / -192 || 195 / -78.1 at 6000 || 1 || 0.04 || 16&lt;br /&gt;
|-&lt;br /&gt;
| [[Water]] (H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;0) || Blue || 72 || 8 || 273 / 0 || 373 / 100 || 6.3 at 273 / 0 || 643 / 370 at 6000 || 8 || 0.018 || 18&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Mixtures==&lt;br /&gt;
While the gases can exist in any arbitrary number of combinations, there are specific functional mixtures produced manually - this is done by filtering and isolating individual component gases and then mixing them in proper ratio using a [[Gas Mixer]]. Such specific mixtures are commonly referenced by their separate names for all associated cases, without mentioning their constituents:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Contents !! Tank Color !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| [[Fuel]] || 67% H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, 33% O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; || Orange || Combustible mixture with Autoignition at 573.15 K / 300 °C&lt;br /&gt;
|-&lt;br /&gt;
| [[HydroNox]] || 50% H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, 50% N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O || N/A || Combustible mixture with Autoignition at 323.15 K / 50 °C&lt;br /&gt;
|-&lt;br /&gt;
| [[Air]] || 75% N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, 25% O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; || White || Well above 16 kPa of minimum O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; pressure required for human breathing, but prevents runaway combustion by spark)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Simulation Mechanics==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! Concept &lt;br /&gt;
! Simulated &lt;br /&gt;
! Notes&lt;br /&gt;
|- &lt;br /&gt;
| Ideal Gas Law (PV=nRT) &lt;br /&gt;
| Partial &lt;br /&gt;
| Pressure will change with temperature, volume, and mols; temperature will not change with pressure, volume, or mols&lt;br /&gt;
|- &lt;br /&gt;
| Adiabatic Heating and Cooling &lt;br /&gt;
| No &lt;br /&gt;
| Compressing or expanding a gas will not affect its temperature or the temperature around it&lt;br /&gt;
|- &lt;br /&gt;
| Thermal Conductivity &lt;br /&gt;
| No &lt;br /&gt;
| Rate of energy transfer is the same for all substances&lt;br /&gt;
|- &lt;br /&gt;
| Thermal Radiation &lt;br /&gt;
| Partial &lt;br /&gt;
| Radiated heat is not absorbed by nearby objects&lt;br /&gt;
|- &lt;br /&gt;
| Phase Change &lt;br /&gt;
| Partial &lt;br /&gt;
| Gas/Liquid have simplified graph; Solid has a fixed temperature; Plasma is ignored&lt;br /&gt;
|- &lt;br /&gt;
| Fluid Dynamics &lt;br /&gt;
| No &lt;br /&gt;
| &#039;Convection&#039; parts work in pressurized environment, other parts work in vacuum&lt;br /&gt;
|- &lt;br /&gt;
| Gas Stoichiometry &lt;br /&gt;
| No &lt;br /&gt;
| The various reactions are arbitrary and vary depending on device used for different products from the same reactants&lt;br /&gt;
|- &lt;br /&gt;
| Gravity/Density &lt;br /&gt;
| No &lt;br /&gt;
| Gas/Liquid is present in all directions&lt;br /&gt;
|- &lt;br /&gt;
| Environment Volume &lt;br /&gt;
| Yes &lt;br /&gt;
| Each environment cube acts as a single point with fixed volume&lt;br /&gt;
|- &lt;br /&gt;
| Saturation&lt;br /&gt;
| No&lt;br /&gt;
| Mixture and % do not affect condensation/evaporation&lt;br /&gt;
|-&lt;br /&gt;
| Pipe Volume &lt;br /&gt;
| Yes &lt;br /&gt;
| Each pipe network acts as a single point with fixed volume depending on number of pipes segments&lt;br /&gt;
|- &lt;br /&gt;
| Flow Direction &lt;br /&gt;
| Partial &lt;br /&gt;
| All pumps and mixer act as check valve, passive check valve available, other valves are not one-way; no flow within each connected pipe network&lt;br /&gt;
|- &lt;br /&gt;
| Pipe Integrity &lt;br /&gt;
| Yes &lt;br /&gt;
| Liquid pipes hold low pressure, but may contain both liquid and gas without consequence; Gas pipes hold high pressure, but stress and break with too much liquid&lt;br /&gt;
|- &lt;br /&gt;
| Heat Transfer &lt;br /&gt;
| Partial &lt;br /&gt;
| Liquid temperature is controlled by gas temperature (if no gas, liquid heater will not function)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Gas]][[Category:Liquid]]&lt;/div&gt;</summary>
		<author><name>Veriszg</name></author>
	</entry>
	<entry>
		<id>https://stationeers-wiki.com/index.php?title=Gas&amp;diff=25257</id>
		<title>Gas</title>
		<link rel="alternate" type="text/html" href="https://stationeers-wiki.com/index.php?title=Gas&amp;diff=25257"/>
		<updated>2025-12-29T09:10:55Z</updated>

		<summary type="html">&lt;p&gt;Veriszg: Better diagram showing all names, temperatures and pressures&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
{{Disambiguation}}&lt;br /&gt;
In older versions of Stationeers, Gas was a generalized term for fluid substances, derived from ices or gained by other means, that can be transported and manipulated to change their energetic form (phase) through the combination of pressure and temperature. Newer versions now have gasses and liquids handled completely separately.&lt;br /&gt;
&lt;br /&gt;
This is opposed to solid resources, processed irreversibly from ores into pure ingots and alloys, used directly for crafting purposes. Gases have a great variety of uses - some are required for creation of livable pressurized environments, while others are toxic and dangerous and meant for controlled industrial processes, or outright waste product with limited utility.&lt;br /&gt;
&lt;br /&gt;
Naturally, gases can exist as a constituence of a planetary atmosphere, available in a virtually infinite amount and possible to capture through the use of appropriate atmospheric devices, can be pressurized, filtered, and stored. Planets or moons that have a below-zero or vacuum conditions will also contain frozen gas deposits in a form of ice, which can be melted by the use of a [[Furnace]] or [[Ice Crusher]]. Also, mined ice nuggets appear similar to metallic ores, however they will begin to melt if exposed to a warm environment while held in arms or regular containers. &lt;br /&gt;
&lt;br /&gt;
Small amount of gases can be acquired from smelting solid materials into ingots, as each type of ore contains its own impurities, although these gases mostly seen as an impediment to efficient smelting due to low output.&amp;lt;br&amp;gt;&lt;br /&gt;
Finally, gases can be purchased from [[traders]] in various forms and at different temperatures. Some traders will also buy gases and mixtures that they need with certain temperature conditions, or even pay you a small fee for disposing of their own waste gases. &lt;br /&gt;
&lt;br /&gt;
Current variety of gases include:&lt;br /&gt;
* [[Special:MyLanguage/Carbon Dioxide|Carbon Dioxide (CO&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;)]] - Inert gas, a non-toxic byproduct of burning organic fuels, breathed by most growing plants as source of Carbon.&lt;br /&gt;
* [[Special:MyLanguage/Nitrogen|Nitrogen (N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;)]] - Heavy gas, usable as a stable pressure agent due to its exceptionally low freezing temperature.&lt;br /&gt;
* [[Special:MyLanguage/Nitrous Oxide|Nitrous Oxide (N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O)]] - Commonly known as &amp;quot;Nitro&amp;quot;, a loose chemical composite of Nitrogen and Oxygen, used as powerful fuel oxidizer and general anesthetic. &lt;br /&gt;
* [[Special:MyLanguage/Oxygen|Oxygen (O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;)]] - Highly-reactive gas used for respiration by animal life and as conventional fuel oxidizer.&lt;br /&gt;
* [[Special:MyLanguage/Pollutant|Pollutants (X)]] - Ambiguous compound of highly-toxic radicals, a waste byproduct from burning or processing of impure organic fuel.&lt;br /&gt;
* [[Special:MyLanguage/Volatiles|Volatiles (CH&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;)+]] - Generic composite of simple organic compounds used as a fuel in smelting, power generation, and chemistry.&lt;br /&gt;
* [[Special:MyLanguage/Water|Water (H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O)]] - Pure compound used for hydration, farming, and as coolant, originally designed as inherently liquid substance.&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;br /&gt;
==Properties==&lt;br /&gt;
Gases and their liquid analogues are presented in the parametric form - that means that they exist as a property of a given atmosphere&#039; grid cell, interior grid cell of an enclosed room, composite [[pipe]] network, atmospheric device, or portable container. To further understand the behavior of gases within different spaces, check [[Atmosphere]] and [[Pipe]] pages. It is technically possible to convert gases down into their solid state (i.e. a physical item), however that action has limited practical use, beyond perhaps hand measuring of specific quantities, and no dedicated devices exist for doing so.&lt;br /&gt;
&lt;br /&gt;
Each different gas have a number of properties, which define its thermodynamic behavior and conditions for phase changes. Leveraging the property values and their differences between gases is an important part of atmospheric management and temperature conditioning required for surviving extreme environments and utilizing advanced technologies:&lt;br /&gt;
* &#039;&#039;&#039;Melting Point&#039;&#039;&#039; - Temperature boundary between solid and liquid states. Liquids cooled to this temperature will begin freezing. This will create ice chunks converting up to 50 mol of liquid into a 50g stack of pure ice. Liquids freezing within containers or pipes will cause them to burst irreversibly. A player should make sure never to cool the gas down to this value.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Boiling Point&#039;&#039;&#039; - Temperature boundary between liquid and gaseous states at standard 1 atm (100 kPa) of pressure. Higher pressures impede evaporation, raising this value and allowing to form liquids at higher temperatures. Most atmospheric devices are designed to work with gases, while liquified substances are very compact. Player should control pressure and temperature to prevent gases and liquids reaching this value unintentionally. Not available for substances, that will remain in gaseous phase at 100 kPa regardless of temperature.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Minimum Condensation Pressure&#039;&#039;&#039; - a Pressure value corresponding to the Melting Point Temperature, which is necessary for the liquid to begin freezing. Most liquified gases will freeze up when cooled below their melting point regardless, but for &#039;&#039;some&#039;&#039; gases a low pressure environment can be sustained to keep a liquid in a super-cooled state without allowing it to crystallize, which is useful for storage of few particular substances.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Maximum Liquid Temperature&#039;&#039;&#039; - a Temperature value, above which the substance cannot remain in liquid state within working pressure range, usually sampled at high pressure (6 MPa). Exponentially higher pressures are capable of keeping the liquid from evaporating, but the requirements are unrealistic for physical limitations of Stationeers&#039; equipment. Its a practical heat boundary, under which a given substance can be either gas, liquid, or both based on the imposed pressure level, all the way down to the melting point boundary.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Molar Heat Capacity&#039;&#039;&#039; - The thermal capacity of 1 mol of the gas, that it has to absorb/radiate to raise/lower its temperature by 1 K. The greater this value, the more heat a cold gas can absorb to cool another gas, and inversely, the more heat has to be drawn out to cool it. Particularly important value for an efficient coolant.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Molar Heat of Fusion&#039;&#039;&#039; - The amount of thermal energy that a mol of frozen substance would need to absorb to change into a liquid, and the amount of same energy a liquid will release into environment when turning into ice. Given that frozen substances are rarely used as anything beyond a raw source material for gases, this value has little importance.&lt;br /&gt;
 &lt;br /&gt;
* &#039;&#039;&#039;Molar Latent Heat&#039;&#039;&#039; - The amount of thermal energy that a mol of liquid substance would need to absorb to change into a gas, and the amount of same energy a gas would release when turning into a liquid. This value is something that is often leveraged in AC or any temperature control systems, by forcing phase changes at specific points of a system through applied pressure. It is also likely responsible for the majority of confusing and frustrating emergencies for inexperienced Stationeers, where temperatures suddenly spike or drop to dangerous levels, seemingly for no reason.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Molar Liquid Volume&#039;&#039;&#039; - Volume in Liters that a mol of substance occupy in liquid form. Since liquified gases produce no Pressure, this value defines how much of a given liquified gas can be stored in a liquid container or pipe network of a certain capacity.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Molar Mass&#039;&#039;&#039; - Net mass of a mol of substance in any phase state. Largely redundant parameter that becomes important when dealing in Rocketry, since the rocket engines have specific limits to what mass they&#039;re able to carry into space against a local gravity, and excessive amount of fuel/payload can make a lift-off impossible. &lt;br /&gt;
&lt;br /&gt;
== Phase Change ==&lt;br /&gt;
The summary of the aforementioned properties define how a given gas behaves depending on the temperature and pressure at which it is contained. By accessing in-game Stationpedia, a player can find a phase diagram for any such gas in a logarithmic scale. A composite diagram for all gases looks like this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;overflow-x: auto;&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Gases-phase-change-diagram.png|1450px|border|Gases diagram]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Interactive version: [https://gralewski.github.io/stationeers-gas-phase-diagram-by-zgralewski.htm Here]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The left part of each diagram correlates to substance&#039;s solid (ice) state. A vertical blue cut-off indicates its melting point.&lt;br /&gt;
Next goes the dynamic curve (main section), which separates the possible conditions for a liquid state (above the curve) and a gas state (below the curve), the curve itself being the phase change boundary between the two.&lt;br /&gt;
Finally, the curve terminates by an abrupt vertical spike - this is a Maximum Liquid Temperature boundary, after which the substance will almost always remain as gas. &lt;br /&gt;
&lt;br /&gt;
A more complex phase change diagram can be located [https://www.desmos.com/calculator/voj4scjipd Here]&lt;br /&gt;
&lt;br /&gt;
Known gas properties:&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Filter Color !! Molar Heat Capacity&amp;lt;br&amp;gt;(J⋅K&amp;lt;sup&amp;gt;−1&amp;lt;/sup&amp;gt;⋅mol&amp;lt;sup&amp;gt;−1&amp;lt;/sup&amp;gt;) !! Molar Heat of Fusion&amp;lt;br&amp;gt;(kJ⋅K&amp;lt;sup&amp;gt;−1&amp;lt;/sup&amp;gt;⋅mol&amp;lt;sup&amp;gt;−1&amp;lt;/sup&amp;gt;) !! data-sort-type=&amp;quot;number&amp;quot; | Melting Point&amp;lt;br&amp;gt;(K / °C) !! data-sort-type=&amp;quot;number&amp;quot; | Boiling Point at 100 kPa&amp;lt;br&amp;gt;(K / °C) !! data-sort-type=&amp;quot;number&amp;quot; | Minimum Condensation&amp;lt;br&amp;gt;(kPa at K / °C) !! data-sort-type=&amp;quot;number&amp;quot; | Maximum Liquid Temperature&amp;lt;br&amp;gt;(K / °C at kPa) !! Molar Latent Heat&amp;lt;br&amp;gt; (kJ / mol) !! Liquid Molar Volume&amp;lt;br&amp;gt;(L / mol) !! Molar Mass&amp;lt;br&amp;gt;(g / mol)&lt;br /&gt;
|-&lt;br /&gt;
| [[Carbon Dioxide]] (CO&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;) || Gray || 28.2 || 0.6 || 218 / -55.3 || N/A || 517 at 218 / -55.3 || 265 / -8.1 at 6000 || 0.6 || 0.04 || 44&lt;br /&gt;
|-&lt;br /&gt;
| [[Nitrogen]] (N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;) || Black || 20.6 || 0.5 || 40 / -233 || 75 / -198 || 6.3 at 40 / -233 || 190 / -83 at 6000 || 0.5 || 0.0348 || 64&amp;lt;!--That&#039;s correct on ingame files as of 0.2.6091.26702, can be looked up on  Scripts.Atmospherics.Mole:MolarMass()--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[Nitrous Oxide]] (N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O) || Green || 37.2 || 4 || 252 / -21 || N/A || 800 at 252 / -21 || 431 / 158 at 2000 || 4 || 0.026 || 46&lt;br /&gt;
|-&lt;br /&gt;
| [[Oxygen]] (O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;) || White || 21.1 || 0.8 || 56.4 / -217 || 90 / -183 || 6.3 at 56.4 / -217 || 162 / -111 at 6000 || 0.8 || 0.03 || 16&lt;br /&gt;
|-&lt;br /&gt;
| [[Pollutant]] (X) || Yellow || 24.8 || 2 || 173 / -99.8 || N/A || 1800 at 173 / -99.8 || 425 / 152 at 6000 || 2 || 0.04 || 28&lt;br /&gt;
|-&lt;br /&gt;
| [[Volatiles]] (H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;) || Red || 20.4 || 1 || 81.6 / -192 || 112 / -162 || 6.3 at 81.6 / -192 || 195 / -78.1 at 6000 || 1 || 0.04 || 16&lt;br /&gt;
|-&lt;br /&gt;
| [[Water]] (H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;0) || Blue || 72 || 8 || 273 / 0 || 373 / 100 || 6.3 at 273 / 0 || 643 / 370 at 6000 || 8 || 0.018 || 18&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Mixtures==&lt;br /&gt;
While the gases can exist in any arbitrary number of combinations, there are specific functional mixtures produced manually - this is done by filtering and isolating individual component gases and then mixing them in proper ratio using a [[Gas Mixer]]. Such specific mixtures are commonly referenced by their separate names for all associated cases, without mentioning their constituents:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Contents !! Tank Color !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| [[Fuel]] || 67% H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, 33% O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; || Orange || Combustible mixture with Autoignition at 573.15 K / 300 °C&lt;br /&gt;
|-&lt;br /&gt;
| [[HydroNox]] || 50% H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, 50% N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O || N/A || Combustible mixture with Autoignition at 323.15 K / 50 °C&lt;br /&gt;
|-&lt;br /&gt;
| [[Air]] || 75% N&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, 25% O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; || White || Well above 16 kPa of minimum O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; pressure required for human breathing, but prevents runaway combustion by spark)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Simulation Mechanics==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- &lt;br /&gt;
! Concept &lt;br /&gt;
! Simulated &lt;br /&gt;
! Notes&lt;br /&gt;
|- &lt;br /&gt;
| Ideal Gas Law (PV=nRT) &lt;br /&gt;
| Partial &lt;br /&gt;
| Pressure will change with temperature, volume, and mols; temperature will not change with pressure, volume, or mols&lt;br /&gt;
|- &lt;br /&gt;
| Adiabatic Heating and Cooling &lt;br /&gt;
| No &lt;br /&gt;
| Compressing or expanding a gas will not affect its temperature or the temperature around it&lt;br /&gt;
|- &lt;br /&gt;
| Thermal Conductivity &lt;br /&gt;
| No &lt;br /&gt;
| Rate of energy transfer is the same for all substances&lt;br /&gt;
|- &lt;br /&gt;
| Thermal Radiation &lt;br /&gt;
| Partial &lt;br /&gt;
| Radiated heat is not absorbed by nearby objects&lt;br /&gt;
|- &lt;br /&gt;
| Phase Change &lt;br /&gt;
| Partial &lt;br /&gt;
| Gas/Liquid have simplified graph; Solid has a fixed temperature; Plasma is ignored&lt;br /&gt;
|- &lt;br /&gt;
| Fluid Dynamics &lt;br /&gt;
| No &lt;br /&gt;
| &#039;Convection&#039; parts work in pressurized environment, other parts work in vacuum&lt;br /&gt;
|- &lt;br /&gt;
| Gas Stoichiometry &lt;br /&gt;
| No &lt;br /&gt;
| The various reactions are arbitrary and vary depending on device used for different products from the same reactants&lt;br /&gt;
|- &lt;br /&gt;
| Gravity/Density &lt;br /&gt;
| No &lt;br /&gt;
| Gas/Liquid is present in all directions&lt;br /&gt;
|- &lt;br /&gt;
| Environment Volume &lt;br /&gt;
| Yes &lt;br /&gt;
| Each environment cube acts as a single point with fixed volume&lt;br /&gt;
|- &lt;br /&gt;
| Saturation&lt;br /&gt;
| No&lt;br /&gt;
| Mixture and % do not affect condensation/evaporation&lt;br /&gt;
|-&lt;br /&gt;
| Pipe Volume &lt;br /&gt;
| Yes &lt;br /&gt;
| Each pipe network acts as a single point with fixed volume depending on number of pipes segments&lt;br /&gt;
|- &lt;br /&gt;
| Flow Direction &lt;br /&gt;
| Partial &lt;br /&gt;
| All pumps and mixer act as check valve, passive check valve available, other valves are not one-way; no flow within each connected pipe network&lt;br /&gt;
|- &lt;br /&gt;
| Pipe Integrity &lt;br /&gt;
| Yes &lt;br /&gt;
| Liquid pipes hold low pressure, but may contain both liquid and gas without consequence; Gas pipes hold high pressure, but stress and break with too much liquid&lt;br /&gt;
|- &lt;br /&gt;
| Heat Transfer &lt;br /&gt;
| Partial &lt;br /&gt;
| Liquid temperature is controlled by gas temperature (if no gas, liquid heater will not function)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Gas]][[Category:Liquid]]&lt;/div&gt;</summary>
		<author><name>Veriszg</name></author>
	</entry>
	<entry>
		<id>https://stationeers-wiki.com/index.php?title=File:Gases-phase-change-diagram.png&amp;diff=25255</id>
		<title>File:Gases-phase-change-diagram.png</title>
		<link rel="alternate" type="text/html" href="https://stationeers-wiki.com/index.php?title=File:Gases-phase-change-diagram.png&amp;diff=25255"/>
		<updated>2025-12-29T08:47:09Z</updated>

		<summary type="html">&lt;p&gt;Veriszg: User created page with UploadWizard&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=={{int:filedesc}}==&lt;br /&gt;
{{Information&lt;br /&gt;
|description={{en|1=Gases diagram}}&lt;br /&gt;
|date=2025-12-29&lt;br /&gt;
|source={{own}}&lt;br /&gt;
|author=[[User:Veriszg|Veriszg]]&lt;br /&gt;
|permission=&lt;br /&gt;
|other versions=&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=={{int:license-header}}==&lt;br /&gt;
{{licensing|generic}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Gas]]&lt;/div&gt;</summary>
		<author><name>Veriszg</name></author>
	</entry>
</feed>