Computer Instructions: Types of Operations
- Data Movement (= Data Flow) Operations:
- MOV: ("move") copies the contents of a register to memory, or vice versa. Example: MOV R1, X copies the variable X to the register R1.
- MVR: ("move registers") copies the content of one register to another. Example: MVR R1, R2 copies R2 to R1.
- LOD: ("load") copies the content of a memory variable to a register. Example: LOD X copies the content of X into the accumulator register Ac.
- STO: ("store") copies the content of a register into a memory variable. Example: STO X copies the content of the accumulator register Ac into the variable X.
- PUSH: adds ("pushes") a number onto the stack data structure of the program stored in main memory. Example: PUSH R1 pushes R1 to the stack.
- POP: removes ("pops") a number from the stack into a register/variable. Example: POP R1 pops an item from the stack and saves it in R1.
- EXC: swaps ("exchanges") two contents. Example: EXC R1, X exchanges X with R1.