Skip to content

VM Calls

🧠 VM Calls (VIREX Runtime Interface)

Similar to how syscalls allow user programs to interact with the operating system, vmcalls are a mechanism for communicating with the virtual machine itself. These instructions trigger built-in functionality provided by VIREX at runtime.

Currently, 8 vmcalls are defined and implemented, handling tasks like memory management, printing, and i/o. There is also an idea under consideration to support external plugin-based vmcalls.

VM calls are executed via a specific opcode INVOKE followed by the call number. A simple header file can also be created to map the vm calls to their IDs.