# it takes a long time to scan all 100 storage slots alias vend d0 alias hashout2 d1 alias hashout3 d2 alias display1 d3 alias display2 d4 alias display3 d5 alias hash1 r15 alias qty1 r14 alias hash2 r13 alias qty2 r12 alias hash3 r11 alias qty3 r10 alias scanslot r9 define LASTSLOT 101 define ASTROLOYHASH 412924554 define CONSTANTANHASH 1058547521 define COPPERHASH -404336834 define ELECTRUMHASH 502280180 define GOLDHASH 226410516 define HASTELLOYHASH 1579842814 define INCONELHASH -787796599 define INVARHASH -297990285 define IRONHASH -1301215609 define LEADHASH 2134647745 define NICKELHASH -1406385572 define SILICONHASH -290196476 define SILVERHASH -929742000 define SOLDERHASH -82508479 define STEELHASH -654790771 define STELLITEHASH -1897868623 define WASPALOYHASH 156348098 start: minloop: move hash1 ASTROLOYHASH move hash2 CONSTANTANHASH move hash3 COPPERHASH jal perhash #move hash1 ELECTRUMHASH #move hash2 GOLDHASH #move hash3 HASTELLOYHASH #jal perhash #move hash1 INCONELHASH #move hash2 INVARHASH #move hash3 IRONHASH #jal perhash #move hash1 LEADHASH #move hash2 NICKELHASH #move hash3 SILICONHASH #jal perhash #move hash1 SILVERHASH #move hash2 SOLDERHASH #move hash3 STEELHASH #jal perhash #move hash1 STELLITEHASH #move hash2 WASPALOYHASH #jal perhash yield j start perhash: move scanslot 2 move qty1 0 move qty2 0 move qty3 0 perslot: ls r1 vend scanslot PrefabHash ls r2 vend scanslot Quantity bne r1 hash1 nothash1 add qty1 qty1 r2 j slotnext nothash1: bne r1 hash2 nothash2 add qty2 qty2 r2 j slotnext nothash2: bne r1 hash3 slotnext add qty3 qty3 r2 j slotnext slotnext: add scanslot scanslot 1 ble scanslot LASTSLOT perslot s db Setting hash1 s display1 Setting qty1 bdns display2 overd2 s hashout2 Setting hash2 s display2 Setting qty2 overd2: bdns display3 overd3 s hashout3 Setting hash3 s display3 Setting qty3 overd3: 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.