FANDOM


A VM instruction that pops a value off of the stack that was previously pushed. Values are popped in FILO (First In Last Out) order.

Usage Edit

pop: {store_location}

hakkML Example Edit

name: pop_example
blocks:
  core:
  entry: {name: 'main', loc: [0,1]}
code:
  main:
    - push: 1
    - push: 2
    - push: 3
    - pop: core.0
    - pop: core.1
    - pop: core.2
    - out: core.0
    - out: core.1
    - out: core.2
    - exit: 0

Outputs:

 3
 2
 1