alias sensor d0 alias pumpn d1 alias pumpo2 d2 alias filter d3 alias heater d4 alias cooler d5 define TARGETTEMP 293 define TOOHOT 298 alias pres r9 alias op r8 alias np r7 alias cp r6 alias targetpressure r5 start: l pres sensor Pressure l op sensor RatioOxygen l np sensor RatioNitrogen l cp sensor RatioCarbonDioxide move targetpressure 80 move targetpressure 101 l r0 sensor Temperature div r0 targetpressure r0 mul targetpressure r0 TARGETTEMP s db Setting targetpressure jal manageo2 jal managen2 jal manageco2 jal warming jal cooling yield j start # manageo2: bdns pumpo2 ra mul r0 op pres mul r1 0.17 targetpressure slt r2 r0 r1 s pumpo2 On r2 j ra # managen2: bdns pumpn ra mul r0 np pres #s db Setting r0 mul r1 0.8 targetpressure slt r2 r0 r1 slt r3 pres targetpressure min r2 r2 r3 s pumpn On r2 j ra # manageco2: bdns filter ra add r0 pres 1 slt r2 targetpressure r0 # pressure is high enough l r0 filter On mul r0 r0 0.01 add cp cp r0 # hysteresis slt r3 0.02 cp #s db Setting r3 # co2 is high min r1 r2 r3 s filter On r1 j ra warming: bdns heater ra l r0 heater On add r0 TARGETTEMP r0 l r1 sensor Temperature slt r0 r1 r0 s heater On r0 j ra cooling: bdns cooler ra l r0 cooler On sub r0 TOOHOT r0 l r1 sensor Temperature sgt r0 r1 r0 s cooler On r0 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.