FANDOM


Description Edit

A [VM] instruction that adds two numbers together and stores the result.

Usage Edit

add: [{store}, {num1}, {num2}]

hakkML Example Edit

name: add_example
blocks:
  core:
  entry: {name: 'main', loc : [0,1]}
code:
  main:
    - rem: adds two literals, stores result in core.0
    - add: [core.0, 4, 2]
    - rem: addes a reference to a literal, stores result in core.1
    - add: [core.1, core.0, 5]
    - rem: outputs '11'
    - out: core.1
    - exit: 0