sgasm is a simple, generic, portable, retargetable assembler.
It is easy changeable for your own vm’s instruction set.
It supports many types of instructions, parameter types, Offset-Jumps and so on...
It is written in C, is extremely easy to configure, and is very fast.