From d88d7a8bc28285cb1088060e8daf9cc97c01dd50 Mon Sep 17 00:00:00 2001 From: historicalsource Date: Sat, 13 Apr 2019 21:39:50 -0400 Subject: [PATCH] Original Source --- README.md | 1 + clock.zil | 66 ++ crufty.xzap | 22 + crufty.zil | 16 + globals.zil | 393 +++++++ goal.zil | 586 +++++++++++ gparser.zil | 1189 +++++++++++++++++++++ load.zil | 58 + mac.zip | Bin 0 -> 105584 bytes macros.zil | 124 +++ main.zil | 297 ++++++ objects.zil | 1667 +++++++++++++++++++++++++++++ parser.cmp | 1399 +++++++++++++++++++++++++ parser.zil | 1325 +++++++++++++++++++++++ people.zil | 507 +++++++++ r7.zip | Bin 0 -> 105500 bytes robots.zil | 932 +++++++++++++++++ rooms.cmp | 43 + rooms.zil | 1716 ++++++++++++++++++++++++++++++ s2.zil | 58 + script.mss | 140 +++ setup.zil | 107 ++ status.zil | 101 ++ suspended.cmp | 10 + suspended.vocabulary | 163 +++ suspended.xzap | 51 + suspended.zil | 58 + suspended.zip | Bin 0 -> 105492 bytes suspendedfreq.xzap | 200 ++++ syntax.zil | 544 ++++++++++ verbs.zil | 2381 ++++++++++++++++++++++++++++++++++++++++++ 31 files changed, 14154 insertions(+) create mode 100644 README.md create mode 100644 clock.zil create mode 100644 crufty.xzap create mode 100644 crufty.zil create mode 100644 globals.zil create mode 100644 goal.zil create mode 100644 gparser.zil create mode 100644 load.zil create mode 100644 mac.zip create mode 100644 macros.zil create mode 100644 main.zil create mode 100644 objects.zil create mode 100644 parser.cmp create mode 100644 parser.zil create mode 100644 people.zil create mode 100644 r7.zip create mode 100644 robots.zil create mode 100644 rooms.cmp create mode 100644 rooms.zil create mode 100644 s2.zil create mode 100644 script.mss create mode 100644 setup.zil create mode 100644 status.zil create mode 100644 suspended.cmp create mode 100644 suspended.vocabulary create mode 100644 suspended.xzap create mode 100644 suspended.zil create mode 100644 suspended.zip create mode 100644 suspendedfreq.xzap create mode 100644 syntax.zil create mode 100644 verbs.zil diff --git a/README.md b/README.md new file mode 100644 index 0000000..6d656dd --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# suspended diff --git a/clock.zil b/clock.zil new file mode 100644 index 0000000..01d092d --- /dev/null +++ b/clock.zil @@ -0,0 +1,66 @@ +"CLOCK for + SUSPENSION + (c) Copyright 1982 Infocom, Inc. All Rights Reserved. +" + + + +> + + + + + + + + + + + + + +) + > ,C-TICK .TICK> + .CINT> + +) + > ,C-TICK .TICK> + .CINT> + +) E C INT) + #DECL ((RTN) ATOM (DEMON) (E C INT) ) + > + > + + > + >> + > + + ) + ( .RTN> )> + >>> + +> + +)) + #DECL ((C E) (TICK) FIX (FLG) ) + > )> + >> + > + + > + ) + (>> + > + ) + (T + > + > + >> + )>)>)> + >>> diff --git a/crufty.xzap b/crufty.xzap new file mode 100644 index 0000000..77a67bc --- /dev/null +++ b/crufty.xzap @@ -0,0 +1,22 @@ + + .FUNCT THIS-IT?,OBJ,TBL,SYNS,?TMP1 + FSET? OBJ,INVISIBLE /FALSE + ZERO? P-NAM /?THN3 + GETPT OBJ,P?SYNONYM >SYNS + PTSIZE SYNS + DIV STACK,2 + SUB STACK,1 + CALL ZMEMQ,P-NAM,SYNS,STACK + ZERO? STACK /FALSE +?THN3: ZERO? P-ADJ /?ELS8 + GETPT OBJ,P?ADJECTIVE >SYNS + ZERO? SYNS /FALSE + PTSIZE SYNS + SUB STACK,1 + CALL ZMEMQB,P-ADJ,SYNS,STACK + ZERO? STACK /FALSE +?ELS8: ZERO? P-GWIMBIT /TRUE + FSET? OBJ,P-GWIMBIT /TRUE + RFALSE + + .ENDI diff --git a/crufty.zil b/crufty.zil new file mode 100644 index 0000000..4a3cd00 --- /dev/null +++ b/crufty.zil @@ -0,0 +1,16 @@ +"(c) Copyright 1983 Infocom, Inc. All Rights Reserved." + + ) + (> + <- 2> 1>>>> + ) + (>> + 1>>>>> + ) + (> >> + )> + > diff --git a/globals.zil b/globals.zil new file mode 100644 index 0000000..192c52e --- /dev/null +++ b/globals.zil @@ -0,0 +1,393 @@ +"GLOBALS for + SUSPENSION + (c) Copyright 1982 Infocom, Inc. All Rights Reserved. +" + + + +"SUBTITLE GLOBAL OBJECTS" + +> + + + + + + +;"Yes, this synonym for LOCAL-GLOBALS needs to exist... sigh" + + + + + + + + + + + + + + + + + + + +) + (CLC-TXT )> + +) + (CLC-TXT )> + +)> + +) + (CLC-TXT )> + +) + (SYNONYM FC FCS COMPUTER) + (ADJECTIVE FILTERING) + (CLC-TXT )> + +) + (SYNONYM CLONES) + (CLC-TXT )> + +)> + +)> + +)> + +)> + +) + (ACTION CRETIN)> + + + + ) + ( + + > + + ) + (T + + )>) + ( + ) + ( + ) + ( + > + ) + ( + > + ) + (T > + )> + )>> + + + + + +;"LOCAL-GLOBALS start here for easier hunting of all ridiculousness which must + be included in the game for sadistic game-testers." + +) + (CLC-TXT ) + (SYNONYM SIGN SIGNPOST ACS) + (ADJECTIVE BUZZIN LITTLE RECESS)> + +) + (SYNONYM PANEL CONSOL) + (ADJECTIVE SMALL)> + +)> + +)> + + +) + (CLC-TXT )> + +)> + +) + (FLAGS NDESCBIT TOUCHBIT)> + +)> + + + + + >> + > + + )> + + ) + ( + ) + (ELSE + )> + + + )>> + +)> + +)> + + +;"GLOBAL ATOMS START HERE" + + + + +> +> + + + + + +> + + + +> +> +> +> ;"First 3 dials, 2nd 3 are Hydro Levers" + +> +> +> +> + + + + + +> + + + + + + + + + + + + + + + + + + + + + +> +> +> + + + + + +> + +> \ No newline at end of file diff --git a/goal.zil b/goal.zil new file mode 100644 index 0000000..6e8ad2a --- /dev/null +++ b/goal.zil @@ -0,0 +1,586 @@ +"GOAL for + SUSPENDED + Copyright 1982 Infocom, Inc. All rights reserved. +" + +"This code is the local T system." + +> + +"Rapid Transit Line Definitions and Identifiers" + + + + + + + + +> + +> + +> + +> + +> + +> + +> + +> + +> + +> + +> + +> + +> + +> + +> + +> + + +"CODE" + +) "AUX" GT OFFSET) + > + > + > + > + + )> + > + +) HL GL GT) + #DECL ((RBT GOAL HERE) OBJECT (HL GL) FIX + (PRIORITY) ) + >> + 12> + <* 2>>> + > + + + > + +) LINE LN RM GT GOAL FLG + (GOAL-FLAG <>) (IGOAL <>) LOC (CNT 1) DIR) + #DECL ((RBT HERE LOC RM) OBJECT (LN CNT) FIX + (GOAL-FLAG) ) + >> + > + + > + ) + (T )>) + (> )> + % + '> + .HERE>> + >)>) + (T + '> + .HERE>> + >)>)> + >>> 0> + > + >)> + ) + (<==? .HERE .GOAL> + >>>> + >)> + ) + (>> + > + >) + (T + >)>)> + >> + > .HERE> + >>) + (T + >>)> + >) + (<==? .RM .GOAL> + )> + >>> + +> + +> + +> + > + + + + <>>) + (T + " " >)> + " to "> + + ) + (T + )> + CR> + + + + + > + +) (COUNT 0) FLOC FROB) + #DECL ((RBT WHERE) OBJECT) + + ;"Prints something")> + > + + )> + .RBT> + >> + > + + > + ) + (T + )>)>> + > + + + + > + ; ,HUMAN-ENTRY ,HALLWAY-JUNCTION>> + >> + + ) + ( + + + >> + > 0> + 1> + + ) + (T + + )>) + ( + > + + ) + ( + + > + + + + + ) + (ELSE + + )>> + + + + )> + .L> + > + >> 0>> + + .L>)>)> + > + + + >>> + > .HERE> + + ) + (<==? .RM .THERE> + )> + >> + > + + ,A-LINE) + (<==? .LN 1> ,B-LINE) + (<==? .LN 2> ,C-LINE) + (<==? .LN 3> ,D-LINE) + (<==? .LN 4> ,E-LINE) + (T ,F-LINE)>> + + ,COR-1) + (<==? .NUM 2> ,COR-2) + (<==? .NUM 4> ,COR-4) + (<==? .NUM 8> ,COR-8) + (<==? .NUM 16> ,COR-16) + (<==? .NUM 32> ,COR-32) + (<==? .NUM 64> ,COR-64) + (<==? .NUM 128> ,COR-128) + (T ,COR-256)>> + + .DIR> + > + )> + >> + )> + >>> + +"Goal tables for the 6 characters, offset by a constant, which, +for a given robot, is the P?ROBOT property of the object." + + <> <> <> 1 <> <> I-FOLLOW> + <> <> <> 1 <> <> G-ROBOT> +
<> <> <> 1 <> <> G-ROBOT> +
<> <> <> 1 <> <> G-ROBOT> +
<> <> <> 1 <> <> G-ROBOT> +
<> <> <> 1 <> <> G-ROBOT> +
<> <> <> 1 <> <> G-ROBOT> +
<> <> <> 1 <> <> G-PEOPLE>>> + + + +"Offsets into GOAL-TABLEs" + + + + + + + + + + +"Goal-function constants, similar to M-xxx in MAIN" + + + + +> ,GOAL-F>> + +) (CNT 0) GT) + > ,CHARACTER-MAX> + ) + (> ,GOAL-S> + > + + > + )>)>> + .FLG> + +>> + > + > + .RBT ,G-REACHED> + > + +> + + + + + + + <>>) + (T + " " + >)> + + "."> + > 0>> + >> + )>)> + 0> + ,M-ENTER> + + + )>> + +;"NOTE: Follow-tbl, found in VERBS, puts the person to be followed into the + table. + NOTE: ROBOT-FOLLOW is used to indicate the robot expected to be found on + arrival, set by GO TO a ROBOT. + NOTE: LAST-ROOM is a table used by the verb FOLLOW to determine whether or + the robot to be followed was just here." + +> + +> + +> + + + + ) + ( + ) + ( + ) + ( + ) + ( + ) + ( + ) + ( + ) + ( + ) + ( + )>)>> + +"Routines to do looking down corridors" + +) "AUX" C Z COR VAL (FOUND <>)) + > + > 0>> + ) + (> 0>> + ) + (> 0>> + ) + (> 0>> + ) + (> 0>> + ) + (> 0>> + ) + (> 0>> + ) + (> 0>> + ) + (> 0>> + ) + (T )> + > + )> + > + .FOUND)>> + +) RM OBJ) + > 0> + ) + (<==? .RM ,WINNER-HERE> ) + (> + + > + )>) + ( + 7> + ) + (ELSE + )> + + )> + + > + + + + ,CHASING-THIEF + > + )> + )> + > + )>> + )>)> + >>> + + + ) + (>> 0>> + + )>> + +>> + + + >>> + ) + (T )>> + +> \ No newline at end of file diff --git a/gparser.zil b/gparser.zil new file mode 100644 index 0000000..a363184 --- /dev/null +++ b/gparser.zil @@ -0,0 +1,1189 @@ + "Generic PARSER file for + The ZORK Trilogy + started on 7/28/83 by MARC" + +;"WHICH and TRAP retrofixes installed" + +"Parser global variable convention: All parser globals will + begin with 'P-'. Local variables are not restricted in any + way. +" + + + +;> + +> + +> + +> + + + + + + + + + + + +; + + + + + +> +;"INBUF - Input buffer for READ" + +> +;"Parse-cont variable" + +> + +> +> + +;"Orphan flag" + +> + +> + +> + +> + +> +;"Parser variables and temporaries" + + + + + + +;"Byte offset to # of entries in LEXV" + + +;"Word offset to start of LEXV entries" + + +;"Number of words per LEXV entry" + + + + +;"Offset to parts of speech byte" + + +;"Offset to first part of speech" + + +;"First part of speech bit mask in PSOFF byte" + + + + + +> + +> + +> + + + + + + + + + + + + + + + + + + + + + + + +> + +" Grovel down the input finding the verb, prepositions, and noun clauses. + If the input is or , fall out immediately + setting PRSA to ,V?WALK and PRSO to . Otherwise, perform + all required orphaning, syntax checking, and noun clause lookup." + +) + LEN (DIR <>) (NW 0) (LW 0) NUM SCNT (CNT -1)) + > ,P-ITBLLEN> ) + (T )>> + > + > + + + + > + + ,VEHBIT>> + >)> + >)> + + + <==? ,PLAYER ,WINNER> + >> + )> + >) + (T + + > + ,VEHBIT>> + >)> + > + )> + + "> + )> + > + )> + + ;> + + + > 0> + > + ) + (> + >> + + > + ) + ( + + ;"Last NOT added 7/3"> + + + )> + + > + + >) + (T )>)> + + >> + + ) + (> + ,ACT?WALK> + + + > + >> + ,W?THEN + ,W?PERIOD + ,W?QUOTE> + >> + + > + + >>> + + + + ,W?THEN>)> + > + > + )>) + (> + > + + + + + 2>>>> + >>) + (> + + + > + >> + + <==? > + ,W?OF> + <0? .VAL> + >>) + (> + + > + ,W?THEN ,W?PERIOD>>> + + + )>) + (<==? ,P-NCN 2> + + ) + (T + > + > + > + + > + )>)>) + () + ( + > + + ) + (T + + )>) + (T + + )> + + >> + + + + )> + > + )> + > + T)>> + + +> + +;"Check whether word pointed at by PTR is the correct part of speech. + The second argument is the part of speech (,PS?). The + 3rd argument (,P1?), if given, causes the value + for that part of speech to be returned." + +> .BIT> + ) + (T + > + > >)> + )>)>> + +;" Scan through a noun clause, leave a pointer to its starting location" + +) (FIRST?? T) NW (LW 0)) + 2>> + > + > .VAL> + .WRD> + >) + (T >)> + > )> + > >> + ,W?THE ,W?A ,W?AN> + 4>>)> + > 0> + >> + )> + > + >> + ) + (T >>)> + ) + ( + + > + >)>) + ( + + + ;"ADDED 4/27 FOR TURTLE,UP" + >> + > + + >> + >) + ( + + + >> + T) + ( + > + >) + ( + > + >> + + 2>>> + ) + (T >)>) + ( 0>>> + + >>) + ( + >> + > + ,W?THEN> + >) + ( T) + (T + + )>) + (T )> + + > + >>> + +)) + > 2>> + > 3>> + > 0> ) + (T + > + + + ) + ( ) + ( > + <- .CHR 48>>>) + (T )> + >)>> + + ) + (.TIM + >) + ( )> + >>)> + + ,W?INTNUM> + + +; + + +;"New ORPHAN-MERGE for TRAP Retrofix 6/21/84" + +) WRD) + > + 0> ,PS?ADJECTIVE> + )> + >>> + + >>> + ) + (<==? ,P-NCN 2> ) + (<==? 1> + > + > + <0? .TEMP>> + > + >) + (T + > + >)>) + (T )>) + (<==? 1> + > + > + <0? .TEMP>> + > + >)> + > + > + ) + (T )>) + (> + > > + > + ) + (T + > + > >)> + > + > + + ) + (T > )>) + ( + + ,PS?ADJECTIVE> + >> + ) + ( ,PS?OBJECT> + <==? .WRD ,W?ONE>> + > + ) + (T )>)> + > + + + + > + )>>)>)> + > ,P-ITBLLEN> + + ) + (T >)>> + T> + +;"New ACLAUSE-WIN for TRAP retrofix 6/21/84" + +> + + .ADJ> + 0>> > + > + > + +;"Print undefined word in input. + PTR points to the unknown word in P-LEXV" + + ) + (ELSE + > + >)>>> + + + + )> + + >> 2> + 3>> + + > + >> + + + + )> + + >> 2> + 3>> + + > + >> + +;" Perform syntax matching operations, using P-ITBL as the source of + the verb and adjectives for this input. Returns false if no + syntax matches, and does it's own orphaning. If return is true, + the syntax is saved in P-SYNTAX." + + + + + + + + + + + + + + + + + + + + + + + +) (DRIVE2 <>) PREP VERB TMP) + >> + + )> + >> + > + > + ,P-SONUMS>> + T) + (> + <0? ,P-NCN> + >> + <==? .PREP >>> + ) + (<==? > + <==? ,P-NCN 1>> + ) + (<==? + > + + )>)> + + ) + (T + + )>) + (T >)>> + + + >>> + + + ) + ( + + >>> + + + ) + ( + + ) + (> + ) + (T + + + > + ) + (<0? > + >) + (T + > + )> + )> + + ) + (T )>> + + )>> + + + > + + + + + ) + (T >)>> + )> + > )> + > + ) + (.D2 + > + )>> + + .THE?>> + +) WRD (FIRST?? T) (PN <>)) + ) + (T + >) + (T )> + > ,W?PERIOD> + ) + (T + .CP> + )> + ) + ( + <==? ,P-IT-LOC ,HERE>> + ) + (T + + >)> + >)>)> + >>> + +> 32>> + 1> <+ 1>>> + +> + + > + )>> + +) "AUX" BEG END) + > + > + ,P-LEXELEN> 2>>> + + ,P-LEXELEN> + 2>>> + ) + (T + >> + )> + >)> + >>> + + + 2>> + .WRD> + + > + + 2>> + ) + (<==? .PREP> + >>)>>> + + + >> + + + + + )> + + + + > + + 1> + > ,ME> + )> + + > + >> + + )> + + ) + (T + )>)> + > + )> + .OBJ)>) + (T )>> + +> 0>> + > + ,P-PRSO> > + > + >>)> + > 0>> + > + ,P-PRSI> > + >> + 1> + >) + (T >)>)>)> + > + +> + + ) + (> ,P-BUTS>) + (T + .OBJ> + >)> + >> + + + + .NTBL> + +> + +> + +> + +> + +> + +> + +> + +> + + + + + + + + + + + +> +> + +> + +) LEN WV WRD NW) + + + + > + + + > + >>) + (T + > + + + + >)>) + ( + > > + + ) + ( + + + + >)>) + (T + + > > + >)>) + ( + >> + + > > + T) + () + () + (<==? .WRD ,W?OF> + + )>) + ( + > + ) + ( + + )>)> + > + > + )>>> + + + + + + + + + + + + + + + +) (OLEN 0) OBJ) + + > + )> + ,P-ADJ > + + >)> + + + > + <0? ,P-GWIMBIT>> + )> + )> + > <0? ,P-SLOCBITS>> + )> + + ) + (T + + + )> + )> + .TLEN>> + ) + ( + >> + > + >> + + > + )> + ) + ( + >>> + + + + .LEN>> + ) + (T + )> + > + + ) + ( + + ,P-NC1) + (T ,P-NC2)>> + + + <>> + ) + (.VRB + )> + > + > + )>) + ( .GCHECK> + + + + + > + > + ) + (T )>)> + > + > + ) + (<0? .LEN> )> + + > + > + >> + + + + + + > + ) + (T + + >)>> + > 0> + )> + > 0> + )> + > 1> + >)> + > + > + .LEN> + +> +> +> + + + + ) + (<==? .TBL ,P-PRSO> + >) + (T >)> + + > + > + + + > )> + ) + ( )> + > 1> + + )>>> + + +> + + > + 2> 1>> + > .TBL> + )> + )>>)> + > + 4> 1>> + + >> + 1>>> + 5>> + > + > + + ) + ( )>>)> + .LEN> + + + + + > + > + )>)>> + +> + ) + (T + + ) + ( + ) + (T )>)>> + + + + + + + +> + > + + > + )> + > + + > + > + + >> + + ,P-SRCALL) + ( + ,P-SRCALL) + (T ,P-SRCTOP)>>>)> + >) (T )>>)>> + +> + .OBJ> + >> + +> + >>> + +) + > + + >> + > 0> ) + (T + >> + )> + > + >> + + + ) + (> + >) + ( + <==? > T>> + >) + (T )> + + > + + + )> + + + + ) + ( + <==? ,WINNER ,ADVENTURER>> + )>)>)>>) + (T)>> + +) TMP) + 1> + ,SMANY>>> + ) + ( 1> + ,SMANY>>> + )> + + )> + + > + ) + ( + >) + (T + >)> + + ) + (T)>> + + )> + > ) + (ELSE >)> + > ) + ( )>>> + +> ) + ( )>>> + +> + +)) + > + )> + + + + > + ) + (T + + + + + + > + > + )>)> + + 0> )>)> + + + .LIT> + +> 0> ,W?IT>> + ) + (T <>>)>> + +> 0> ,W?IT>> + ) + (T <>>)>> + +;"former CRUFTY routine, re-written by SWG" + + ) + (> + <- 2> 1>>>> + ) + (>> + 2> 1>>>>> + ) + (> >> + )> + > \ No newline at end of file diff --git a/load.zil b/load.zil new file mode 100644 index 0000000..34e3062 --- /dev/null +++ b/load.zil @@ -0,0 +1,58 @@ +"SUSPENSION for + SUSPENSION + (c) Copyright 1982 Infocom, Inc. All Rights Reserved. +" + + + + + ) + (T )> + + + + + + + + + + >> + + + >> + +) "AUX" (TIM