Dali VM packages


This section describes the organization of packages in the Dali Virtual Machine programming model, and outlines the steps to take to write your own package as an extension to Dali.

(The code currently resides in the SourceSafe repository, in the project named RVM-pkgs.)

Overview

The Dali Virtual Machine has been split up into a number of separate packages, each one implementing a set of RVM commands. This enhances the modularity of the code and allows the user to avoid loading the entire Dali command space when only a subset is needed.

At the core of the VM is the Rvmbasic package. It defines the abstractions for bit and byte images, as well as simple arithmetic operations on these types. All other RVM packages use the Rvmbasic, and therefore require it to be loaded (by executing the Tcl "package require Rvmbasic" command).

This document describes the files in a typical RVM package. A template package is provided to serve as an example RVM package on which new RVM package can be based. Its implementation is trivial, as its only purpose is to demonstrate the package structure. It should be used in conjunction with this page to learn the proper organization of the code, and can then actually be used as a template to modify into a new package.


Source file overview

The following files are needed for each package (package name designated by <pkg>):


Compiling and linking

The makefile needs to be modified to compile the package into a DLL:


Writing your own package

You can easily create a new package by modifying the template through the following steps:


Last Updated : Sunday, 15 November 1998 01:42 AM -0500