[MUD-Dev] Internal Mud Languages
Jeff Kesselman
jeffk at tenetwork.com
Tue May 27 12:05:26 CEST 1997
At 12:53 PM 5/26/97 PST8PDT, you wrote:
>
>I have found little help in the "target" area or PCCTS output whether
>it be native 486 code or tokenized output to some undefined VM.
>
>Maybe I should be a little more specific. Are there any sample/simple
>documented VMs available? In particular, those designed with 486
>architecture in mind?
Um, if you know you are going to a 486 architecture, then why a VM?
It seems a highre efficiency soln based on a 486 kernel and some std libs
aught to be possible...
My VM was built with portability in mind, it assumes no underlying
architecture and in fact compiled immediately and ran when I moved it to
the Sparc.
In general for VMs you might want to look at a book on systems and machine
origanization. I personally like Tannenbaum's book a lot (a classic called
something boring like "Machine Organization." A VM is just a software
implementation of a processor. In logic its exactly the same a designing a
micrprocessor chip (in fact most microprocessors really ARE VMs running in
firmware microcode on a simpler hardware processor.)
Every VM I've ever built has been a simple stack machine of some sort.
They ar not necc the most efficient but are extremely easy to genreate code
for. If you want information on the next level up, how to implement the
logic for higher level functions (ifs, case statements, etc) in assembly
code (this is what is often caled the "backend" or "code generation" part
of the compiler) I'ld recommend "Crafting a Compiler", a real favorite of
mine. Its particularly cogent in regard to PCCTS as it talks about
recursive descent parser implementation, which is the kind of parser PCCTS
generates, but the code generaton stuff really applies just fine to any
compiler.
>
>PCCTS and BISON would seem to be overkill for me in the translation
>department. In particular, I am extremely leery of PCCTS's ability
>to clean-up its memory with the C++ implementation.
Hmmm. I've met the guy who wrote PCCTS and he is a serious architect and
structured programmer. Ild be very suprised if PCCTS had any really sloppy
stuff like un-freed memory.
JK
More information about the mud-dev-archive
mailing list