I first played the game, way back - prior to having read the novel. It was mind-blowing. I had no idea what was going on but I got a real sense that it could be pretty funny if I did. So I read the novel eventually, and it was as good as I expected. I don't think I'd gone back to play the game until this week, though.
gcc -Werror=missing-declarations -Werror=redundant-decls
(last I checked, Clang's implementation of this was buggy and half-useless, but I'll admit I stopped using Clang)I recommend this for well-maintained code too, just as another way to keep the code smells away. For a lot of projects this will only require adding a bit of `static` that you were too lazy to write.
K&R C has no concept of THEN. That's a peculiarity of the ZIP source code, defined as a pure no-op:
#define THEN
https://github.com/ChristopherDrum/pez/blob/main/zip/infocom...What we're seeing here is 40 year old code compile and run with minimal effort. Largely because the C language has respected backwards compatibility.
Yes, there were breaking changes along the way, but they were trivial to resolve in hours. And (more interesting) the author believed that to be true and so persevered.
I saw this recently as well. I run a lot of programs on Windows. Many are 32 bit, written in the 90s for Windows 95, or 98. They all still run. Microsoft bends over backwards to keep things compatible.
I also get to write a lot of web API clients. I tell customers that it won't work forever. Web APIs are constantly changing. The service (especially Google) will change something soon to break it.
The people building those APIs are expecting only currently-maintained apps to run. They have no concept (or experience) of 40 or 30 year old code "just running". Crumbs, if you get 5 years out an API client you're doing well.
(2) Scott Adams made an adventure interpreter was was similar but less sophisticated than the z-machine but similarly portable, in fact you could write a Scott Adams interpreter in BASIC [1] but he also wrote interpreters in assembly for the most popular platforms
https://6502disassembly.com/a2-scott-adams/interp.html
(3) Infocom developed the games on a PDP-10 machine which might be the last general purpose computer that survived with other than the 8-bit byte. (Though it had bitwise addressing which helped it cope with the industry going in that direction).
[1] Notably if you tried to write an adventure game in straight up BASIC you'd struggle. It's not like you could look up a verb in a hashtable and dispatch to subroutine. You'd be writing incredibly long if-then-else ladders nested inside if-then-else ladders which is bad enough in a civilized language.
[~/Downloads] $ chmod +x zork*
[~/Downloads] $ ./zork1
Cannot open assembly './zork1': File does not contain a valid CIL image.