Actions

Editing MIPS

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 8: Line 8:
 
Device registers '''d? logicType''': Device registers are written to and from the IC. A device register is numbered '''d0''' to '''d5''' (select via screw), or '''db''' (connected device). From now on referred to as '''d?'''.
 
Device registers '''d? logicType''': Device registers are written to and from the IC. A device register is numbered '''d0''' to '''d5''' (select via screw), or '''db''' (connected device). From now on referred to as '''d?'''.
  
=== Logic and algorithmic with '''Internal registers''' ===
+
=== Logic and algoritmic with '''Internal registers''' ===
All calculations are exclusively performed to and from '''r?''' registers, or generally more understood as variables in programming. You can use aliases to give convenient names with the <code>alias string r?|d?</code>command (see below).  
+
All calculations are exclusively performed to and from '''r?''' registers, or generally more understood as variables in programming. You can use aliases to give convinent names with the <code>alias string r?|d?</code>command (see below).  
  
 
Internal registers can be manipulated in various ways.  
 
Internal registers can be manipulated in various ways.  
Line 21: Line 21:
 
You can also read/write to the device where the IC is planted in using device '''db'''.
 
You can also read/write to the device where the IC is planted in using device '''db'''.
  
Generally, there are up to 6 devices which can be set using the screwdriver '''d0''' to '''d5'''. A special device register '''db''' is the device wherever the IC is mounted upon. Very convenient for atmospheric devices where no separate IC socket is required.
+
Generally, there are up to 6 devices which can be set using the screwdriver '''d0''' to '''d5'''. A special decice register '''db''' is the device wherever the IC is mounted upon. Very convinent for atmospheric devices where no seperate IC socket is reguired.
  
Note, the IC is completely unaware where d? is actually connected to. So if you get a logicType error, check d? number, or check if the screw has been set opn the socket. An alias is only convenient to convey what is expected to be set on the d? screw, it does not actually set or program the screq.
+
Note, the IC is completely unaware where d? is actually connected to. So if you get a logicType error, check d? number, or check if the screw has been set opn the socket. An allias is only convinent to convey what is expected to be set on the d? screw, it does not actually set or program the screq.
  
 
* Read from device (load) <code>l r? d? logicType</code>: Reads logicType, like Pressure from a [[Sensors|gas sensor]], from device d? to register r?. Values can be read from connected devices and put into the register using the '''l''' (load) command. For example, if you want to load the state of a door. <br> Example: <code>l r0 Door Open</code> reads the 'Open' field of an object named 'Door', that would be connected to the IC housing of the chip.
 
* Read from device (load) <code>l r? d? logicType</code>: Reads logicType, like Pressure from a [[Sensors|gas sensor]], from device d? to register r?. Values can be read from connected devices and put into the register using the '''l''' (load) command. For example, if you want to load the state of a door. <br> Example: <code>l r0 Door Open</code> reads the 'Open' field of an object named 'Door', that would be connected to the IC housing of the chip.
Line 162: Line 162:
  
 
==Indirect referencing==
 
==Indirect referencing==
This is a way of accessing a register by using another register as a pointer. Adding an additional r in front of the register turns on this behaviour. The value stored in the register being used as the pointer must be between 0 to 15, this will then point to a register from r0 to r15, higher or lower values will cause an error.
+
This is a way of accessing a register by using another register as a pointer. Adding an additional r infront of the register turns on this behaviour. The value stored in the register being used as the pointer must be between 0 to 15, this will then point to a register from r0 to r15, higher or lower values will cause an error.
  
 
<code>move r0 5</code> stores the value 5 in r0
 
<code>move r0 5</code> stores the value 5 in r0
Line 261: Line 261:
 
Two practice scripts:
 
Two practice scripts:
 
<br>Automatic Night Light: Load "Activate" from a Daylight sensor, flip the value with a NOT-gate, store the value to the "On" variable of one or more lights.
 
<br>Automatic Night Light: Load "Activate" from a Daylight sensor, flip the value with a NOT-gate, store the value to the "On" variable of one or more lights.
<br>Automatic Wall Cooler: Read "Temperature" from a Gas Sensor. Branch if the value is greater than X, turn on the cooler. Branch if the value is less than Y, turn off the cooler. (Wall coolers need a minimum of 12.5 kPa pressure in the connected pipe)
+
<br>Automatic Wall Cooler: Read "Temperature" from a Gas Sensor. Branch if the value is greater than X, turn on the cooler. Branch if the value is less than Y, turn off the cooler. (Wall coolers need a minumum of 12.5 kPa pressure in the connected pipe)
  
  

Please note that all contributions to Unofficial Stationeers Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Unofficial Stationeers Wiki:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)