Advertisement
Guest User

Stationeers MIPS Test Program for Logging

a guest
Jan 7th, 2020
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ARM 1.09 KB | None | 0 0
  1. alias dPump d0 #Pump Being tested
  2. alias dAnal d1 #Gas Analyzer
  3.  
  4. move r0 0 #Default conventions to have readily accessible 0 and 1 to write to devices
  5. move r1 1
  6. alias rHousing r2 #Place to store data to/from db (IC Housing/Self)
  7. alias rPumpSett r3 #Volume displacement setting for pump, 0-100L
  8. alias rP1 r4 #Current Pressure from analyzer
  9.  
  10. define targPress 2500
  11. move rPumpSett 50
  12.  
  13. #Reset Header (prevents code from advancing until reset signal [db < 0] stops
  14. begin:
  15.  l rHousing db Setting
  16.  bltz rHousing begin
  17.  
  18. #Code Main Body -- simple code, makes sure sensors are on, sets volume setting, runs pump until pressure >= target
  19. s dAnal On r1
  20. s dPump Setting rPumpSett
  21. s dPump On r1
  22. main:
  23.  l rP1 dAnal Pressure
  24.  blt rP1 targPress main
  25. s dPump On r0 #target pressure reached/exceeded. shut off pump
  26.  
  27. #Reset Footer (stops program from ending/continuing so long as reset signal [db < 0] is *not* active)
  28. s db Setting r1 #Return that code has finished #write back 1 as a return code on the housing to inform proctor that code has finished.
  29. end:
  30.  l rHousing db Setting
  31.  bltz rHousing begin
  32.  j end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement