Summary: Wanted: Simple virtual machine or interpreter

Morten Norman <>
13 Mar 1998 00:06:33 -0500

          From comp.compilers

Related articles
Summary: Wanted: Simple virtual machine or interpreter (Morten Norman) (1998-03-13)
| List of all articles for this month |

From: Morten Norman <>
Newsgroups: comp.compilers
Date: 13 Mar 1998 00:06:33 -0500
Organization: Compilers Central
Keywords: interpreter, summary

I while ago I asked for a simple, yet efficient virtual machine and a
compiler for it. (More background details are in my original post
that may be found in the archives for this group...)

This returned a lot of interesting pointers and suggestions and I
really like to thank you everybody for all great input!

I have not yet picked my choice, but the candidates I think suits _my_
application best are BCPL or the "Obfuscated C interpreter". Both
does what I want, but no more. BCPL is mature and has been used for
real projects. Obfuscated C on the other hand is a C subset (means
reduced learning for me) and is extremly "bare bones".

Anyway, here is the brief summary. The comments are more or less my
personal notes during a quick WWW browse. Be warned that things may
be misinterpreted or even mixed up by me. The list is in random

Lua at
Free (no cost), but copyrighted.
C-like. Has C interface. Is a C library. Precompiles available for Unix,
Windows, and Macintosh. Interpreted (text parsing?) GUILE
Pointer that GUILE might be useful.

Free (under GPL), forces me to release my application under GPL too (but
that was my intention anyway).
Java. Ported to Unix, Amiga, Windows 95 etc. Just-in-time compiles.
Free (no cost), but copyrighted
C-like. C source. Runs on Unix, PC, Macintosh, Amiga, and many other systems.
Interpreted (can be byte-compiled?)

Hints to look for a forth called UNTIL in ANSI C. Repeated suggestions
that forth is small and efficient. or news:comp.lang.forth

Hints to look for for Tcl without the graphical interface.

WAM (Warren Abstract Machine) for Prolog implementation

Free for noncommercial use:

TAM (code example from book)
Pointer to book with PASCAL source code for an interpreter for a simple
abstract machine language called TAM.

Programming Language Processors
David A. Watt
Prentice-Hall, 1993
ISBN 0-13-720129-X (paperback)

Obfuscated C
Lennart Augustssons winning entry in the "Obfuscated C contest" 1996.
An interpreter that runs a simple byte code + a compiler that compiles
a C subset into this code.

Obfuscated version at:

And a few more pointers under year 1996 and subject august at:

Unobfuscated version at
(I had to replace "~augustss" with "home/augustss" or something like
that to get the path recognised. Maybe just my ftp?) Not too much
comments in the source, but after seeing the obfuscated version I'm
eternally grateful for the human readable version! ;-).

As far as I understand, the language C has adopted most from.

Has a "porting kit" with efficient BCPL byte code that may be
used to run the compiler etc. Appears to be designed for porting.
Tightly associated to the TRIPOS operating system. Appears to be
fully usable even when running under an interpreter? TRIPOS (in a
modified port?) is also known as the original AmigaDOS (which IMHO
still beats the latest MS-DOS).

Pointer to Martin Richards (the author himself) WWW page:

Morten Norman email:

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.