FANDOM


Description Edit

A [VM] instruction that divides a number by another number and stores the result.

Usage Edit

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

hakkML Example Edit

name: div_example
blocks:
  core:
  entry: {name: 'main', loc : [0,1]}
code:
  main:
    - rem: divides a literal by another literal, stores result in core.0
    - div: [core.0, 4, 2]
    - rem: divides a number stored in core.0 by a literal, stores result in core.1
    - div: [core.1, core.0, 2]
    - rem: outputs '1'
    - out: core.1
    - exit: 0