alias stackerA d0 alias export d3 alias larre d4 alias ringmaster d5 alias dev r15 define fabberStation 1 define MODULUS 55 move sp MODULUS add sp sp 5 s db Setting sp # start: s db Setting -1 yield get r0 ringmaster 120 bne r0 3 -2 # wait for our turn to control LArRE s db Setting -2 # manage the stackers/export downstream of the fabricators ls r0 export 0 Occupied blez r0 manageStackers s larre Setting fabberStation s larre TargetSlotIndex 0 jal waitLarreIdle s larre Activate 1 jal waitLarreIdle put ringmaster 120 2 j start manageStackers: ls r0 stackerA 0 Occupied beqz r0 overA # skip if empty lb dev HASH("StructureAutolathe") ReferenceId Maximum getd r0 dev 0 bnez r0 overA # skip if busy sleep 1 s stackerA Activate 1 overA: put ringmaster 120 0 j start waitLarreIdle: #s db Setting 10 yield l r0 larre Idle blez r0 waitLarreIdle 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.