Zork Assembler Program (ZAP) source code found!

While digging through the various recently uploaded source code files, there is a file in the first version (R2) of Mini-Zork (1982) called “zap.mid” (“x.mid” seems to be a duplicate). This file appears to be the source code for ZAP written in MIDAS assembly language which is an MIT-developed port of the more popular MACROS assembly language more commonly used on PDP machines.

Intro of the file:

TITLE ZAP – New Z-Language Assembler

; ZAP version 3 - Expanded word table to 96 words
; MARC/JMB - 1/7/82

ZAP is the program that takes the Z assembly language code from ZILCH (the compiler for ZIL). After two passes, a complete story file (so called ZIP file) is created.

I was unable to actually compile this file as it is difficult to find a working MIDAS assembler. Maybe someone can translate this assembly code into a more popular x86 or 68000 assembly.

https://eblong.com/infocom/sources/minizork-r2.zip

10 Likes

Ooh, good catch.

x.mid looks like an older version.

What would read the ZIP file if you made one?

A ZIP file is a Z-code game file. We customarily use the file suffixes .z3, .z5, and so on; but Infocom named those files with a .zip suffix.

I’m not sure if this code will be useful at this point. It’s probably interesting from a historical perspective. I do wonder if someone could translate it into another language to see if the z-code generated is different to ZAPF.

After quick look, I think that porting from MIDAS to the more common DEC MACRO-10 isn’t trivial but not impossible, but what matters is that there’s primary sources (historiographical sense) on z-machine.

oh, also diff(1) point clearly that x.mid is NOT a duplicate… and a very cursory look of the diffs shows to be promising…

Thank for the interesting room (as in Decamerone :wink: ) and

Best regards from Italy,
dott. Piergiorgio.

I have MIDAS running on a PDP-10 emulator. ZAP.MID is a TOPS-20 version, but I have partly ported it to ITS.

4 Likes