i'm afraid there's no sample code anywhere...
you get a VM context handle with the "allocVM" function.
you should do this once per instance, so that every instance has its own variables and things like that.
the next thing you do (also once per instance) is registering variables. you might find this macro useful 🙂 (modify to fit your variable name for the VM context)
#define regvar(varname, initval) *(VMV_##varname = g_extinfo->regVMvariable(vmcontext, #varname)) = initval;
it registers a variable with the given name and initialises it to the given initvalue
example: regvar(w, (double)w);
you need to declare this variable somewhere (preferably in the class definition)
double *VMV_w;
after you have completed these steps, you can compile code with the "compileVMcode" function. This function takes a VM context and a piece of code as parameters and returns a VM code handle.
you can then execute the code with the "executeCode" function.
when you're done, don't forget to free the code, using the "freeCode" function, and the VM, using the "freeVM" function.
btw about that mmx stuff:
i have maximum blending in 2 MMX ops per 2 pixels and minimum blending in 3 MMX ops per 2 pixels (not including loading the mmx registers and storing the data back)