PLAIN – Module

PLAIN VM consist of multiple Modules. A Module have it’s own unique name, easyIPC Object map, Stack and can execute independently from other Modules. One Module can interact with other Modules or call them on blocking/non-blocking schemes.

All code in PLAIN Assembly must be part of a module and a module start execution with the first statement it finds

Use System
Module MyModule
            println ("Hello World")

This is the “Hello World” example in PLAIN. We could even write the following:

use System
println ("Hello World")

In this last example we just add our code to a global module. As we assemble this we also declare what repository to use, and the use statement administrate what modules we access. This is designed to be easy once set up, but still give you full control of what the assembler does and how it assemble Your modules. It also enables portability by replacing the repository – no changes to Assembly code.

A repository is a XML based database that we need to write. This describe the VM, add-on modules in C/C++ and PLAIN etc. “use System” assume we have a module named “System” with an exact description of this. Your object file will contain this as a “specification” that is downloaded with your module. The real-time linker will reject modules with missing dependencies.

Leave a Reply