Here are the instructions that let you pull out (pop) a value or a reference from the stack into another variable or field:
pop | Pops a value out of the stack (doesn't store it in any variable) |
starg | Stores a value from the stack into a method's argument |
stelem | Stores a value from the stack into an element of an array (given the element ID and the reference to the array on top of the stack) |
stfld (stsfld) | Stores a value from the stack to a field ( and stsfld for static fields) |
stind | Stores a value from the stack at a specific memory address (which is pushed into the stack before the value is pushed) |
stloc | Stores a value from the stack into a local variable (it also has stloc.0 until stloc.3) |
stobj | Stores an object from the stack (that includes the reference to it) at a memory address, which is also pushed into the stack |
The instructions that take IDs also have a shorter version with the .s suffix and some instructions such...