Device (IO)

d0
FieldSetValue
SlotLogic TypeSetValue
ReagentModeSetValue
d1
FieldSetValue
SlotLogic TypeSetValue
ReagentModeSetValue
d2
FieldSetValue
SlotLogic TypeSetValue
ReagentModeSetValue
d3
FieldSetValue
SlotLogic TypeSetValue
ReagentModeSetValue
d4
FieldSetValue
SlotLogic TypeSetValue
ReagentModeSetValue
d5
FieldSetValue
SlotLogic TypeSetValue
ReagentModeSetValue
db (db)
FieldSetValue
SlotLogic TypeSetValue
ReagentModeSetValue

Stack

0: 01: 02: 03: 04: 05: 06: 07: 0
8: 09: 010: 011: 012: 013: 014: 015: 0

Registers Clear registers.

SetValueLabel
0 0
1 0
2 0
3 0
4 0
5 0
6 0
7 0
8 0
9 0
10 0
11 0
12 0
13 0
14 0
15 0
16 0sp
17 0ra

Program

start:
add r0 r0 1 # Increment r0.
yield
j start
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Control

Status

Program Counter0
Last Run Operations0 (Not Run)
Last State

Instructions

Introduction

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.

Device IO

InstructionFields
bdns    
»
bdnsal    
»
bdse    
»
bdseal    
»
brdns    
»
brdse    
»
l    
»
lb    
»
lr    
»
ls    
»
s    
»
sb    
»

Flow Control, Branches and Jumps

InstructionFields
bap    
»
bapal    
»
bapz    
»
bapzal    
»
beq    
»
beqal    
»
beqz    
»
beqzal    
»
bge    
»
bgeal    
»
bgez    
»
bgezal    
»
bgt    
»
bgtal    
»
bgtz    
»
bgtzal    
»
ble    
»
bleal    
»
blez    
»
blezal    
»
blt    
»
bltal    
»
bltz    
»
bltzal    
»
bna    
»
bnaal    
»
bnaz    
»
bnazal    
»
bne    
»
bneal    
»
bnez    
»
bnezal    
»
brap    
»
brapz    
»
breq    
»
breqz    
»
brge    
»
brgez    
»
brgt    
»
brgtz    
»
brle    
»
brlez    
»
brlt    
»
brltz    
»
brna    
»
brnaz    
»
brne    
»
brnez    
»
j    
»
jal    
»
jr    
»

Variable Selection

InstructionFields
sap    
»
sapz    
»
sdns    
»
sdse    
»
select    
»
seq    
»
seqz    
»
sge    
»
sgez    
»
sgt    
»
sgtz    
»
sle    
»
slez    
»
slt    
»
sltz    
»
sna    
»
snaz    
»
sne    
»
snez    
»

Mathematical Operations

InstructionFields
abs    
»
acos    
»
add    
»
asin    
»
atan    
»
ceil    
»
cos    
»
div    
»
exp    
»
floor    
»
log    
»
max    
»
min    
»
mod    
»
mul    
»
rand    
»
round    
»
sin    
»
sqrt    
»
sub    
»
tan    
»
trunc    
»

Logic

InstructionFields
and    
»
nor    
»
or    
»
xor    
»

Stack

InstructionFields
peek    
»
pop    
»
push    
»

Misc

InstructionFields
alias    
»
define    
»
hcf    
»
move    
»
sleep    
»
yield    
»