alias switchmax r15 alias switchmin r14 alias doorstate r13 alias hashname r12 alias m0 r10 alias m1 r9 define HASHSWITCH HASH("StructureLogicSwitch") move switchmax 4 move switchmin 3 move doorstate 2 start: alias doorfurnace d0 alias doornorth d1 yield alias door d0 alias mem r10 move hashname HASH("Gate Switch furnace") jal managedoor alias door d1 alias mem r9 move hashname HASH("Gate Switch north") jal managedoor alias door d2 alias mem r8 move hashname HASH("Gate Switch gas") jal managedoor j start # managedoor: bdns door ra lbn switchmax HASHSWITCH hashname Open Maximum lbn switchmin HASHSWITCH hashname Open Minimum l doorstate door Open bne switchmax switchmin toggle bne mem doorstate override seqz r0 switchmax s db Setting r0 s door Setting r0 move mem r0 s db Setting 9 j ra toggle: seqz r0 doorstate s door Open r0 sbn HASHSWITCH hashname Open r0 move mem r0 s db Setting 7 j ra override: s db Setting doorstate sbn HASHSWITCH hashname Open doorstate move mem doorstate j ra |
MIPS is the programming language used by IC (integrated circuits) in the game Stationeers. Stationeering web site has a MIPS emulator with syntax highlighting and error detection.