4 ms·
Note that dungeon (the source port from the mainframe game that eventually became Zork) has been open sourced for much longer. At some point it was machine tran
by 65a 3y ago
Note that dungeon (the source port from the mainframe game that eventually became Zork) has been open sourced for much longer. At some point it was machine translated from F77 Fortran to C~90, and comprises some of the most terrifying code I have seen:
https://github.com/devshane/zork https://github.com/devshane/zork
http://mirrors.ibiblio.org/interactive-fiction/games/source/dungn32b.zip http://mirrors.ibiblio.org/interactive-fiction/games/source/...
- jprd 3y agoEverywhere the `goto` touches, is your kingdom.
- eropple 3y agoThe Republic of longjmp() isn't going to help you out much, though.
- m463 3y agoI first played it as dungeon on a vax, I believe it was the fortran version. One detail I vividly remember is reading a listing deep in some cavern that said something about MEMQ
- m463 3y agoReplying to my own comment. I decoded it from the original dtextc.dat file: Object: 122: stack of listings There is an enormous stack of line-printer paper here. It is barely readable and totally unintelligable. Initial: There is a gigantic pile of line-printer output here. Although the paper once contained useful information, almost nothing can be distinguished now. Flag1: -8176 (burn take read visible) Size: 70 Room: 137 (Tomb of the Unknown Implementer) Read: <DEFINE FEEL-FREE (LOSER) <TELL "FEEL FREE, CHOMPER!"> <MEMQ ...... The rest is, alas, unintelligable (as were the implementers).
- MarkusWandel 3y agoDid Fortran programmers really use meaningless goto labels like that?
- tlb 3y agoFORTRAN77 only allowed 5-digit numbers as labels. So people developed habits for numbering loops & ifs. Programs definitely lost readability if you renumbered them. The labels were in fact numbers, not just numeric strings, since there was a computed GOTO that took an expression to jump to.
- 082349872349872 3y agoI'm pretty sure back then number labels didn't seem any worse than the memory addresses one would use in machine code. I wonder what aspect of coding today will seem to coders a half-century from now to have been not, sympathy for the machine, but excessive kowtowing towards it? (I would suggest order-dependent alternative trees, but Hope provides an example of starting with order independence and subsequently reverting to what programmers traditionally expect)
- qingcharles 3y agoBut was anyone actually coding in machine code without an assembler? At least an assembler lets you set strings for all your jump points...
- 082349872349872 3y agoGood point; looking at MIXAL (ca.1968?) it looks like local symbols are single digit but global symbols are up to 10 character alphanumeric.
- jeffrallen 3y agoComputed GOTO was tricky, but not as bad as a computed COMEFROM.