Z-machine

The Z-machine is a virtual machine that was developed by Joel Berez and Marc Blank in 1979 and used by Infocom for its text adventure games.

The MDL programming language was derived from Lisp at the Massachusetts Institute of Technology by the Dynamic Modeling group of the Laboratory for Computer Science (LCS) in the 1970s; inspired by Colossal Cave Adventure (1977), members of that group went on to write Zork in MDL, completing the initial version two weeks later.

[2][3]: 5–6  Like Adventure, Zork was programmed for the DEC PDP-10; the finished version occupies 1 MB of MDL code and requires 512 KB of RAM to run.

[4] The compression required to run Zork from floppy discs with approximately 80 KB of storage seemed like an insurmountable barrier to Blank.

Berez realized that UCSD Pascal used a virtual machine (VM) model to generate executable files that could be readily ported across platforms, and together with Blank, they devised requirements for a lightweight VM optimized for text adventure games, which would retrieve data and execute instructions as needed from storage to compensate for the relatively small RAM sizes in typical microcomputers.

After Mediagenic moved Infocom to California in 1989, Computer Gaming World stated that "ZIL ... is functionally dead", and reported rumors of a "completely new parser that may never be used".

Though these sizes may seem small by today's computing standards, for text-only adventures, these are large enough for elaborate games.

During the 1990s, Graham Nelson drew up a Z-Machine Standard based on detailed studies of the existing Infocom files.

Here is the definition of Zork I's brass lantern in ZIL, with added comments to illustrate the meaning of each line:[11] The equivalent object in MDL is defined as: A more complex example involving combat, along with its MDL Zork equivalent, is presented in a 2019 blog post by Andrew Plotkin.

The Inform website lists links to freely available interpreters for 15 desktop operating systems (including 8-bit microcomputers from the 1980s such as the Apple II, TRS-80, and ZX Spectrum, and grouping "Unix" and "Windows" as one each), 10 mobile operating systems (including Palm OS and the Game Boy), and four interpreter platforms (Emacs, Java, JavaScript, and Scratch).

An implementation of Frotz running on an iPhone , playing the MIT version of Zork .