#2022-Sep alias vent d1 alias sensor d0 define maxTemp 303 define minTemp 293 define targetTemp 297 s db Setting targetTemp start: yield bdns sensor nosensor l r0 sensor Temperature j gottemp nosensor: l r0 db TemperatureOutput # assume output has passive vent to room gottemp: l r4 db Mode sub r3 maxTemp r4 sgt r1 r0 r3 add r3 minTemp r4 slt r2 r0 r3 max r0 r1 r2 mul r3 r4 20 l r2 db TemperatureOutput2 sub r2 r2 r3 slt r1 r2 360 #efficient enough? min r0 r0 r1 s db Mode r0 bdns vent start l r1 db PressureInput slt r2 r1 500 s vent Mode 1 s vent PressureInternal 500 s vent On 1 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.