Re: Wanted: Simple virtual machine or interpreter

"brian mcsweeney" <>
18 Feb 1998 23:02:11 -0500

          From comp.compilers

Related articles
Wanted: Simple virtual machine or interpreter (Norman) (1998-02-14)
Re: Wanted: Simple virtual machine or interpreter (brian mcsweeney) (1998-02-18)
Re: Wanted: Simple virtual machine or interpreter (Lennart Augustsson) (1998-02-18)
| List of all articles for this month |

From: "brian mcsweeney" <>
Newsgroups: comp.compilers
Date: 18 Feb 1998 23:02:11 -0500
Organization: Compilers Central
References: 98-02-072
Keywords: interpreter

I think you should consider an implementation of forth called UNTIL
and is also described in a book of the same name. It is written in
clean ansi c/c++ and can be embedded in any application as a macro
language or for debugging, etc.

I apologize for not providing any pointers but it can be found on the
net. "Good luck, Jim!" :)

/s/ brian

===See notes below.

I'm searching for a simple low-level, yet efficient virtual machine
and a compiler for it.

=== Obviously You need Forth, try UNTIL.

The background is that I like to write a modem utility that works on
several [computer] platforms. I can write a portable application that
just needs to be recompiled on the target platform, but I'm not
satisfied with that solution.

The problem is that I'm going to release the application under GPL,
and expect it to be modified and ported by a lot of programmers over
time. Still I need a way to quickly upgrade the utility to handle new
modems that appears rather often. To let the average end user (who
probably don't even know the word "compiler" ;-) have this upgrade
_fast_ can really be a problem. Especially since I don't have control
over all versions of the utility...

My intended solution is to use a virtual machine that looks the same
on any platform.

== this is forth

  This machine runs platform independent code ...
=== this is forth too.


To upgrade, a user just needs a new code file for this virtual machine,
and can always find the latest version at my WWW page.

=== Forth can do this too.

I need this virtual machine though, and here is my dream specification:

* Source available in C.
== See UNTIL

* Public domain or distribution under a "license" that makes it
possible to redistribute the source and application (like GPL).
== You could design your own implementation and distribute it any == way
you want

* Possible to program in a "high-level" language (like C, Rexx, Basic,

== See UNTIL.

* Size of binary that emulates the virtual machine: 16 Kbyte, or less.
(If it needs more, it's not a _simple_ virtual machine!)

=== Forth can easily fit your requirement.

Does such a beast already exist, or do you know something "close
enough" that I can modify?

=== Forth

I guess any old CPU emulator or integer BASIC interpretator can be
helpful. But are there even better things out there?

== Nah, Forth!

Thanks in advance for any help!

== You're welcome!


Post a followup to this message

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