Tower of Mystery is a text-only adventure game published in Gary McGath's 1984 book COMPUTE!'s Guide to Adventure Games. The object of the game is to explore an abandonded multi-floor building, solve some simple puzzles, and to use an in-game computer to create a copy of an Adventure game tape.
The Guide to Adventure Games mostly contained reviews of then-current adventure games, along with general tips and tactics for solving them.
The game was included at the end of the book for readers to type into their own personal computer. Typing programs in from a printed listing was common in 1980s computer magazines and books. The main purpose for this was as a method of analog software distribution.
The secondary purpose was education. Typing a program into a computer by hand was a slow process. Programming this way was a method for novices to learn programming basics through copying and imitation. McGath's book contained a substantial explanation of the program in the chapter following the program listing, highlighting Tower of Mystery's educational purpose.
In the book, Gary McGath named the setting as, "The old factory of the adventure is, in fact, a real building in Manchester, NH, which now houses several high-tech companies" (p. 165). A few years ago, I met Gary via Reddit and he confirmed for me that he had in mind the Jefferson Mill building specifically. The picture of the building above shows the factory with its prominent clock tower.
In the 1984 book, the original source code is given in Microsoft BASIC. For the time, Microsoft BASIC was a lingua franca programming language, running mostly unchanged on a diversity of personal computers of the 1980s.