alias larre d0 alias depositchute d1 alias hydroname r15 alias stationidx r14 alias occupied r13 alias ratiowater r12 alias temperature r11 alias pressure r10 alias seeding r9 alias mature r8 alias seedstation r7 alias index r6 alias depositstation r5 define tooCold 280 define tooHot 320 define HYDROHASH HASH("StructureHydroponicsTrayData") get r0 db 0 mul r0 r0 3 add sp r0 3 start: get r0 db 0 s db Setting r0 get depositstation db 1 move index 0 loop1: mul r0 index 3 add r0 r0 2 get hydroname db r0 add r0 r0 1 get stationidx db r0 add r0 r0 1 get seedstation db r0 s db Setting index #yield jal doplant #yield get r0 db 0 # number of hydroponics add index index 1 blt index r0 loop1 yield j start # doplant: bdns depositchute nochute ls r0 depositchute 0 Occupied seqz r0 r0 s depositchute Open r0 nochute: ls r0 larre 0 Occupied blez r0 regular push ra s larre Setting depositstation jal waittillidle s larre Activate 1 jal waittillidle pop ra j ra regular: s db Setting 41 lbns seeding HYDROHASH hydroname 0 Seeding Maximum lbns mature HYDROHASH hydroname 0 Mature Maximum bltz seeding skipharvest s db Setting 42 push ra s larre Setting stationidx jal waittillidle s larre Activate 1 jal waittillidle pop ra j ra skipharvest: lbns occupied HYDROHASH hydroname 0 Occupied Maximum bgtz occupied ra lbn r0 HYDROHASH hydroname RatioPollutant Maximum bgtz r0 ra lbn ratiowater HYDROHASH hydroname RatioWater Maximum blt ratiowater 0.9 ra lbn temperature HYDROHASH hydroname Temperature Maximum blt temperature tooCold ra bgt temperature tooHot ra lbn pressure HYDROHASH hydroname Pressure Maximum blt pressure 10 ra push ra s larre Setting seedstation jal waittillidle s larre Activate 1 jal waittillidle s larre Setting stationidx jal waittillidle s larre Activate 1 jal waittillidle pop ra j ra # waittillidle: yield l r0 larre Idle beqz r0 waittillidle 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.