Guest User

Untitled

a guest
Jan 2nd, 2015
422
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. Che------iler V1.0
  2. By Volundr
  3.  
  4. machine has 5 registers, 1024 bytes of RAM, and 10 reagent
  5.  
  6. reservoirs that can be any reagent_container/glass item.
  7. it also has a pill generator, a vial generator, and an eject port.
  8.  
  9. registers:
  10. ptr = data pointer (16-bit) (data is 0-indexed)
  11. iptr = instruction pointer (16-bit) (1-indexed)
  12. sx = source register (8-bit) (valid sources are 1-10 for the 1 thru
  13.  
  14. 10 reagent reservoirs) in the machine
  15. tx = target register (16-bit) (valid targets are reservoirs as above, or 11 for pill generator, 12 for vial generator, or 13 for ejection port)
  16. ax = amount register (16-bit)
  17.  
  18. > = ++ptr
  19. < = --ptr
  20. + = ++*ptr
  21. - = --*ptr
  22. [ = while (*ptr) {
  23. ] = }
  24. { = mov *ptr sx
  25. } = mov sx *ptr
  26. ( = mov *ptr tx
  27. ) = mov tx *ptr
  28. ^ = mov *ptr ax
  29. ' = mov ax *ptr
  30. $ = heat or cool reagent in sx to ((273 - tx) + ax) kelvin
  31. @ = transfer ax units of reagent from reservoir sx to target tx
  32. ~ = "comp-le" the code so it cannot be retrieved again via the load button.
  33.  
  34. (generates pill or vial if they are targeted, or sends regs out ejector port)
  35.  
  36. Both the heating and transferring steps are delayed. Heating takes as long as the chem-stry lab heater would take. Transferring reagents takes 1/4 * amount seconds.
Advertisement
Add Comment
Please, Sign In to add comment