alias tank d0 alias idx r15 move idx 0 start: yield #jal volumemod1 jal volumepersecond j start volumemod1: l r0 tank VolumeOfLiquid mod r0 r0 1 s db Setting r0 j ra volumepersecond: define CYCLE 5 #add r2 idx 1 #mod r2 r2 CYCLE add r9 idx 100 #add r8 r2 100 l r0 tank VolumeOfLiquid l r0 tank TotalMoles get r2 db r9 put db r9 r0 sub r3 r0 r2 div r4 CYCLE 2 div r0 r3 r4 mul r0 1000 r0 s db Setting r0 add idx 1 idx sge r1 idx CYCLE select idx r1 0 idx 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.