Skip to content
Tom's Software Emporium

εVM

An embeddable Compiler and Micro Virtual Machine

EVM is a high-performance, lightweight virtual machine platform optimized for embedding directly into diverse applications. With EVM, developers can integrate portable logic that runs within video games or low-spec embedded systems, sandbox user-generated content, or automate tasks. Its versatility making it suitable for everything from teaching systems programming to real-time applications on resource constrained architectures–delivering impressive performance even on hardware as modest as an ATmega328 or a 386 in real mode.

Familiar yet Minimal Environment

EVM's strength lies in its simplicity and compatibility. It includes a straightforward recursive-descent C compiler that enables developers to virtualize existing code seamlessly or write new code without needing to learn a custom language. The compiler produces a minimal bytecode optimized around universal processor instructions–a "lowest common denominator" design that keeps the virtual machine lean and fast. Most instructions translate nearly one-to-one with the underlying hardware, with only a few requiring multiple steps, allowing EVM to perform closer to the level of native code without the bulk of heavy JIT (Just-in-Time) compilers.

Program listing for "PRIME.C" which can be run both natively and through EVM.

char isPrime(int n)
{
   int i;
   if (n <= 1) {
       return 0;
   }
   i = 2;
   while (i < n) {
       if (n % i == 0) {
           return 0;
       }
       ++i;
   }

   return 1;
}

On a scale from AST-traversing interpreters (low speed) to JIT compilers (native speed), EVM falls somewhere prior to JIT in performance. Its structure provides native code sequence threading and macro-instructions, offering developers a balance between speed and memory efficiency, with the VM core requiring under a kilobyte of memory without the C compiler.

Key Features

EVM is engineered with features that provide robust control, efficiency, and sandboxing across applications:

εVM in action!

EVM is an ideal choice for developers looking to add powerful, efficient logic engines to their applications without sacrificing speed or memory. Whether you're developing resource-constrained embedded software, fast-paced game mechanics, or interactive applications, EVM brings performance and portability to a range of use cases such as:

Download Evaluation Sample (Win2K+/ReactOS): [TSetup.zip].

Free for personal, non-commercial use.