From 1c8c4fcccba939d7467d8a0d4954278e5588052a Mon Sep 17 00:00:00 2001 From: historicalsource Date: Sat, 13 Apr 2019 22:21:37 -0400 Subject: [PATCH] Revision 14 (Original Source) --- README.md | 1 + clock.zil | 69 + debug.zil | 188 ++ events.zil | 458 +++++ goal.zil | 905 ++++++++++ m3.zil | 68 + m3.zip | Bin 0 -> 118692 bytes macros.zil | 173 ++ main.zil | 379 ++++ p.zil | 5 + parser.zil | 1408 +++++++++++++++ people.zil | 4888 ++++++++++++++++++++++++++++++++++++++++++++++++++++ places.zil | 2907 +++++++++++++++++++++++++++++++ syntax.zil | 681 ++++++++ things.zil | 871 ++++++++++ verbs.zil | 2697 +++++++++++++++++++++++++++++ 16 files changed, 15698 insertions(+) create mode 100644 README.md create mode 100644 clock.zil create mode 100644 debug.zil create mode 100644 events.zil create mode 100644 goal.zil create mode 100644 m3.zil create mode 100644 m3.zip create mode 100644 macros.zil create mode 100644 main.zil create mode 100644 p.zil create mode 100644 parser.zil create mode 100644 people.zil create mode 100644 places.zil create mode 100644 syntax.zil create mode 100644 things.zil create mode 100644 verbs.zil diff --git a/README.md b/README.md new file mode 100644 index 0000000..0316c9a --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# suspect diff --git a/clock.zil b/clock.zil new file mode 100644 index 0000000..8bcc79b --- /dev/null +++ b/clock.zil @@ -0,0 +1,69 @@ +"CLOCK for M3 +Copyright (C) 1984 Infocom, Inc. All rights reserved." + + + + 150) + (ELSE 300)>>> + + + + + + + + + + + +) + > ,C-TICK .TICK> + .CINT> + +) + > + > + + > + > + + ) + ( .RTN> )> + >>> + +> + +) VAL) + #DECL ((C E) (TICK) FIX ;(FLG) ;) + > )> + > + > 59> + + > 23> + )>)> + > + > + + % )>> + ) + (>> + > + ) + (T + > + > + > + >>>> + + <==? .VAL ,M-FATAL>> + )>)>)>)> + >>> diff --git a/debug.zil b/debug.zil new file mode 100644 index 0000000..0299b50 --- /dev/null +++ b/debug.zil @@ -0,0 +1,188 @@ +> +> +> +> +> +> +> + + + + + + + + + + + + + + + + +> + ) + (T )>> + +> + + + + )> + > + ) + (T )>> + + + + ) + (> + ) + (T )>> + + + + )> + > + 0> + > + ) + (T + > + )>> + + + + )> + > ,CHARACTER-MAX> + ) + (> + > + >> + ) + (> + + >)>>)>>> + + + ) + (,PRSI ) + (,PRSO ) + (T + > + > + + ) + (T )>)> + > ,CHARACTER-MAX> + )>>)>> + + + ) + (>> + > + + >> + + > + >> + )>) + (ELSE )> + + >>> + >)> + > + >>> + )> + > + )> + > + )> + > + + "," + N >)>) + (ELSE )> + ) + (ELSE )>> + + + ) + (T + > + ) + (ELSE )>)>> + + + ) + (ELSE + > + ) + (ELSE )>)>> + + + ) + (T + + )> + )> + )> + )> + )> + )> + )> + )> + )> + )> + )> + ) + ( + )> + + )> + )>> + + + ) + (,GOSSIP >) + (T + + )> + > + + + ) + (T + )>)> + > ,CHARACTER-MAX> + )>>)>> + + + + ) + (> + ) + (T )>> \ No newline at end of file diff --git a/events.zil b/events.zil new file mode 100644 index 0000000..597566f --- /dev/null +++ b/events.zil @@ -0,0 +1,458 @@ +"EVENTS for M3 +Copyright (C) 1984 Infocom, Inc. All rights reserved." + +"SCORE INDICATES HOURS / MOVES = MINUTES" + + + + + ;"9 PM" + +> + +>> + >> + >> + >> + > + + > + > + > + > + + + + > + +> + + + )>> + +> + + + + + + ) + ( + + + )>> + + ,BALLROOM-LINE-C> ) + ( + ,P?LINE> ,BALLROOM-LINE-C>> + )>> + + + +"What happens at end..." + +> + +) "AUX" FLG CORRECT?) + + > + + ) + ( + > + + >> + + + + + + )> + + > + ) + ( + > + )> + + + + + > + )>)> + + ,DETECTIVE-CONVINCED> + )> + )>) + ( + > + + >> + + + )> + + ) + (ELSE + + )>)> + + + ) + ( + + + + + ) + (,DETECTIVE-SEEN-LIST? + + ) + (ELSE + )>) + (T + + )>) + ( + + + > + ) + (ELSE + )>) + ( + + ) + ( + ) + (ELSE + )>) + (,DETECTIVE-SEEN-CARD? + ) + (ELSE + + )>) + ( + + )> + + ) + ( + + ) + ( + + ) + (ELSE + + )>) + (ELSE + + )> + + >> + > + >>> + + + ) + (ELSE + + )> + > + + + > + +)) + + > + +)) + + )> + > + +)) + + )> + + )> + + )> + > + + + + ) + (.HELPER + + > + ) + ( + ) + ( + ) + (T + )>) + (> + ) + (T + )> + > + + + > + ) + (ELSE + )>) + (ELSE + )> + + > + + + + >> ) + ( + ) + (ELSE )>>> + +> + > + >>) + (ELSE + + + + )> + + + + + + + + + + > + )> + + + > + ) + (ELSE + + + )> + )>)>> + +> + + +>> + +)) + .L> + + ,OPENBIT> + ,PERSON>>> + + + + )>> + + + + )> + + ) + (> + % ".]" CR>)>> + + ) + ( + ) + (ELSE + + + ) + (T + )>)>) + (ELSE + + + )> + )>> + + + > diff --git a/goal.zil b/goal.zil new file mode 100644 index 0000000..fb31080 --- /dev/null +++ b/goal.zil @@ -0,0 +1,905 @@ +"GOAL for M3 +Copyright 1984 Infocom, Inc. All rights reserved. +" + +"This code is the local T system." + +> + + .DIR> + > + )> + >> + )> + >>> + +> + +> + +> + +> + +> + +> + +;"corridors are described by the direction they run (west-to-east, +for example) and the rooms one would visit going in that direction" + +> + +> + +> + +> + +> + +> + +> + +> + +> + +;"up to 16 corridors (65536) add them to GET-COR if new ones made" + +"CODE" + + ,GOAL-ENABLE .VAL>> + +) LINE RM GT GOAL FLG TMP + (HERE-FLAG 0) (GOAL-FLAG <>) (IGOAL <>) LOC (CNT 1)) + #DECL ((PER HERE LOC RM) OBJECT (LN CNT) FIX + (HERE-FLAG GOAL-FLAG) ) + > + > + >) + (> )> + > + .HERE>> + >)> + >>> + 0> + > + >)> + ) + (<==? .HERE .GOAL> + >>> + > + ) + (>> + ;> ;"before move-person!" + >> + ) + (T + >)>)> + >> + > .HERE> + ) + (<==? .RM .GOAL> + ) + (<==? > 0> + % " ***">> + + )> + >> + + 0> + + > + + + )> + >>)> + > + >> + .TMP> + + >) + (ELSE + )>) + ( + >)>)> + > + 1>>)> + ) + (T <+ .HERE-FLAG 3>)>>> + > + + + >>> + > .HERE> + + ) + (<==? .RM .THERE> + )> + >> + > + + ,HALL-LINE) + (<==? .LN 1> ,BALLROOM-LINE) + (<==? .LN 2> ,EAST-HALL-LINE) + (<==? .LN 3> ,GARAGE-LINE) + (<==? .LN 4> ,OUTSIDE-LINE) + (ELSE )>> + + ,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)>> + +> + + + + + + + + + + + + + + + + + + + + + >> + +"Goal tables for the characters, offset by a constant, which, +for a given character is the P?CHARACTER property of the object." + + <> <> 1 <> <> 5 0> + <> <> 1 <> G-MICHAEL 5 0> ;"1" +
<> <> 1 <> G-VERONICA 5 0> ;"2" +
<> <> 1 <> G-ALICIA 5 0> ;"3" +
<> <> 1 <> G-RICHARD 5 0> ;"4" +
<> <> 1 <> G-COL-MARSTON 5 0> ;"5" +
<> <> 1 <> G-LINDA 5 0> ;"6" +
<> <> 1 <> G-SEN-ASHER 5 0> ;"7" +
<> <> 1 <> G-COCHRANE 5 0> ;"8" +
<> <> 1 <> G-OSTMANN 5 0> ;"9" +
<> <> 1 <> G-BUTLER 5 0> ;"10" +
<> <> 1 <> G-BARTENDER 5 0> ;"11" +
<> <> 1 <> G-DETECTIVE 5 0> ;"12" +
<> <> 1 <> G-DUFFY 5 0> ;"13">> + + + +"Offsets into GOAL-TABLEs" + + ;"final goal" + ;"station of final goal" + ;"intermediate goal (transfer point)" + ;"character can move; usually false only when he's + interrupted enroute" + ;"secondary goal to go to when current, higher- + priority one has been reached" + ;"routine to apply on arrival" + ;"how long character will wait when interrupted" + ;"used to count down from ATTENTION-SPAN to 0" + +"Goal-function constants, similar to M-xxx in MAIN" + + + + + + +"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 ,HERE> ) + (> + + > + )>) + ( + >> + + > + + )> + > + )>> + )>)> + >>> + +"Goal tables for the characters (including PLAYER), offset +by the preceding constants, which, for a given character, +is the P?CHARACTER property of the object." + +"The ATTENTION-TABLE is now a thing of the past. ATTENTION +in the GOAL-TABLES is used instead." + +"Here's how the movement goals are done: For each player is +a table which consists of triplets, a number of minutes until +the next movement (an clock interrupt number), a number of +minutes allowed variation (for a bit of randomness), and a +room toward which to start. All movement is controlled by +the GOAL-ENABLE flag in the GOAL-TABLE for a character." + +"Time starts at 8AM. Characters are at that point in their +starting positions, as reflected in PEOPLE." + + + ;"MICHAEL" +
+ ;"VERONICA" +
+ ;"ALICIA" +
+ ;"RICHARD" +
+ ;"COL-MARSTON" +
+ ;"LINDA" +
+ ;"SEN-ASHER" +
+ ;"COCHRANE" +
+ ;"OSTMANN" +
+ ;"BUTLER" +
+ ;"BARTENDER" +
+ ;"DETECTIVE" +
+ ;"DUFFY" +
>> + +> + +> + +> + +> + +> + +> + +> + + + >>> + ) + (T )>)>> + +> + > + > + > + > + > + + + + > + >> + +"This routine does the interrupt-driven goal establishment +for the various characters, using the MOVEMENT-GOALS table." + + + + +> + + +> + > + +> + + > + > + + ') + (ELSE '>>)>> + > + +)) + #DECL ((PER) OBJECT (TB) (ID VAR DIS TIM) FIX) + > + > + > + >>> + + ) + (T + )>)> + >>> + > 0> + > + )> + >) + (ELSE 0)>> + >>> + > + >>> + <- .VAR .DIS>>>)>)> + > + +) (CNT 0) GT VAL) + > ,CHARACTER-MAX> + ) + (> ,GOAL-S> + > + >> + > + )>)>)>> + .FLG> + +) (CNT 0) ATT GT) + > ,CHARACTER-MAX> )> + > + > + + > + ) + ( + ,HERE> + % + ,G-IMPATIENT> + + ,G-IMPATIENT>>> + )> + )>> + .FLG> + +) "AUX" GT ATT) + #DECL ((PER) OBJECT (ATT) FIX) + > + + ) + (ELSE >)> + + + + ) + ( + >)>)> + + + > + +"Movement etc." + +> + + + > + >)>> + +) + "AUX" H HL GL GT) + #DECL ((PER GOAL H) OBJECT (HL GL) FIX) + ,HERE) + (ELSE )>> + %> + + ) + ( + + )> + )>> + > + + + >> + %> + )>> + )>)> + + ') + (ELSE + ' >)> + ,LINES> + >>> + > + + > + +) "AUX" GT) + #DECL ((PER) OBJECT) + > + + > + %)>> + % + + > + + >>)>> + +) DR (VAL <>) PB?) + #DECL ((PER WHERE) OBJECT) + > + > + > + % + )>> + >> ,DEXIT> + > + > + + > + T) + (T + + )>) + (T >)>) + (T >)> + > + T) + ( + >> + >> + + + > + ) + (T + + )> + + + )> + > + )>)>) + (<==? .OL ,HERE> + + + + ) + (<==? .DIR ,P?IN> + )> + ) + (T + )> + + + )>) + (<==? .WHERE ,HERE> + >> + + + )> + + <==? .DIR ,P-WALK-DIR> + ,LAST-PLAYER-LOC>>> + ) + (T )> + )>) + (> + > + 0>>> + + > + + > + + )> + + > + ) + (<0? >> + + > + + >> + ) + (T + + >> + + >> + ) + (ELSE + + )> + )>) + (> + 0>>> + + + >> + + + > + ) + (ELSE + + >)> + )>)> + + + + )> + %)>> + .WHERE> + >> + >> + + > + > + + + )> + + + ) + (.PB? + >) + (T + + >)> + )>)>) + (T + + ,G-ENROUTE> + + ,G-ENROUTE>> + )>)> + + %)>> + .FLG) + (T .VAL)>> + +>> + ) + ( T) + (> + > + > + + <==? .THERE>> + )>)>>> + +> + 0>)>> + +) + "AUX" OW WT NC (CNT 0) CHR L (PER? <>)) + >> )> + > + > + > + > + >)> + ) + (<==? .CNT .NC>) + (> + .L> + .FLG>> + + > + + >> + ) + (> + + >> + ) + ( + + ) + ( + > + )>)>)> + + .NC ,PRESENT-TIME>)> + >>> + + ;"PLAYER" +
;"MICHAEL" +
;"VERONICA" +
;"ALICIA" +
;"RICHARD" +
;"COL. M." +
;"LINDA" +
;"SEN. A." +
;"COCHRANE" +
;"OSTMANN" +
;"BUTLER" +
;"BARTENDER" +
;"DETECTIVE" +
;"DUFFY">> + +;"END" \ No newline at end of file diff --git a/m3.zil b/m3.zil new file mode 100644 index 0000000..4e36564 --- /dev/null +++ b/m3.zil @@ -0,0 +1,68 @@ +"COMPILE/LOAD FILE for M3 +Copyright (C) 1984 Infocom, Inc. All rights reserved." + + + > + + + >) + ( + + >>) + (ELSE + )>> + +> + + + + ) + (T )> + + + + + + + +; + + + >> + +) "AUX" (TIM