Skip to content
/ masiina Public

Virtual machine for Plorth programming language

License

Notifications You must be signed in to change notification settings

plorth/masiina

Repository files navigation

masiina

Experimental virtual machine for Plorth programming language.

Compilation

C++17 capable compiler and CMake are required to compile the interpreter. Dependencies are handled by cget, which also needs to be installed.

$ cget install
$ mkdir build
$ cd build
$ cmake ..
$ make

Usage

Masiina consists from two binaries: compiler and the runtime that is used to run Plorth programs compiled into bytecode by the compiler.

The compiler is called masiinac and it can be used to compile Plorth programs into bytecode. Multiple programs can be compiled into single compilation unit, but the first one is considered to be main program, which is the one that is initially executed.

For example:

$ masiinac -o output.bin 1.plorth 2.plorth 3.plorth

would compile files 1.plorth, 2.plorth and 3.plorth into a single file but 1.plorth would be the Plorth program that would be initially executed while 2.plorth and 3.plorth would be considered as utility modules that could be imported from 1.plorth. The compiler will then produce file output.bin that can be executed by the Masiina virtual machine.

Once you have compiled one or more Plorth programs into an compilation unit you can then execute it with masiina like this:

$ masiina output.bin arg1 arg2 arg3

About

Virtual machine for Plorth programming language

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published