very slightly higher level wrapper around mlog. makes jump statements actually usable and will yell at you incomprehensibly if you make a mistake (partial syntax checking)
download the code from the latest release or compile it yourself (directions below), then run it in your terminal of choice (it's a command line program)
- install cargo if you haven't already (guide)
- run
cargo build --release
in the source code directory - the built executable will be located in
target/release/
, you can do whatever with it at this point
- as with some flavors of BASIC, you create labels with the syntax
labelName:
(where label name can be any label name) - instead of taking addresses to jump to, the
jump
instruction now takes labels, and will jump to them accordingly - the instruction
goto <labelName>
is an alias tojump <labelName> always
, if you want to type slightly less - basic subroutine support, uses variables to store the instruction pointer locations since we don't have a stack. downsides are recursion doesn't work. it's possible to create a stack, but it would be slow so i didn't
- you can create subroutines with
routine <routineName>:
, return from a subroutine withreturn
, and end a subroutine withendroutine
- subroutines are called with
gosub <routineName>
or you can usegosubc
for a conditional gosub, syntax is the same asjump