alias temp d0 alias heater d3 alias cooler d4 alias led d5 define toocold 290 define toohot 305 move r1 0 move r2 0 start: yield l r0 d0 Temperature add r9 toocold r1 # some hysteresis slt r1 r0 r9 bdns heater maybecool s heater On r1 maybecool: sub r9 toohot r2 # some hysteresis sgt r2 r0 r9 bdns cooler maybeled s cooler On r2 maybeled: bdns led start sub r4 r0 273.15 s led Setting r4 # color 2=green, 0=blue, 3=orange mul r3 r1 2 sub r3 2 r3 add r3 r3 r2 s led Color r3 j start |
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.