This is a clean room implementation of the Stationeers Programable Chip. It should implement the MIPS instructions set as detailed by Heightmare.
Writing A Program
Write the program code in the Program text box, it will be read and parsed automatically. Any errors will appear below the text box and marked along side your code, once corrected the program can be run.
Running A Program
Pressing will step the program through one instruction at a time. Pressing will run it through. If you use step then will reset the program to the first instruction, wipe registers and stack.
can be toggled, if solid then when a register at the top is changed the program will be automatically rerun.
can be toggled, if solid then the simulator will allow you to run an invalid program. When it encounters an error, the instruction will be ignored and treated as a noop.
Jump Tags
To assist the creation of larger and more complex programs, the simulator can handle jump tags as supported by the IC. This means where you would put a jump destination you may put a tag.
For example:
start:
move o 1
yield
j start
Set/Unset Devices
You can toggle if the IC would see the emulated device as connected by toggling with the icon.
Labelling Devices
To label a device (in simulator and in game), use the follow instruction:
alias GasSensor d1
Note Stationeering.com's labels will no longer work for devices, use the alias instruction.
Labelling Registers
To label a register, use the following instruction:
alias CurrentPressure r1
You will then be able to refer to the label name rather than the register in code.
Note The aliases will not appear on the registers until the instruction has been executed.
You can also still use Stationeering.com's legacy method of labeling registers.
#:internal:0:If it's safe?
Note These comments will still count as line numbers for the interpreter, so addresses for jumps needs to be adjusted.
Stationeers Instruction Set
Comments are made by using the # symbol, either at the start of a line or after an instruction.