hakkML is the base machine language code that is compiled and run by the VM

File FormatEdit

The default format for hakkML is a YAML formatted representation of a hakk ( program).


hakkML files (also known as "hakk files") are a set of declarations that describe a hakk and it's instructions.

# This example hakk shows how to declare the minimum information in order
# to be a valid hakk.
# All hakks must have a name and declare two mandatory blocks:  A core block and
# and entry block.
# Notice the entry block is also defining a location relative to the core block, 
# which is always the axis of a hakk (0,0)
# In the code section, each instruction block, including the entry (called 'main'
# in this example) must include the code that will run in that block.  Notice
# how the name of the code block 'main' matches the name defined for the entry
# block.
name: add_example
  entry: {name: 'main', loc : [0,1]}
    - 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