Colossal Cave Adventure http://jerz.setonhill.edu/if/crowther/ Program build and execution session log by retro98se at gmail.com for asun.net Script started on Thu Jun 18 05:25:17 2009 $ telnet localhost 2020 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Connected to the PDP-10 simulator DZ device, line 0 PDP10 05:25:38 TTY0 system 4097 Connected to Node CENTRA(0) Line # 0 Please LOGIN .login 100,100 Job 3 PDP10 TTY0 Password: [LGNLAS Last access to [100,100] succeeded on 16-Jun-109:23:00:05] 05:25 18-Jun-109 Thursday . .; The compiler to build Adventure will be Fortran-10 Version 6 .; for the TOPS-10 operating system. Circa 1981. . .dir sys:for* FORDDT REL 46 <055> 11-Dec-81 DSKB: [1,4] FORLIB REL 403 <055> 3-Dec-81 FORTB EXE 196 <055> 3-Dec-81 6(1144) FORTC EXE 120 <055> 3-Dec-81 6(1144) FORTD EXE 240 <055> 3-Dec-81 6(1144) FORTE EXE 204 <055> 3-Dec-81 6(1144) FORTF EXE 172 <055> 3-Dec-81 6(1144) FORTG EXE 148 <055> 3-Dec-81 6(1144) FORTRA EXE 80 <055> 3-Dec-81 6(1144) FOROT6 EXE 120 <055> 3-Dec-81 6(2033) Total of 1729 blocks in 10 files on DSKB: [1,4] .set tty fill 0 .set tty lc .set tty tab .dir ADV0 SFD 1 <775> 8-Jun-09 DSKB: [100,100] ADV1 SFD 1 <775> 8-Jun-09 ADV2 SFD 1 <775> 8-Jun-09 Total of 3 blocks in 3 files on DSKB: [100,100] .r setsrc *cp [,,adv0] *^Z EXIT . .; The original (pre Don Woods) version of Colossal Cave Adventure, written .; by Will Crowther. Long believed lost, this was found from a backup of .; Don Wood's student account thanks to the efforts of Dennis Jerz. Included .; are three versions of the Fortran-IV source code, along with two versions .; of the data file. .; http://jerz.setonhill.edu/if/crowther/ . .dir ADV11 DAT 32 <057> 11-Mar-77 DSKB: [100,100,ADV0] ADV31 DAT 32 <057> 31-Mar-77 ADV11 F4 22 <057> 11-Mar-77 ADV23 F4 23 <057> 23-Mar-77 ADV31 F4 22 <057> 31-Mar-77 Total of 131 blocks in 5 files on DSKB: [100,100,ADV0] . .; Adventure performs a CALL IFILE(1,'TEXT') to read the game database .; DAT file, but the code doesn't define IFILE. .; .; IFILE may have originally been part of a 3rd party IOFIL library. .; Without the library, we'll create the file IFILE.F4 with the .; Fortran code for this function. .; .; Function argument FNAME is a file name string of length up to 10 .; characters. The required type depends on the Fortran compiler. .; Fortran 6 expects FNAME to be an array. In later Fortran versions, .; FNAME needs to be type "character" instead. . .sos ifile.f4 Creating IFILE.F4[100,100,ADV0] 00100 SUBROUTINE IFILE(UNUM,FNAME) 00200 00300 IMPLICIT INTEGER(A-Z) 00400 DIMENSION FNAME(2) 00500 C CHARACTER FNAME*10 00600 00700 OPEN(UNIT=UNUM,NAME=FNAME,ACCESS='SEQIN') 00800 RETURN 00900 END 01000 $ *eu [DSKB:IFILE.F4[100,100,ADV0]] .type ifile.f4 SUBROUTINE IFILE(UNUM,FNAME) IMPLICIT INTEGER(A-Z) DIMENSION FNAME(2) C CHARACTER FNAME*10 OPEN(UNIT=UNUM,NAME=FNAME,ACCESS='SEQIN') RETURN END . .; Adventure initializes its arrays by reading data from file text.dat. .; Since we'll edit the data due to reasons noted below, we copy .; adven.dat to be text.dat. . .copy text.dat=adv31.dat . .; The text.dat modifications account for changes in the way the Fortran .; library interprets fields read from input files. .; .; Fortran v6 (v5 and later) considers one or more white space characters .; to delimit fields. This is undesirable because some of the strings .; in text.dat have leading spaces and tabs. When the Fortran library .; reads those strings, it discards the leading spaces. To work around .; this, we'll replace the tab field delimiter with a comma delimiter .; in the lines containing strings with leading white space. .; .; In the lines with , change to . .; The sos editor command to accomplish this is: .; s,^:*,d .; confirms substitution for the line .; e exit decide mode . .sos /start:1/step:1/nonum text.dat Editing TEXT.DAT[100,100,ADV0] *p^!2 1 1 YOU ARE STANDING AT THE END OF A ROAD BEFORE A SMALL BRICK *s $, $^:*,d 1, YOU ARE STANDING AT THE END OF A ROAD BEFORE A SMALL BRICK [Accepted] 1, BUILDING . AROUND YOU IS A FOREST. A SMALL [Accepted] 1, STREAM FLOWS OUT OF THE BUILDING AND DOWN A GULLY. e *p. 1 STREAM FLOWS OUT OF THE BUILDING AND DOWN A GULLY. *s $, $.:*,n *p. 80, WHICH WAY? *eub [DSKB:TEXT.DAT[100,100,ADV0]] .dir ADV11 DAT 32 <057> 11-Mar-77 DSKB: [100,100,ADV0] ADV31 DAT 32 <057> 31-Mar-77 ADV11 F4 22 <057> 11-Mar-77 ADV23 F4 23 <057> 23-Mar-77 ADV31 F4 22 <057> 31-Mar-77 IFILE F4 1 <057> 18-Jun-09 TEXT DAT 32 <057> 18-Jun-09 Total of 164 blocks in 7 files on DSKB: [100,100,ADV0] .exec adv31.f4,ifile.f4 FORTRAN: ADV31 00005 DIMENSION IOBJ(300),ICHAIN(100),IPLACE(100) 00006 1 ,IFIXED(100),COND(300),PROP(100),ABB(300),LLINE(1000,22) 00007 2 ,LTEXT(300),STEXT(300),KEY(300),DEFAULT(300),TRAVEL(1000) %FTNLID Line:00007 Identifier DEFAUL more than 6 characters 00008 3 ,TK(25),KTAB(1000),ATAB(1000),BTEXT(200),DSEEN(10) 00009 4 ,DLOC(10),ODLOC(10),DTRAV(20),RTEXT(100),JSPKT(100) 00010 5 ,IPLT(100),IFIXT(100) %FTNWRN MAIN. No fatal errors and 1 warning SPEAK GETIN YES SHIFT FORTRAN: IFILE IFILE LINK: Loading [LNKXCT ADV31 execution] PAUSE INIT DONE Type G to Continue, X to Exit, T To Trace. *x CPU time 0.01 Elapsed time 24.92 EXIT .save adv31 ADV31 saved .dir ADV11 DAT 32 <057> 11-Mar-77 DSKB: [100,100,ADV0] ADV31 DAT 32 <057> 31-Mar-77 ADV11 F4 22 <057> 11-Mar-77 ADV23 F4 23 <057> 23-Mar-77 ADV31 F4 22 <057> 31-Mar-77 IFILE F4 1 <057> 18-Jun-09 TEXT DAT 32 <057> 18-Jun-09 ADV31 REL 38 <057> 18-Jun-09 IFILE REL 1 <057> 18-Jun-09 ADV31 EXE 380 <057> 18-Jun-09 Total of 583 blocks in 10 files on DSKB: [100,100,ADV0] .run adv31 WELCOME TO ADVENTURE!! WOULD YOU LIKE INSTRUCTIONS? YES SOMEWHERE NEARBY IS COLOSSAL CAVE, WHERE OTHERS HAVE FOUND FORTUNES IN TREASURE AND GOLD, THOUGH IT IS RUMORED THAT SOME WHO ENTER ARE NEVER SEEN AGAIN. MAGIC IS SAID TO WORK IN THE CAVE. I WILL BE YOUR EYES AND HANDS. DIRECT ME WITH COMMANDS OF 1 OR 2 WORDS. (ERRORS, SUGGESTIONS, COMPLAINTS TO CROWTHER) (IF STUCK TYPE HELP FOR SOME HINTS) YOU ARE STANDING AT THE END OF A ROAD BEFORE A SMALL BRICK BUILDING . AROUND YOU IS A FOREST. A SMALL STREAM FLOWS OUT OF THE BUILDING AND DOWN A GULLY. GO IN YOU ARE INSIDE A BUILDING, A WELL HOUSE FOR A LARGE SPRING. THERE ARE SOME KEYS ON THE GROUND HERE. THERE IS A SHINY BRASS LAMP NEARBY. THERE IS FOOD HERE. THERE IS A BOTTLE OF WATER HERE. get keys I DON'T KNOW THAT WORD. GET KEYS OK QUIT I DON'T KNOW THAT WORD. ^C .kjob Job 3 User USER [100,100] Logged-off TTY0 at 5:41:12 on 18-Jun-109 Runtime: 6:48:54, KCS:365023, Connect time: 0:15:23 Disk Reads:2114, Writes:696, Blocks saved:1530 .kjob Line hangup Connection to localhost closed by foreign host. $ exit script done on Thu Jun 18 05:41:39 2009