I found something here in the https://www.ifarchive.org/if-archive/infocom/interpreters/specification/ZMachineArchive-20020808.zip
The subject line is: [z-machine] Proposal for a proposal for Version 9
From ???@??? Mon Jan 18 09:43:49 1999
Return-Path: owner-z-machine@omega.gmd.de
Date: Thu, 14 Jan 1999 01:01:30 +0100 (BST)
From: Graham Nelson <graham@gnelson.demon.co.uk>
Subject: [z-machine] Proposal for a proposal for Version 9
To: Z-Machine Mailing List <z-machine@gmd.de>
Message-Id: <Marcel-1.46-0114000130-d07M+4%@gnelson.demon.co.uk>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
X-Organization: none
X-Mailer: ANT RISCOS Marcel [ver 1.46]
Sender: owner-z-machine@omega.gmd.de
Precedence: bulk
X-UIDL: 34642fe02f99443ec31660722a8ce829
The summer and autumn of 1999 mark the twentieth anniversary
of the creation of the Z-machine, when two would-be Infocom
programmers, Joel Berez and Marc Blank, were stranded in Pittsburgh
and passed the time by trying to find a way to squash "Zork" onto
a personal computer.
The following proposal might serve as one way to mark the occasion,
if it finds favour: I suggest that it is now time to create
Version 9.
The proposal I'm making here is at a very informal stage indeed.
Perhaps I might begin with a meta-proposal: a way to conduct
whatever discussions we have about "Version 9", if we choose to
construct one. Please excuse my rudeness in electing myself
chairman of our committee, so to speak.
(a) We try above all to agree, and in particular to persuade
interpreter-writers that a proposed change is worth their
while. Conversely, we listen to them if they say that it's
harder than it looks.
(b) We make minimal changes, which require minimal work to
implement, given what they must accomplish.
(c) We address genuine needs rather than trying to build some
Platonic ideal of the Z-machine. In particular, there is
no need to build Lord Dimwit Flathead the Excessive's
Version Infinity.
(d) We consider that other languages besides Inform may one day
want to compile to the Z-machine.
The two "genuine needs" which I feel are pressing are:
(1) The limit on story file size (512K to 640K), and above all
on the size of writeable memory (64K). Story file
authors are actually having to go to some lengths to
get around these limits, and especially the latter one,
where people are actually writing Inform libraries to
compress arrays as bitmaps, rotate things in and out of
lower memory, etc.
(2) Less pressing, and arguably my own fault, but for reasons
to do with Inform's typelessness I would like it to be
possible to distinguish between a number and an object
at run-time. (As it is in some other object-oriented
virtual machines, notably those for Smalltalk and Java.)
At present the Inform doctrine is that:
routines, static strings, Z-machine objects and classes
are "objects" and can be mutually distinguished,
numbers, characters, arrays, actions, dictionary words,
etc., etc., are not objects and cannot.
This is anomalous and unsatisfactory, not just for the
puritanical reason that it makes the language less "clean"
than it should be -- though heaven knows, that's true --
but because it's very hard to write code that can
satisfactorily print something out in a useful way.
Both of these issues have arisen in work on the new "Infix"
feature for Inform 6.21 (he said mysteriously).
There are clearly other issues which _might_ be addressed,
such as (3) an increase in the number of attributes or (4) an
increase of the maximum number of local and global variables.
I am quite reluctant to go too far down the road of meddling
with everything, though.
Here is my minimal proposal to address (1) and (2), and which has
the fringe benefit of improving Z-machine arithmetic.
1. Version 9 should have a flat 32-bit memory model, thus raising
both limits in (1) above to roughly 1 gigabyte. All addresses
would be byte addresses, and the formula to convert a packed
routine or string address P to a byte address A would just be
A := P.
2. Everything that is now a 2-byte word should become a 4-byte
word. In particular, variables and the stack hold 4-byte values.
Minimum stack capacity (in bytes) is doubled to accommodate this.
The opcodes @storew and @loadw work in 4-byte increments, in
that
@loadw X Y -> Z
would set Z to the 4-byte value at byte address X+4*Y, rather
than the 2-byte value at byte address X+2*Y as at present.
The long operand type holds a 4-byte value, not a 2-byte one.
Some of the Z-machine tables need similar alterations: e.g.
the table of default property values.
Lastly, the header and header extension table are "doubled"
in the sense that what is currently at byte X would in future
be in the byte at 2*X. What is currently at the 2-byte word
at X, X+1 would in future be a 4-byte word at 2*X, 2*X+1,
2*X+2, 2*X+3.
3. The upper byte of a 4-byte value should be allowed to
contain information about its type, but the Z-machine shouldn't
get involved in whether it does or how it does. The only
provisions are these:
(a) the 5 arithmetic opcodes calculate with signed 31-bit
numbers and always store values with top bit zero.
(b) when an operand is "used", meaning that the Z-machine
uses the value to do something rather than simply
copies it across to a new location (e.g. the stack,
a variable, an array entry), the following happens:
if the top bit is set, then the top 8 bits
are ignored and only the bottom 24 used as the
value.
For instance, @loadw X Y -> ... "uses" both X and Y.
@storew X Y Z "uses" X and Y but doesn't use Z, which it simply
copies to the new location.
--
Graham Nelson | graham@gnelson.demon.co.uk | Oxford, United Kingdom