Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!news.rwth-aachen.de!news.ruhr-uni-bochum.de!news.rhrz.uni-bonn.de!RRZ.Uni-Koeln.DE!news.gtn.com!osn.de!noris.net!blackbush.xlink.net!tank.news.pipex.net!pipex!howland.erols.net!cam-news-hub1.bbnplanet.com!cpk-news-feed2.bbnplanet.com!cpk-news-hub1.bbnplanet.com!www.nntp.primenet.com!nntp.primenet.com!netcom.com!erkyrath
From: erkyrath@netcom.com (Andrew Plotkin)
Subject: Re: Inform/Zmachine thoughts
Message-ID: <erkyrathDy1z30.MMD@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
X-Newsreader: TIN [version 1.2 PL1]
References: <Pine.LNX.3.95.960920173018.5222G-100000@adamant.res.wpi.edu>
Date: Fri, 20 Sep 1996 22:42:36 GMT
Lines: 56
Sender: erkyrath@netcom.netcom.com

George Caswell (timbuktu@adamant.res.wpi.edu) wrote:

>    Hi.  Might it make sense for Inform to use or have an external Zmachine
> assembler?  (Regardless, such an assembler could be useful in making other
> languages compile for the Z-machine, couldn't it?) 

Inform can compile source files that look like
[ main;
  @opcode;
  @opcode;
  @opcode;
...
];

so it's effectively an assembler as well as a compiler.

Yes, this capacity could be helpful for other compiler-writers.

>    Oh, one technical question about the Z-machine...  are the save files
> implementation-dependant due to the differences in the machines an
> interpreter runs on, specific design decisions of the interpreter, or all
> the above?

Both. However, you can design the interpreter to read/write a specified 
save format. (The save format contains all of main memory, the stack, and 
I think a register or two. You just have to decide on an order for these 
things, and make sure the stack and registers get saved in the correct 
endianness.)

The original ZIP code used a single save format except that it did *not* 
account for endianness. This code was not changed in the two interpreters 
I did, XZip and MaxZip. The other modern interpreters are less lazy and 
more useful on this subject; I'm sure the relevant authors will speak 
up with details.

>    (One last thing--  can anyone recommend interpreter(s) that satisfy the
> following criteria-- text mode implementing all the character attributes,
> with no cheat functions, no shell escapes, X mode that looks good and
> works well, implements color and such when applicable, also no cheats, and
> the two having compatible save formats and supporting all text-mode Z-code
> versions?)

That's a big list. :) I'm pretty sure that XZip is the only X Windows 
interpreter (although, of course, all the Unix text-based ones will run 
in an X terminal window.) XZip does everything you want except color and 
save file format (see above.)

For text-based terps, take your pick. More to the point, download all of 
them and look at the splash sheets. :)

--Z

-- 

"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the
borogoves..."
