# control a stacker to dispense one helping of ingots and then eject # the rest. alias stacker d0 alias exportCount r14 s stacker Mode 1 # rig for logic contrl start: yield alias stacker d0 jal once j start once: ls r0 stacker 2 Occupied s db Setting 11 blez r0 ra s db Setting 21 l r1 stacker Setting ls r0 stacker 2 Quantity blt r0 r1 ra # not enough to emit l exportCount stacker ExportCount s stacker Output 1 push ra jal exportandwait pop ra s db Setting 22 ls r0 stacker 2 Quantity blez r0 ra l exportCount stacker ExportCount s stacker Activate 1 # purge the rest push ra jal exportandwait pop ra s db Setting 23 j ra exportandwait: loopwait: yield l r0 stacker Mode blez r0 ra l r1 stacker ExportCount ble r1 exportCount loopwait 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.