Jason Scott has made the source available for every one of Infocom's classic and genre-defining text adventure games (previously) for the Apple ][+ and its successors, posting it to Github under the historicalsource account.
The code is written in Zork Implementation Language, a Lisp-like programming language that you can learn with this manual.
The source seems to have been posted under the general rubric of archival preservation, which is an activity that can fall under copyright's fair use doctrine. If Activision -- owner of the rights to Infocom titles -- decides to push the matter, we might end up with a fascinating and precedent-setting court battle.
Included in the collection are all the Zork games, as well as the notorious and brilliant Douglas Adams game "The Hitchhiker's Guide to the Galaxy" and partial sources for its unreleased sequel "The Restaurant at the End of the Universe" and the complete sources for an unreleased adaptation of "The Abyss," James Cameron's 1989 movie.
Dive in and you'll find that things are very different now than they were then. At the time Infocom was active, personal computers did not have a widely shared architecture, so the path ZIL's architects took was to allow game creators to write instructions for a virtual machine called the Z-machine, which was then brought to the various platforms of the day. There are interpreters available today for Windows, macOS, Linux, iOS, and Android, among other platforms.
The interactive fiction community is still quite lively, and people are still making games using ZIL and the Z-machine today. But they've been joined by creators using new tools for spinning interactive, text-focused games like Twine and Ink, some of which are used as middleware in modern graphical game productions big and small.
Historical Source [Jason Scott/Github]
You can now download the source code for all Infocom text adventure classics [Samuel Axon/Ars Technica]