FANDOM


Description Edit

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

Usage Edit

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

hakkML Example Edit

name: mul_example
blocks:
  core:
  entry: {name: 'main', loc : [0,1]}
code:
  main:
    - rem: multiplies two literals, stores result in core.0
    - mul: [core.0, 4, 2]
    - rem: multiplies a number stored in core.0 with a literal, stores result in core.1
    - mul: [core.1, core.0, 5]
    - rem: outputs '40'
    - out: core.1
    - exit: 0