Class: Whitespace::ISA::Retrieve
- Inherits:
-
Instruction
- Object
- Instruction
- Whitespace::ISA::Retrieve
- Defined in:
- lib/whitespace/instructions/heap_access/retrieve.rb
Instance Attribute Summary
Attributes inherited from Instruction
Instance Method Summary collapse
Methods inherited from Instruction
Constructor Details
This class inherits a constructor from Whitespace::ISA::Instruction
Instance Method Details
#execute ⇒ Object
3 4 5 6 7 |
# File 'lib/whitespace/instructions/heap_access/retrieve.rb', line 3 def execute address = vm.vstack.pop vm.vstack.push vm.memory[address] end |