aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhistoricalsource <historicalsoftware@textfiles.com>2019-04-13 22:12:44 -0400
committerhistoricalsource <historicalsoftware@textfiles.com>2019-04-13 22:12:44 -0400
commit8ae301e53b8380121347962703a51724a537a2e7 (patch)
treec526610284c364cd472614376976cd3339cec72f
downloadcheckpoint-8ae301e53b8380121347962703a51724a537a2e7.tar.gz
checkpoint-8ae301e53b8380121347962703a51724a537a2e7.tar.bz2
checkpoint-8ae301e53b8380121347962703a51724a537a2e7.zip
Final Revision
-rw-r--r--README.md1
-rw-r--r--cars.zap252
-rw-r--r--cars.zil746
-rw-r--r--chase.blank44
-rw-r--r--checkpoint.zil56
-rw-r--r--clock.cmp82
-rw-r--r--clock.zap65
-rw-r--r--clock.zil107
-rw-r--r--frotzerland.mss90
-rw-r--r--global.cmp822
-rw-r--r--global.zap657
-rw-r--r--global.zil980
-rw-r--r--goal.cmp2643
-rw-r--r--goal.zap2130
-rw-r--r--goal.zil1916
-rw-r--r--i1.zil56
-rw-r--r--macros.cmp368
-rw-r--r--macros.zap270
-rw-r--r--macros.zil347
-rw-r--r--main.cmp406
-rw-r--r--main.zap474
-rw-r--r--main.zil512
-rw-r--r--p.cmp248
-rw-r--r--parser.cmp910
-rw-r--r--parser.true2148
-rw-r--r--parser.zap2530
-rw-r--r--parser.zil2443
-rw-r--r--people.cmp1332
-rw-r--r--people.zap1537
-rw-r--r--people.zil1863
-rw-r--r--places.cmp183
-rw-r--r--places.zap165
-rw-r--r--places.zil159
-rw-r--r--script.gary14173
-rw-r--r--script.jw544
-rw-r--r--script.liz1558
-rw-r--r--script.md812
-rw-r--r--script.scf9408
-rw-r--r--script.swg802
-rw-r--r--spies.cmp1138
-rw-r--r--spies.txt146
-rw-r--r--spies.zap1685
-rw-r--r--spies.zil1331
-rw-r--r--spoiler.mss67
-rw-r--r--spoiler.rno43
-rw-r--r--spy.chart4
-rw-r--r--spy.errors27
-rw-r--r--spy.mem393
-rw-r--r--spy.mss334
-rw-r--r--spy.record1527
-rw-r--r--spy.rno221
-rw-r--r--spy.script1020
-rw-r--r--spy.serial1
-rw-r--r--spy.txt92
-rw-r--r--spy.xzap21
-rw-r--r--spy.zap53
-rw-r--r--spy.zbin51
-rw-r--r--spy.zebra15
-rw-r--r--spy.zil61
-rw-r--r--spy.zipbin0 -> 229948 bytes
-rw-r--r--spydat.zap17961
-rw-r--r--spyfreq.xzap200
-rw-r--r--spystr.zap368
-rw-r--r--station.cmp352
-rw-r--r--station.zap407
-rw-r--r--station.zil614
-rw-r--r--syntax.zap2
-rw-r--r--syntax.zil848
-rw-r--r--things.cmp1391
-rw-r--r--things.zap949
-rw-r--r--things.zil1239
-rw-r--r--train.cmp2271
-rw-r--r--train.zap2263
-rw-r--r--train.zil3115
-rw-r--r--verbs.cmp5412
-rw-r--r--verbs.zap4501
-rw-r--r--verbs.zil3445
-rw-r--r--zapch.ctl14
78 files changed, 107421 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..a907ed6
--- /dev/null
+++ b/README.md
@@ -0,0 +1 @@
+# checkpoint
diff --git a/cars.zap b/cars.zap
new file mode 100644
index 0000000..41f2ae8
--- /dev/null
+++ b/cars.zap
@@ -0,0 +1,252 @@
+
+
+ .FUNCT DINER-F
+ EQUAL? PRSA,V?WALK-TO \FALSE
+ EQUAL? CAR-HERE,DINER-CAR \?ELS10
+ CALL1 HAR-HAR
+ RSTACK
+?ELS10: ZERO? DINER-TOUCHED /FALSE
+ SET 'CLOCK-WAIT,TRUE-VALUE
+ PRINTR "(You'll have to get there on your own.)"
+
+
+ .FUNCT GENERIC-BOOTH-F,X
+ EQUAL? HERE,HALL-1-DINER,BOOTH-1 \?ELS5
+ RETURN BOOTH-1
+?ELS5: EQUAL? HERE,HALL-2-DINER,BOOTH-2 \?ELS7
+ RETURN BOOTH-2
+?ELS7: EQUAL? HERE,HALL-3-DINER,BOOTH-3 \?ELS9
+ RETURN BOOTH-3
+?ELS9: CALL1 REMOTE-VERB?
+ ZERO? STACK \FALSE
+ SET 'CLOCK-WAIT,TRUE-VALUE
+ PRINTI "(You can't see any booth here.)"
+ CRLF
+ RETURN NOT-HERE-OBJECT
+
+
+ .FUNCT PANTRY-F,RARG=0
+ EQUAL? RARG,M-LOOK \?ELS5
+ CALL2 ROOM-IS-CROWDED,PANTRY
+ RSTACK
+?ELS5: EQUAL? RARG,M-END \FALSE
+ IN? WAITER,PANTRY \FALSE
+ CALL2 INVASION?,WAITER
+ RFALSE
+
+
+ .FUNCT INVASION?,PER
+ GETP PER,P?SOUTH
+ LESS? 0,STACK /FALSE
+ EQUAL? PRSA,V?SMILE /FALSE
+ EQUAL? PRSA,V?KISS,V?GIVE,V?$CALL /FALSE
+ EQUAL? INVASION-TIME,PRESENT-TIME /FALSE
+ ZERO? CLOCK-WAIT \FALSE
+ SET 'INVASION-TIME,PRESENT-TIME
+ CALL HE-SHE-IT,PER,TRUE-VALUE,STR?154
+ PRINTI " a pushing motion with one hand and points forward with the other. "
+ CALL HE-SHE-IT,PER,TRUE-VALUE,STR?194
+ PRINTI " angry that you're invading"
+ CALL HIM-HER-IT,PER,FALSE-VALUE,TRUE-VALUE
+ PRINTR " space."
+
+
+ .FUNCT GALLEY-F,RARG=0
+ EQUAL? RARG,M-LOOK \?ELS5
+ CALL2 ROOM-IS-CROWDED,GALLEY
+ RSTACK
+?ELS5: EQUAL? RARG,M-END \FALSE
+ IN? COOK,GALLEY \FALSE
+ CALL2 INVASION?,COOK
+ RFALSE
+
+
+ .FUNCT COUNTER-GALLEY-F
+ EQUAL? PRSA,V?LOOK-ON,V?EXAMINE \FALSE
+ PRINTR "The counter is crowded with kitchen hardware and software."
+
+
+ .FUNCT ROOM-IS-CROWDED,RM
+ CALL2 START-SENTENCE,RM
+ PRINTI " is crowded with supplies and equipment. The locked cabinets are probably filled with "
+ EQUAL? RM,PANTRY \?ELS5
+ PRINTI "dishes, tableware, and napkins"
+ JUMP ?CND3
+?ELS5: EQUAL? RM,GALLEY \?CND3
+ PRINTI "food, kettles, and kitchen tools. There's a crowded counter for preparing food"
+?CND3: PRINTR ". If you want to find something, you'll have to search for it."
+
+
+ .FUNCT BOOTH-F,RARG=0,?TMP1
+ EQUAL? RARG,M-ENTER \?ELS5
+ ZERO? DEBUG /?CND6
+ PRINTI "[booth entry routine]"
+ CRLF
+?CND6: IN? WAITER,HERE \?ELS16
+ PUTP WAITER,P?LDESC,25
+ RFALSE
+?ELS16: EQUAL? SCENERY-OBJ,STATION-GRNZ /FALSE
+ CALL ESTABLISH-GOAL,WAITER,HERE
+ RFALSE
+?ELS5: EQUAL? RARG,M-END \?ELS22
+ CALL1 EXIT-VERB?
+ ZERO? STACK /FALSE
+ CALL2 META-LOC,FOOD
+ EQUAL? HERE,STACK /?THN30
+ CALL2 META-LOC,CUP-A >?TMP1
+ CALL2 META-LOC,CUP-B
+ EQUAL? HERE,?TMP1,STACK \FALSE
+?THN30: CALL ESTABLISH-GOAL,WAITER,HERE
+ RFALSE
+?ELS22: EQUAL? RARG,M-LOOK \?ELS33
+ FSET BOOTH-1,TOUCHBIT
+ FSET BOOTH-2,TOUCHBIT
+ FSET BOOTH-3,TOUCHBIT
+ CALL1 BOOTH-DESC
+ CALL1 MOTION-PREFIX
+ RTRUE
+?ELS33: EQUAL? RARG,M-BEG \FALSE
+ CALL1 PERSON-TAKES-GUN?
+ RSTACK
+
+
+ .FUNCT BOOTH-DESC
+ PRINTI "This is a diner booth on the "
+ PRINT TRAIN-NAME
+ PRINTR ". In fact, it looks as if the railway company just converted a first-class coach into a diner by removing the door and adding a table to each compartment."
+
+
+ .FUNCT FROY-F
+ EQUAL? PRSA,V?READ,V?EXAMINE,V?ANALYZE \FALSE
+ FSET? FROY,TOUCHBIT /?ELS10
+ FSET FROY,TOUCHBIT
+ FSET FROY,NDESCBIT
+ PRINTR "It's hard to read in this light, but the writing seems to say ""FROY."""
+?ELS10: PRINTR "Hmmm... The writing seems to have vanished."
+
+
+ .FUNCT REST-ROOM-REAR-DINER-DOOR-F
+ CALL REST-ROOM-DOOR-F,REST-ROOM-REAR-DINER-DOOR,REST-ROOM-REAR-DINER
+ RSTACK
+
+
+ .FUNCT REST-ROOM-FWD-DINER-DOOR-F
+ CALL REST-ROOM-DOOR-F,REST-ROOM-FWD-DINER-DOOR,REST-ROOM-FWD-DINER
+ RSTACK
+
+
+ .FUNCT MACHINE-F,P
+ EQUAL? PRSO,MACHINE \?ELS5
+ EQUAL? PRSA,V?CLOSE,V?OPEN \?ELS5
+ CALL1 YOU-CANT
+ RSTACK
+?ELS5: EQUAL? PRSA,V?LOOK-THROUGH /?THN10
+ EQUAL? PRSA,V?LOOK-INSIDE,V?EXAMINE,V?ANALYZE \?ELS9
+?THN10: PRINTR "The plastic panel is so scratched and grimy that you can barely see the display of cigarette packs inside."
+?ELS9: EQUAL? PRSA,V?MUNG \?ELS15
+ PRINTR "It seems that someone else beat you to it."
+?ELS15: EQUAL? PRSA,V?SHAKE,V?SLAP,V?ATTACK \?ELS19
+ FSET? MACHINE,MUNGBIT /?ELS19
+ FSET? CIGARETTE,TOUCHBIT /?ELS19
+ LOC CIGARETTE >P
+ FSET? P,PERSONBIT \?CND22
+ GETP P,P?LDESC
+ EQUAL? 5,STACK \?CND22
+ FCLEAR P,TOUCHBIT
+ PUTP P,P?LDESC,4
+?CND22: FSET CIGARETTE,TOUCHBIT
+ FSET CIGARETTE,TAKEBIT
+ MOVE CIGARETTE,HERE
+ CALL2 THIS-IS-IT,CIGARETTE
+ PRINTR "The machine shudders and disgorges a single cigarette onto the floor."
+?ELS19: EQUAL? PRSA,V?PUT-IN /?THN31
+ EQUAL? PRSA,V?SHAKE,V?SLAP,V?ATTACK \FALSE
+?THN31: EQUAL? PRSA,V?PUT-IN \?CND33
+ ZERO? P-DOLLAR-FLAG /?ELS38
+ EQUAL? PRSO,GLOBAL-MONEY,INTNUM \?ELS38
+ GETP PLAYER,P?SOUTH
+ LESS? STACK,P-AMOUNT /?ELS38
+ EQUAL? VARIATION,2,4 \?CND41
+ FSET MACHINE,MUNGBIT
+?CND41: GETP PLAYER,P?SOUTH
+ SUB STACK,P-AMOUNT
+ PUTP PLAYER,P?SOUTH,STACK
+ JUMP ?CND33
+?ELS38: CALL1 YOU-CANT
+ RTRUE
+?CND33: RANDOM 100
+ LESS? 50,STACK /?ELS48
+ PRINTI """Whirr, buzz"
+ JUMP ?CND46
+?ELS48: PRINTI """Whizz, burr"
+?CND46: PRINTR ", click!"" Nothing else happens."
+
+
+ .FUNCT PICK-ONE-BOOTH,X
+ RANDOM 3 >X
+ EQUAL? X,1 \?ELS5
+ RETURN BOOTH-1
+?ELS5: EQUAL? X,2 \?ELS7
+ RETURN BOOTH-2
+?ELS7: EQUAL? X,3 \FALSE
+ RETURN BOOTH-3
+
+
+ .FUNCT SUITE-1-DOOR-F
+ CALL2 COMPARTMENT-DOOR-F,SUITE-1-DOOR
+ RSTACK
+
+
+ .FUNCT SUITE-2-DOOR-F
+ CALL2 COMPARTMENT-DOOR-F,SUITE-2-DOOR
+ RSTACK
+
+
+ .FUNCT SUITE-3-DOOR-F
+ CALL2 COMPARTMENT-DOOR-F,SUITE-3-DOOR
+ RSTACK
+
+
+ .FUNCT SUITE-F,RARG=0,N
+ ZERO? RARG /FALSE
+ CALL1 V-FOO
+ RTRUE
+
+
+ .FUNCT HALL-FANCY-F,RARG=0,X,TOUCHED=0,VAL=0
+ FSET? HALL-1-FANCY,TOUCHBIT /?THN4
+ FSET? HALL-1-FANCY,TOUCHBIT /?THN4
+ FSET? HALL-1-FANCY,TOUCHBIT \?CND1
+?THN4: SET 'TOUCHED,TRUE-VALUE
+?CND1: EQUAL? RARG,M-LOOK /?THN11
+ ZERO? RARG \?ELS10
+ EQUAL? PRSA,V?LOOK \?ELS10
+?THN11: FSET HERE,TOUCHBIT
+ PRINTI "This is the "
+ PRINTD HERE
+ PRINTI " of the corridor."
+ EQUAL? PRSA,V?LOOK /?THN20
+ ZERO? TOUCHED \?CND17
+?THN20: PRINTI " The floor and walls are covered with grey carpet, worn thin in spots but intact. A long series of windows, framed by polished wood, runs along the corridor on the right-hand side of the train."
+?CND17: EQUAL? PLAYER-NOT-FACING,P?WEST \?ELS26
+ CRLF
+ RTRUE
+?ELS26: GETPT HERE,P?IN
+ GET STACK,REXIT >X
+ CALL2 THIS-IS-IT,X
+ PRINTI " On the left side of the train, behind a locked door, lies the "
+ PRINTD X
+ PRINTR "."
+?ELS10: EQUAL? RARG,M-ENTER \FALSE
+ CALL2 NOISY?,LAST-PLAYER-LOC
+ ZERO? STACK /?CND33
+ SET 'VAL,TRUE-VALUE
+ PRINTI "The relative quiet here is welcome. "
+?CND33: ZERO? TOUCHED \?CND41
+ SET 'VAL,TRUE-VALUE
+ PRINTI "The feel of luxury here is unmistakable."
+?CND41: ZERO? VAL /FALSE
+ CRLF
+ RFALSE
+
+ .ENDI
diff --git a/cars.zil b/cars.zil
new file mode 100644
index 0000000..870919d
--- /dev/null
+++ b/cars.zil
@@ -0,0 +1,746 @@
+"CARS for CHECKPOINT
+Copyright (C) 1985 Infocom, Inc. All rights reserved."
+
+<OBJECT DINER
+ (LOC GLOBAL-OBJECTS)
+ (DESC "dining car")
+ (ADJECTIVE DINER DINING CLUB)
+ (SYNONYM DINER CAR CARRIAGE)
+ (ACTION DINER-F)>
+
+<ROUTINE DINER-F ()
+ <COND (<VERB? WALK-TO>
+ <COND (<==? ,CAR-HERE ,DINER-CAR>
+ <HAR-HAR>)
+ (,DINER-TOUCHED
+ <SETG CLOCK-WAIT T>
+ <TELL "(You'll have to get there on your own.)" CR>)>)>>
+
+<ROOM REST-ROOM-FWD-DINER
+ (LOC ROOMS)
+ ;(OTHER OTHER-REST-ROOM-FWD)
+ (FLAGS ;RLANDBIT ONBIT)
+ (DESC "forward restroom")
+ (ADJECTIVE NORTH N FORWARD FRONT F FORE REST)
+ (SYNONYM RESTROOM BATHROOM LAVATORY TOILET ROOM)
+ (GENERIC GENERIC-REST-ROOM-F)
+ (LINE 3)
+ (STATION VESTIBULE-FWD-DINER)
+ ;(NORTH TO VESTIBULE-FWD-DINER IF REST-ROOM-FWD-DINER-DOOR IS OPEN)
+ (WEST TO VESTIBULE-FWD-DINER IF REST-ROOM-FWD-DINER-DOOR IS OPEN)
+ (OUT TO VESTIBULE-FWD-DINER IF REST-ROOM-FWD-DINER-DOOR IS OPEN)
+ (GLOBAL REST-ROOM-FWD-DINER-DOOR ;STOP-CORD MIRROR TOILET
+ SINK TOWEL-FIXTURE TOWEL-LOOP FIXTURES)
+ (ACTION REST-ROOM-F)>
+
+<ROOM BOOTH-1
+ (LOC ROOMS)
+ (FLAGS ;RLANDBIT ONBIT)
+ (DESC "first booth")
+ (ADJECTIVE FIRST)
+ (SYNONYM BOOTH ROOM)
+ (LINE 3)
+ (CORRIDOR *2000*)
+ (STATION HALL-1-DINER)
+ (EAST TO HALL-1-DINER)
+ (OUT TO HALL-1-DINER)
+ (GLOBAL WINDOW-1 SCENERY-LEFT ;STOP-CORD MENU ITEMS ;CHAIR)
+ (GENERIC GENERIC-BOOTH-F)
+ (ACTION BOOTH-F)>
+
+<OBJECT TABLE-1
+ (LOC BOOTH-1)
+ (ADJECTIVE DINING)
+ (SYNONYM TABLE)
+ (FLAGS SEARCHBIT SURFACEBIT OPENBIT NDESCBIT ;VEHBIT)
+ (CAPACITY 100)
+ (DESC "dining table")>
+
+<ROOM BOOTH-2
+ (LOC ROOMS)
+ (FLAGS ;RLANDBIT ONBIT)
+ (DESC "second booth")
+ (ADJECTIVE SECOND)
+ (SYNONYM BOOTH ROOM)
+ (STATION HALL-2-DINER)
+ (LINE 3)
+ (CORRIDOR *4000*)
+ (EAST TO HALL-2-DINER)
+ (OUT TO HALL-2-DINER)
+ (GLOBAL WINDOW-2 SCENERY-LEFT ;STOP-CORD MENU ITEMS ;CHAIR)
+ (GENERIC GENERIC-BOOTH-F)
+ (ACTION BOOTH-F)>
+
+<OBJECT TABLE-2
+ (LOC BOOTH-2)
+ (ADJECTIVE DINING)
+ (SYNONYM TABLE)
+ (FLAGS SEARCHBIT SURFACEBIT OPENBIT NDESCBIT ;VEHBIT)
+ (CAPACITY 100)
+ (DESC "dining table")>
+
+<ROOM BOOTH-3
+ (LOC ROOMS)
+ (FLAGS ;RLANDBIT ONBIT)
+ (DESC "third booth")
+ (ADJECTIVE THIRD LAST)
+ (SYNONYM BOOTH ROOM)
+ (STATION HALL-3-DINER)
+ (LINE 3)
+ (CORRIDOR *10000*)
+ (EAST TO HALL-3-DINER)
+ (OUT TO HALL-3-DINER)
+ (GLOBAL WINDOW-3 SCENERY-LEFT ;STOP-CORD MENU ITEMS ;CHAIR)
+ (GENERIC GENERIC-BOOTH-F)
+ (ACTION BOOTH-F)>
+
+<OBJECT TABLE-3
+ (LOC BOOTH-3)
+ (ADJECTIVE DINING)
+ (SYNONYM TABLE)
+ (FLAGS SEARCHBIT SURFACEBIT OPENBIT NDESCBIT ;VEHBIT)
+ (CAPACITY 100)
+ (DESC "dining table")>
+
+<ROUTINE GENERIC-BOOTH-F (X)
+ <COND (<EQUAL? ,HERE ,HALL-1-DINER ,BOOTH-1> ,BOOTH-1)
+ (<EQUAL? ,HERE ,HALL-2-DINER ,BOOTH-2> ,BOOTH-2)
+ (<EQUAL? ,HERE ,HALL-3-DINER ,BOOTH-3> ,BOOTH-3)
+ (<REMOTE-VERB?> <RFALSE>)
+ (T
+ <SETG CLOCK-WAIT T>
+ <TELL "(You can't see any booth here.)" CR>
+ ,NOT-HERE-OBJECT)>>
+
+<OBJECT EQUIPMENT
+ (LOC LOCAL-GLOBALS)
+ (DESC "equipment")
+ (SYNONYM EQUIPMENT SUPPLIES)
+ (ACTION RANDOM-PSEUDO)>
+
+<ROOM PANTRY
+ (LOC ROOMS)
+ (FLAGS ;RLANDBIT ONBIT)
+ (DESC "pantry")
+ (ADJECTIVE FOURTH)
+ (SYNONYM PANTRY ROOM)
+ (STATION HALL-4-DINER)
+ (LINE 3)
+ (CORRIDOR *20000*)
+ (EAST TO HALL-4-DINER)
+ (OUT TO HALL-4-DINER)
+ (GLOBAL WINDOW-4 SCENERY-LEFT ;STOP-CORD EQUIPMENT)
+ (ACTION PANTRY-F)>
+
+<ROUTINE PANTRY-F ("OPTIONAL" (RARG <>))
+ <COND (<==? .RARG ,M-LOOK>
+ <ROOM-IS-CROWDED ,PANTRY>)
+ (<==? .RARG ,M-END>
+ <COND (<IN? ,WAITER ,PANTRY>
+ <INVASION? ,WAITER>
+ <RFALSE>)>)>>
+
+<GLOBAL INVASION-TIME 0>
+<ROUTINE INVASION? (PER)
+ <COND (<L? 0 <GETP .PER ,P?SOUTH>> <RFALSE>) ;"(partly) bribed"
+ (<VERB? $CALL GIVE KISS SMILE> <RFALSE>)
+ (<==? ,INVASION-TIME ,PRESENT-TIME> <RFALSE>)
+ (<AND ;,P-WON <NOT ,CLOCK-WAIT>>
+ <SETG INVASION-TIME ,PRESENT-TIME>
+ <TELL
+CHE .PER make " a pushing motion with one hand and points forward with
+the other. " CHE .PER seem " angry that you're invading" HIS .PER
+" space." CR>)>>
+
+<ROOM GALLEY
+ (LOC ROOMS)
+ (FLAGS ;RLANDBIT ONBIT)
+ (DESC "galley")
+ (ADJECTIVE FIFTH)
+ (SYNONYM GALLEY KITCHEN ROOM)
+ (STATION HALL-5-DINER)
+ (LINE 3)
+ (CORRIDOR *40000*)
+ (EAST TO HALL-5-DINER)
+ (OUT TO HALL-5-DINER)
+ (GLOBAL WINDOW-5 SCENERY-LEFT ;STOP-CORD EQUIPMENT)
+ (ACTION GALLEY-F)>
+
+<ROUTINE GALLEY-F ("OPTIONAL" (RARG <>))
+ <COND (<==? .RARG ,M-LOOK>
+ <ROOM-IS-CROWDED ,GALLEY>)
+ (<==? .RARG ,M-END>
+ <COND (<IN? ,COOK ,GALLEY>
+ <INVASION? ,COOK>
+ <RFALSE>)>)>>
+
+<OBJECT COUNTER-GALLEY
+ (LOC GALLEY)
+ (DESC "counter")
+ (ADJECTIVE CROWDED)
+ (SYNONYM COUNTER)
+ (FLAGS SEARCHBIT SURFACEBIT OPENBIT NDESCBIT ;VEHBIT)
+ (CAPACITY 200)
+ (ACTION COUNTER-GALLEY-F)>
+
+<ROUTINE COUNTER-GALLEY-F ()
+ <COND (<VERB? EXAMINE LOOK-ON>
+ <TELL
+"The counter is crowded with kitchen hardware and software." CR>)>>
+
+<ROUTINE ROOM-IS-CROWDED (RM)
+ <TELL
+CTHE .RM " is crowded with supplies and equipment. The locked cabinets
+are probably filled with ">
+ <COND (<==? .RM ,PANTRY>
+ <TELL "dishes, tableware, and napkins">)
+ (<==? .RM ,GALLEY>
+ <TELL
+"food, kettles, and kitchen tools. There's a crowded counter for preparing
+food">)>
+ <TELL
+". If you want to find something, you'll have to search for it." CR>>
+
+<ROUTINE BOOTH-F ("OPTIONAL" (RARG <>))
+ <COND (<EQUAL? .RARG ,M-ENTER>
+ <COND (,DEBUG <TELL "[booth entry routine]" CR>)>
+ <COND (<IN? ,WAITER ,HERE>
+ <PUTP ,WAITER ,P?LDESC 25 ;"waiting for your order">
+ <RFALSE>)
+ (<NOT <EQUAL? ,SCENERY-OBJ ,STATION-GRNZ>>
+ <ESTABLISH-GOAL ,WAITER ,HERE>
+ <RFALSE>)
+ (T <RFALSE>)>)
+ (<EQUAL? .RARG ,M-END>
+ <COND (<AND <EXIT-VERB?>
+ <OR <EQUAL? ,HERE <META-LOC ,FOOD>>
+ <EQUAL? ,HERE <META-LOC ,CUP-A> <META-LOC ,CUP-B>>>>
+ <ESTABLISH-GOAL ,WAITER ,HERE>
+ <RFALSE>)>)
+ (<EQUAL? .RARG ,M-LOOK>
+ <FSET ,BOOTH-1 ,TOUCHBIT>
+ <FSET ,BOOTH-2 ,TOUCHBIT>
+ <FSET ,BOOTH-3 ,TOUCHBIT>
+ <BOOTH-DESC>
+ <MOTION-PREFIX>
+ <RTRUE>)
+ (<EQUAL? .RARG ,M-BEG>
+ <PERSON-TAKES-GUN?>)>>
+
+<ROUTINE BOOTH-DESC ()
+ <TELL
+"This is a diner booth on the " ,TRAIN-NAME ". In fact, it looks as if
+the railway company just converted a first-class coach into a diner by
+removing the door and adding a table to each compartment." CR>>
+
+"Allusion to Hitchcock's THE LADY VANISHES --"
+
+<OBJECT FROY
+ (DESC "window writing")
+ (ADJECTIVE WINDOW)
+ (SYNONYM WRITING SOMETHING MESSAGE)
+ (LDESC "There seems to be something written on the window.")
+ (FLAGS READBIT)
+ (ACTION FROY-F)>
+
+<ROUTINE FROY-F ()
+ <COND (<VERB? ANALYZE EXAMINE READ>
+ <COND (<NOT <FSET? ,FROY ,TOUCHBIT>>
+ <FSET ,FROY ,TOUCHBIT>
+ <FSET ,FROY ,NDESCBIT>
+ <TELL
+"It's hard to read in this light, but the writing seems to say \"FROY.\"" CR>)
+ (T
+ <TELL "Hmmm... The writing seems to have vanished." CR>)>)>>
+
+<ROOM REST-ROOM-REAR-DINER
+ (LOC ROOMS)
+ ;(OTHER OTHER-REST-ROOM-REAR)
+ (FLAGS ;RLANDBIT ONBIT)
+ (DESC "rear restroom")
+ (ADJECTIVE SOUTH S REAR R AFT REST)
+ (SYNONYM RESTROOM BATHROOM LAVATORY TOILET ROOM)
+ (GENERIC GENERIC-REST-ROOM-F)
+ (LINE 3)
+ (STATION VESTIBULE-REAR-DINER)
+ ;(SOUTH TO VESTIBULE-REAR-DINER IF REST-ROOM-REAR-DINER-DOOR IS OPEN)
+ (WEST TO VESTIBULE-REAR-DINER IF REST-ROOM-REAR-DINER-DOOR IS OPEN)
+ (OUT TO VESTIBULE-REAR-DINER IF REST-ROOM-REAR-DINER-DOOR IS OPEN)
+ (GLOBAL REST-ROOM-REAR-DINER-DOOR ;STOP-CORD MIRROR TOILET
+ SINK TOWEL-FIXTURE TOWEL-LOOP FIXTURES)
+ (ACTION REST-ROOM-F)>
+
+<OBJECT REST-ROOM-REAR-DINER-DOOR
+ (LOC LOCAL-GLOBALS)
+ (DESC "restroom door")
+ (ADJECTIVE RESTROOM BATHROOM LAVATORY TOILET ROOM SMALL)
+ (SYNONYM DOOR)
+ (FLAGS DOORBIT)
+ (ACTION REST-ROOM-REAR-DINER-DOOR-F)>
+
+<ROUTINE REST-ROOM-REAR-DINER-DOOR-F ()
+ <REST-ROOM-DOOR-F ,REST-ROOM-REAR-DINER-DOOR ,REST-ROOM-REAR-DINER>>
+
+<ROOM VESTIBULE-FWD-DINER
+ (LOC ROOMS)
+ ;(OTHER OTHER-VESTIBULE-FWD)
+ (FLAGS ;RLANDBIT ONBIT)
+ (DESC "forward vestibule")
+ (ADJECTIVE NORTH N FORWARD FRONT F FORE)
+ (SYNONYM VESTIBULE V)
+ (GENERIC GENERIC-VESTIBULE-F)
+ (NORTH PER NEXT-CAR-TO-FWD-F)
+ (SOUTH TO HALL-1-DINER IF VESTIBULE-FWD-DOOR ;-DINER IS OPEN)
+ (EAST TO REST-ROOM-FWD-DINER IF REST-ROOM-FWD-DOOR IS OPEN)
+ (IN TO REST-ROOM-FWD-DINER IF REST-ROOM-FWD-DOOR IS OPEN)
+ (LINE 3)
+ (STATION VESTIBULE-FWD-DINER)
+ (GLOBAL REST-ROOM-FWD-DOOR VESTIBULE-FWD-DOOR ;-DINER
+ VESTIBULE-FWD-WINDOW ;STOP-CORD)
+ (CORRIDOR -1)
+ (ACTION VESTIBULE-FWD-F)>
+
+<OBJECT REST-ROOM-FWD-DINER-DOOR
+ (LOC LOCAL-GLOBALS)
+ (DESC "restroom door")
+ (ADJECTIVE RESTROOM BATHROOM LAVATORY TOILET ROOM SMALL)
+ (SYNONYM DOOR)
+ (FLAGS DOORBIT)
+ (ACTION REST-ROOM-FWD-DINER-DOOR-F)>
+
+<ROUTINE REST-ROOM-FWD-DINER-DOOR-F ()
+ <REST-ROOM-DOOR-F ,REST-ROOM-FWD-DINER-DOOR ,REST-ROOM-FWD-DINER>>
+
+<ROOM HALL-1-DINER
+ (LOC ROOMS)
+ (DESC "forward end")
+ (ADJECTIVE NORTH N FORWARD FRONT F FORE)
+ (SYNONYM END)
+ (GENERIC GENERIC-HALL-1-F)
+ (STATION HALL-1-DINER)
+ (LINE 3)
+ (FLAGS ;RLANDBIT ONBIT)
+ (WEST TO BOOTH-1)
+ (IN TO BOOTH-1)
+ (GLOBAL HALL-WINDOW SCENERY-RIGHT VESTIBULE-FWD-DOOR ;-DINER)
+ (NORTH TO VESTIBULE-FWD-DINER IF VESTIBULE-FWD-DOOR ;-DINER IS OPEN)
+ (SOUTH TO HALL-2-DINER)
+ (CORRIDOR *2002*)
+ (ACTION HALL-F)>
+
+<ROOM HALL-2-DINER
+ (LOC ROOMS)
+ (DESC "forward middle")
+ (ADJECTIVE NORTH N FORWARD FRONT F FORE)
+ (SYNONYM MIDDLE)
+ (GENERIC GENERIC-MIDDLE-F)
+ (STATION HALL-2-DINER)
+ (LINE 3)
+ (FLAGS ;RLANDBIT ONBIT)
+ (WEST TO BOOTH-2)
+ (IN TO BOOTH-2)
+ (GLOBAL HALL-WINDOW SCENERY-RIGHT)
+ (NORTH TO HALL-1-DINER)
+ (SOUTH TO HALL-3-DINER)
+ (CORRIDOR *4002*)
+ (ACTION HALL-F)>
+
+<ROOM HALL-3-DINER
+ (LOC ROOMS)
+ (DESC "middle")
+ (SYNONYM MIDDLE)
+ (GENERIC GENERIC-MIDDLE-F)
+ (STATION HALL-3-DINER)
+ (LINE 3)
+ (FLAGS ;RLANDBIT ONBIT)
+ (WEST TO BOOTH-3)
+ (IN TO BOOTH-3)
+ (GLOBAL HALL-WINDOW SCENERY-RIGHT)
+ (NORTH TO HALL-2-DINER)
+ (SOUTH TO HALL-4-DINER)
+ (CORRIDOR *10002*)
+ (ACTION HALL-3-F)>
+
+<ROOM HALL-4-DINER
+ (DESC "rear middle")
+ (ADJECTIVE SOUTH S REAR R AFT)
+ (SYNONYM MIDDLE)
+ (GENERIC GENERIC-MIDDLE-F)
+ (LOC ROOMS)
+ (STATION HALL-4-DINER)
+ (LINE 3)
+ (FLAGS ;RLANDBIT ONBIT)
+ (WEST TO PANTRY)
+ (IN TO PANTRY)
+ (GLOBAL HALL-WINDOW SCENERY-RIGHT)
+ (SOUTH TO HALL-5-DINER)
+ (NORTH TO HALL-3-DINER)
+ (CORRIDOR *20002*)
+ (ACTION HALL-F)>
+
+<ROOM HALL-5-DINER
+ (DESC "rear end")
+ (ADJECTIVE SOUTH S REAR R AFT)
+ (SYNONYM END)
+ (GENERIC GENERIC-HALL-5-F)
+ (LOC ROOMS)
+ (STATION HALL-5-DINER)
+ (LINE 3)
+ (FLAGS ;RLANDBIT ONBIT)
+ (WEST TO GALLEY)
+ (IN TO GALLEY)
+ (GLOBAL HALL-WINDOW SCENERY-RIGHT VESTIBULE-REAR-DOOR ;-DINER)
+ (SOUTH TO VESTIBULE-REAR-DINER IF VESTIBULE-REAR-DOOR ;-DINER IS OPEN)
+ (NORTH TO HALL-4-DINER)
+ (CORRIDOR *40002*)
+ (ACTION HALL-F)>
+
+<ROOM VESTIBULE-REAR-DINER
+ (LOC ROOMS)
+ (FLAGS ;RLANDBIT ONBIT)
+ (DESC "rear vestibule")
+ (ADJECTIVE SOUTH S REAR R AFT)
+ (SYNONYM VESTIBULE V)
+ (GENERIC GENERIC-VESTIBULE-F)
+ (SOUTH PER NEXT-CAR-TO-REAR-F)
+ (NORTH TO HALL-5-DINER IF VESTIBULE-REAR-DOOR ;-DINER IS OPEN)
+ (EAST TO REST-ROOM-REAR-DINER IF REST-ROOM-REAR-DOOR IS OPEN)
+ (IN TO REST-ROOM-REAR-DINER IF REST-ROOM-REAR-DOOR IS OPEN)
+ (LINE 3)
+ (STATION VESTIBULE-REAR-DINER)
+ (GLOBAL REST-ROOM-REAR-DOOR VESTIBULE-REAR-DOOR ;-DINER
+ VESTIBULE-REAR-WINDOW ;STOP-CORD LADDER)
+ (WEST PER DETRAIN-F)
+ (OUT PER DETRAIN-F)
+ (DOWN PER DETRAIN-F)
+ (UP PER LADDER-EXIT-F)
+ (CORRIDOR -1)
+ (ACTION VESTIBULE-REAR-F)>
+
+<OBJECT MACHINE
+ (LOC VESTIBULE-REAR-DINER)
+ (DESC "cigarette machine")
+ (ADJECTIVE CIGARETTE VENDING PLASTIC)
+ (SYNONYM MACHINE PANEL)
+ (FLAGS CONTBIT OPENBIT)
+ (CAPACITY 99)
+ (FDESC
+"A cigarette machine stands in one corner, waiting to be either used or
+discarded -- it's hard to say which.")
+ (ACTION MACHINE-F)>
+
+<ROUTINE MACHINE-F ("AUX" P)
+ <COND (<AND <DOBJ? MACHINE> <VERB? OPEN CLOSE>>
+ <YOU-CANT>)
+ (<VERB? ANALYZE EXAMINE LOOK-INSIDE LOOK-THROUGH>
+ <TELL
+"The plastic panel is so scratched and grimy that you can barely see
+the display of cigarette packs inside." CR>)
+ (<VERB? MUNG>
+ <TELL "It seems that someone else beat you to it." CR>)
+ (<AND <VERB? ATTACK SLAP SHAKE>
+ <NOT <FSET? ,MACHINE ,MUNGBIT>>
+ <NOT <FSET? ,CIGARETTE ,TOUCHBIT>>>
+ <SET P <LOC ,CIGARETTE>>
+ <COND (<AND <FSET? .P ,PERSONBIT> <==? 5 <GETP .P ,P?LDESC>>>
+ <FCLEAR .P ,TOUCHBIT>
+ <PUTP .P ,P?LDESC 4 ;"gum">)>
+ <FSET ,CIGARETTE ,TOUCHBIT>
+ <FSET ,CIGARETTE ,TAKEBIT>
+ <MOVE ,CIGARETTE ,HERE>
+ <THIS-IS-IT ,CIGARETTE>
+ <TELL
+"The machine shudders and disgorges a single cigarette onto the floor." CR>)
+ (<VERB? ATTACK SLAP SHAKE PUT-IN>
+ <COND (<VERB? PUT-IN>
+ <COND (<AND ,P-DOLLAR-FLAG
+ <DOBJ? INTNUM GLOBAL-MONEY>
+ <NOT <L? <GETP ,PLAYER ,P?SOUTH> ,P-AMOUNT>>>
+ <COND (<HARD?>
+ <FSET ,MACHINE ,MUNGBIT>)>
+ <PUTP ,PLAYER ,P?SOUTH
+ <- <GETP ,PLAYER ,P?SOUTH> ,P-AMOUNT>>)
+ (T <YOU-CANT> <RTRUE>)>)>
+ <COND (<PROB 50>
+ <TELL "\"Whirr, buzz">)
+ (T
+ <TELL "\"Whizz, burr">)>
+ <TELL ", click!\" Nothing else happens." CR>)>>
+
+<ROOM LIMBO-FWD-DINER
+ (DESC "diner forward limbo")
+ (LOC ROOMS)
+ (SOUTH TO VESTIBULE-FWD-DINER)
+ (LINE 3)
+ (STATION LIMBO-FWD-DINER)>
+
+<ROOM LIMBO-REAR-DINER
+ (DESC "diner rear limbo")
+ (LOC ROOMS)
+ (NORTH TO VESTIBULE-REAR-DINER)
+ (LINE 3)
+ (STATION LIMBO-REAR-DINER)>
+
+;<OBJECT VESTIBULE-FWD-DINER-DOOR
+ (LOC LOCAL-GLOBALS)
+ (DESC "swinging door")
+ (FLAGS DOORBIT TRANSBIT)
+ (ADJECTIVE METAL VESTIBULE HALL SWINGING)
+ (SYNONYM DOOR)
+ (LDESC "This is a swinging metal door with a brass handle.")
+ (ACTION VESTIBULE-FWD-DINER-DOOR-F)>
+
+;<ROUTINE VESTIBULE-FWD-DINER-DOOR-F ()
+ <VESTIBULE-DOOR-F ,VESTIBULE-FWD-DINER-DOOR>>
+
+;<OBJECT VESTIBULE-REAR-DINER-DOOR
+ (LOC LOCAL-GLOBALS)
+ (DESC "swinging door")
+ (FLAGS DOORBIT TRANSBIT)
+ (ADJECTIVE METAL VESTIBULE HALL SWINGING)
+ (SYNONYM DOOR)
+ (LDESC "This is a swinging metal door with a brass handle.")
+ (ACTION VESTIBULE-REAR-DINER-DOOR-F)>
+
+;<ROUTINE VESTIBULE-REAR-DINER-DOOR-F ()
+ <VESTIBULE-DOOR-F ,VESTIBULE-REAR-DINER-DOOR>>
+
+<GLOBAL DINER-CAR 3> ;"Diner can't be first or last car."
+<GLOBAL DINER-TOUCHED <>>
+<GLOBAL FANCY-CAR 0>
+
+<GLOBAL CAR-ROOMS-COMPS-DINER
+ <PLTABLE BOOTH-1 BOOTH-2 BOOTH-3 PANTRY GALLEY>>
+
+<GLOBAL CAR-ROOMS-DINER
+ <PLTABLE REST-ROOM-FWD-DINER
+ BOOTH-1 BOOTH-2 BOOTH-3 PANTRY GALLEY REST-ROOM-REAR-DINER
+ VESTIBULE-FWD-DINER HALL-1-DINER HALL-2-DINER HALL-3-DINER
+ HALL-4-DINER HALL-5-DINER VESTIBULE-REAR-DINER>>
+
+<GLOBAL CAR-ROOMS-FANCY
+ <PLTABLE ;REST-ROOM-FWD-FANCY
+ SUITE-1 SUITE-2 SUITE-3 ;REST-ROOM-REAR-FANCY
+ VESTIBULE-FWD-FANCY HALL-1-FANCY HALL-2-FANCY HALL-3-FANCY
+ VESTIBULE-REAR-FANCY>>
+
+<ROUTINE PICK-ONE-BOOTH ("AUX" X)
+ <SET X <RANDOM 3>>
+ <COND (<==? .X 1> ,BOOTH-1)
+ (<==? .X 2> ,BOOTH-2)
+ (<==? .X 3> ,BOOTH-3)>>
+
+<ROOM VESTIBULE-FWD-FANCY
+ (LOC ROOMS)
+ ;(OTHER OTHER-VESTIBULE-FWD)
+ (FLAGS ;RLANDBIT ONBIT)
+ (DESC "forward vestibule")
+ (ADJECTIVE NORTH N FORWARD FRONT F FORE)
+ (SYNONYM VESTIBULE V)
+ (GENERIC GENERIC-VESTIBULE-F)
+ (NORTH PER NEXT-CAR-TO-FWD-F)
+ (SOUTH TO HALL-1-FANCY IF VESTIBULE-FWD-DOOR ;-FANCY IS OPEN)
+ (LINE 6)
+ (STATION VESTIBULE-FWD-FANCY)
+ (GLOBAL VESTIBULE-FWD-DOOR ;-FANCY VESTIBULE-FWD-WINDOW ;STOP-CORD)
+ (CORRIDOR -1)
+ (ACTION VESTIBULE-FWD-F)>
+
+<ROOM HALL-1-FANCY
+ (LOC ROOMS)
+ (DESC "forward end")
+ (ADJECTIVE NORTH N FORWARD FRONT F FORE)
+ (SYNONYM END)
+ (GENERIC GENERIC-HALL-1-F)
+ (STATION HALL-1-FANCY)
+ (LINE 6)
+ (FLAGS ;RLANDBIT ONBIT)
+ (WEST TO SUITE-1 IF SUITE-1-DOOR IS OPEN)
+ (IN TO SUITE-1 IF SUITE-1-DOOR IS OPEN)
+ (NORTH TO VESTIBULE-FWD-FANCY IF VESTIBULE-FWD-DOOR IS OPEN)
+ (SOUTH TO HALL-2-FANCY)
+ (CORRIDOR *10*)
+ (GLOBAL SUITE-1-DOOR HALL-WINDOW VESTIBULE-FWD-DOOR
+ SCENERY-RIGHT)
+ (ACTION HALL-FANCY-F)>
+
+<OBJECT SUITE-1-DOOR
+ (LOC LOCAL-GLOBALS)
+ (DESC "compartment door")
+ (ADJECTIVE COMPARTMENT C)
+ (SYNONYM DOOR)
+ (FLAGS DOORBIT LOCKED)
+ (ACTION SUITE-1-DOOR-F)>
+
+<ROUTINE SUITE-1-DOOR-F () <COMPARTMENT-DOOR-F ,SUITE-1-DOOR>>
+
+<ROOM HALL-2-FANCY
+ (LOC ROOMS)
+ (DESC "middle")
+ (SYNONYM MIDDLE)
+ (GENERIC GENERIC-MIDDLE-F)
+ (STATION HALL-2-FANCY)
+ (LINE 6)
+ (FLAGS ;RLANDBIT ONBIT)
+ (WEST TO SUITE-2 IF SUITE-2-DOOR IS OPEN)
+ (IN TO SUITE-2 IF SUITE-2-DOOR IS OPEN)
+ (GLOBAL SUITE-2-DOOR HALL-WINDOW SCENERY-RIGHT)
+ (NORTH TO HALL-1-FANCY)
+ (SOUTH TO HALL-3-FANCY)
+ (CORRIDOR *10*)
+ (ACTION HALL-FANCY-F ;HALL-3-F)>
+
+<OBJECT SUITE-2-DOOR
+ (LOC LOCAL-GLOBALS)
+ (DESC "compartment door")
+ (ADJECTIVE COMPARTMENT C)
+ (SYNONYM DOOR)
+ (FLAGS DOORBIT LOCKED)
+ (ACTION SUITE-2-DOOR-F)>
+
+<ROUTINE SUITE-2-DOOR-F () <COMPARTMENT-DOOR-F ,SUITE-2-DOOR>>
+
+<ROOM HALL-3-FANCY
+ (LOC ROOMS)
+ (DESC "rear end")
+ (ADJECTIVE SOUTH S REAR R AFT)
+ (SYNONYM END)
+ (GENERIC GENERIC-HALL-5-F)
+ (STATION HALL-3-FANCY)
+ (LINE 6)
+ (FLAGS ;RLANDBIT ONBIT)
+ (WEST TO SUITE-3 IF SUITE-3-DOOR IS OPEN)
+ (IN TO SUITE-3 IF SUITE-3-DOOR IS OPEN)
+ (GLOBAL SUITE-3-DOOR HALL-WINDOW VESTIBULE-REAR-DOOR
+ SCENERY-RIGHT)
+ (SOUTH TO VESTIBULE-REAR-FANCY IF VESTIBULE-REAR-DOOR IS OPEN)
+ (NORTH TO HALL-2-FANCY)
+ (CORRIDOR *10*)
+ (ACTION HALL-FANCY-F)>
+
+<OBJECT SUITE-3-DOOR
+ (LOC LOCAL-GLOBALS)
+ (DESC "compartment door")
+ (ADJECTIVE COMPARTMENT C)
+ (SYNONYM DOOR)
+ (FLAGS DOORBIT LOCKED)
+ (ACTION SUITE-3-DOOR-F)>
+
+<ROUTINE SUITE-3-DOOR-F () <COMPARTMENT-DOOR-F ,SUITE-3-DOOR>>
+
+<ROOM VESTIBULE-REAR-FANCY
+ (LOC ROOMS)
+ (FLAGS ;RLANDBIT ONBIT)
+ (DESC "rear vestibule")
+ (ADJECTIVE SOUTH S REAR R AFT)
+ (SYNONYM VESTIBULE V)
+ (GENERIC GENERIC-VESTIBULE-F)
+ (SOUTH PER NEXT-CAR-TO-REAR-F)
+ (NORTH TO HALL-3-FANCY IF VESTIBULE-REAR-DOOR ;-FANCY IS OPEN)
+ (LINE 6)
+ (STATION VESTIBULE-REAR-FANCY)
+ (GLOBAL VESTIBULE-REAR-DOOR ;-FANCY VESTIBULE-REAR-WINDOW LADDER)
+ (WEST PER DETRAIN-F)
+ (OUT PER DETRAIN-F)
+ (DOWN PER DETRAIN-F)
+ (UP PER LADDER-EXIT-F)
+ (CORRIDOR -1)
+ (ACTION VESTIBULE-REAR-F)>
+
+<ROOM LIMBO-FWD-FANCY
+ (DESC "fancy forward limbo")
+ (LOC ROOMS)
+ (SOUTH TO VESTIBULE-FWD-FANCY)
+ (LINE 6)
+ (STATION LIMBO-FWD-FANCY)>
+
+<ROOM LIMBO-REAR-FANCY
+ (DESC "fancy rear limbo")
+ (LOC ROOMS)
+ (NORTH TO VESTIBULE-REAR-FANCY)
+ (LINE 6)
+ (STATION LIMBO-REAR-FANCY)>
+
+<ROOM SUITE-1
+ (LOC ROOMS)
+ (FLAGS ;RLANDBIT ONBIT)
+ (DESC "first suite")
+ (ADJECTIVE FIRST 1ST \#1)
+ (SYNONYM SUITE ROOM)
+ (STATION HALL-1-FANCY)
+ (LINE 6)
+ (EAST TO HALL-1-FANCY IF SUITE-1-DOOR IS OPEN)
+ (OUT TO HALL-1-FANCY IF SUITE-1-DOOR IS OPEN)
+ (GLOBAL SUITE-1-DOOR WINDOW-1 SCENERY-LEFT ;STOP-CORD)
+ ;(GENERIC GENERIC-COMPARTMENT-F)
+ (ACTION SUITE-F)>
+
+<ROOM SUITE-2
+ (LOC ROOMS)
+ (FLAGS ;RLANDBIT ONBIT)
+ (DESC "second suite")
+ (ADJECTIVE SECOND 2ND \#2)
+ (SYNONYM SUITE ROOM)
+ (STATION HALL-2-FANCY)
+ (LINE 6)
+ (EAST TO HALL-2-FANCY IF SUITE-2-DOOR IS OPEN)
+ (OUT TO HALL-2-FANCY IF SUITE-2-DOOR IS OPEN)
+ (GLOBAL SUITE-2-DOOR WINDOW-2 SCENERY-LEFT ;STOP-CORD)
+ ;(GENERIC GENERIC-COMPARTMENT-F)
+ (ACTION SUITE-F)>
+
+<ROOM SUITE-3
+ (LOC ROOMS)
+ (FLAGS ;RLANDBIT ONBIT)
+ (DESC "third suite")
+ (ADJECTIVE THIRD 3RD \#3 LAST)
+ (SYNONYM SUITE ROOM)
+ (STATION HALL-3-FANCY)
+ (LINE 6)
+ (EAST TO HALL-3-FANCY IF SUITE-3-DOOR IS OPEN)
+ (OUT TO HALL-3-FANCY IF SUITE-3-DOOR IS OPEN)
+ (GLOBAL SUITE-3-DOOR WINDOW-3 SCENERY-LEFT ;STOP-CORD)
+ ;(GENERIC GENERIC-COMPARTMENT-F)
+ (ACTION SUITE-F)>
+
+<ROUTINE SUITE-F ("OPTIONAL" (RARG <>) "AUX" N)
+ <COND (.RARG
+ <V-FOO>
+ <RTRUE>)>>
+
+<ROUTINE HALL-FANCY-F ("OPTIONAL" (RARG <>) "AUX" X (TOUCHED <>) (VAL <>))
+ <COND (<OR <FSET? ,HALL-1-FANCY ,TOUCHBIT>
+ <FSET? ,HALL-1-FANCY ,TOUCHBIT>
+ <FSET? ,HALL-1-FANCY ,TOUCHBIT>>
+ <SET TOUCHED T>)>
+ <COND (<OR <EQUAL? .RARG ,M-LOOK>
+ <AND <ZERO? .RARG> <VERB? LOOK>>>
+ <FSET ,HERE ,TOUCHBIT>
+ <TELL "This is the " D ,HERE " of the corridor.">
+ <COND (<OR <VERB? LOOK> <ZERO? .TOUCHED>>
+ <TELL
+" The floor and walls are covered with grey carpet, worn thin
+in spots but intact. A long series of
+windows, framed by polished wood, runs along the corridor on the right-hand
+side of the train.">)>
+ <COND (<==? ,PLAYER-NOT-FACING ,P?WEST>
+ <CRLF>)
+ (T
+ <SET X <GET-REXIT-ROOM <GETPT ,HERE ,P?IN>>>
+ <THIS-IS-IT .X>
+ <TELL
+" On the left side of the train, behind a locked door, lies the " D .X"."CR>)>
+ <RTRUE>)
+ (<EQUAL? .RARG ,M-ENTER>
+ <COND (<NOISY? ,LAST-PLAYER-LOC>
+ <SET VAL T>
+ <COND (T;<OR <AND<EQUAL? ,LAST-PLAYER-LOC ,VESTIBULE-FWD-FANCY>
+ <EQUAL? ,HERE ,HALL-1-FANCY>>
+ <AND <EQUAL? ,LAST-PLAYER-LOC ,VESTIBULE-REAR-FANCY>
+ <EQUAL? ,HERE ,HALL-3-FANCY>>>
+ <TELL "The relative quiet here is welcome. ">)>)>
+ <COND (<NOT .TOUCHED>
+ <SET VAL T>
+ <TELL "The feel of luxury here is unmistakable.">)>
+ <COND (.VAL <CRLF>)>
+ <RFALSE>)>>
diff --git a/chase.blank b/chase.blank
new file mode 100644
index 0000000..f656cde
--- /dev/null
+++ b/chase.blank
@@ -0,0 +1,44 @@
+Chase Scene for CHECKPOINT
+--------------------------
+When you get through the checkpoint (at Frbz?), someone will get
+suspicious (presumably seeing the camera) and will board the
+train. As you are in 'friendly' territory after crossing the border,
+the new 'bad spy' will be working behind enemy lines. He will therefore
+be more dangerous and ruthless.
+
+Perhaps some hint of what's coming could be presented in a description
+of some officials carrying off your now bloodied contact, this being
+printed as you re-board the train.
+
+The new bad spy (NBS) will attempt to get you alone and thereupon kill
+you and take the McGuffin. I would think that sometime soon upon
+entering the train, you would catch a glimpse of this person from the
+corner of your eye.
+
+He will follow you into any compartment -
+
+ a) If it is empty, he will reach into his raincoat in a way that
+should remind the player of someone reaching for a gun. The player
+must do something the very next move or get killed. This could consist
+of throwing something at the man, leaving the compartment, etc.
+
+ b) If it isn't empty, he will say something in Frotzer to the other
+people there (presumably it is something like "My colleague and I need
+to talk privately - would you mind leaving us for a few moments.")
+In most (all?) cases, the others will leave, and you now are in
+the previous situation.
+
+If you are just walking around the train, he will follow at a distance
+of a few locations (2?). Walking into a restroom is a good way to get
+trapped. He will knock on the door. Then the following:
+
+ a) If you don't ever leave the restroom and its getting near the
+stop at Gola, he will become desparate and shoot through the door,
+wounding you badly. He will also take the camera, so the world is
+lost.
+
+ b) If you leave the restroom, he will wedge his foot in the door
+and point the barrel of the gun toward you. You have two moves before
+you must pull the emergency cord of the train or (something else, so
+there are multiple solutions). When you do so, his gun falls from his
+hand. Before you can grab it, he runs off. \ No newline at end of file
diff --git a/checkpoint.zil b/checkpoint.zil
new file mode 100644
index 0000000..8bb2a4b
--- /dev/null
+++ b/checkpoint.zil
@@ -0,0 +1,56 @@
+"EXTENDED COMPILE/LOAD FILE for CHECKPOINT
+Copyright (C) 1985 Infocom, Inc. All rights reserved."
+
+<COND (<GASSIGNED? PREDGEN>
+ <PRINC "Compiling">
+ <SETG ZSTR-ON <SETG ZSTR-OFF ,TIME>>
+ <ID 0>)
+ (T <PRINC "Loading">)>
+
+<PRINC " CHECKPOINT: interactive fiction from Infocom!
+">
+
+<COND (<GASSIGNED? MUDDLE>
+ <BLOAT 90000 0 0 3500 0 0 0 0 0 512>)>
+
+<SET REDEFINE T>
+
+"<GLOBAL BIGFIX 10000>"
+
+<OR <GASSIGNED? ZILCH>
+ <SETG WBREAKS <STRING !\" !,WBREAKS>>>
+
+<DEFINE IFILE (STR "OPTIONAL" (FLOAD? <>) "AUX" (TIM <TIME>))
+ <INSERT-FILE .STR .FLOAD?>>
+
+<DIRECTIONS ;"Do not change the order of the first eight
+ without consulting MARC! -- ENCHANTER"
+ NORTH ;NE EAST ;SE SOUTH ;SW WEST ;NW UP DOWN IN OUT>
+
+<IFILE "MACROS" T>
+<IFILE "SYNTAX" T>
+<IFILE "MAIN" T>
+<IFILE "THINGS" T>
+<IFILE "PEOPLE" T>
+<IFILE "PLACES" T>
+<IFILE "GLOBAL" T>
+
+<CONSTANT SERIAL 0>
+
+<IFILE "CLOCK" T>
+<IFILE "PARSER" T>
+<IFILE "VERBS" T>
+<IFILE "TRAIN" T>
+<IFILE "CARS" T>
+<IFILE "STATION" T>
+<IFILE "GOAL" T>
+<IFILE "SPIES" T>
+
+<PROPDEF SIZE 5>
+<PROPDEF CAPACITY 0>
+
+<DEFINE ISL () <INIT-STATUS-LINE>>
+
+<GC-MON T>
+<COND (<GASSIGNED? MUDDLE>
+ <GC 0 T 5>)>
diff --git a/clock.cmp b/clock.cmp
new file mode 100644
index 0000000..c10f68c
--- /dev/null
+++ b/clock.cmp
@@ -0,0 +1,82 @@
+
+;COMPARISON OF PS:<SWG>CLOCK.ZAP.1 AND PS:<SWG>CLOCK.ZAP.3
+;OPTIONS ARE /1
+
+**** FILE PS:<SWG>CLOCK.ZAP.1, 1-12 (180)
+?PRG1: EQUAL? C,E \?ELS5
+**** FILE PS:<SWG>CLOCK.ZAP.3, 1-12 (180)
+?PRG1: EQUAL? C,E \?ELS4
+***************
+
+**** FILE PS:<SWG>CLOCK.ZAP.1, 1-17 (295)
+?ELS5: GET C,C-RTN
+**** FILE PS:<SWG>CLOCK.ZAP.3, 1-17 (295)
+?ELS4: GET C,C-RTN
+***************
+
+**** FILE PS:<SWG>CLOCK.ZAP.1, 1-29 (523)
+ IGRTR? 'MOVES,59 \?CND5
+**** FILE PS:<SWG>CLOCK.ZAP.3, 1-29 (523)
+ IGRTR? 'MOVES,59 \?CND3
+***************
+
+**** FILE PS:<SWG>CLOCK.ZAP.1, 1-31 (564)
+ IGRTR? 'SCORE,23 \?CND5
+**** FILE PS:<SWG>CLOCK.ZAP.3, 1-31 (564)
+ IGRTR? 'SCORE,23 \?CND3
+***************
+
+**** FILE PS:<SWG>CLOCK.ZAP.1, 1-33 (605)
+?CND5: PUSH C-INTS
+**** FILE PS:<SWG>CLOCK.ZAP.3, 1-33 (605)
+?CND3: PUSH C-INTS
+***************
+
+**** FILE PS:<SWG>CLOCK.ZAP.1, 1-36 (676)
+?PRG16: EQUAL? C,E \?ELS20
+**** FILE PS:<SWG>CLOCK.ZAP.3, 1-36 (676)
+?PRG10: EQUAL? C,E \?ELS13
+***************
+
+**** FILE PS:<SWG>CLOCK.ZAP.1, 1-38 (717)
+?ELS20: GET C,C-ENABLED?
+ ZERO? STACK /?CND18
+**** FILE PS:<SWG>CLOCK.ZAP.3, 1-38 (717)
+?ELS13: GET C,C-ENABLED?
+ ZERO? STACK /?CND12
+***************
+
+**** FILE PS:<SWG>CLOCK.ZAP.1, 1-41 (786)
+ ZERO? TICK \?ELS25
+ JUMP ?CND18
+?ELS25: SUB TICK,1
+**** FILE PS:<SWG>CLOCK.ZAP.3, 1-41 (786)
+ ZERO? TICK \?ELS16
+ JUMP ?CND12
+?ELS16: SUB TICK,1
+***************
+
+**** FILE PS:<SWG>CLOCK.ZAP.1, 1-45 (862)
+ GRTR? TICK,1 /?CND23
+**** FILE PS:<SWG>CLOCK.ZAP.3, 1-45 (862)
+ GRTR? TICK,1 /?CND15
+***************
+
+**** FILE PS:<SWG>CLOCK.ZAP.1, 1-48 (917)
+ ZERO? VAL /?CND23
+ ZERO? FLG /?THN36
+ EQUAL? VAL,M-FATAL \?CND18
+?THN36: SET 'FLG,VAL
+?CND23:
+?CND18: ADD C,C-INTLEN >C
+ JUMP ?PRG16
+**** FILE PS:<SWG>CLOCK.ZAP.3, 1-48 (917)
+ ZERO? VAL /?CND15
+ ZERO? FLG /?THN21
+ EQUAL? VAL,M-FATAL \?CND12
+?THN21: SET 'FLG,VAL
+?CND15:
+?CND12: ADD C,C-INTLEN >C
+ JUMP ?PRG10
+***************
+
diff --git a/clock.zap b/clock.zap
new file mode 100644
index 0000000..9b03d56
--- /dev/null
+++ b/clock.zap
@@ -0,0 +1,65 @@
+
+
+ .FUNCT QUEUE,RTN,TICK,CINT
+ CALL2 INT,RTN >CINT
+ PUT CINT,C-TICK,TICK
+ RETURN CINT
+
+
+ .FUNCT INT,RTN,DEMON=0,E,C,INT
+ ADD C-TABLE,C-TABLELEN >E
+ ADD C-TABLE,C-INTS >C
+?PRG1: EQUAL? C,E \?ELS5
+ SUB C-INTS,C-INTLEN >C-INTS
+ ADD C-TABLE,C-INTS >INT
+ PUT INT,C-RTN,RTN
+ RETURN INT
+?ELS5: GET C,C-RTN
+ EQUAL? STACK,RTN \?CND3
+ RETURN C
+?CND3: ADD C,C-INTLEN >C
+ JUMP ?PRG1
+
+
+ .FUNCT QUEUED?,RTN,C
+ CALL2 INT,RTN >C
+ GET C,C-ENABLED?
+ ZERO? STACK /FALSE
+ GET C,C-TICK >C
+ ZERO? C /FALSE
+ RETURN C
+
+
+ .FUNCT CLOCKER,C,E,TICK,FLG=0,VAL
+ ZERO? CLOCK-WAIT /?CND1
+ SET 'CLOCK-WAIT,FALSE-VALUE
+ RFALSE
+?CND1: INC 'PRESENT-TIME
+ IGRTR? 'MOVES,59 \?CND5
+ SET 'MOVES,0
+ IGRTR? 'SCORE,23 \?CND5
+ SET 'SCORE,0
+?CND5: PUSH C-INTS
+ ADD C-TABLE,STACK >C
+ ADD C-TABLE,C-TABLELEN >E
+?PRG16: EQUAL? C,E \?ELS20
+ RETURN FLG
+?ELS20: GET C,C-ENABLED?
+ ZERO? STACK /?CND18
+ GET C,C-TICK >TICK
+ ZERO? TICK \?ELS25
+ JUMP ?CND18
+?ELS25: SUB TICK,1
+ PUT C,C-TICK,STACK
+ GRTR? TICK,1 /?CND23
+ GET C,C-RTN
+ CALL STACK >VAL
+ ZERO? VAL /?CND23
+ ZERO? FLG /?THN36
+ EQUAL? VAL,M-FATAL \?CND18
+?THN36: SET 'FLG,VAL
+?CND23:
+?CND18: ADD C,C-INTLEN >C
+ JUMP ?PRG16
+
+ .ENDI
diff --git a/clock.zil b/clock.zil
new file mode 100644
index 0000000..2dc91bb
--- /dev/null
+++ b/clock.zil
@@ -0,0 +1,107 @@
+"CLOCK for CHECKPOINT
+Copyright (C) 1985 Infocom, Inc. All rights reserved."
+
+"List of queued routines:
+G-LEAVE-TRAIN
+I-ARRIVE-WARNING
+I-ATTENTION
+I-BAD-SPY
+I-BAD-SPY-W-CASE
+I-BAD-SPY-W-YOU
+I-BOND
+I-BOND-OTHER
+I-COME-TO
+I-CONDUCTOR
+I-CONTACT-APPEARS
+I-CONTACT-GIVES-UP
+I-DEPART
+I-DEPART-WARNING
+I-EXTRA
+I-FOLLOW
+I-LEAVE-TRAIN
+I-PROMPT
+I-TICKETS-PLEASE
+I-TRAIN-ARREST
+I-TRAIN-LURCH
+I-TRAIN-RESTART
+I-TRAIN-SCENERY
+;I-TRAIN-SOUNDS
+I-TRAVELER
+I-TRAVELER-FINDS-CONTACT
+I-TRAVELER-SEEKS-FLOWER
+I-TRAVELER-TO-GRNZ
+I-VESTIBULE-DOOR
+"
+
+<CONSTANT C-TABLELEN 222>
+<GLOBAL C-TABLE %<COND ;(<GASSIGNED? PREDGEN> '<ITABLE NONE 111>)
+ (T '<ITABLE NONE 222>)>>
+
+<GLOBAL C-INTS 222>
+<CONSTANT C-INTLEN 6>
+<CONSTANT C-ENABLED? 0>
+<CONSTANT C-TICK 1>
+<CONSTANT C-RTN 2>
+
+<ROUTINE QUEUE (RTN TICK "AUX" CINT)
+ ;#DECL ((RTN) ATOM (TICK) FIX (CINT) <PRIMTYPE VECTOR>)
+ <PUT <SET CINT <INT .RTN>> ,C-TICK .TICK>
+ .CINT>
+
+<ROUTINE INT (RTN "OPTIONAL" (DEMON <>) E C INT)
+ ;#DECL ((RTN) ATOM (DEMON) <OR ATOM FALSE> (E C INT) <PRIMTYPE
+ VECTOR>)
+ <SET E <REST ,C-TABLE ,C-TABLELEN>>
+ <SET C <REST ,C-TABLE ,C-INTS>>
+ <REPEAT ()
+ <COND (<==? .C .E>
+ <SETG C-INTS <- ,C-INTS ,C-INTLEN>>
+ ;<AND .DEMON <SETG C-DEMONS <- ,C-DEMONS ,C-INTLEN>>>
+ <SET INT <REST ,C-TABLE ,C-INTS>>
+ <PUT .INT ,C-RTN .RTN>
+ <RETURN .INT>)
+ (<EQUAL? <GET .C ,C-RTN> .RTN> <RETURN .C>)>
+ <SET C <REST .C ,C-INTLEN>>>>
+
+;<ROUTINE ENABLED? (RTN)
+ <NOT <ZERO? <GET <INT .RTN> ,C-ENABLED?>>>>
+
+<ROUTINE QUEUED? (RTN "AUX" C)
+ <SET C <INT .RTN>>
+ <COND (<ZERO? <GET .C ,C-ENABLED?>> <RFALSE>)
+ (<ZERO? <SET C <GET .C ,C-TICK>>> <RFALSE>)
+ (T .C)>>
+
+<GLOBAL CLOCK-WAIT <>>
+
+"SCORE INDICATES HOURS / MOVES = MINUTES"
+
+<GLOBAL SCORE 0>
+<GLOBAL MOVES 0>
+<GLOBAL PRESENT-TIME 600>
+
+<ROUTINE CLOCKER ("AUX" C E TICK (FLG <>) VAL)
+ ;#DECL ((C E) <PRIMTYPE VECTOR> (TICK) FIX ;(FLG) ;<OR FALSE ATOM>)
+ <COND (,CLOCK-WAIT <SETG CLOCK-WAIT <>> <RFALSE>)>
+ <SETG PRESENT-TIME <+ ,PRESENT-TIME 1>>
+ ;<COND (<G? ,PRESENT-TIME 1199>
+ <TIMES-UP>)>
+ <COND (<G? <SETG MOVES <+ ,MOVES 1>> 59>
+ <SETG MOVES 0>
+ <COND (<G? <SETG SCORE <+ ,SCORE 1>> 23>
+ <SETG SCORE 0>)>)>
+ <SET C <REST ,C-TABLE <COND (T ;,P-WON ,C-INTS) ;(T ,C-DEMONS)>>>
+ <SET E <REST ,C-TABLE ,C-TABLELEN>>
+ <REPEAT ()
+ <COND (<==? .C .E> <RETURN .FLG>)
+ (<NOT <ZERO? <GET .C ,C-ENABLED?>>>
+ <SET TICK <GET .C ,C-TICK>>
+ <COND (<ZERO? .TICK>)
+ (T
+ <PUT .C ,C-TICK <- .TICK 1>>
+ <COND (<AND <NOT <G? .TICK 1>>
+ <SET VAL <APPLY <GET .C ,C-RTN>>>>
+ <COND (<OR <NOT .FLG>
+ <==? .VAL ,M-FATAL>>
+ <SET FLG .VAL>)>)>)>)>
+ <SET C <REST .C ,C-INTLEN>>>>
diff --git a/frotzerland.mss b/frotzerland.mss
new file mode 100644
index 0000000..1781c3a
--- /dev/null
+++ b/frotzerland.mss
@@ -0,0 +1,90 @@
+@style (spacing 2)
+@title ("Seven Shadows" Browsie)
+@pageheading (draft)
+
+@majorheading ("SEVEN SHADOWS" BROWSIE)
+
+@center (Comments to Stu Galley)
+@blankspace(5)
+
+@center (VUBSNAP NI FROTZ!)
+
+@center (WELCOME TO FROTZENLAND!)
+
+Whether you come to Frotzenland for business, for pleasure, or for neither,
+our people will roll out the purple carpet to welcome you!
+After years of isolation and fear, our hearts and minds are open!
+Never before will you have seen such sights, ate such food, heard such
+noises, or enjoyed our day-to-day life!
+
+@center (FROTZENLAND - "SO GOOD YOU NEVER SAW")
+
+Frotzenland is a country somewhere in Europe.
+Its rugged terrain and mountainous borders help keep it safe from its
+neighbours, yet easy to access with one airplane from Vienna.
+Here you find something for every traveller: wild rivers, barren plains,
+dark forests, clean cities, or friendly people.
+
+@center (OUR BELOVED GOVERNMENT)
+
+Every citizen in Frotzenland must vote in every election.
+Our wise leaders find themselves elected again every time.
+They conduct themselves as strictly neutral
+government, with planning for every citizen's life and happiness.
+
+@center (OUR BELOVED RAILWAY)
+
+The Frotz National Railway ("Ferroglip Natsiolim Frotzilim")
+carries our beloved people whenever they wish to get away.
+It has more kilometers of trackage than highways or canals.
+It always can run on time, so you don't usually
+forget your printed timetable.
+
+Modern equipments make every train a pleasure to watch.
+First-class passenger wagons have:
+@begin (itemize)
+several identical compartments for equal rights to travel
+
+a corridor you can walk in
+
+two W.C@. or restrooms in case of emergency
+
+also cars for dining as much as you feel
+@end (itemize)
+
+The stations are all equal too,
+with these interesting rooms:
+@begin (itemize)
+
+platform, where you say hello and goodbye
+
+waiting room, where you wait
+
+cafe with delicious foods and also travelling necessaries in store
+
+W.C@. or restroom in case of emergency
+
+ticket area, where you buy side trips or scene excursions
+
+luggage room (if you travel heavy) with careful clerks who don't damage
+
+police persons can help you if you wander too far
+@end (itemize)
+
+@center (OUR BELOVED FOOD)
+
+You will find something for every taste in Frotzenland.
+Since the recent tractor reforms, all citizens do their parts
+to grow abundantly for home use and visitors.
+The good soil can produce fine meats and potatoes, wild games and cabbages.
+And don't pass by local delicacies such as rumpled stilt's skin,
+or fish heads and lice.
+
+In a city you may find a good restaurant with Continental air
+and attending services. The finest food we can find for you.
+And you may enjoy a good wine, with the taste of good soil from the
+Thnbrd district.
+
+@center (PLEASE TO COME ENJOY OUR BELOVED COUNTRY BEFORE IT'S TOO LATE.)
+
+@center (YOU @I[WILL] ENJOY YOUR VISIT!)
diff --git a/global.cmp b/global.cmp
new file mode 100644
index 0000000..86f7ff6
--- /dev/null
+++ b/global.cmp
@@ -0,0 +1,822 @@
+
+;COMPARISON OF PS:<SWG>GLOBAL.ZAP.1 AND PS:<SWG>GLOBAL.ZAP.3
+;OPTIONS ARE /1
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-4 (37)
+ EQUAL? PRSI,OBJ2 \?ELS5
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-4 (37)
+ EQUAL? PRSI,OBJ2 \?ELS4
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-7 (102)
+?ELS5: EQUAL? PRSO,OBJ2 \?ELS7
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-7 (102)
+?ELS4: EQUAL? PRSO,OBJ2 \?ELS5
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-10 (173)
+?ELS7: CALL V-FOO
+ ZERO? STACK /FALSE
+ RTRUE
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-10 (173)
+?ELS5: CALL V-FOO
+ ZERO? STACK \TRUE
+ RFALSE
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-22 (326)
+ EQUAL? PRSI,IT \?THN10
+ EQUAL? PRSA,V?TELL-ABOUT /?THN10
+ EQUAL? PRSA,V?SEARCH-FOR,V?ASK-FOR,V?ASK-ABOUT /?THN14
+?THN10: EQUAL? PRSO,IT \FALSE
+ EQUAL? PRSA,V?WHAT /?THN14
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-22 (326)
+ EQUAL? PRSI,IT \?ELS5
+ EQUAL? PRSA,V?TELL-ABOUT /?THN4
+ EQUAL? PRSA,V?SEARCH-FOR,V?ASK-FOR,V?ASK-ABOUT /?THN4
+?ELS5: EQUAL? PRSO,IT \FALSE
+ EQUAL? PRSA,V?WHAT /?THN4
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-28 (569)
+?THN14: CALL PRODUCE-GIBBERISH
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-28 (564)
+?THN4: CALL PRODUCE-GIBBERISH
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-33 (636)
+ EQUAL? PRSA,V?PUT \?ELS5
+ EQUAL? PRSI,FLOOR \?ELS5
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-33 (630)
+ EQUAL? PRSA,V?PUT \?ELS4
+ EQUAL? PRSI,FLOOR \?ELS4
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-37 (726)
+?ELS5: EQUAL? PRSA,V?LOOK-ON,V?SEARCH,V?EXAMINE \?ELS9
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-37 (720)
+?ELS4: EQUAL? PRSA,V?LOOK-ON,V?SEARCH,V?EXAMINE \?ELS6
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-39 (825)
+ ZERO? OBJ /?ELS14
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-39 (819)
+ ZERO? OBJ /?ELS10
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-45 (965)
+?ELS14: PRINTR "You don't find anything new there."
+?ELS9: EQUAL? PRSA,V?TAKE,V?BRUSH \FALSE
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-45 (959)
+?ELS10: PRINTR "You don't find anything new there."
+?ELS6: EQUAL? PRSA,V?TAKE,V?BRUSH \FALSE
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-53 (1160)
+ EQUAL? PRSA,V?COUNT \?ELS5
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-53 (1154)
+ EQUAL? PRSA,V?COUNT \?ELS4
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-56 (1240)
+?ELS5: ZERO? P-DOLLAR-FLAG /?ELS10
+ ZERO? P-AMOUNT \?CND8
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-56 (1234)
+?ELS4: ZERO? P-DOLLAR-FLAG /?ELS6
+ ZERO? P-AMOUNT \?CND5
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-59 (1318)
+ JUMP ?CND8
+?ELS10: SET 'P-DOLLAR-FLAG,TRUE-VALUE
+ ZERO? P-NUMBER \?CND8
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-59 (1311)
+ JUMP ?CND5
+?ELS6: SET 'P-DOLLAR-FLAG,TRUE-VALUE
+ ZERO? P-NUMBER \?CND5
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-63 (1412)
+?CND8: CALL DO-INSTEAD-OF,INTNUM,DOLLARS
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-63 (1404)
+?CND5: CALL DO-INSTEAD-OF,INTNUM,DOLLARS
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-70 (1538)
+ ZERO? STACK /?ELS11
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-70 (1530)
+ ZERO? STACK /?ELS8
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-73 (1595)
+?ELS11: EQUAL? PRSA,V?ASK-FOR,V?TAKE /FALSE
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-73 (1586)
+?ELS8: EQUAL? PRSA,V?ASK-FOR,V?TAKE /FALSE
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-80 (1764)
+ EQUAL? WINNER,PLAYER /?ELS5
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-80 (1754)
+ EQUAL? WINNER,PLAYER /?ELS4
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-83 (1835)
+?ELS5: EQUAL? PRSA,V?ASK-ABOUT \FALSE
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-83 (1825)
+?ELS4: EQUAL? PRSA,V?ASK-ABOUT \FALSE
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-90 (1979)
+ EQUAL? PRSA,V?LOOK-UP,V?LOOK-DOWN /?THN6
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-90 (1969)
+ EQUAL? PRSA,V?LOOK-UP,V?LOOK-DOWN /?THN4
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-92 (2077)
+?THN6: ZERO? ON-TRAIN /FALSE
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-92 (2067)
+?THN4: ZERO? ON-TRAIN /FALSE
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-94 (2142)
+ ZERO? STACK /?ELS14
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-94 (2132)
+ ZERO? STACK /?ELS10
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-97 (2195)
+?ELS14: CALL NEXT-ROOM,HERE,P?OUT >RM
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-97 (2185)
+?ELS10: CALL NEXT-ROOM,HERE,P?OUT >RM
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-104 (2339)
+ EQUAL? PRSA,V?WALK-TO \?ELS5
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-104 (2329)
+ EQUAL? PRSA,V?WALK-TO \?ELS4
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-107 (2417)
+?ELS5: EQUAL? PRSA,V?KNOCK \?ELS7
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-107 (2407)
+?ELS4: EQUAL? PRSA,V?KNOCK \?ELS5
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-109 (2510)
+?ELS7: EQUAL? PRSA,V?TIE-TO,V?PUT-IN,V?PUT \?ELS11
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-109 (2500)
+?ELS5: EQUAL? PRSA,V?TIE-TO,V?PUT-IN,V?PUT \?ELS8
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-112 (2593)
+?ELS11: EQUAL? PRSA,V?EXAMINE,V?SEARCH \FALSE
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-112 (2582)
+?ELS8: EQUAL? PRSA,V?EXAMINE,V?SEARCH \FALSE
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-114 (2663)
+ ZERO? STACK /?ELS16
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-114 (2651)
+ ZERO? STACK /?ELS11
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-116 (2698)
+ JUMP ?CND14
+?ELS16: GETP HERE,P?SIZE
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-116 (2686)
+ JUMP ?CND10
+?ELS11: GETP HERE,P?SIZE
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-119 (2757)
+?CND14: EQUAL? P-ADVERB,W?CAREFULLY \?CND19
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-119 (2745)
+?CND10: EQUAL? P-ADVERB,W?CAREFULLY \?CND12
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-121 (2819)
+?CND19: PRINTI "(It's better to examine or search one thing at a time. It would take a long time to search a whole room or area thoroughly. A "
+ EQUAL? P-ADVERB,W?CAREFULLY \?ELS26
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-121 (2807)
+?CND12: PRINTI "(It's better to examine or search one thing at a time. It would take a long time to search a whole room or area thoroughly. A "
+ EQUAL? P-ADVERB,W?CAREFULLY \?ELS17
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-124 (3021)
+ JUMP ?CND24
+?ELS26: PRINTI "brief"
+?CND24: PRINTI " search would take "
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-124 (3009)
+ JUMP ?CND16
+?ELS17: PRINTI "brief"
+?CND16: PRINTI " search would take "
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-130 (3206)
+ ZERO? STACK /?ELS39
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-130 (3194)
+ ZERO? STACK /?ELS27
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-133 (3280)
+ ZERO? VAL /?ELS46
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-133 (3268)
+ ZERO? VAL /?ELS32
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-135 (3317)
+ EQUAL? P-ADVERB,W?CAREFULLY \?ELS54
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-135 (3305)
+ EQUAL? P-ADVERB,W?CAREFULLY \?ELS38
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-137 (3369)
+ JUMP ?CND50
+?ELS54: PUSH STR?99
+?CND50: PRINT STACK
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-137 (3357)
+ JUMP ?CND35
+?ELS38: PUSH STR?99
+?CND35: PRINT STACK
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-141 (3470)
+?ELS46: PRINTR "You didn't finish looking over the place."
+?ELS39: SET 'P-WON,FALSE-VALUE
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-141 (3458)
+?ELS32: PRINTR "You didn't finish looking over the place."
+?ELS27: SET 'P-WON,FALSE-VALUE
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-147 (3598)
+ EQUAL? PRSA,V?EXAMINE \?ELS5
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-147 (3586)
+ EQUAL? PRSA,V?EXAMINE \?ELS4
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-149 (3680)
+?ELS5: EQUAL? PRSA,V?WALK-TO \?ELS9
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-149 (3668)
+?ELS4: EQUAL? PRSA,V?WALK-TO \?ELS7
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-151 (3749)
+?ELS9: EQUAL? PRSA,V?SMELL \FALSE
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-151 (3737)
+?ELS7: EQUAL? PRSA,V?SMELL \FALSE
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-153 (3805)
+ ZERO? STACK /?ELS18
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-153 (3793)
+ ZERO? STACK /?ELS14
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-155 (3866)
+?ELS18: CALL FRESH-AIR?,HERE
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-155 (3854)
+?ELS14: CALL FRESH-AIR?,HERE
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-168 (4098)
+ EQUAL? PRSA,V?PUT-IN \?ELS5
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-168 (4086)
+ EQUAL? PRSA,V?PUT-IN \?ELS4
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-172 (4186)
+?ELS5: EQUAL? PRSA,V?FLUSH-DOWN,V?FLUSH \FALSE
+ ZERO? IN-STATION /?ELS17
+ ZERO? ON-TRAIN /?ELS17
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-172 (4174)
+?ELS4: EQUAL? PRSA,V?FLUSH-DOWN,V?FLUSH \FALSE
+ ZERO? IN-STATION /?ELS13
+ ZERO? ON-TRAIN /?ELS13
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-179 (4445)
+?ELS17: EQUAL? PRSA,V?FLUSH-DOWN \?CND24
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-179 (4433)
+?ELS13: EQUAL? PRSA,V?FLUSH-DOWN \?CND17
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-184 (4573)
+?CND24: FIRST? TOILET \?CND30
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-184 (4561)
+?CND17: FIRST? TOILET \?CND21
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-187 (4669)
+?CND30: PRINTR "Whhoooossshhhhh!"
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-187 (4657)
+?CND21: PRINTR "Whhoooossshhhhh!"
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-191 (4752)
+ FIRST? WHAT >X /?KLU29
+?KLU29:
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-191 (4740)
+ FIRST? WHAT >X /?KLU20
+?KLU20:
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-194 (4809)
+ NEXT? X >N /?KLU30
+?KLU30: ZERO? N \?CND6
+ ZERO? TOLD? /?CND6
+ ZERO? TELL? /?CND6
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-194 (4797)
+ NEXT? X >N /?KLU21
+?KLU21: ZERO? N \?CND5
+ ZERO? TOLD? /?CND5
+ ZERO? TELL? /?CND5
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-199 (4912)
+?CND6: SET 'TOLD?,TRUE-VALUE
+ ZERO? TELL? /?CND13
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-199 (4900)
+?CND5: SET 'TOLD?,TRUE-VALUE
+ ZERO? TELL? /?CND10
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-202 (4980)
+ ZERO? N /?ELS21
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-202 (4968)
+ ZERO? N /?ELS15
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-204 (5011)
+ JUMP ?CND13
+?ELS21: PRINTI ". "
+?CND13: MOVE X,THIEF
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-204 (4999)
+ JUMP ?CND10
+?ELS15: PRINTI ". "
+?CND10: MOVE X,THIEF
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-213 (5131)
+ EQUAL? PRSA,V?CLOSE,V?OPEN \?ELS5
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-213 (5119)
+ EQUAL? PRSA,V?CLOSE,V?OPEN \?ELS4
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-216 (5193)
+?ELS5: EQUAL? PRSA,V?LAMP-ON \FALSE
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-216 (5181)
+?ELS4: EQUAL? PRSA,V?LAMP-ON \FALSE
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-221 (5398)
+ EQUAL? PRSA,V?CUT \?ELS5
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-221 (5386)
+ EQUAL? PRSA,V?CUT \?ELS4
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-234 (5824)
+?ELS5: EQUAL? PRSA,V?EXAMINE \?ELS14
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-234 (5812)
+?ELS4: EQUAL? PRSA,V?EXAMINE \?ELS11
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-236 (6011)
+?ELS14: EQUAL? PRSA,V?TAKE /?THN19
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-236 (5999)
+?ELS11: EQUAL? PRSA,V?TAKE /?THN14
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-238 (6092)
+?THN19: PRINTR "As you pull on the towel, a fresh portion appears from a slot, and the used portion starts to disappear into the dispenser."
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-238 (6080)
+?THN14: PRINTR "As you pull on the towel, a fresh portion appears from a slot, and the used portion starts to disappear into the dispenser."
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-242 (6267)
+ EQUAL? PRSA,V?EXAMINE \?ELS5
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-242 (6255)
+ EQUAL? PRSA,V?EXAMINE \?ELS4
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-244 (6440)
+?ELS5: EQUAL? PRSA,V?TAKE,V?USE /?THN10
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-244 (6428)
+?ELS4: EQUAL? PRSA,V?TAKE,V?USE /?THN7
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-246 (6526)
+?THN10: PRINTR "There's not enough left!"
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-246 (6513)
+?THN7: PRINTR "There's not enough left!"
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-256 (6698)
+ EQUAL? PRSA,V?TAKE /?THN6
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-256 (6684)
+ EQUAL? PRSA,V?TAKE /?THN4
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-258 (6771)
+?THN6: PRINTR "Whatever you have in mind, it'll never work!"
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-258 (6757)
+?THN4: PRINTR "Whatever you have in mind, it'll never work!"
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-262 (6855)
+ EQUAL? PRSA,V?MUNG \?ELS5
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-262 (6841)
+ EQUAL? PRSA,V?MUNG \?ELS4
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-264 (6923)
+?ELS5: EQUAL? PRSA,V?EXAMINE,V?LOOK-INSIDE \FALSE
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-264 (6909)
+?ELS4: EQUAL? PRSA,V?EXAMINE,V?LOOK-INSIDE \FALSE
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-270 (7149)
+ ZERO? STACK /?ELS5
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-270 (7135)
+ ZERO? STACK /?ELS4
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-273 (7195)
+?ELS5: EQUAL? PRSA,V?LOOK-THROUGH,V?LOOK-INSIDE \?ELS7
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-273 (7181)
+?ELS4: EQUAL? PRSA,V?LOOK-THROUGH,V?LOOK-INSIDE \?ELS5
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-275 (7279)
+ EQUAL? WINNER,PLAYER \?ELS10
+ GRTR? POCKET-CHANGE,0 \?ELS10
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-275 (7265)
+ EQUAL? WINNER,PLAYER \?ELS7
+ GRTR? POCKET-CHANGE,0 \?ELS7
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-278 (7373)
+ ZERO? X /?ELS15
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-278 (7357)
+ ZERO? X /?ELS10
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-280 (7418)
+?ELS15: PRINTR "You have some money in your pocket."
+?ELS10: ZERO? X \TRUE
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-280 (7402)
+?ELS10: PRINTR "You have some money in your pocket."
+?ELS7: ZERO? X \TRUE
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-283 (7528)
+?ELS7: EQUAL? PRSA,V?EMPTY \?ELS28
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-283 (7511)
+?ELS5: EQUAL? PRSA,V?EMPTY \?ELS18
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-289 (7671)
+?ELS28: EQUAL? PRSA,V?CLOSE,V?OPEN \?ELS37
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-289 (7654)
+?ELS18: EQUAL? PRSA,V?CLOSE,V?OPEN \?ELS25
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-291 (7753)
+?ELS37: EQUAL? PRSA,V?PUT-IN \FALSE
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-291 (7736)
+?ELS25: EQUAL? PRSA,V?PUT-IN \FALSE
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-293 (7818)
+ EQUAL? PRSO,GLOBAL-MONEY /?THN49
+ EQUAL? PRSO,INTNUM \?ELS48
+ ZERO? P-DOLLAR-FLAG /?ELS48
+?THN49: PRINTR "It's already there."
+?ELS48: IN? CUSTOMS-AGENT,HERE \FALSE
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-293 (7801)
+ EQUAL? PRSO,GLOBAL-MONEY /?THN33
+ EQUAL? PRSO,INTNUM \?ELS34
+ ZERO? P-DOLLAR-FLAG /?ELS34
+?THN33: PRINTR "It's already there."
+?ELS34: IN? CUSTOMS-AGENT,HERE \FALSE
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-307 (8165)
+ EQUAL? PRSA,V?FIND \?ELS5
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-307 (8148)
+ EQUAL? PRSA,V?FIND \?ELS4
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-309 (8224)
+?ELS5: CALL REMOTE-VERB?
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-309 (8207)
+?ELS4: CALL REMOTE-VERB?
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-311 (8271)
+ EQUAL? PRSA,V?PUT-IN,V?PUT \?ELS11
+ EQUAL? PRSO,GLOBAL-MONEY \?ELS11
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-311 (8254)
+ EQUAL? PRSA,V?PUT-IN,V?PUT \?ELS8
+ EQUAL? PRSO,GLOBAL-MONEY \?ELS8
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-315 (8374)
+?ELS11: GRTR? POCKET-CHANGE,0 \?ELS15
+ EQUAL? PRSA,V?EXAMINE,V?COUNT \?ELS20
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-315 (8355)
+?ELS8: GRTR? POCKET-CHANGE,0 \?ELS10
+ EQUAL? PRSA,V?EXAMINE,V?COUNT \?ELS14
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-321 (8543)
+?ELS20: EQUAL? PRSA,V?GIVE \?ELS26
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-321 (8523)
+?ELS14: EQUAL? PRSA,V?GIVE \?ELS19
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-324 (8656)
+?ELS26: EQUAL? PRSA,V?TAKE \?ELS30
+ ZERO? PRSI /?ELS30
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-324 (8636)
+?ELS19: EQUAL? PRSA,V?TAKE \?ELS22
+ ZERO? PRSI /?ELS22
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-329 (8788)
+?ELS30: CALL TELL-FLASHING-CASH
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-329 (8768)
+?ELS22: CALL TELL-FLASHING-CASH
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-331 (8831)
+?ELS15: CALL NOT-HERE,GLOBAL-MONEY
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-331 (8811)
+?ELS10: CALL NOT-HERE,GLOBAL-MONEY
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-344 (9016)
+ EQUAL? PRSA,V?BUY,V?ASK-FOR \?ELS5
+ EQUAL? P-ADJ,W?FIRST \?ELS10
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-344 (8996)
+ EQUAL? PRSA,V?BUY,V?ASK-FOR \?ELS4
+ EQUAL? P-ADJ,W?FIRST \?ELS8
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-348 (9125)
+?ELS10: CALL DO-INSTEAD-OF,FOOD-2,ITEMS
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-348 (9104)
+?ELS8: CALL DO-INSTEAD-OF,FOOD-2,ITEMS
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-350 (9175)
+?ELS5: EQUAL? PRSA,V?READ,V?EXAMINE,V?ANALYZE \FALSE
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-350 (9153)
+?ELS4: EQUAL? PRSA,V?READ,V?EXAMINE,V?ANALYZE \FALSE
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-358 (9306)
+ EQUAL? PRSA,V?SMELL,V?BUY,V?ASK-FOR \?ELS5
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-358 (9284)
+ EQUAL? PRSA,V?SMELL,V?BUY,V?ASK-FOR \?ELS4
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-361 (9398)
+?ELS5: CALL REMOTE-VERB?
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-361 (9376)
+?ELS4: CALL REMOTE-VERB?
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-378 (9657)
+ EQUAL? PRSA,V?DRINK,V?SMELL,V?EAT \?ELS5
+ EQUAL? PRSA,V?SMELL /?THN11
+ IN? PRSO,GLOBAL-OBJECTS /?ELS10
+?THN11: PRINTR "It's pungent but not very flavorful."
+?ELS10: PRINTR "That wouldn't be very polite."
+?ELS5: EQUAL? PRSA,V?PUT-IN,V?PUT,V?POUR \?ELS20
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-378 (9635)
+ EQUAL? PRSA,V?DRINK,V?SMELL,V?EAT \?ELS4
+ EQUAL? PRSA,V?SMELL /?THN8
+ IN? PRSO,GLOBAL-OBJECTS /?ELS9
+?THN8: PRINTR "It's pungent but not very flavorful."
+?ELS9: PRINTR "That wouldn't be very polite."
+?ELS4: EQUAL? PRSA,V?PUT-IN,V?PUT,V?POUR \?ELS14
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-385 (9957)
+?ELS20: EQUAL? PRSA,V?BUY,V?ASK-FOR \FALSE
+ ZERO? ON-TRAIN /?ELS27
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-385 (9931)
+?ELS14: EQUAL? PRSA,V?BUY,V?ASK-FOR \FALSE
+ ZERO? ON-TRAIN /?ELS19
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-388 (10044)
+ JUMP ?CND25
+?ELS27: SET 'PER,WAITRESS
+?CND25: ZERO? DRINK? /?ELS33
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-388 (10018)
+ JUMP ?CND18
+?ELS19: SET 'PER,WAITRESS
+?CND18: ZERO? DRINK? /?ELS21
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-392 (10135)
+ JUMP ?CND31
+?ELS33: SET 'OBJ,FOOD
+?CND31: ZERO? DRINK? /?ELS39
+ FSET? WINE-RED,TOUCHBIT /?THN44
+ FSET? WINE-WHITE,TOUCHBIT \?CND37
+?THN44: PRINTR "You've bought enough drink already."
+?ELS39: FSET? FOOD,TOUCHBIT \?CND37
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-392 (10109)
+ JUMP ?CND20
+?ELS21: SET 'OBJ,FOOD
+?CND20: ZERO? DRINK? /?ELS23
+ FSET? WINE-RED,TOUCHBIT /?THN25
+ FSET? WINE-WHITE,TOUCHBIT \?CND22
+?THN25: PRINTR "You've bought enough drink already."
+?ELS23: FSET? FOOD,TOUCHBIT \?CND22
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-400 (10409)
+?CND37: ZERO? POCKET-CHANGE \?ELS56
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-400 (10383)
+?CND22: ZERO? POCKET-CHANGE \?ELS35
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-402 (10486)
+?ELS56: IN? PER,HERE /?ELS60
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-402 (10460)
+?ELS35: IN? PER,HERE /?ELS38
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-406 (10583)
+?ELS60: DEC 'POCKET-CHANGE
+ EQUAL? OBJ,WINE-RED,WINE-WHITE \?CND65
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-406 (10557)
+?ELS38: DEC 'POCKET-CHANGE
+ EQUAL? OBJ,WINE-RED,WINE-WHITE \?CND41
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-412 (10728)
+?CND65: CALL TABLE?,HERE
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-412 (10702)
+?CND41: CALL TABLE?,HERE
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-414 (10768)
+ ZERO? ?ORTMP /?ORP71
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-414 (10742)
+ ZERO? ?ORTMP /?ORP45
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-416 (10805)
+ JUMP ?THN68
+?ORP71: PUSH HERE
+?THN68: MOVE OBJ,STACK
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-416 (10779)
+ JUMP ?THN43
+?ORP45: PUSH HERE
+?THN43: MOVE OBJ,STACK
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-434 (11164)
+ EQUAL? PRSA,V?EMPTY,V?THROW-THROUGH,V?THROW-AT \?ELS5
+ IN? WINE-RED,CUP \?CND6
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-434 (11138)
+ EQUAL? PRSA,V?EMPTY,V?THROW-THROUGH,V?THROW-AT \?ELS4
+ IN? WINE-RED,CUP \?CND5
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-437 (11277)
+?CND6: IN? WINE-WHITE,CUP \?CND9
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-437 (11251)
+?CND5: IN? WINE-WHITE,CUP \?CND7
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-439 (11344)
+?CND9: CALL ROB,CUP,HERE
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-439 (11318)
+?CND7: CALL ROB,CUP,HERE
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-442 (11416)
+?ELS5: EQUAL? PRSA,V?PUT-IN \FALSE
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-442 (11390)
+?ELS4: EQUAL? PRSA,V?PUT-IN \FALSE
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-451 (11617)
+ EQUAL? PRSA,V?PUT \?ELS9
+ EQUAL? PRSI,TOWEL-WAITER,NAPKIN,SCARF \?ELS9
+ EQUAL? PRSO,WINE-RED \?ELS9
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-451 (11591)
+ EQUAL? PRSA,V?PUT \?ELS5
+ EQUAL? PRSI,TOWEL-WAITER,NAPKIN,SCARF \?ELS5
+ EQUAL? PRSO,WINE-RED \?ELS5
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-455 (11737)
+ ZERO? OBJ \?THN6
+?ELS9: EQUAL? PRSA,V?PUT-IN \?ELS5
+ EQUAL? PRSO,TOWEL-WAITER,NAPKIN,SCARF \?ELS5
+ EQUAL? PRSI,WINE-RED \?ELS5
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-455 (11711)
+ ZERO? 1 \?THN4
+?ELS5: EQUAL? PRSA,V?PUT-IN \?ELS6
+ EQUAL? PRSO,TOWEL-WAITER,NAPKIN,SCARF \?ELS6
+ EQUAL? PRSI,WINE-RED \?ELS6
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-460 (11885)
+ ZERO? OBJ /?ELS5
+?THN6: LOC OBJ
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-460 (11857)
+ ZERO? 1 /?ELS6
+?THN4: LOC OBJ
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-471 (12108)
+?ELS5: CALL FOOD-F,TRUE-VALUE
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-471 (12078)
+?ELS6: CALL FOOD-F,TRUE-VALUE
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-476 (12176)
+ ZERO? ON-TRAIN /?ELS3
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-476 (12146)
+ ZERO? ON-TRAIN /?ELS2
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-479 (12231)
+?ELS3: SET 'PER,WAITRESS
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-479 (12201)
+?ELS2: SET 'PER,WAITRESS
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-490 (12547)
+ EQUAL? RM,CAFE \?ELS5
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-490 (12517)
+ EQUAL? RM,CAFE \?ELS4
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-492 (12593)
+?ELS5: EQUAL? RM,BOOTH-1 \?ELS7
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-492 (12563)
+?ELS4: EQUAL? RM,BOOTH-1 \?ELS5
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-494 (12643)
+?ELS7: EQUAL? RM,BOOTH-2 \?ELS9
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-494 (12613)
+?ELS5: EQUAL? RM,BOOTH-2 \?ELS6
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-496 (12693)
+?ELS9: EQUAL? RM,BOOTH-3 \FALSE
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-496 (12663)
+?ELS6: EQUAL? RM,BOOTH-3 \FALSE
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-506 (12993)
+ EQUAL? PRSA,V?LEARN,V?ANALYZE \?ELS5
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-506 (12963)
+ EQUAL? PRSA,V?LEARN,V?ANALYZE \?ELS4
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-508 (13201)
+?ELS5: EQUAL? PRSA,V?MAKE \FALSE
+ ZERO? PRSI /?ELS12
+ FSET? PRSI,PERSONBIT \?ELS12
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-508 (13171)
+?ELS4: EQUAL? PRSA,V?MAKE \FALSE
+ ZERO? PRSI /?ELS9
+ FSET? PRSI,PERSONBIT \?ELS9
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-512 (13301)
+ JUMP ?CND10
+?ELS12: CALL QCONTEXT-GOOD?
+ ZERO? STACK /?ELS16
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-512 (13269)
+ JUMP ?CND8
+?ELS9: CALL QCONTEXT-GOOD?
+ ZERO? STACK /?ELS11
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-516 (13384)
+ JUMP ?CND10
+?ELS16: CALL FIND-FLAG,HERE,PERSONBIT,WINNER >P
+ ZERO? P \?CND10
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-516 (13350)
+ JUMP ?CND8
+?ELS11: CALL FIND-FLAG,HERE,PERSONBIT,WINNER >P
+ ZERO? P \?CND8
+***************
+
+**** FILE PS:<SWG>GLOBAL.ZAP.1, 1-520 (13517)
+?CND10: CALL START-SENTENCE,P
+**** FILE PS:<SWG>GLOBAL.ZAP.3, 1-520 (13481)
+?CND8: CALL START-SENTENCE,P
+***************
+
diff --git a/global.zap b/global.zap
new file mode 100644
index 0000000..a67e1d6
--- /dev/null
+++ b/global.zap
@@ -0,0 +1,657 @@
+
+
+ .FUNCT DO-INSTEAD-OF,OBJ1,OBJ2
+ EQUAL? PRSI,OBJ2 \?ELS5
+ CALL PERFORM,PRSA,PRSO,OBJ1
+ RTRUE
+?ELS5: EQUAL? PRSO,OBJ2 \?ELS7
+ CALL PERFORM,PRSA,OBJ1,PRSI
+ RTRUE
+?ELS7: CALL1 V-FOO
+ ZERO? STACK /FALSE
+ RTRUE
+
+
+ .FUNCT TURN-F
+ EQUAL? PRSA,V?USE \FALSE
+ CALL PERFORM,V?WAIT-FOR,PRSO
+ RTRUE
+
+
+ .FUNCT IT-F
+ EQUAL? PRSI,IT \?THN10
+ EQUAL? PRSA,V?TELL-ABOUT /?THN10
+ EQUAL? PRSA,V?SEARCH-FOR,V?ASK-FOR,V?ASK-ABOUT /?THN14
+?THN10: EQUAL? PRSO,IT \FALSE
+ EQUAL? PRSA,V?WHAT /?THN14
+ EQUAL? PRSA,V?FIND,V?ASK-CONTEXT-FOR,V?ASK-CONTEXT-ABOUT \FALSE
+?THN14: CALL1 PRODUCE-GIBBERISH
+ RSTACK
+
+
+ .FUNCT FLOOR-F,OBJ
+ EQUAL? PRSA,V?PUT \?ELS5
+ EQUAL? PRSI,FLOOR \?ELS5
+ CALL PERFORM,V?DROP,PRSO
+ RTRUE
+?ELS5: EQUAL? PRSA,V?LOOK-ON,V?SEARCH,V?EXAMINE \?ELS9
+ CALL FIND-FLAG,HERE,NDESCBIT,WINNER >OBJ
+ ZERO? OBJ /?ELS14
+ FCLEAR OBJ,NDESCBIT
+ CALL2 THIS-IS-IT,OBJ
+ PRINTI "Something catches your eye: it's "
+ CALL2 PRINTA,OBJ
+ PRINTR "."
+?ELS14: PRINTR "You don't find anything new there."
+?ELS9: EQUAL? PRSA,V?TAKE,V?BRUSH \FALSE
+ IN? BLOOD-SPOT,HERE \FALSE
+ CALL PERFORM,V?BRUSH,BLOOD-SPOT,PRSI
+ RTRUE
+
+
+ .FUNCT DOLLARS-F
+ EQUAL? PRSA,V?COUNT \?ELS5
+ CALL DO-INSTEAD-OF,GLOBAL-MONEY,DOLLARS
+ RTRUE
+?ELS5: ZERO? P-DOLLAR-FLAG /?ELS10
+ ZERO? P-AMOUNT \?CND8
+ SET 'P-AMOUNT,1
+ JUMP ?CND8
+?ELS10: SET 'P-DOLLAR-FLAG,TRUE-VALUE
+ ZERO? P-NUMBER \?CND8
+ SET 'P-AMOUNT,1
+?CND8: CALL DO-INSTEAD-OF,INTNUM,DOLLARS
+ RTRUE
+
+
+ .FUNCT INTNUM-F
+ ZERO? P-DOLLAR-FLAG /FALSE
+ CALL2 DIVESTMENT?,PRSO
+ ZERO? STACK /?ELS11
+ CALL1 TELL-FLASHING-CASH
+ RTRUE
+?ELS11: EQUAL? PRSA,V?ASK-FOR,V?TAKE /FALSE
+ EQUAL? WINNER,PLAYER \FALSE
+ GETP PLAYER,P?SOUTH
+ GRTR? P-AMOUNT,STACK \FALSE
+ PRINTR "You don't have that much."
+
+
+ .FUNCT YOU-F
+ EQUAL? WINNER,PLAYER /?ELS5
+ CALL DO-INSTEAD-OF,WINNER,YOU
+ RTRUE
+?ELS5: EQUAL? PRSA,V?ASK-ABOUT \FALSE
+ EQUAL? PRSI,YOU \FALSE
+ CALL PERFORM,V?ASK-ABOUT,PRSO,PRSO
+ RTRUE
+
+
+ .FUNCT CORRIDOR-GLOBAL-F,RM
+ EQUAL? PRSA,V?LOOK-UP,V?LOOK-DOWN /?THN6
+ EQUAL? PRSA,V?LOOK-INSIDE,V?EXAMINE,V?ANALYZE \FALSE
+?THN6: ZERO? ON-TRAIN /FALSE
+ CALL ZMEMQ,HERE,CAR-ROOMS-CORRID
+ ZERO? STACK /?ELS14
+ CALL2 PERFORM,V?LOOK
+ RTRUE
+?ELS14: CALL NEXT-ROOM,HERE,P?OUT >RM
+ ZERO? RM /FALSE
+ CALL ROOM-PEEK,RM,TRUE-VALUE
+ RSTACK
+
+
+ .FUNCT GLOBAL-HERE-F,FLG=0,F,HR,TIM,VAL
+ EQUAL? PRSA,V?SIT,V?WALK-TO \?ELS5
+ CALL DO-INSTEAD-OF,HERE,GLOBAL-HERE
+ RTRUE
+?ELS5: EQUAL? PRSA,V?KNOCK \?ELS7
+ PRINTR "Knocking on the walls reveals nothing unusual."
+?ELS7: EQUAL? PRSA,V?TIE-TO,V?PUT-IN,V?PUT \?ELS11
+ CALL1 MORE-SPECIFIC
+ RSTACK
+?ELS11: EQUAL? PRSA,V?EXAMINE,V?SEARCH \FALSE
+ GETP HERE,P?CORRIDOR
+ ZERO? STACK /?ELS16
+ SET 'TIM,3
+ JUMP ?CND14
+?ELS16: GETP HERE,P?SIZE
+ ADD 2,STACK >TIM
+?CND14: EQUAL? P-ADVERB,W?CAREFULLY \?CND19
+ MUL 2,TIM >TIM
+?CND19: PRINTI "(It's better to examine or search one thing at a time. It would take a long time to search a whole room or area thoroughly. A "
+ EQUAL? P-ADVERB,W?CAREFULLY \?ELS26
+ PRINTI "careful"
+ JUMP ?CND24
+?ELS26: PRINTI "brief"
+?CND24: PRINTI " search would take "
+ PRINTN TIM
+ PRINTI " minutes, and it might not reveal much. Would you like to do it anyway?)"
+ CALL1 YES?
+ ZERO? STACK /?ELS39
+ CALL2 INT-WAIT,TIM >VAL
+ EQUAL? M-FATAL,VAL /TRUE
+ ZERO? VAL /?ELS46
+ PRINTI "Your "
+ EQUAL? P-ADVERB,W?CAREFULLY \?ELS52
+ PRINTI "careful"
+ JUMP ?CND50
+?ELS52: PRINTI "brief"
+?CND50: PRINTI " search reveals"
+ CALL2 FOUND?,HERE >VAL
+ ZERO? VAL /?ELS65
+ CALL2 PRINTT,VAL
+ PRINTR " under the seat."
+?ELS65: PRINTR " nothing exciting."
+?ELS46: PRINTR "You didn't finish looking over the place."
+?ELS39: SET 'CLOCK-WAIT,TRUE-VALUE
+ PRINTR "Okay."
+
+
+ .FUNCT FOUND?,RM,X
+ CALL ZMEMQ,RM,CAR-ROOMS-COMPS >X
+ ZERO? X /?ELS5
+ GET CAR-ROOMS-UNDER,X
+ FIRST? STACK >X \?ELS5
+ RETURN X
+?ELS5: EQUAL? RM,BOOTH-1 \?ELS9
+ FIRST? UNDER-BOOTH-1 /TRUE
+ RFALSE
+?ELS9: EQUAL? RM,BOOTH-2 \?ELS13
+ FIRST? UNDER-BOOTH-2 /TRUE
+ RFALSE
+?ELS13: EQUAL? RM,BOOTH-3 \FALSE
+ FIRST? UNDER-BOOTH-3 /TRUE
+ RFALSE
+
+
+ .FUNCT AIR-F
+ EQUAL? PRSA,V?EXAMINE \?ELS5
+ PRINTR "You can see through the air around you."
+?ELS5: EQUAL? PRSA,V?WALK-TO \?ELS9
+ PRINTR "It's all around you!"
+?ELS9: EQUAL? PRSA,V?SMELL \FALSE
+ CALL2 OUTSIDE?,HERE
+ ZERO? STACK /?ELS18
+ PRINTR "The air is clear and fresh."
+?ELS18: CALL2 FRESH-AIR?,HERE
+ ZERO? STACK \TRUE
+ PRINTR "The air is rather musty."
+
+
+ .FUNCT SOMETHING-F
+ SET 'CLOCK-WAIT,TRUE-VALUE
+ PRINTI "(Type a real word instead of "
+ PRINTD SOMETHING
+ PRINTR ".)"
+
+
+ .FUNCT TOILET-F
+ EQUAL? PRSA,V?CLOSE,V?OPEN \?ELS5
+ CALL1 YOU-CANT
+ RSTACK
+?ELS5: EQUAL? PRSA,V?PUT-IN \?ELS7
+ EQUAL? PRSI,TOILET \FALSE
+ FSET PRSO,MUNGBIT
+ RFALSE
+?ELS7: EQUAL? PRSA,V?FLUSH-DOWN,V?FLUSH \FALSE
+ ZERO? IN-STATION /?ELS19
+ ZERO? ON-TRAIN /?ELS19
+ PRINTR "An old refrain comes to mind:
+""Passengers will please refrain
+From flushing toilets while the train
+Is standing in the station. (I love you!)"""
+?ELS19: EQUAL? PRSA,V?FLUSH-DOWN \?CND26
+ CALL1 ITAKE
+ EQUAL? STACK,TRUE-VALUE \TRUE
+ MOVE PRSO,TOILET
+?CND26: FIRST? TOILET \?CND32
+ PRINTI "Say goodbye to"
+ CALL ROB,TOILET,LIMBO-FWD,TRUE-VALUE
+?CND32: PRINTR """Whhoooossshhhhh!"""
+
+
+ .FUNCT ROB,WHAT,THIEF,TELL?=0,N,X,TOLD?=0
+ FIRST? WHAT >X /?KLU29
+?KLU29:
+?PRG1: ZERO? X /TRUE
+ NEXT? X >N /?KLU30
+?KLU30: ZERO? N \?CND6
+ ZERO? TOLD? /?CND6
+ ZERO? TELL? /?CND6
+ PRINTI " and"
+?CND6: SET 'TOLD?,TRUE-VALUE
+ ZERO? TELL? /?CND13
+ CALL2 PRINTT,X
+ ZERO? N /?ELS21
+ PRINTI ","
+ JUMP ?CND13
+?ELS21: PRINTI ". "
+?CND13: MOVE X,THIEF
+ FCLEAR X,TAKEBIT
+ SET 'X,N
+ JUMP ?PRG1
+
+
+ .FUNCT SINK-F
+ EQUAL? PRSA,V?CLOSE,V?OPEN \?ELS5
+ CALL1 YOU-CANT
+ RSTACK
+?ELS5: EQUAL? PRSA,V?LAMP-ON \FALSE
+ PRINTR "You push on the handle, and water runs until you let go. A silly idea comes into your head: what is the sound of one hand washing?"
+
+
+ .FUNCT TOWEL-LOOP-F
+ EQUAL? PRSA,V?CUT \?ELS5
+ EQUAL? PRSI,KNIFE \FALSE
+ MOVE SCARF,PLAYER
+ FSET SCARF,TAKEBIT
+ PUTP SCARF,P?CAR,CAR-HERE
+ MOVE TOWEL-FIXTURE-BROKEN,HERE
+ PUTP TOWEL-FIXTURE-BROKEN,P?CAR,CAR-HERE
+ MOVE TOWEL-LOOP-BROKEN,HERE
+ PUTP TOWEL-LOOP-BROKEN,P?CAR,CAR-HERE
+ CALL2 THIS-IS-IT,TOWEL-LOOP-BROKEN
+ PRINTI "Well done! You now have a government-issue "
+ PRINTD SCARF
+ PRINTR ", and the janitor has a mess to repair."
+?ELS5: EQUAL? PRSA,V?EXAMINE \?ELS14
+ PRINTR "This cloth towel must be very long, but most of it is rolled up inside the dispenser. Only about a meter hangs below it in a ""U"" shape."
+?ELS14: EQUAL? PRSA,V?TAKE /?THN19
+ EQUAL? PRSA,V?USE,V?MOVE-DIR,V?MOVE \FALSE
+?THN19: PRINTR "As you pull on the towel, a fresh portion appears from a slot, and the used portion starts to disappear into the dispenser."
+
+
+ .FUNCT TOWEL-LOOP-BROKEN-F
+ EQUAL? PRSA,V?EXAMINE \?ELS5
+ PRINTR "This cloth towel must be very long, but most of it is rolled up inside the dispenser. The part that should hang below is cut away."
+?ELS5: EQUAL? PRSA,V?TAKE,V?USE /?THN10
+ EQUAL? PRSA,V?MOVE-DIR,V?MOVE,V?CUT \FALSE
+?THN10: PRINTR "There's not enough left!"
+
+
+ .FUNCT PAPER-FIXTURE-F
+ EQUAL? PRSA,V?LOOK-INSIDE \FALSE
+ FCLEAR PAPER-LOOP,NDESCBIT
+ RFALSE
+
+
+ .FUNCT PAPER-LOOP-F
+ EQUAL? PRSA,V?TAKE /?THN6
+ EQUAL? PRSA,V?USE,V?MOVE-DIR,V?MOVE \FALSE
+?THN6: PRINTR "Whatever you have in mind, it'll never work!"
+
+
+ .FUNCT MIRROR-F
+ EQUAL? PRSA,V?MUNG \?ELS5
+ PRINTR "You don't need any bad luck!"
+?ELS5: EQUAL? PRSA,V?EXAMINE,V?LOOK-INSIDE \FALSE
+ PRINTI "A harried and weary "
+ EQUAL? VARIATION,3,4 \?ELS16
+ PUSH STR?151
+ JUMP ?CND12
+?ELS16: PUSH STR?152
+?CND12: PRINT STACK
+ PRINTR " looks back at you, with a look that seems to say, ""I don't need this aggravation!"""
+
+
+ .FUNCT POCKET-F,X
+ CALL2 DIVESTMENT?,POCKET
+ ZERO? STACK /?ELS5
+ CALL1 HAR-HAR
+ RSTACK
+?ELS5: EQUAL? PRSA,V?LOOK-THROUGH,V?LOOK-INSIDE \?ELS7
+ CALL2 PRINT-CONT,POCKET >X
+ EQUAL? WINNER,PLAYER \?ELS10
+ GETP PLAYER,P?SOUTH
+ GRTR? STACK,0 \?ELS10
+ CALL2 THIS-IS-IT,GLOBAL-MONEY
+ ZERO? X /?ELS15
+ PRINTR "And some money."
+?ELS15: PRINTI "You have some money in your pocket."
+ IN? CUSTOMS-AGENT,HERE \?CND23
+ PRINTI " But"
+ CALL2 HE-SHE-IT,CUSTOMS-AGENT
+ PRINTI " won't mind."
+?CND23: CRLF
+ RTRUE
+?ELS10: ZERO? X \TRUE
+ PRINTR "Your pocket is empty."
+?ELS7: EQUAL? PRSA,V?EMPTY \?ELS33
+ FIRST? POCKET \FALSE
+ PRINTI "You are now holding"
+ CALL ROB,POCKET,PLAYER,TRUE-VALUE
+ CRLF
+ RTRUE
+?ELS33: EQUAL? PRSA,V?CLOSE,V?OPEN \?ELS42
+ PRINTR "You don't need to do that."
+?ELS42: EQUAL? PRSA,V?PUT-IN \FALSE
+ EQUAL? PRSI,POCKET \FALSE
+ EQUAL? PRSO,GLOBAL-MONEY /?THN54
+ EQUAL? PRSO,INTNUM \?ELS53
+ ZERO? P-DOLLAR-FLAG /?ELS53
+?THN54: PRINTR "It's already there."
+?ELS53: EQUAL? PRSO,CAMERA \FALSE
+ FSET? PRSO,OPENBIT \FALSE
+ FCLEAR PRSO,OPENBIT
+ PRINTI "(You close"
+ CALL2 HIM-HER-IT,PRSO
+ PRINTI " first.)"
+ CRLF
+ RFALSE
+
+
+ .FUNCT POCKET-C-F,X
+ CALL2 DIVESTMENT?,POCKET-C
+ ZERO? STACK /?ELS5
+ CALL1 HAR-HAR
+ RSTACK
+?ELS5: EQUAL? PRSA,V?LOOK-THROUGH,V?LOOK-INSIDE \?ELS7
+ FSET? CONDUCTOR,MUNGBIT /?THN11
+ FSET? CONDUCTOR,PERSONBIT /?ELS10
+?THN11: CALL2 PRINT-CONT,POCKET-C >X
+ RTRUE
+?ELS10: CALL HE-SHE-IT,CONDUCTOR,TRUE-VALUE
+ PRINTR " brushes your hand away without even looking."
+?ELS7: EQUAL? PRSA,V?CLOSE,V?OPEN \?ELS18
+ PRINTR "You don't need to do that."
+?ELS18: EQUAL? PRSA,V?PUT-IN \FALSE
+ EQUAL? PRSI,POCKET-C \FALSE
+ EQUAL? PRSO,CAMERA \FALSE
+ FSET? PRSO,OPENBIT \FALSE
+ FCLEAR PRSO,OPENBIT
+ PRINTI "(You close"
+ CALL2 HIM-HER-IT,PRSO
+ PRINTI " first.)"
+ CRLF
+ RFALSE
+
+
+ .FUNCT TELL-FLASHING-CASH
+ PRINTR "Flashing your bankroll is not a good idea."
+
+
+ .FUNCT GLOBAL-MONEY-F
+ EQUAL? PRSA,V?FIND \?ELS5
+ PRINTR "It's not that easy!"
+?ELS5: CALL1 REMOTE-VERB?
+ ZERO? STACK \FALSE
+ EQUAL? PRSA,V?PUT-IN,V?PUT \?ELS11
+ EQUAL? PRSO,GLOBAL-MONEY \?ELS11
+ CALL1 MORE-SPECIFIC
+ RSTACK
+?ELS11: GETP PLAYER,P?SOUTH
+ GRTR? STACK,0 \?ELS15
+ EQUAL? PRSA,V?EXAMINE,V?COUNT \?ELS20
+ PRINTI "You are carrying "
+ PRINTC CURRENCY-SYMBOL
+ GETP PLAYER,P?SOUTH
+ PRINTN STACK
+ PRINTR "."
+?ELS20: EQUAL? PRSA,V?GIVE \?ELS26
+ SET 'CLOCK-WAIT,TRUE-VALUE
+ PRINTR "(You didn't say how much money to give.)"
+?ELS26: EQUAL? PRSA,V?TAKE \?ELS30
+ ZERO? PRSI /?ELS30
+ PRINTI "You can't see any money on"
+ CALL2 HIM-HER-IT,PRSI
+ PRINTR "."
+?ELS30: EQUAL? PRSA,V?SHOW /FALSE
+ CALL1 TELL-FLASHING-CASH
+ RSTACK
+?ELS15: CALL2 NOT-HERE,GLOBAL-MONEY
+ RSTACK
+
+
+ .FUNCT MENU-F
+ EQUAL? PRSA,V?READ,V?EXAMINE,V?ANALYZE \FALSE
+ GETP MENU,P?TEXT
+ PRINT STACK
+ CRLF
+ RTRUE
+
+
+ .FUNCT ITEMS-F
+ EQUAL? PRSA,V?BUY,V?ASK-FOR \?ELS5
+ EQUAL? P-ADJ,W?FIRST \?ELS10
+ CALL DO-INSTEAD-OF,FOOD,ITEMS
+ RTRUE
+?ELS10: CALL DO-INSTEAD-OF,FOOD-2,ITEMS
+ RTRUE
+?ELS5: EQUAL? PRSA,V?READ,V?EXAMINE,V?ANALYZE \FALSE
+ GETP MENU,P?TEXT
+ PRINT STACK
+ CRLF
+ RTRUE
+
+
+ .FUNCT FOOD-GLOBAL-F
+ EQUAL? PRSA,V?SMELL,V?BUY,V?ASK-FOR \?ELS5
+ CALL DO-INSTEAD-OF,FOOD,FOOD-GLOBAL
+ RTRUE
+?ELS5: CALL1 REMOTE-VERB?
+ ZERO? STACK \FALSE
+ CALL2 NOT-HERE,FOOD-GLOBAL
+ RSTACK
+
+
+ .FUNCT DRINK-F
+ CALL2 FOOD-F,TRUE-VALUE
+ RSTACK
+
+
+ .FUNCT DRINK-1-F
+ CALL DO-INSTEAD-OF,DRINK-GLOBAL,DRINK-1
+ RTRUE
+
+
+ .FUNCT FOOD-F,DRINK?=0,PER,OBJ,X,?ORTMP
+ EQUAL? PRSA,V?DRINK,V?SMELL,V?EAT \?ELS5
+ EQUAL? PRSA,V?SMELL /?THN11
+ IN? PRSO,GLOBAL-OBJECTS /?ELS10
+?THN11: PRINTI "It's pungent but not very flavorful."
+ EQUAL? PRSA,V?SMELL /?CND15
+ GETP PRSO,P?SIZE >X
+ PUTP PRSO,P?SIZE,X
+ EQUAL? X,FOOD-HALF-SIZE \?ELS20
+ PRINTI " And it's half gone."
+ JUMP ?CND15
+?ELS20: ZERO? X \?CND15
+ MOVE PRSO,GLOBAL-OBJECTS
+ PRINTI " And it's gone."
+?CND15: EQUAL? VARIATION,3,4 \?CND27
+ PRINTI " You've had better in some mighty dank corners of the world."
+?CND27: CRLF
+ RTRUE
+?ELS10: PRINTR "That wouldn't be very polite."
+?ELS5: EQUAL? PRSA,V?MUNG /?THN38
+ EQUAL? PRSA,V?PUT-IN,V?PUT,V?POUR \?ELS37
+?THN38: EQUAL? PRSI,TOILET /FALSE
+ EQUAL? PRSA,V?POUR /?ELS46
+ EQUAL? PRSI,TABLE-3,TABLE-2,TABLE-1 /FALSE
+?ELS46: PRINTR "What a mess that would make!"
+?ELS37: EQUAL? PRSA,V?BUY,V?ASK-FOR \FALSE
+ EQUAL? HERE,PANTRY \?CND55
+ CALL2 INVASION?,WAITER
+ ZERO? STACK \TRUE
+?CND55: ZERO? ON-TRAIN /?ELS62
+ SET 'PER,WAITER
+ JUMP ?CND60
+?ELS62: SET 'PER,WAITRESS
+?CND60: ZERO? DRINK? /?ELS68
+ SET 'OBJ,WINE-RED
+ JUMP ?CND66
+?ELS68: SET 'OBJ,FOOD
+?CND66: ZERO? DRINK? /?ELS74
+ FSET? WINE-RED,TOUCHBIT /?THN79
+ FSET? WINE-WHITE,TOUCHBIT \?CND72
+?THN79: PRINTR "You've bought enough to drink already."
+?ELS74: FSET? FOOD,TOUCHBIT \?CND72
+ PRINTR "You've bought enough to eat already."
+?CND72: GETP PLAYER,P?SOUTH
+ ZERO? STACK \?ELS91
+ PRINTR "You don't have enough money."
+?ELS91: IN? PER,HERE /?ELS95
+ PRINTI "You'd better talk to "
+ CALL2 PRINTA,PER
+ PRINTR " first."
+?ELS95: GETP PLAYER,P?SOUTH
+ SUB STACK,1
+ PUTP PLAYER,P?SOUTH,STACK
+ EQUAL? OBJ,WINE-RED,WINE-WHITE \?ELS102
+ CALL CALL-FOR-PROP,CUP-A,WAITER
+ POP '?ORTMP
+ ZERO? ?ORTMP /?ORP106
+ PUSH ?ORTMP
+ JUMP ?THN103
+?ORP106: CALL CALL-FOR-PROP,CUP-B,WAITER
+?THN103: POP 'X
+ MOVE OBJ,X
+ PUTP OBJ,P?CAR,CAR-HERE
+ PUTP OBJ,P?SIZE,FOOD-SIZE
+ FSET OBJ,TOUCHBIT
+ SET 'OBJ,X
+ JUMP ?CND100
+?ELS102: PUTP OBJ,P?SIZE,FOOD-SIZE
+?CND100: CALL2 TABLE?,HERE
+ POP '?ORTMP
+ ZERO? ?ORTMP /?ORP112
+ PUSH ?ORTMP
+ JUMP ?THN109
+?ORP112: PUSH HERE
+?THN109: MOVE OBJ,STACK
+ PUTP OBJ,P?CAR,CAR-HERE
+ FSET OBJ,TAKEBIT
+ FSET OBJ,TOUCHBIT
+ FCLEAR OBJ,NDESCBIT
+ FCLEAR PER,TOUCHBIT
+ PUTP PER,P?LDESC,29
+ CALL HE-SHE-IT,PER,TRUE-VALUE
+ PRINTI " returns in an instant with "
+ CALL2 PRINTA,OBJ
+ PRINTI " and takes "
+ PRINTC CURRENCY-SYMBOL
+ PRINTR "1 from you."
+
+
+ .FUNCT CUP-F
+ EQUAL? PRSA,V?EMPTY,V?THROW-THROUGH,V?THROW-AT \?ELS5
+ LOC WINE-RED
+ EQUAL? STACK,PRSO,PRSI \?CND6
+ MOVE WINE-RED,GLOBAL-OBJECTS
+?CND6: LOC WINE-WHITE
+ EQUAL? STACK,PRSO,PRSI \?CND9
+ MOVE WINE-WHITE,GLOBAL-OBJECTS
+?CND9: CALL ROB,PRSO,HERE
+ CALL ROB,PRSI,HERE
+ EQUAL? PRSA,V?EMPTY \FALSE
+ PRINTR "Okay."
+?ELS5: EQUAL? PRSA,V?PUT-IN \FALSE
+ EQUAL? PRSO,TOWEL-WAITER,NAPKIN,SCARF \FALSE
+ EQUAL? PRSI,CUP-B,CUP-A \FALSE
+ IN? WINE-RED,PRSI \FALSE
+ CALL DO-INSTEAD-OF,WINE-RED,PRSI
+ RTRUE
+
+
+ .FUNCT WINE-PUT?
+ EQUAL? PRSA,V?PUT \?ELS5
+ EQUAL? PRSI,TOWEL-WAITER,NAPKIN,SCARF \FALSE
+ EQUAL? PRSO,WINE-RED \FALSE
+ RETURN PRSI
+?ELS5: EQUAL? PRSA,V?PUT-IN \FALSE
+ EQUAL? PRSO,TOWEL-WAITER,NAPKIN,SCARF \FALSE
+ EQUAL? PRSI,WINE-RED \FALSE
+ RETURN PRSO
+
+
+ .FUNCT WINE-F,OBJ
+ EQUAL? PRSA,V?TAKE \?ELS5
+ LOC PRSO
+ EQUAL? STACK,CUP-A,CUP-B \?ELS5
+ LOC PRSO
+ CALL PERFORM,PRSA,STACK,PRSI
+ RTRUE
+?ELS5: CALL1 WINE-PUT? >OBJ
+ ZERO? OBJ /?ELS9
+ LOC OBJ
+ MOVE HANKY,STACK
+ FSET HANKY,TAKEBIT
+ MOVE OBJ,LIMBO-FWD
+ FCLEAR OBJ,TAKEBIT
+ MOVE WINE-RED,GLOBAL-OBJECTS
+ PRINTI "The "
+ PRINTD OBJ
+ PRINTI " soaks up the wine, and the stain spreads to every nook and cranny. Within a minute, you have a decent imitation of a "
+ PRINTD HANKY
+ PRINTR "."
+?ELS9: CALL2 FOOD-F,TRUE-VALUE
+ RSTACK
+
+
+ .FUNCT NO-FOOD-F,PER
+ ZERO? ON-TRAIN /?ELS3
+ SET 'PER,WAITER
+ JUMP ?CND1
+?ELS3: SET 'PER,WAITRESS
+?CND1: EQUAL? PRSA,V?BUY,V?ASK-ABOUT \FALSE
+ CALL2 START-SENTENCE,PER
+ PRINTI " shakes"
+ CALL HIM-HER-IT,PER,FALSE-VALUE,TRUE-VALUE
+ CALL2 THIS-IS-IT,FOOD
+ CALL2 THIS-IS-IT,PER
+ PRINTR " head and points to the first item on the menu, which you find unreadable."
+
+
+ .FUNCT TABLE?,RM
+ EQUAL? RM,CAFE \?ELS5
+ RETURN COUNTER-CAFE
+?ELS5: EQUAL? RM,BOOTH-1 \?ELS7
+ RETURN TABLE-1
+?ELS7: EQUAL? RM,BOOTH-2 \?ELS9
+ RETURN TABLE-2
+?ELS9: EQUAL? RM,BOOTH-3 \FALSE
+ RETURN TABLE-3
+
+
+ .FUNCT LANGUAGE-F
+ EQUAL? PRSA,V?LEARN,V?ANALYZE \FALSE
+ PRINTR "Maybe you should have taken your company's offer to pay for language lessons before you started this trip. After all, English isn't spoken everywhere."
+
+
+ .FUNCT GESTURE-F,P
+ EQUAL? PRSA,V?LEARN,V?ANALYZE \?ELS5
+ PRINTR "Maybe you should have taken your company's offer to pay for gesture lessons before you started this trip. After all, English gestures aren't used everywhere."
+?ELS5: EQUAL? PRSA,V?MAKE \FALSE
+ ZERO? PRSI /?ELS12
+ FSET? PRSI,PERSONBIT \?ELS12
+ SET 'P,PRSI
+ JUMP ?CND10
+?ELS12: CALL1 QCONTEXT-GOOD?
+ ZERO? STACK /?ELS16
+ SET 'P,QCONTEXT
+ JUMP ?CND10
+?ELS16: CALL FIND-FLAG,HERE,PERSONBIT,WINNER >P
+ ZERO? P \?CND10
+ CALL2 NOT-CLEAR-WHOM,TRUE-VALUE
+ RTRUE
+?CND10: CALL2 START-SENTENCE,P
+ CALL HE-SHE-IT,P,-1,STR?154
+ PRINTR " a gesture right back. Somehow it looks nastier than yours."
+
+
+ .FUNCT GAME-F
+ EQUAL? PRSA,V?READ,V?PLAY,V?EXAMINE \FALSE
+ SET 'CLOCK-WAIT,TRUE-VALUE
+ PRINTR "(You're doing it now!)"
+
+
+ .FUNCT HEAD-F
+ EQUAL? PRSA,V?NOD \?ELS5
+ CALL2 PERFORM,V?YES
+ RTRUE
+?ELS5: EQUAL? PRSA,V?SHAKE \FALSE
+ CALL2 PERFORM,V?NO
+ RTRUE
+
+ .ENDI
diff --git a/global.zil b/global.zil
new file mode 100644
index 0000000..ee58e5e
--- /dev/null
+++ b/global.zil
@@ -0,0 +1,980 @@
+"GLOBALS for CHECKPOINT
+Copyright (C) 1985 Infocom, Inc. All rights reserved."
+
+<OBJECT GLOBAL-OBJECTS
+ (DESC "GO")
+ (FDESC 0)
+ (FLAGS BUSYBIT CONTBIT DOORBIT FEMALE
+ INVISIBLE LIGHTBIT LOCKED MUNGBIT
+ NARTICLEBIT NDESCBIT ONBIT ;ON?BIT OPENBIT
+ ;PERSONBIT ;PLURAL READBIT RMUNGBIT
+ SEARCHBIT ;SEENBIT SURFACEBIT
+ TAKEBIT TOOLBIT TOUCHBIT TRANSBIT TRYTAKEBIT TURNBIT
+ VEHBIT VOWELBIT WEAPONBIT WEARBIT WINDOWBIT WORNBIT)>
+
+<OBJECT LOCAL-GLOBALS
+ (LOC GLOBAL-OBJECTS)
+ (DESC "LG")
+ (SYNONYM ZZZZLG) ;"This synonym is necessary - God knows">
+
+<ROUTINE DO-INSTEAD-OF (OBJ1 OBJ2)
+ <COND (<EQUAL? ,PRSI .OBJ2> <PERFORM ,PRSA ,PRSO .OBJ1> <RTRUE>)
+ (<EQUAL? ,PRSO .OBJ2> <PERFORM ,PRSA .OBJ1 ,PRSI> <RTRUE>)
+ (<V-FOO>)>>
+
+<OBJECT TURN
+ (LOC GLOBAL-OBJECTS)
+ (ADJECTIVE NUMBER FULL)
+ (SYNONYM TURN TURNS MINUTE)
+ (DESC "minute")
+ (ACTION TURN-F)>
+
+<ROUTINE TURN-F ()
+ <COND (<VERB? USE>
+ <PERFORM ,V?WAIT-FOR ,PRSO>
+ <RTRUE>)>>
+
+<OBJECT IT
+ (LOC GLOBAL-OBJECTS)
+ (SYNONYM IT THIS ;"FUCKER SUCKER")
+ (DESC "it")
+ (FLAGS VOWELBIT NARTICLEBIT)
+ (ACTION IT-F)>
+
+<ROUTINE IT-F ()
+ <COND (<OR <AND <IOBJ? IT>
+ ;<FSET? ,PRSO ,PERSONBIT>
+ <VERB? ASK-ABOUT ASK-FOR SEARCH-FOR TELL-ABOUT>>
+ <AND <DOBJ? IT>
+ <VERB? ASK-CONTEXT-ABOUT ASK-CONTEXT-FOR FIND WHAT>>>
+ <PRODUCE-GIBBERISH>
+ ;<TELL "\"I'm not sure what you're talking about.\"" CR>)>>
+
+<OBJECT FLOOR
+ (LOC GLOBAL-OBJECTS)
+ (DESC "floor")
+ (SYNONYM FLOOR ;AREA GROUND)
+ (ACTION FLOOR-F)>
+
+<ROUTINE FLOOR-F ("AUX" OBJ)
+ <COND ;(<REMOTE-VERB?> <RFALSE>)
+ (<AND <VERB? PUT> <IOBJ? FLOOR>>
+ <PERFORM ,V?DROP ,PRSO>
+ <RTRUE>)
+ (<VERB? EXAMINE SEARCH LOOK-ON>
+ <COND (<SET OBJ <FIND-FLAG ,HERE ,NDESCBIT ,WINNER>>
+ <FCLEAR .OBJ ,NDESCBIT>
+ <THIS-IS-IT .OBJ>
+ <TELL "Something catches your eye: it's " A .OBJ "." CR>)
+ (T <TELL "You don't find anything new there." CR>)>)
+ (<VERB? BRUSH TAKE>
+ <COND (<IN? ,BLOOD-SPOT ,HERE>
+ <PERFORM ,V?BRUSH ,BLOOD-SPOT ,PRSI>
+ <RTRUE>)>)>>
+
+;<OBJECT DANGER
+ (LOC GLOBAL-OBJECTS)
+ (DESC "danger")
+ (SYNONYM DANGER THREAT)>
+
+;<OBJECT MOTIVE
+ (LOC GLOBAL-OBJECTS)
+ (DESC "motive")
+ ;(ADJECTIVE YOUR)
+ (SYNONYM MOTIVE)>
+
+;<OBJECT PROBLEM
+ (LOC GLOBAL-OBJECTS)
+ (DESC "problem")
+ (ADJECTIVE URGENT)
+ (SYNONYM PROBLEM ;"WANT WRONG HAPPENING")>
+
+;<OBJECT GLOBAL-WEAPON
+ (LOC GLOBAL-OBJECTS)
+ (DESC "weapon")
+ (ADJECTIVE ;YOUR SOME)
+ (SYNONYM WEAPON)>
+
+;<OBJECT GLOBAL-EXPLOSIVE
+ (LOC GLOBAL-OBJECTS)
+ (DESC "explosive charge")
+ (ADJECTIVE ;YOUR SOME EXPLOSIVE)
+ (SYNONYM EXPLOSIVE CHARGE)
+ (FLAGS VOWELBIT)>
+
+;<OBJECT GLOBAL-SURFACE
+ (LOC GLOBAL-OBJECTS)
+ (DESC "surface")
+ (SYNONYM SURFACE)>
+
+<OBJECT DOLLARS
+ (LOC GLOBAL-OBJECTS)
+ (ADJECTIVE NUMBER)
+ (SYNONYM SLIMPUK)
+ (DESC "slimpuk")
+ (ACTION DOLLARS-F)>
+
+<ROUTINE DOLLARS-F ()
+ <COND (<VERB? COUNT>
+ <DO-INSTEAD-OF ,GLOBAL-MONEY ,DOLLARS>
+ <RTRUE>)
+ (T
+ <COND (,P-DOLLAR-FLAG
+ <COND (<0? ,P-AMOUNT> <SETG P-AMOUNT 1>)>)
+ (T
+ <SETG P-DOLLAR-FLAG T>
+ <COND (<0? ,P-NUMBER> <SETG P-AMOUNT 1>)>)>
+ <DO-INSTEAD-OF ,INTNUM ,DOLLARS>
+ <RTRUE>)>>
+
+<OBJECT INTNUM
+ (LOC GLOBAL-OBJECTS)
+ (SYNONYM NUMBER)
+ (DESC "number")
+ (ACTION INTNUM-F)>
+
+<ROUTINE INTNUM-F ()
+ <COND ;(<AND ;<VERB? GIVE WITHDRAW>
+ <NOT ,P-DOLLAR-FLAG>>
+ <TELL "(Please use units with numbers.)" CR>
+ <SETG CLOCK-WAIT T>
+ <RFATAL>)
+ (,P-DOLLAR-FLAG
+ <COND (<DIVESTMENT? ,PRSO>
+ <TELL-FLASHING-CASH>
+ <RTRUE>)
+ (<AND <NOT <VERB? ;WITHDRAW TAKE ASK-FOR>>
+ <==? ,WINNER ,PLAYER>
+ <G? ,P-AMOUNT <GETP ,PLAYER ,P?SOUTH>>>
+ <TELL "You don't have that much." CR>)>)>>
+
+;<OBJECT GLOBAL-WATER
+ (LOC GLOBAL-OBJECTS)
+ (DESC "water")
+ (SYNONYM WATER)
+ (ACTION WATER-F)>
+
+;<ROUTINE WATER-F ()
+ <COND (<REMOTE-VERB?> <RFALSE>)
+ (<VERB? SWIM THROUGH>
+ <TELL "This is no time for a swim!" CR>)>>
+
+<OBJECT YOU
+ (LOC GLOBAL-OBJECTS)
+ (SYNONYM YOU YOURSELF HIMSELF HERSELF)
+ (DESC "himself or herself")
+ (FLAGS ;NDESCBIT NARTICLEBIT)
+ (ACTION YOU-F)>
+
+<ROUTINE YOU-F ()
+ <COND (<NOT <==? ,WINNER ,PLAYER>>
+ <DO-INSTEAD-OF ,WINNER ,YOU>
+ <RTRUE>)
+ (<AND <VERB? ASK-ABOUT> <IOBJ? YOU>>
+ <PERFORM ,V?ASK-ABOUT ,PRSO ,PRSO>
+ <RTRUE>)>>
+
+;<OBJECT HINT
+ (DESC "clue" ;"hint")
+ (LOC GLOBAL-OBJECTS)
+ (SYNONYM CLUE HINT HELP)
+ (ACTION HINT-F)>
+
+;<ROUTINE HINT-F ()
+ <COND (<VERB? FIND>
+ <HELP-TEXT>)
+ (<VERB? ASK-FOR ASK-CONTEXT-FOR TAKE>
+ <MORE-SPECIFIC>)>>
+
+<OBJECT CORRIDOR-GLOBAL
+ (LOC GLOBAL-OBJECTS)
+ (DESC "corridor")
+ (SYNONYM CORRIDOR)
+ (ACTION CORRIDOR-GLOBAL-F)>
+
+<ROUTINE CORRIDOR-GLOBAL-F ("AUX" RM)
+ <COND (<VERB? ANALYZE EXAMINE LOOK-INSIDE LOOK-DOWN LOOK-UP>
+ <COND (<NOT ,ON-TRAIN>
+ <RFALSE>)
+ (<ZMEMQ ,HERE ,CAR-ROOMS-CORRID>
+ <PERFORM ,V?LOOK>
+ <RTRUE>)
+ (<SET RM <NEXT-ROOM ,HERE ,P?OUT>>
+ <ROOM-PEEK .RM T>)>)>>
+
+<OBJECT GLOBAL-HERE
+ (LOC GLOBAL-OBJECTS)
+ (DESC "here")
+ (ADJECTIVE THIS)
+ (SYNONYM HERE AREA ROOM PLACE)
+ (FLAGS NARTICLEBIT)
+ (ACTION GLOBAL-HERE-F)>
+
+<ROUTINE GLOBAL-HERE-F ("AUX" (FLG <>) F HR TIM VAL)
+ <COND (<VERB? WALK-TO SIT>
+ <DO-INSTEAD-OF ,HERE ,GLOBAL-HERE>
+ <RTRUE>)
+ (<VERB? KNOCK>
+ <TELL "Knocking on the walls reveals nothing unusual." CR>)
+ (<VERB? PUT PUT-IN TIE-TO>
+ <MORE-SPECIFIC>)
+ (<VERB? SEARCH EXAMINE>
+ <COND ;(<OUTSIDE? ,HERE>
+ <SET TIM 10>)
+ (<NOT <ZERO? <GETP ,HERE ,P?CORRIDOR>>>
+ <SET TIM 3>)
+ (T <SET TIM <+ 2 <GETP ,HERE ,P?SIZE>>>)>
+ <COND (<==? ,P-ADVERB ,W?CAREFULLY> <SET TIM <* 2 .TIM>>)>
+ <TELL
+"(It's better to examine or search one thing at a time. It would take a
+long time to search a whole room or area thoroughly. A ">
+ <COND (<==? ,P-ADVERB ,W?CAREFULLY> <TELL "careful">)
+ (T <TELL "brief">)>
+ <TELL " search would take
+" N .TIM " minutes, and it might not reveal much. Would you like
+to do it anyway?)">
+ <COND (<YES?>
+ <COND (<==? ,M-FATAL <SET VAL <INT-WAIT .TIM>>>
+ <RTRUE>)
+ (.VAL
+ <TELL "Your ">
+ <COND (<==? ,P-ADVERB ,W?CAREFULLY>
+ <TELL "careful">)
+ (T <TELL "brief">)>
+ <TELL " search reveals">
+ <COND (<SET VAL <FOUND? ,HERE>>
+ <TELL THE .VAL " under the seat." CR>)
+ (T <TELL " nothing exciting." CR>)>)
+ (T
+ <TELL
+"You didn't finish looking over the place." CR>)>)
+ (T
+ <SETG CLOCK-WAIT T>
+ <TELL "Okay." CR>)>)>>
+
+<ROUTINE FOUND? (RM "AUX" X)
+ <COND (<AND <SET X <ZMEMQ .RM ,CAR-ROOMS-COMPS>>
+ <SET X <FIRST? <GET ,CAR-ROOMS-UNDER .X>>>>
+ <RETURN .X>)
+ (<==? .RM ,BOOTH-1>
+ <FIRST? ,UNDER-BOOTH-1>)
+ (<==? .RM ,BOOTH-2>
+ <FIRST? ,UNDER-BOOTH-2>)
+ (<==? .RM ,BOOTH-3>
+ <FIRST? ,UNDER-BOOTH-3>)>>
+
+<OBJECT AIR
+ (LOC GLOBAL-OBJECTS)
+ (DESC "air")
+ (SYNONYM AIR ;"WIND" BREEZE OXYGEN)
+ (FLAGS VOWELBIT)
+ (ACTION AIR-F)>
+
+<ROUTINE AIR-F ()
+ <COND (<VERB? EXAMINE>
+ <TELL "You can see through the air around you." CR>)
+ (<VERB? WALK-TO>
+ <TELL "It's all around you!" CR>)
+ (<VERB? SMELL>
+ <COND (<OUTSIDE? ,HERE>
+ <TELL "The air is clear and fresh." CR>)
+ (<FRESH-AIR? ,HERE> <RTRUE>)
+ (T <TELL "The air is rather musty." CR>)>)>>
+
+;<ROUTINE TOO-FAR-AWAY (OBJ) <TOO-BAD-BUT .OBJ "too far away">>
+
+<OBJECT CHAIR
+ (LOC LOCAL-GLOBALS)
+ (DESC "chair")
+ (SYNONYM CHAIR ;CHAIRS SEAT BENCH STOOL)
+ (FLAGS NDESCBIT ;FURNITURE VEHBIT)
+ ;(ACTION CHAIR-F)>
+
+;<ROUTINE CHAIR-F ()
+ <COND (<VERB? SIT LOOK-UNDER CLIMB-ON CLIMB-DOWN>
+ <TELL "That's just a waste of time." CR>)>>
+
+<OBJECT SOMETHING
+ (LOC GLOBAL-OBJECTS)
+ (DESC "(something)")
+ (SYNONYM \(SOMETHING\) )
+ (ACTION SOMETHING-F)>
+
+<ROUTINE SOMETHING-F ()
+ <SETG CLOCK-WAIT T>
+ <TELL "(Type a real word instead of " D ,SOMETHING ".)" CR>>
+
+;<OBJECT MORE
+ (DESC "more")
+ (LOC GLOBAL-OBJECTS)
+ (SYNONYM MORE)
+ (FLAGS NARTICLEBIT)>
+
+;<OBJECT GLOBAL-SABOTAGE
+ (LOC GLOBAL-OBJECTS)
+ (DESC "sabotage")
+ (SYNONYM SABOTAGE)>
+
+[
+<OBJECT FIXTURES
+ (LOC LOCAL-GLOBALS)
+ (DESC "bunch of fixtures")
+ (SYNONYM BUNCH FIXTURE FIXTURES)>
+
+<OBJECT TOILET
+ (LOC LOCAL-GLOBALS)
+ (DESC "toilet")
+ (SYNONYM TOILET ;FIXTURE)
+ (FLAGS NDESCBIT OPENBIT CONTBIT SEARCHBIT VEHBIT)
+ (CAPACITY 33)
+ (ACTION TOILET-F)>
+
+<ROUTINE TOILET-F ()
+ <COND (<VERB? OPEN CLOSE>
+ <YOU-CANT>)
+ (<VERB? PUT-IN>
+ <COND (<IOBJ? TOILET>
+ <FSET ,PRSO ,MUNGBIT>
+ <RFALSE>)>)
+ (<VERB? FLUSH FLUSH-DOWN>
+ <COND (<AND ,IN-STATION ,ON-TRAIN>
+ <TELL
+"An old refrain comes to mind:|
+\"Passengers will please refrain|
+From flushing toilets while the train|
+Is standing in the station. (I love you!)\"" CR>)
+ (T
+ <COND (<VERB? FLUSH-DOWN>
+ <COND (<NOT <==? <ITAKE> T>> <RTRUE>)>
+ ;<FSET ,TOILET ,OPENBIT>
+ <MOVE ,PRSO ,TOILET>)>
+ <COND (<FIRST? ,TOILET>
+ <TELL "Say goodbye to">
+ <ROB ,TOILET ,LIMBO-FWD T>)>
+ <TELL "\"Whhoooossshhhhh!\"" CR>)>)>>
+
+<ROUTINE ROB (WHAT THIEF "OPTIONAL" (TELL? <>) "AUX" N X (TOLD? <>))
+ <SET X <FIRST? .WHAT>>
+ <REPEAT ()
+ <COND (<NOT .X> <RETURN>)>
+ <SET N <NEXT? .X>>
+ <COND (<AND <NOT .N> .TOLD? .TELL?>
+ <TELL " and">)>
+ <SET TOLD? T>
+ <COND (.TELL?
+ <TELL THE .X>
+ <COND (.N <TELL ",">)
+ (T <TELL ". ">)>)>
+ <MOVE .X .THIEF>
+ <FCLEAR .X ,TAKEBIT>
+ <SET X .N>>>
+
+<OBJECT SINK
+ (LOC LOCAL-GLOBALS)
+ (DESC "sink")
+ (SYNONYM SINK BOWL BASIN FAUCET)
+ (FLAGS NDESCBIT CONTBIT SEARCHBIT OPENBIT)
+ (CAPACITY 15)
+ (TEXT
+"It's a metal sink, a bit dented and scratched, with only one faucet.")
+ (ACTION SINK-F)>
+
+<ROUTINE SINK-F ()
+ <COND (<VERB? OPEN CLOSE>
+ <YOU-CANT>)
+ (<VERB? LAMP-ON>
+ <TELL
+"You push on the handle, and water runs until you let go. A silly idea
+comes into your head: what is the sound of one hand washing?" CR>)>>
+
+<OBJECT TOWEL-FIXTURE
+ (LOC LOCAL-GLOBALS)
+ (DESC "towel dispenser")
+ (ADJECTIVE TOWEL)
+ (SYNONYM DISPENSER ;FIXTURE HOLDER)
+ (FLAGS NDESCBIT)>
+
+<OBJECT TOWEL-FIXTURE-BROKEN
+ ;(LOC OTHER-REST-ROOM-REAR)
+ (CAR 0)
+ (DESC "towel dispenser")
+ (ADJECTIVE TOWEL)
+ (SYNONYM DISPENSER ;FIXTURE HOLDER)
+ (FLAGS NDESCBIT)>
+
+<OBJECT TOWEL-LOOP
+ (LOC LOCAL-GLOBALS ;TOWEL-FIXTURE)
+ (DESC "towel")
+ (ADJECTIVE CLOTH FRESH)
+ (SYNONYM TOWEL PORTION)
+ (FLAGS NDESCBIT TRYTAKEBIT)
+ (ACTION TOWEL-LOOP-F)>
+
+<OBJECT TOWEL-LOOP-BROKEN
+ (CAR 0)
+ (DESC "towel remnant")
+ (ADJECTIVE CLOTH FRESH)
+ (SYNONYM TOWEL PORTION REMNANT)
+ (FLAGS NDESCBIT TRYTAKEBIT)
+ (ACTION TOWEL-LOOP-BROKEN-F)>
+
+<ROUTINE TOWEL-LOOP-F ()
+ <COND (<VERB? CUT>
+ <COND (<IOBJ? KNIFE>
+ <MOVE ,SCARF ,PLAYER>
+ <FSET ,SCARF ,TAKEBIT>
+ <PUTP ,SCARF ,P?CAR ,CAR-HERE>
+ <MOVE ,TOWEL-FIXTURE-BROKEN ,HERE>
+ <PUTP ,TOWEL-FIXTURE-BROKEN ,P?CAR ,CAR-HERE>
+ <MOVE ,TOWEL-LOOP-BROKEN ,HERE>
+ <PUTP ,TOWEL-LOOP-BROKEN ,P?CAR ,CAR-HERE>
+ <THIS-IS-IT ,TOWEL-LOOP-BROKEN>
+ <TELL
+"Well done! You now have a government-issue " D ,SCARF ", and the janitor
+has a mess to repair." CR>)>)
+ (<VERB? EXAMINE>
+ <TELL
+"This cloth towel must be very long, but most of it is rolled up
+inside the dispenser. Only about a meter hangs below it in a \"U\" shape."
+CR>)
+ (<VERB? MOVE MOVE-DIR USE TAKE>
+ <TELL
+"As you pull on the towel, a fresh portion appears from a slot, and
+the used portion starts to disappear into the dispenser." CR>)>>
+
+<ROUTINE TOWEL-LOOP-BROKEN-F ()
+ <COND (<VERB? EXAMINE>
+ <TELL
+"This cloth towel must be very long, but most of it is rolled up
+inside the dispenser. The part that should hang below is cut away." CR>)
+ (<VERB? CUT MOVE MOVE-DIR USE TAKE>
+ <TELL "There's not enough left!" CR>)>>
+
+<OBJECT PAPER-FIXTURE
+ ;(LOC LOCAL-GLOBALS)
+ (DESC "paper dispenser")
+ (ADJECTIVE ;TOILET PAPER TISSUE)
+ (SYNONYM DISPENSER ;FIXTURE HOLDER)
+ (FLAGS NDESCBIT OPENBIT CONTBIT SEARCHBIT)
+ (CAPACITY 3)
+ (ACTION PAPER-FIXTURE-F)>
+
+<ROUTINE PAPER-FIXTURE-F ()
+ <COND (<VERB? LOOK-INSIDE>
+ <FCLEAR ,PAPER-LOOP ,NDESCBIT>
+ <RFALSE>)>>
+
+<OBJECT PAPER-LOOP
+ (LOC PAPER-FIXTURE)
+ (CAR 0)
+ (DESC "paper")
+ (ADJECTIVE TOILET)
+ (SYNONYM PAPER TISSUE PORTION)
+ (FLAGS NARTICLEBIT NDESCBIT ;TRYTAKEBIT)
+ (SIZE 3)
+ (ACTION PAPER-LOOP-F)>
+
+<ROUTINE PAPER-LOOP-F ()
+ <COND (<VERB? MOVE MOVE-DIR USE TAKE>
+ <TELL "Whatever you have in mind, it'll never work!" CR>)>>
+
+<OBJECT MIRROR
+ (LOC LOCAL-GLOBALS)
+ (DESC "mirror")
+ (SYNONYM MIRROR)
+ (ACTION MIRROR-F)>
+
+<ROUTINE MIRROR-F ()
+ <COND (<VERB? MUNG>
+ <TELL "You don't need any bad luck!"
+;"According to superstition, it's bad luck to break mirrors." CR>)
+ (<VERB? LOOK-INSIDE EXAMINE>
+ <TELL "A harried and weary "
+ <COND (<SPY?> "spy") (T "traveler")>
+ " looks back at you, with a
+look that seems to say, \"I don't need this aggravation!\"" CR>)>>
+]
+<OBJECT POCKET
+ (LOC PLAYER ;GLOBAL-OBJECTS)
+ (DESC "your pocket")
+ (ADJECTIVE MY)
+ (SYNONYM POCKET POCKETS)
+ (FLAGS CONTBIT OPENBIT NARTICLEBIT NDESCBIT SEARCHBIT)
+ (CAPACITY 15)
+ (ACTION POCKET-F)>
+
+<ROUTINE POCKET-F ("AUX" X)
+ <COND (<DIVESTMENT? ,POCKET>
+ <HAR-HAR>)
+ ;(<AND <VERB? TAKE>
+ <DOBJ? GLOBAL-MONEY>>
+ <TELL-FLASHING-CASH>)
+ (<VERB? LOOK-INSIDE LOOK-THROUGH>
+ <SET X <PRINT-CONT ,POCKET ;T>>
+ <COND (<AND <==? ,WINNER ,PLAYER>
+ <G? <GETP ,PLAYER ,P?SOUTH> 0>>
+ <THIS-IS-IT ,GLOBAL-MONEY>
+ <COND (.X <TELL "And some money." CR>)
+ (T
+ <TELL "You have some money in your pocket.">
+ <COND (<IN? ,CUSTOMS-AGENT ,HERE>
+ <TELL
+" But" HE ,CUSTOMS-AGENT " won't mind.">)>
+ <CRLF>)>)
+ (<NOT .X> <TELL "Your pocket is empty." CR>)>
+ <RTRUE>)
+ (<VERB? EMPTY>
+ <COND (<FIRST? ,POCKET>
+ <TELL "You are now holding">
+ <ROB ,POCKET ,PLAYER T>
+ <CRLF>)>)
+ (<VERB? OPEN CLOSE>
+ <TELL "You don't need to do that." CR>)
+ (<AND <VERB? PUT-IN>
+ <IOBJ? POCKET>>
+ <COND (<OR <DOBJ? GLOBAL-MONEY>
+ <AND <DOBJ? INTNUM> ,P-DOLLAR-FLAG>>
+ <TELL "It's already there." CR>)
+ (<DOBJ? CAMERA>
+ <COND (<FSET? ,PRSO ,OPENBIT>
+ <FCLEAR ,PRSO ,OPENBIT>
+ <TELL "(You close" HIM ,PRSO " first.)" CR>
+ <RFALSE>)>)>)>>
+
+<OBJECT POCKET-C
+ (LOC CONDUCTOR ;GLOBAL-OBJECTS)
+ (DESC "conductor's pocket")
+ (ADJECTIVE CONDUCTOR CONDUC COLLECTOR)
+ (SYNONYM POCKET POCKETS)
+ (FLAGS CONTBIT OPENBIT NDESCBIT SEARCHBIT)
+ (CAPACITY 15)
+ (ACTION POCKET-C-F)>
+
+<ROUTINE POCKET-C-F ("AUX" X)
+ <COND (<DIVESTMENT? ,POCKET-C>
+ <HAR-HAR>)
+ (<VERB? LOOK-INSIDE LOOK-THROUGH>
+ <COND (<OR <FSET? ,CONDUCTOR ,MUNGBIT>
+ <NOT <FSET? ,CONDUCTOR ,PERSONBIT>>>
+ <SET X <PRINT-CONT ,POCKET-C ;T>>)
+ (T <TELL
+CHE ,CONDUCTOR " brushes your hand away without even looking." CR>)>
+ <RTRUE>)
+ (<VERB? OPEN CLOSE>
+ <TELL "You don't need to do that." CR>)
+ (<AND <VERB? PUT-IN>
+ <IOBJ? POCKET-C>>
+ <COND (<DOBJ? CAMERA>
+ <COND (<FSET? ,PRSO ,OPENBIT>
+ <FCLEAR ,PRSO ,OPENBIT>
+ <TELL "(You close" HIM ,PRSO " first.)" CR>
+ <RFALSE>)>)>)>>
+
+<ROUTINE TELL-FLASHING-CASH ()
+ <TELL "Flashing your bankroll is not a good idea." CR>>
+
+<OBJECT GLOBAL-MONEY
+ (LOC GLOBAL-OBJECTS)
+ (ADJECTIVE SOME MY)
+ (SYNONYM MONEY CASH \*)
+ (DESC "money")
+ (FLAGS NARTICLEBIT)
+ (ACTION GLOBAL-MONEY-F)>
+
+<ROUTINE GLOBAL-MONEY-F ()
+ <COND (<VERB? FIND>
+ <TELL "It's not that easy!" CR>
+ <RTRUE>)
+ (<REMOTE-VERB?>
+ <RFALSE>)
+ (<AND <VERB? PUT PUT-IN> <DOBJ? GLOBAL-MONEY>>
+ <MORE-SPECIFIC>)
+ (<G? <GETP ,PLAYER ,P?SOUTH> 0>
+ <COND (<VERB? COUNT EXAMINE>
+ <TELL "You are carrying ">
+ <PRINTC ,CURRENCY-SYMBOL>
+ <TELL N <GETP ,PLAYER ,P?SOUTH> "." CR>)
+ (<VERB? GIVE>
+ <SETG CLOCK-WAIT T>
+ <TELL "(You didn't say how much money to give.)" CR>)
+ (<AND <VERB? TAKE> ,PRSI ;<FSET? ,PRSI ,PERSONBIT>>
+ <TELL "You can't see any money on" HIM ,PRSI "." CR>)
+ (<AND <VERB? SHOW> ;<DOBJ? CUSTOMS-AGENT>>
+ <RFALSE>)
+ (T <TELL-FLASHING-CASH>)>)
+ (T <NOT-HERE ,GLOBAL-MONEY>)>>
+
+<OBJECT MENU
+ (DESC "menu")
+ (LOC LOCAL-GLOBALS)
+ (FLAGS READBIT)
+ (SYNONYM MENU)
+ (ACTION MENU-F)
+ (TEXT
+"A sign on the wall has a long list of mysterious Frotzian phrases,
+printed in ornate letters. All you can decipher is unpleasant things
+like fish heads and lice, or rumpled stilt's skin. Wait! There's an
+American phrase: Eggs McGuffin!")>
+
+<ROUTINE MENU-F ()
+ <COND (<VERB? ANALYZE EXAMINE READ>
+ <TELL <GETP ,MENU ,P?TEXT> CR>)>>
+
+<OBJECT ITEMS
+ (DESC "item")
+ (LOC LOCAL-GLOBALS)
+ (FLAGS READBIT VOWELBIT)
+ (ADJECTIVE ;FIRST SECOND THIRD FOURTH FIFTH)
+ (SYNONYM ITEM)
+ (ACTION ITEMS-F)>
+
+<ROUTINE ITEMS-F ()
+ <COND (<VERB? ASK-FOR BUY>
+ <COND ;(<EQUAL? ,P-ADJ ;N ,W?FIRST>
+ <DO-INSTEAD-OF ,FOOD ,ITEMS>
+ <RTRUE>)
+ (T
+ <DO-INSTEAD-OF ,FOOD-2 ,ITEMS>
+ <RTRUE>)>)
+ (<VERB? ANALYZE EXAMINE READ>
+ <TELL <GETP ,MENU ,P?TEXT> CR>)>>
+
+<OBJECT FOOD-GLOBAL
+ (DESC "food")
+ (LOC GLOBAL-OBJECTS)
+ (SYNONYM FOOD)
+ (FLAGS NARTICLEBIT)
+ (ACTION FOOD-GLOBAL-F)>
+
+<ROUTINE FOOD-GLOBAL-F ()
+ <COND (<VERB? ASK-FOR BUY SMELL>
+ <DO-INSTEAD-OF ,FOOD ,FOOD-GLOBAL>
+ <RTRUE>)
+ (<REMOTE-VERB?> <RFALSE>)
+ (T <NOT-HERE ,FOOD-GLOBAL>)>>
+
+<OBJECT DRINK-GLOBAL
+ (DESC "drink")
+ (LOC GLOBAL-OBJECTS)
+ (SYNONYM DRINK)
+ (FLAGS NARTICLEBIT)
+ (ACTION DRINK-F)>
+
+<ROUTINE DRINK-F () <FOOD-F T>>
+
+<OBJECT DRINK-1
+ (DESC "drink")
+ (LOC GLOBAL-OBJECTS)
+ (SYNONYM TEA BEER COFFEE)
+ (FLAGS NARTICLEBIT)
+ (ACTION DRINK-1-F)>
+
+<ROUTINE DRINK-1-F ()
+ <DO-INSTEAD-OF ,DRINK-GLOBAL ,DRINK-1>
+ <RTRUE>>
+
+;<ROUTINE GENERIC-FOOD-F (X)
+ <COND (<==? ,HERE <META-LOC ,FOOD>> ,FOOD)
+ (T ,FOOD-GLOBAL)>>
+
+<OBJECT FOOD-CAFE
+ (DESC "food")
+ (LOC CAFE)
+ (SYNONYM FOOD)
+ (FLAGS NDESCBIT NARTICLEBIT)
+ (ACTION FOOD-F)>
+
+<OBJECT FOOD ;"Make this similar to WINE-xxx."
+ (DESC "plate of thin gruel")
+ (LOC GALLEY)
+ (CAR 3)
+ (ADJECTIVE THIN FIRST)
+ (SYNONYM GRUEL PLATE DISH FOOD ITEM)
+ (FLAGS NDESCBIT SEARCHBIT)
+ (SIZE 20)
+ (ACTION FOOD-F)>
+
+<CONSTANT FOOD-SIZE 4>
+<CONSTANT FOOD-HALF-SIZE 2>
+
+<ROUTINE FOOD-F ("OPTIONAL" (DRINK? <>) "AUX" PER OBJ X)
+ <COND (<VERB? EAT SMELL DRINK>
+ <COND (<OR <VERB? SMELL>
+ <NOT <IN? ,PRSO ,GLOBAL-OBJECTS>>
+ ;<DOBJ? FOOD WINE-RED WINE-WHITE>>
+ <TELL "It's pungent but not very flavorful.">
+ <COND (<NOT <VERB? SMELL>>
+ <SET X <GETP ,PRSO ,P?SIZE>>
+ <PUTP ,PRSO ,P?SIZE .X>
+ <COND (<==? .X ,FOOD-HALF-SIZE>
+ <TELL " And it's half gone.">)
+ (<ZERO? .X>
+ <MOVE ,PRSO ,GLOBAL-OBJECTS>
+ <TELL " And it's gone.">)>)>
+ <COND (<SPY?>
+ <TELL
+" You've had better in some mighty dank corners of the world.">)>
+ <CRLF>)
+ (T <TELL "That wouldn't be very polite." CR>)>)
+ (<VERB? POUR PUT PUT-IN MUNG>
+ <COND (<IOBJ? TOILET>
+ <RFALSE>)
+ (<AND <NOT <VERB? POUR>>
+ <IOBJ? TABLE-1 TABLE-2 TABLE-3>>
+ <RFALSE>)
+ (T <TELL "What a mess that would make!" CR>)>)
+ (<VERB? ASK-FOR BUY>
+ <COND (<AND <EQUAL? ,HERE ,PANTRY>
+ <INVASION? ,WAITER>>
+ <RTRUE>)>
+ <COND (,ON-TRAIN <SET PER ,WAITER>)
+ (T <SET PER ,WAITRESS>)>
+ <COND (.DRINK? <SET OBJ ,WINE-RED>)
+ (T <SET OBJ ,FOOD>)>
+ <COND (.DRINK?
+ <COND (<OR <FSET? ,WINE-RED ,TOUCHBIT>
+ <FSET? ,WINE-WHITE ,TOUCHBIT>>
+ <TELL "You've bought enough to drink already."CR>
+ <RTRUE>)>)
+ (<FSET? ,FOOD ,TOUCHBIT> ;<IN? ,FOOD ,HERE>
+ <TELL "You've bought enough to eat already." CR>
+ <RTRUE>)>
+ <COND (<0? <GETP ,PLAYER ,P?SOUTH>>
+ <TELL "You don't have enough money." CR>)
+ (<NOT <IN? .PER ,HERE>>
+ <TELL "You'd better talk to " A .PER " first." CR>)
+ (T
+ <PUTP ,PLAYER ,P?SOUTH <- <GETP ,PLAYER ,P?SOUTH> 1>>
+ <COND (<EQUAL? .OBJ ,WINE-RED ,WINE-WHITE>
+ <SET X <OR <CALL-FOR-PROP ,CUP-A ,WAITER>
+ <CALL-FOR-PROP ,CUP-B ,WAITER>>>
+ <MOVE .OBJ .X>
+ <PUTP .OBJ ,P?CAR ,CAR-HERE>
+ <PUTP .OBJ ,P?SIZE ,FOOD-SIZE>
+ <FSET .OBJ ,TOUCHBIT>
+ <SET OBJ .X>)
+ (T <PUTP .OBJ ,P?SIZE ,FOOD-SIZE>)>
+ <MOVE .OBJ <OR <TABLE? ,HERE> ,HERE>>
+ <PUTP .OBJ ,P?CAR ,CAR-HERE>
+ <FSET .OBJ ,TAKEBIT>
+ <FSET .OBJ ,TOUCHBIT>
+ <FCLEAR .OBJ ,NDESCBIT>
+ <FCLEAR .PER ,TOUCHBIT>
+ <PUTP .PER ,P?LDESC 29>
+ <TELL
+CHE .PER " returns in an instant with " A .OBJ " and takes ">
+ <PRINTC ,CURRENCY-SYMBOL>
+ <TELL "1 from you." CR>)>)>>
+
+<OBJECT CUP-A
+ (LOC GLOBAL-OBJECTS)
+ (CAR 3)
+ (DESC "china cup")
+ (ADJECTIVE CHINA)
+ (SYNONYM CUP)
+ (FLAGS CONTBIT OPENBIT SEARCHBIT)
+ (CAPACITY 15)
+ (SIZE 20)
+ (ACTION CUP-F)>
+
+<OBJECT CUP-B
+ (LOC GLOBAL-OBJECTS)
+ (CAR 3)
+ (DESC "enamel cup")
+ (ADJECTIVE ENAMEL)
+ (SYNONYM CUP)
+ (FLAGS CONTBIT OPENBIT SEARCHBIT VOWELBIT)
+ (CAPACITY 15)
+ (SIZE 20)
+ (ACTION CUP-F)>
+
+<ROUTINE CUP-F ()
+ <COND (<VERB? THROW-AT THROW-THROUGH EMPTY>
+ <COND (<EQUAL? <LOC ,WINE-RED> ,PRSO ,PRSI>
+ <MOVE ,WINE-RED ,GLOBAL-OBJECTS>)>
+ <COND (<EQUAL? <LOC ,WINE-WHITE> ,PRSO ,PRSI>
+ <MOVE ,WINE-WHITE ,GLOBAL-OBJECTS>)>
+ <ROB ,PRSO ,HERE>
+ <ROB ,PRSI ,HERE>
+ <COND (<VERB? EMPTY> <TELL "Okay." CR>)
+ (T <RFALSE>)>)
+ (<AND <VERB? PUT-IN>
+ <DOBJ? SCARF NAPKIN TOWEL-WAITER>
+ <IOBJ? CUP-A CUP-B>
+ <IN? ,WINE-RED ,PRSI>>
+ <DO-INSTEAD-OF ,WINE-RED ,PRSI>
+ <RTRUE>)>>
+
+<OBJECT WINE-RED
+ (LOC GLOBAL-OBJECTS)
+ (CAR 3)
+ (DESC ;"cup of " "purple wine")
+ (ADJECTIVE PURPLE RED)
+ (SYNONYM WINE ;CUP)
+ (FLAGS NARTICLEBIT TRYTAKEBIT SEARCHBIT)
+ (SIZE 10)
+ (ACTION WINE-F)>
+
+<OBJECT WINE-WHITE
+ (LOC GLOBAL-OBJECTS)
+ (CAR 3)
+ (DESC ;"cup of " "yellow wine")
+ (ADJECTIVE YELLOW WHITE)
+ (SYNONYM WINE ;CUP)
+ (FLAGS NARTICLEBIT TRYTAKEBIT SEARCHBIT)
+ (SIZE 10)
+ (ACTION WINE-F)>
+
+<ROUTINE WINE-PUT? ()
+ <COND (<VERB? PUT>
+ <COND (<AND <IOBJ? SCARF NAPKIN TOWEL-WAITER>
+ <DOBJ? WINE-RED>>
+ <RETURN ,PRSI>)>)
+ (<VERB? PUT-IN>
+ <COND (<AND <DOBJ? SCARF NAPKIN TOWEL-WAITER>
+ <IOBJ? WINE-RED>>
+ <RETURN ,PRSO>)>)>>
+
+<ROUTINE WINE-F ("AUX" OBJ)
+ <COND (<AND <VERB? TAKE> <EQUAL? <LOC ,PRSO> ,CUP-A ,CUP-B>>
+ <PERFORM ,PRSA <LOC ,PRSO> ,PRSI>
+ <RTRUE>)
+ (<SET OBJ <WINE-PUT?>>
+ ;<OR <AND <VERB? PUT>
+ <IOBJ? SCARF NAPKIN TOWEL-WAITER>
+ <DOBJ? WINE-RED>
+ <SET OBJ ,PRSI>>
+ <AND <VERB? PUT-IN>
+ <DOBJ? SCARF NAPKIN TOWEL-WAITER>
+ <IOBJ? WINE-RED>
+ <SET OBJ ,PRSO>>>
+ <MOVE ,HANKY <LOC .OBJ>>
+ <FSET ,HANKY ,TAKEBIT>
+ <MOVE .OBJ ,LIMBO-FWD ;,GLOBAL-OBJECTS>
+ <FCLEAR .OBJ ,TAKEBIT>
+ <MOVE ,WINE-RED ,GLOBAL-OBJECTS>
+ <TELL
+"The " D .OBJ " soaks up the wine, and the stain spreads to every nook
+and cranny. Within a minute, you have a decent imitation of a " D ,HANKY
+"." CR>)
+ (T <FOOD-F T>)>>
+
+<OBJECT FOOD-1
+ (DESC "food")
+ (LOC GLOBAL-OBJECTS)
+ (ADJECTIVE FISH RUMPLED STILT'S)
+ (SYNONYM FISH HEADS LICE SKIN)
+ (FLAGS NARTICLEBIT)
+ (ACTION NO-FOOD-F)>
+
+<OBJECT FOOD-2
+ (DESC "food")
+ (LOC GLOBAL-OBJECTS)
+ (ADJECTIVE EGGS)
+ (SYNONYM ;FOOD EGGS MCGUFFIN MACGUFFIN ;ITEM)
+ (FLAGS NARTICLEBIT)
+ (ACTION NO-FOOD-F)>
+
+<OBJECT FOOD-3
+ (DESC "food")
+ (LOC GLOBAL-OBJECTS)
+ (SYNONYM MEAL SNACK BREAKFAST LUNCH DINNER SANDWICH BREAD)
+ (FLAGS NARTICLEBIT)
+ (ACTION NO-FOOD-F)>
+
+<ROUTINE NO-FOOD-F ("AUX" PER)
+ <COND (,ON-TRAIN <SET PER ,WAITER>)
+ (T <SET PER ,WAITRESS>)>
+ <COND (<VERB? ASK-ABOUT BUY>
+ <TELL CTHE .PER " shakes" HIS .PER>
+ <THIS-IS-IT ,FOOD>
+ <THIS-IS-IT .PER>
+ <TELL
+" head and points to the first item on the menu, which you find unreadable."
+CR>)>>
+
+<ROUTINE TABLE? (RM)
+ <COND (<==? .RM ,CAFE> ,COUNTER-CAFE)
+ (<==? .RM ,BOOTH-1> ,TABLE-1)
+ (<==? .RM ,BOOTH-2> ,TABLE-2)
+ (<==? .RM ,BOOTH-3> ,TABLE-3)>>
+
+<OBJECT LANGUAGE
+ (LOC GLOBAL-OBJECTS)
+ (DESC "language")
+ (ADJECTIVE FROTZIAN FOREIGN THEIR HIS ;HER)
+ (SYNONYM LANGUAGE FROTZIAN)
+ (ACTION LANGUAGE-F)>
+
+<ROUTINE LANGUAGE-F ()
+ <COND (<VERB? ANALYZE LEARN>
+ <TELL
+"Maybe you should have taken your company's offer to pay for language
+lessons before you started this trip. After all, English isn't spoken
+everywhere." CR>)>>
+
+<OBJECT GESTURE
+ (LOC GLOBAL-OBJECTS)
+ (DESC "gesture")
+ (ADJECTIVE FROTZIAN FOREIGN THEIR HIS ;HER NASTY)
+ (SYNONYM GESTURE)
+ (ACTION GESTURE-F)>
+
+<ROUTINE GESTURE-F ("AUX" P)
+ <COND (<VERB? ANALYZE LEARN>
+ <TELL
+"Maybe you should have taken your company's offer to pay for gesture
+lessons before you started this trip. After all, English gestures aren't used
+everywhere." CR>)
+ (<VERB? MAKE>
+ <COND (<AND ,PRSI <FSET? ,PRSI ,PERSONBIT>>
+ <SET P ,PRSI>)
+ (<QCONTEXT-GOOD?> <SET P ,QCONTEXT>)
+ (<NOT <SET P <FIND-FLAG ,HERE ,PERSONBIT ,WINNER>>>
+ <NOT-CLEAR-WHOM T>
+ <RTRUE>)>
+ <TELL
+CTHE .P V .P make " a gesture right back. Somehow it looks nastier than
+yours." CR>)>>
+
+<OBJECT LIGHT-GLOBAL
+ (LOC GLOBAL-OBJECTS)
+ (DESC "light")
+ (SYNONYM LIGHT SUNLIGHT MOONLIGHT)>
+
+<OBJECT GAME
+ (LOC GLOBAL-OBJECTS)
+ (DESC ;"STEAM AND VARIATIONS" "CHECKPOINT" ;"SEVEN SHADOWS")
+ (ADJECTIVE SPY SHORT LONG)
+ (SYNONYM THRILLER GAME CHECKPOINT)
+ (FLAGS NARTICLEBIT)
+ (ACTION GAME-F)>
+
+<ROUTINE GAME-F ()
+ <COND (<VERB? EXAMINE PLAY READ>
+ ;<COND (<EQUAL? ,P-ADJ ;N ,W?SHORT> )>
+ <SETG CLOCK-WAIT T>
+ <TELL "(You're doing it now!)" CR>)>>
+
+<OBJECT HANDS
+ (LOC GLOBAL-OBJECTS)
+ (DESC "your hands")
+ (SYNONYM HANDS)
+ (ADJECTIVE ;YOUR MY BARE)
+ (FLAGS NARTICLEBIT PLURALBIT)>
+
+<OBJECT HEAD
+ (LOC GLOBAL-OBJECTS)
+ (DESC "your head")
+ (SYNONYM HEAD ;FACE)
+ (ADJECTIVE ;YOUR MY)
+ (FLAGS NARTICLEBIT)
+ (ACTION HEAD-F)>
+
+<ROUTINE HEAD-F ()
+ <COND (<VERB? NOD>
+ <PERFORM ,V?YES>
+ <RTRUE>)
+ (<VERB? SHAKE>
+ <PERFORM ,V?NO>
+ <RTRUE>)>>
diff --git a/goal.cmp b/goal.cmp
new file mode 100644
index 0000000..dccaed9
--- /dev/null
+++ b/goal.cmp
@@ -0,0 +1,2643 @@
+
+;COMPARISON OF PS:<SWG>GOAL.ZAP.1 AND PS:<SWG>GOAL.ZAP.3
+;OPTIONS ARE /1
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-8 (119)
+ ZERO? ON-TRAIN /?CND6
+ ZERO? IN-STATION /?THN13
+ EQUAL? DIR,P?DOWN /?CND6
+?THN13: SET 'TBL,NAUTICAL-DIR-STRINGS
+?CND6:
+?PRG15: GET TBL,CNT >X
+ ZERO? X \?ELS19
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-8 (119)
+ ZERO? ON-TRAIN /?CND5
+ ZERO? IN-STATION /?THN8
+ EQUAL? DIR,P?DOWN /?CND5
+?THN8: SET 'TBL,NAUTICAL-DIR-STRINGS
+?CND5:
+?PRG10: GET TBL,CNT >X
+ ZERO? X \?ELS13
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-17 (319)
+?ELS19: EQUAL? X,DIR \?CND17
+ EQUAL? DIR,P?UP,P?DOWN /?CND24
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-17 (317)
+?ELS13: EQUAL? X,DIR \?CND12
+ EQUAL? DIR,P?UP,P?DOWN /?CND17
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-20 (398)
+?CND24: ZERO? ON-TRAIN /?ELS31
+ ZERO? IN-STATION /?ELS31
+ EQUAL? DIR,P?DOWN \?ELS31
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-20 (396)
+?CND17: ZERO? ON-TRAIN /?ELS22
+ ZERO? IN-STATION /?ELS22
+ EQUAL? DIR,P?DOWN \?ELS22
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-25 (520)
+?ELS31: ADD CNT,1
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-25 (518)
+?ELS22: ADD CNT,1
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-29 (578)
+?CND17: ADD CNT,2 >CNT
+ JUMP ?PRG15
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-29 (576)
+?CND12: ADD CNT,2 >CNT
+ JUMP ?PRG10
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-38 (731)
+ ZERO? STACK \?ELS10
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-38 (729)
+ ZERO? STACK \?ELS7
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-42 (804)
+?ELS10: SUB CNT,2
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-42 (801)
+?ELS7: SUB CNT,2
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-45 (862)
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-45 (858)
+?CND6:
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-50 (923)
+ EQUAL? LN,1 \?ELS5
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-51 (928)
+ EQUAL? LN,1 \?ELS4
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-52 (964)
+?ELS5: EQUAL? LN,2 \?ELS7
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-53 (969)
+?ELS4: EQUAL? LN,2 \?ELS5
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-54 (1011)
+?ELS7: EQUAL? LN,3 \?ELS9
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-55 (1016)
+?ELS5: EQUAL? LN,3 \?ELS6
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-56 (1058)
+?ELS9: EQUAL? LN,4 \?ELS11
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-57 (1063)
+?ELS6: EQUAL? LN,4 \?ELS7
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-58 (1106)
+?ELS11: EQUAL? LN,5 \FALSE
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-59 (1110)
+?ELS7: EQUAL? LN,5 \FALSE
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-67 (1302)
+ EQUAL? HERE,STACK \?ELS3
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-68 (1305)
+ EQUAL? HERE,STACK \?ELS2
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-70 (1366)
+?ELS3: GET GT,GOAL-ENABLE
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-71 (1369)
+?ELS2: GET GT,GOAL-ENABLE
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-73 (1445)
+ EQUAL? HERE,X /?CND6
+ ZERO? X \?CND9
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-74 (1448)
+ EQUAL? HERE,X /?CND4
+ ZERO? X \?CND6
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-80 (1564)
+?CND9: CALL ZMEMQ,HERE,CAR-ROOMS-REST
+ ZERO? STACK /?CND14
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-81 (1567)
+?CND6: CALL ZMEMQ,HERE,CAR-ROOMS-REST
+ ZERO? STACK /?CND10
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-84 (1680)
+?CND14: CALL MOVE-PERSON,PERSON,X
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-85 (1683)
+?CND10: CALL MOVE-PERSON,PERSON,X
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-86 (1725)
+?CND6: GET GT,GOAL-I >IGOAL
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-87 (1728)
+?CND4: GET GT,GOAL-I >IGOAL
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-88 (1787)
+ ZERO? GOAL \?CND17
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-89 (1790)
+ ZERO? GOAL \?CND12
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-91 (1855)
+?CND17: ZERO? GOAL /FALSE
+ EQUAL? HERE,GOAL \?CND20
+ ZERO? IGOAL /?ELS27
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-92 (1858)
+?CND12: ZERO? GOAL /FALSE
+ EQUAL? HERE,GOAL \?CND14
+ ZERO? IGOAL /?ELS18
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-96 (1977)
+ ZERO? FLG \?CND29
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-97 (1980)
+ ZERO? FLG \?CND19
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-102 (2078)
+?CND29: CALL MOVE-PERSON,PERSON,FLG >FLG
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-103 (2081)
+?CND19: CALL MOVE-PERSON,PERSON,FLG >FLG
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-106 (2184)
+?ELS27: GET GT,GOAL-F >FLG
+ EQUAL? HERE,FLG /?ELS35
+ ZERO? FLG \?CND36
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-107 (2187)
+?ELS18: GET GT,GOAL-F >FLG
+ EQUAL? HERE,FLG /?ELS23
+ ZERO? FLG \?CND24
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-114 (2339)
+?CND36: EQUAL? PERSON,CONDUCTOR,CUSTOMS-AGENT /?CND41
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-115 (2342)
+?CND24: EQUAL? PERSON,CONDUCTOR,CUSTOMS-AGENT /?CND28
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-117 (2443)
+?CND41: CALL ZMEMQ,FLG,CAR-ROOMS-REST
+ ZERO? STACK /?CND44
+ EQUAL? PERSON,PLAYER /?ELS49
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-118 (2446)
+?CND28: CALL ZMEMQ,FLG,CAR-ROOMS-REST
+ ZERO? STACK /?CND30
+ EQUAL? PERSON,PLAYER /?ELS33
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-122 (2582)
+ ZERO? STACK /?ELS49
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-123 (2585)
+ ZERO? STACK /?ELS33
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-125 (2641)
+?ELS49: CALL FIND-FLAG-LG,FLG,DOORBIT
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-126 (2644)
+?ELS33: CALL FIND-FLAG-LG,FLG,DOORBIT
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-127 (2700)
+?CND44: CALL MOVE-PERSON,PERSON,FLG >FLG
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-128 (2703)
+?CND30: CALL MOVE-PERSON,PERSON,FLG >FLG
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-129 (2755)
+?ELS35: CALL GOAL-REACHED,PERSON
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-130 (2758)
+?ELS23: CALL GOAL-REACHED,PERSON
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-131 (2799)
+?CND20: CALL FOLLOW-GOAL-NEXT,HERE,GOAL,PERSON >FLG
+ EQUAL? HERE,FLG \?CND56
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-132 (2802)
+?CND14: CALL FOLLOW-GOAL-NEXT,HERE,GOAL,PERSON >FLG
+ EQUAL? HERE,FLG \?CND35
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-135 (2943)
+?CND56: CALL MOVE-PERSON,PERSON,FLG
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-136 (2946)
+?CND35: CALL MOVE-PERSON,PERSON,FLG
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-145 (3163)
+ EQUAL? HERE,LOC /?CND6
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-146 (3166)
+ EQUAL? HERE,LOC /?CND4
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-147 (3204)
+?CND6: GETP GOAL,P?STATION >LOC
+ EQUAL? GOAL,LOC /?CND9
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-148 (3207)
+?CND4: GETP GOAL,P?STATION >LOC
+ EQUAL? GOAL,LOC /?CND6
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-150 (3278)
+?CND9: CALL FOLLOW-GOAL-NEXT,HERE,GOAL,PERSON >LOC
+ EQUAL? LOC,HERE \?CND12
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-151 (3281)
+?CND6: CALL FOLLOW-GOAL-NEXT,HERE,GOAL,PERSON >LOC
+ EQUAL? LOC,HERE \?CND8
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-154 (3421)
+?CND12: CALL DIR-FROM,HERE,LOC
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-155 (3423)
+?CND8: CALL DIR-FROM,HERE,LOC
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-163 (3636)
+ ZERO? LINE \?ELS6
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-164 (3637)
+ ZERO? LINE \?ELS4
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-171 (3764)
+?ELS6: GETP HERE,P?LINE
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-172 (3765)
+?ELS4: GETP HERE,P?LINE
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-173 (3811)
+ EQUAL? LINE,STACK /?CND4
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-174 (3812)
+ EQUAL? LINE,STACK /?CND3
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-183 (3979)
+?CND4:
+?PRG13: GET LINE,CNT >RM
+ EQUAL? RM,HERE \?ELS17
+ ZERO? GOAL-FLAG /?ELS20
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-184 (3980)
+?CND3:
+?PRG10: GET LINE,CNT >RM
+ EQUAL? RM,HERE \?ELS13
+ ZERO? GOAL-FLAG /?ELS15
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-190 (4112)
+?ELS20: ADD CNT,3
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-191 (4113)
+?ELS15: ADD CNT,3
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-193 (4166)
+?ELS17: EQUAL? RM,GOAL \?CND15
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-194 (4167)
+?ELS13: EQUAL? RM,GOAL \?CND12
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-195 (4226)
+?CND15: ADD CNT,3 >CNT
+ JUMP ?PRG13
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-196 (4227)
+?CND12: ADD CNT,3 >CNT
+ JUMP ?PRG10
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-200 (4326)
+ EQUAL? HERE,ROOF \?ELS3
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-201 (4327)
+ EQUAL? HERE,ROOF \?ELS2
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-202 (4385)
+ LESS? CAR,CAR-HERE \?ELS8
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-203 (4386)
+ LESS? CAR,CAR-HERE \?ELS5
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-204 (4430)
+?ELS8: RETURN P?SOUTH
+?ELS3: EQUAL? HERE,VESTIBULE-FWD,VESTIBULE-FWD-DINER \?ELS12
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-205 (4431)
+?ELS5: RETURN P?SOUTH
+?ELS2: EQUAL? HERE,VESTIBULE-FWD,VESTIBULE-FWD-DINER \?ELS6
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-207 (4532)
+ EQUAL? CAR,STACK \?ELS15
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-208 (4532)
+ EQUAL? CAR,STACK \?ELS8
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-209 (4577)
+ EQUAL? THERE,STACK \?ELS15
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-210 (4576)
+ EQUAL? THERE,STACK \?ELS8
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-211 (4623)
+?ELS15: RETURN FALSE-VALUE
+?ELS12: EQUAL? HERE,VESTIBULE-REAR,VESTIBULE-REAR-DINER \?CND1
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-212 (4621)
+?ELS8: RETURN FALSE-VALUE
+?ELS6: EQUAL? HERE,VESTIBULE-REAR,VESTIBULE-REAR-DINER \?CND1
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-214 (4732)
+ EQUAL? CAR,STACK \?ELS24
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-215 (4728)
+ EQUAL? CAR,STACK \?ELS12
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-216 (4776)
+ EQUAL? THERE,STACK \?ELS24
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-217 (4772)
+ EQUAL? THERE,STACK \?ELS12
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-218 (4822)
+?ELS24: RETURN FALSE-VALUE
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-219 (4818)
+?ELS12: RETURN FALSE-VALUE
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-223 (4955)
+?PRG29: GET COR,CNT >RM
+ EQUAL? RM,HERE \?ELS33
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-224 (4951)
+?PRG14: GET COR,CNT >RM
+ EQUAL? RM,HERE \?ELS17
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-226 (5019)
+ JUMP ?REP30
+?ELS33: EQUAL? RM,THERE \?CND31
+ JUMP ?REP30
+?CND31: INC 'CNT
+ JUMP ?PRG29
+?REP30: GET COR,PAST
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-227 (5015)
+ JUMP ?REP15
+?ELS17: EQUAL? RM,THERE \?CND16
+ JUMP ?REP15
+?CND16: INC 'CNT
+ JUMP ?PRG14
+?REP15: GET COR,PAST
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-236 (5169)
+ EQUAL? NUM,1 \?ELS5
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-237 (5165)
+ EQUAL? NUM,1 \?ELS4
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-238 (5206)
+?ELS5: EQUAL? NUM,2 \?ELS7
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-239 (5202)
+?ELS4: EQUAL? NUM,2 \?ELS5
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-240 (5249)
+?ELS7: RETURN COR-4
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-241 (5245)
+?ELS5: RETURN COR-4
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-256 (5572)
+ LESS? C,0 \?ELS15
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-257 (5568)
+ LESS? C,0 \?ELS11
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-259 (5644)
+?ELS15:
+?PRG18: SUB C,4 >Z
+ LESS? Z,0 /?ELS22
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-260 (5640)
+?ELS11:
+?PRG12: SUB C,4 >Z
+ LESS? Z,0 /?ELS15
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-263 (5711)
+ JUMP ?CND20
+?ELS22: SUB C,2 >Z
+ LESS? Z,0 /?ELS24
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-264 (5707)
+ JUMP ?CND14
+?ELS15: SUB C,2 >Z
+ LESS? Z,0 /?ELS16
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-267 (5782)
+ JUMP ?CND20
+?ELS24: SUB C,1 >Z
+ LESS? Z,0 /?REP19
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-268 (5778)
+ JUMP ?CND14
+?ELS16: SUB C,1 >Z
+ LESS? Z,0 /?REP13
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-271 (5853)
+?CND20: CALL CORRIDOR-CHECK,COR,ITM,CAR >VAL
+ ZERO? FOUND \?CND29
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-272 (5849)
+?CND14: CALL CORRIDOR-CHECK,COR,ITM,CAR >VAL
+ ZERO? FOUND \?CND18
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-274 (5938)
+?CND29: SET 'C,Z
+ JUMP ?PRG18
+?REP19: RETURN FOUND
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-275 (5934)
+?CND18: SET 'C,Z
+ JUMP ?PRG12
+?REP13: RETURN FOUND
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-280 (6079)
+ ZERO? COR /?ORP4
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-281 (6075)
+ ZERO? COR /?ORP3
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-283 (6122)
+?ORP4: PUSH COR-1
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-284 (6118)
+?ORP3: PUSH COR-1
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-285 (6169)
+?PRG5: ZERO? COR /?ELS9
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-286 (6165)
+?PRG4: ZERO? COR /?ELS7
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-287 (6212)
+ ZERO? RM \?CND7
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-288 (6208)
+ ZERO? RM \?CND8
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-290 (6261)
+?ELS9: EQUAL? HERE,ROOF \?ELS14
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-291 (6257)
+?CND8: JUMP ?CND6
+?ELS7: EQUAL? HERE,ROOF \?ELS10
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-292 (6315)
+ ZERO? NCAR \?ELS17
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-294 (6330)
+ ZERO? NCAR \?ELS12
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-294 (6359)
+ ZERO? NCAR \?CND7
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-296 (6374)
+ ZERO? NCAR \?CND11
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-296 (6393)
+ ZERO? COR /?ORP24
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-298 (6409)
+ ZERO? COR /?ORP17
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-298 (6424)
+ JUMP ?THN21
+?ORP24: PUSH COR-1
+?THN21: GET STACK,PAST >DIR
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-300 (6440)
+ JUMP ?THN15
+?ORP17: PUSH COR-1
+?THN15: GET STACK,PAST >DIR
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-302 (6510)
+ JUMP ?CND7
+?ELS17: ZERO? PAST \?ELS26
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-304 (6526)
+ JUMP ?CND11
+?ELS12: ZERO? PAST \?ELS18
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-305 (6563)
+ ZERO? NCAR \?CND7
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-307 (6580)
+ ZERO? NCAR \?CND11
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-307 (6597)
+ ZERO? COR /?ORP33
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-309 (6615)
+ ZERO? COR /?ORP23
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-309 (6628)
+ JUMP ?THN30
+?ORP33: PUSH COR-1
+?THN30: GET STACK,PAST >DIR
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-311 (6646)
+ JUMP ?THN21
+?ORP23: PUSH COR-1
+?THN21: GET STACK,PAST >DIR
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-313 (6714)
+ JUMP ?CND7
+?ELS26: INC 'NCAR
+ GRTR? NCAR,CAR-MAX \?CND7
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-315 (6732)
+ JUMP ?CND11
+?ELS18: INC 'NCAR
+ GRTR? NCAR,CAR-MAX \?CND24
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-318 (6805)
+?ELS14: ZERO? RM /?ELS40
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-320 (6825)
+?CND24:
+?CND11: JUMP ?CND6
+?ELS10: ZERO? RM /?ELS26
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-321 (6862)
+?ELS40: EQUAL? HERE,VESTIBULE-REAR,VESTIBULE-REAR-DINER \?ELS42
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-325 (6912)
+?ELS26: EQUAL? HERE,VESTIBULE-REAR,VESTIBULE-REAR-DINER \?ELS27
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-323 (6941)
+ ZERO? COR /?ORP46
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-327 (6991)
+ ZERO? COR /?ORP30
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-325 (6972)
+ JUMP ?THN43
+?ORP46: PUSH COR-1
+?THN43: GET STACK,PAST >DIR
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-329 (7022)
+ JUMP ?THN28
+?ORP30: PUSH COR-1
+?THN28: GET STACK,PAST >DIR
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-330 (7080)
+ JUMP ?CND7
+?ELS42: EQUAL? HERE,VESTIBULE-FWD,VESTIBULE-FWD-DINER \?CND7
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-334 (7130)
+ JUMP ?CND6
+?ELS27: EQUAL? HERE,VESTIBULE-FWD,VESTIBULE-FWD-DINER \?CND6
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-334 (7201)
+?CND7: EQUAL? RM,HERE \?ELS51
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-338 (7251)
+?CND6: EQUAL? RM,HERE \?ELS33
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-336 (7246)
+ ZERO? COR /?ORP57
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-340 (7296)
+ ZERO? COR /?ORP37
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-338 (7277)
+ JUMP ?THN54
+?ORP57: PUSH COR-1
+?THN54: GET STACK,PAST >DIR
+ JUMP ?CND49
+?ELS51: SET 'OBJ,RM
+ EQUAL? ITM,OBJ /?THN60
+ FIRST? RM >OBJ \?CND49
+?THN60:
+?PRG62: ZERO? ITM /?ELS66
+ EQUAL? OBJ,ITM \?CND64
+ ZERO? COR /?ELS72
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-342 (7327)
+ JUMP ?THN35
+?ORP37: PUSH COR-1
+?THN35: GET STACK,PAST >DIR
+ JUMP ?CND32
+?ELS33: SET 'OBJ,RM
+ PUSH 1
+ EQUAL? ITM,STACK /?THN38
+ FIRST? RM >OBJ \?CND32
+?THN38:
+?PRG40: ZERO? ITM /?ELS43
+ EQUAL? OBJ,ITM \?CND44
+ ZERO? COR /?ELS47
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-350 (7529)
+ JUMP ?REP63
+?ELS72: EQUAL? NCAR,CAR \?CND64
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-355 (7590)
+ JUMP ?REP41
+?ELS47: EQUAL? NCAR,CAR \?CND46
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-353 (7600)
+ JUMP ?REP63
+?ELS66: ZERO? COR-ALL-DIRS \?THN79
+ EQUAL? DIR,PLAYER-NOT-FACING /?CND64
+?THN79: EQUAL? OBJ,BRIEFCASE /?THN81
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-358 (7661)
+ JUMP ?REP41
+?CND46:
+?CND44: JUMP ?CND42
+?ELS43: ZERO? COR-ALL-DIRS \?THN50
+ EQUAL? DIR,PLAYER-NOT-FACING /?CND42
+?THN50: EQUAL? OBJ,BRIEFCASE /?THN51
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-358 (7750)
+ ZERO? STACK /?CND64
+?THN81: ZERO? COR \?THN83
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-365 (7842)
+ ZERO? STACK /?CND42
+?THN51: ZERO? COR \?THN52
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-361 (7816)
+ EQUAL? NCAR,STACK \?CND64
+?THN83: FSET? OBJ,NDESCBIT /?CND64
+ ZERO? COR-GRAB-FLAG \?THN85
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-368 (7908)
+ EQUAL? NCAR,STACK \?CND42
+?THN52: FSET? OBJ,NDESCBIT /?CND42
+ ZERO? COR-GRAB-FLAG \?THN53
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-365 (7932)
+ ZERO? STACK \?CND64
+?THN85: ZERO? COR-GRAB-FLAG /?ELS89
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-372 (8024)
+ ZERO? STACK \?CND42
+?THN53: ZERO? COR-GRAB-FLAG /?ELS56
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-368 (8020)
+ ZERO? X /?CND90
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-375 (8112)
+ ZERO? X /?CND57
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-374 (8146)
+?CND90: ZERO? Y \?CND87
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-381 (8238)
+?CND57: ZERO? Y \?CND55
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-376 (8182)
+ JUMP ?CND87
+?ELS89: CALL COR-ADD-PER,OBJ,DIR
+ ZERO? STACK /?ELS101
+ JUMP ?CND64
+?ELS101: CALL START-SENTENCE,OBJ
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-383 (8274)
+ JUMP ?CND55
+?ELS56: CALL COR-ADD-PER,OBJ,DIR
+ ZERO? STACK /?ELS65
+ JUMP ?CND42
+?ELS65: CALL START-SENTENCE,OBJ
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-385 (8366)
+?CND87:
+?CND64: NEXT? OBJ >OBJ /?KLU114
+?KLU114: ZERO? OBJ \?PRG62
+?REP63: ZERO? FOUND /?CND49
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-392 (8456)
+?CND55:
+?CND42: NEXT? OBJ >OBJ /?KLU74
+?KLU74: ZERO? OBJ \?PRG40
+?REP41: ZERO? FOUND /?CND72
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-390 (8481)
+?CND49: INC 'CNT
+ JUMP ?PRG5
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-397 (8569)
+?CND72:
+?CND32: INC 'CNT
+ JUMP ?PRG4
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-399 (8635)
+?PRG4: GET T,L
+ ZERO? STACK \?ELS8
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-407 (8733)
+?PRG3: GET T,L
+ ZERO? STACK \?ELS6
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-403 (8695)
+?ELS8: DLESS? 'L,1 \?PRG4
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-411 (8793)
+?ELS6: DLESS? 'L,1 \?PRG3
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-418 (8955)
+ ZERO? FIRST /?ELS10
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-426 (9053)
+ ZERO? FIRST /?ELS8
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-422 (9039)
+?ELS10: EQUAL? L,1 /?THN19
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-430 (9136)
+?ELS8: EQUAL? L,1 /?THN12
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-425 (9091)
+ ZERO? STACK \?ELS18
+?THN19: PRINTI " and"
+ JUMP ?CND16
+?ELS18: PRINTI ","
+?CND16: CALL PRINTT,P
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-433 (9187)
+ ZERO? STACK \?ELS13
+?THN12: PRINTI " and"
+ JUMP ?CND11
+?ELS13: PRINTI ","
+?CND11: CALL PRINTT,P
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-431 (9220)
+ ZERO? NUM \?ELS34
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-439 (9316)
+ ZERO? NUM \?ELS23
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-433 (9253)
+?ELS34: EQUAL? NUM,1 \?ELS36
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-441 (9349)
+?ELS23: EQUAL? NUM,1 \?ELS24
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-435 (9298)
+ JUMP ?CND32
+?ELS36: PRINTI " are"
+?CND32: PRINTI " off to "
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-443 (9394)
+ JUMP ?CND22
+?ELS24: PRINTI " are"
+?CND22: PRINTI " off to "
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-455 (9734)
+ LOC PERSON >L
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-463 (9830)
+ LOC PERSON
+ SET 'L,STACK
+ SET '?TMP1,1
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-457 (9769)
+ EQUAL? L,F /FALSE
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-467 (9892)
+ EQUAL? ?TMP1,F /FALSE
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-496 (10583)
+?CND1: ZERO? WALK-TRAIN \?CND4
+ EQUAL? PERSON,CONDUCTOR,CUSTOMS-AGENT /?CND4
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-506 (10710)
+?CND1: ZERO? WALK-TRAIN \?CND3
+ EQUAL? PERSON,CONDUCTOR,CUSTOMS-AGENT /?CND3
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-500 (10712)
+?CND4: LOC PERSON
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-510 (10839)
+?CND3: LOC PERSON
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-508 (10879)
+ EQUAL? CAR,CARH /?ELS3
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-518 (11006)
+ EQUAL? CAR,CARH /?ELS2
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-512 (10988)
+ LESS? CAR,CARH \?ELS6
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-522 (11115)
+ LESS? CAR,CARH \?ELS4
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-515 (11049)
+?ELS6: CALL L-REAR,CARH >GOAL
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-525 (11176)
+?ELS4: CALL L-REAR,CARH >GOAL
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-517 (11093)
+?ELS3: GET GT,GOAL-OFUNCTION
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-527 (11220)
+?ELS2: GET GT,GOAL-OFUNCTION
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-558 (12070)
+ ZERO? STACK \?THN6
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-568 (12197)
+ ZERO? STACK \?THN4
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-561 (12138)
+?THN6: CALL PRINTT,RM
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-571 (12265)
+?THN4: CALL PRINTT,RM
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-576 (12491)
+ EQUAL? OL,VESTIBULE-FWD,OTHER-VESTIBULE-FWD,VESTIBULE-FWD-DINER \?ELS6
+ EQUAL? WHERE,LIMBO-FWD,OTHER-LIMBO-FWD,LIMBO-FWD-DINER \?CND4
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-586 (12618)
+ EQUAL? OL,VESTIBULE-FWD,OTHER-VESTIBULE-FWD,VESTIBULE-FWD-DINER \?ELS3
+ EQUAL? WHERE,LIMBO-FWD,OTHER-LIMBO-FWD,LIMBO-FWD-DINER \?CND2
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-580 (12667)
+ JUMP ?CND4
+?ELS6: EQUAL? OL,VESTIBULE-REAR,OTHER-VESTIBULE-REAR,VESTIBULE-REAR-DINER \?CND4
+ EQUAL? WHERE,LIMBO-REAR,OTHER-LIMBO-REAR,LIMBO-REAR-DINER \?CND4
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-590 (12794)
+ JUMP ?CND2
+?ELS3: EQUAL? OL,VESTIBULE-REAR,OTHER-VESTIBULE-REAR,VESTIBULE-REAR-DINER \?CND2
+ EQUAL? WHERE,LIMBO-REAR,OTHER-LIMBO-REAR,LIMBO-REAR-DINER \?CND2
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-585 (12867)
+?CND4: ZERO? DIR /?CND15
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-595 (12994)
+?CND2: ZERO? DIR /?CND9
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-587 (12911)
+ ZERO? X /?CND15
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-597 (13037)
+ ZERO? X /?CND9
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-589 (12940)
+ EQUAL? STACK,DEXIT \?CND15
+ GET X,DEXITOBJ >DOOR
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-599 (13065)
+ EQUAL? STACK,DEXIT \?CND9
+ CALL GET-DOOR-OBJ,X >DOOR
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-592 (13023)
+ ZERO? STACK /?CND15
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-602 (13152)
+ ZERO? STACK /?CND9
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-594 (13069)
+?CND15: EQUAL? PERSON,PLAYER \?ELS25
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-604 (13197)
+?CND9: EQUAL? PERSON,PLAYER \?ELS15
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-596 (13139)
+ ZERO? OL /?CND26
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-606 (13266)
+ ZERO? OL /?CND16
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-599 (13242)
+?CND26: ZERO? DOOR /?CND23
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-609 (13369)
+?CND16: ZERO? DOOR /?CND14
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-601 (13295)
+ ZERO? STACK \?CND23
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-611 (13422)
+ ZERO? STACK \?CND14
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-604 (13336)
+?ELS25: FSET? PERSON,NDESCBIT \?ELS37
+ JUMP ?CND23
+?ELS37: EQUAL? OL,HERE \?ELS39
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-614 (13463)
+?ELS15: FSET? PERSON,NDESCBIT \?ELS23
+ JUMP ?CND14
+?ELS23: EQUAL? OL,HERE \?ELS24
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-609 (13483)
+ EQUAL? PERSON,CONDUCTOR \?CND40
+ ZERO? TOUCH-CAP? /?CND40
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-619 (13610)
+ EQUAL? PERSON,CONDUCTOR \?CND25
+ ZERO? TOUCH-CAP? /?CND25
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-613 (13618)
+?CND40: ZERO? DOOR /?CND47
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-623 (13745)
+?CND25: ZERO? DOOR /?CND30
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-617 (13699)
+?CND47: EQUAL? DIR,P?OUT /?THN56
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-627 (13826)
+?CND30: EQUAL? DIR,P?OUT /?THN35
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-619 (13767)
+ ZERO? STACK \?THN56
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-629 (13894)
+ ZERO? STACK \?THN35
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-621 (13824)
+ ZERO? STACK /?ELS55
+?THN56: PRINTI " leaves."
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-631 (13951)
+ ZERO? STACK /?ELS36
+?THN35: PRINTI " leaves."
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-624 (13881)
+ JUMP ?CND23
+?ELS55: CALL ENTERS?,DIR,OWHERE
+ ZERO? STACK /?ELS61
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-634 (14008)
+ JUMP ?CND14
+?ELS36: CALL ENTERS?,DIR,OWHERE
+ ZERO? STACK /?ELS39
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-629 (14002)
+ ZERO? DOOR /?CND66
+ FSET? DOOR,LOCKED \?CND66
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-639 (14129)
+ ZERO? DOOR /?CND43
+ FSET? DOOR,LOCKED \?CND43
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-632 (14081)
+?CND66: PRINTI "."
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-642 (14208)
+?CND43: PRINTI "."
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-634 (14109)
+ JUMP ?CND23
+?ELS61: EQUAL? CAR,CAR-MAX \?ELS76
+ EQUAL? OL,VESTIBULE-REAR \?ELS76
+ EQUAL? WHERE,LIMBO-REAR \?ELS76
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-644 (14236)
+ JUMP ?CND14
+?ELS39: EQUAL? CAR,CAR-MAX \?ELS50
+ EQUAL? OL,VESTIBULE-REAR \?ELS50
+ EQUAL? WHERE,LIMBO-REAR \?ELS50
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-642 (14337)
+ JUMP ?CND23
+?ELS76: EQUAL? PERSON,PLAYER \?ELS85
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-652 (14464)
+ JUMP ?CND14
+?ELS50: EQUAL? PERSON,PLAYER \?ELS55
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-645 (14407)
+ JUMP ?CND83
+?ELS85: PRINTI " heads "
+?CND83: EQUAL? DIR,P?UP,P?DOWN /?CND92
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-655 (14534)
+ JUMP ?CND54
+?ELS55: PRINTI " heads "
+?CND54: EQUAL? DIR,P?UP,P?DOWN /?CND60
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-649 (14506)
+?CND92: CALL DIR-PRINT,DIR
+ ZERO? DOOR /?CND97
+ FSET? DOOR,LOCKED \?CND97
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-659 (14633)
+?CND60: CALL DIR-PRINT,DIR
+ ZERO? DOOR /?CND64
+ FSET? DOOR,LOCKED \?CND64
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-653 (14613)
+?CND97: PRINTI "."
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-663 (14740)
+?CND64: PRINTI "."
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-655 (14641)
+ JUMP ?CND23
+?ELS39: EQUAL? OWHERE,HERE \?ELS107
+ ZERO? GT /?THN111
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-665 (14768)
+ JUMP ?CND14
+?ELS24: EQUAL? OWHERE,HERE \?ELS71
+ ZERO? GT /?THN73
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-659 (14728)
+ EQUAL? HERE,STACK /?CND23
+?THN111: ZERO? TICKETS-PUNCHED? /?ELS119
+ ZERO? CUSTOMS-SWEEP /?THN116
+?ELS119: EQUAL? PERSON,CONDUCTOR /?CND23
+?THN116: SET 'VAL,TRUE-VALUE
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-669 (14853)
+ EQUAL? HERE,STACK /?CND14
+?THN73: ZERO? TICKETS-PUNCHED? /?ELS77
+ ZERO? CUSTOMS-SWEEP /?THN76
+?ELS77: EQUAL? PERSON,CONDUCTOR /?CND14
+?THN76: SET 'VAL,TRUE-VALUE
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-665 (14941)
+ ZERO? DOOR /?CND120
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-675 (15061)
+ ZERO? DOOR /?CND79
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-669 (15016)
+?CND120: PRINTI " walks "
+ EQUAL? PRSA,V?WALK \?ELS130
+ EQUAL? OL,LAST-PLAYER-LOC \?ELS130
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-679 (15135)
+?CND79: PRINTI " walks "
+ EQUAL? PRSA,V?WALK \?ELS86
+ EQUAL? OL,LAST-PLAYER-LOC \?ELS86
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-673 (15136)
+ JUMP ?CND128
+?ELS130: PRINTI "past you"
+ EQUAL? DIR,P?IN,P?OUT /?CND128
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-683 (15252)
+ JUMP ?CND85
+?ELS86: PRINTI "past you"
+ EQUAL? DIR,P?IN,P?OUT /?CND85
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-679 (15272)
+?CND128: PRINTI "."
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-689 (15385)
+?CND85: PRINTI "."
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-681 (15301)
+ JUMP ?CND23
+?ELS107: GETP HERE,P?CORRIDOR >COR
+ ZERO? COR /?CND23
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-691 (15413)
+ JUMP ?CND14
+?ELS71: GETP HERE,P?CORRIDOR >COR
+ ZERO? COR /?CND14
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-685 (15409)
+ EQUAL? PCOR,FALSE-VALUE,PLAYER-NOT-FACING /?ELS150
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-695 (15520)
+ EQUAL? PCOR,FALSE-VALUE,PLAYER-NOT-FACING /?ELS100
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-687 (15495)
+ EQUAL? STACK,FALSE-VALUE,PLAYER-NOT-FACING \?ELS153
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-697 (15606)
+ EQUAL? STACK,FALSE-VALUE,PLAYER-NOT-FACING \?ELS102
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-690 (15611)
+ ZERO? STACK \?CND154
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-700 (15722)
+ ZERO? STACK \?CND103
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-692 (15647)
+?CND154: PRINTI " off to "
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-702 (15758)
+?CND103: PRINTI " off to "
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-695 (15710)
+ ZERO? DOOR /?CND163
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-705 (15821)
+ ZERO? DOOR /?CND111
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-699 (15785)
+?CND163: CALL ENTERS?,DIR,OWHERE
+ ZERO? STACK /?ELS171
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-709 (15896)
+?CND111: CALL ENTERS?,DIR,OWHERE
+ ZERO? STACK /?ELS116
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-703 (15894)
+ JUMP ?CND169
+?ELS171: PRINTI " disappears "
+ EQUAL? DIR,P?UP,P?DOWN /?CND180
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-713 (16005)
+ JUMP ?CND115
+?ELS116: PRINTI " disappears "
+ EQUAL? DIR,P?UP,P?DOWN /?CND122
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-707 (15990)
+?CND180: CALL DIR-PRINT,DIR
+?CND169: ZERO? DOOR /?CND185
+ FSET? DOOR,LOCKED \?CND185
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-717 (16101)
+?CND122: CALL DIR-PRINT,DIR
+?CND115: ZERO? DOOR /?CND126
+ FSET? DOOR,LOCKED \?CND126
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-711 (16108)
+?CND185: PRINTI "."
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-721 (16219)
+?CND126: PRINTI "."
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-713 (16137)
+ JUMP ?CND148
+?ELS153: SET 'VAL,TRUE-VALUE
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-723 (16248)
+ JUMP ?CND99
+?ELS102: SET 'VAL,TRUE-VALUE
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-719 (16289)
+ EQUAL? PCOR,DIR \?ELS202
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-729 (16399)
+ EQUAL? PCOR,DIR \?ELS138
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-721 (16341)
+ JUMP ?CND200
+?ELS202: CALL OPP-DIR,DIR
+ EQUAL? PCOR,STACK \?ELS206
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-731 (16451)
+ JUMP ?CND137
+?ELS138: CALL OPP-DIR,DIR
+ EQUAL? PCOR,STACK \?ELS141
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-725 (16434)
+ JUMP ?CND200
+?ELS206: EQUAL? DIR,P?UP,P?DOWN /?CND211
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-735 (16544)
+ JUMP ?CND137
+?ELS141: EQUAL? DIR,P?UP,P?DOWN /?CND144
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-728 (16510)
+?CND211: CALL DIR-PRINT,DIR
+?CND200: PRINTI "."
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-738 (16620)
+?CND144: CALL DIR-PRINT,DIR
+?CND137: PRINTI "."
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-731 (16568)
+ JUMP ?CND148
+?ELS150: CALL CORRIDOR-LOOK,OWHERE,NCAR >PCOR
+ EQUAL? PCOR,FALSE-VALUE,PLAYER-NOT-FACING /?CND23
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-741 (16678)
+ JUMP ?CND99
+?ELS100: CALL CORRIDOR-LOOK,OWHERE,NCAR >PCOR
+ EQUAL? PCOR,FALSE-VALUE,PLAYER-NOT-FACING /?CND14
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-738 (16762)
+ IN? BRIEFCASE,PERSON \?CND224
+ FSET? BRIEFCASE,SEENBIT /?CND224
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-748 (16871)
+ IN? BRIEFCASE,PERSON \?CND155
+ FSET? BRIEFCASE,SEENBIT /?CND155
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-744 (16913)
+?CND224: PRINTI " appears"
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-754 (17022)
+?CND155: PRINTI " appears"
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-746 (16972)
+ EQUAL? DIR,P?IN /?CND233
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-756 (17081)
+ EQUAL? DIR,P?IN /?CND162
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-749 (17045)
+?CND233: PRINTI "."
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-759 (17154)
+?CND162: PRINTI "."
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-751 (17074)
+?CND148:
+?CND23: ZERO? PERSON \?ELS242
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-761 (17183)
+?CND99:
+?CND14: ZERO? PERSON \?ELS169
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-755 (17147)
+ JUMP ?CND240
+?ELS242: MOVE PERSON,WHERE
+?CND240: EQUAL? PERSON,PLAYER /?CND247
+ EQUAL? PERSON,BAD-SPY \?ELS252
+ ZERO? BAD-SPY-DONE-PEEKING \?ELS252
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-765 (17255)
+ JUMP ?CND168
+?ELS169: MOVE PERSON,WHERE
+?CND168: EQUAL? PERSON,PLAYER /?CND172
+ EQUAL? PERSON,BAD-SPY \?ELS175
+ ZERO? BAD-SPY-DONE-PEEKING \?ELS175
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-761 (17336)
+ JUMP ?CND247
+?ELS252: EQUAL? PERSON,CONDUCTOR,CUSTOMS-AGENT /?CND247
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-771 (17444)
+ JUMP ?CND172
+?ELS175: EQUAL? PERSON,CONDUCTOR,CUSTOMS-AGENT /?CND172
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-764 (17433)
+?CND247: ZERO? GT /?CND257
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-774 (17541)
+?CND172: ZERO? GT /?CND178
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-766 (17477)
+ EQUAL? STACK,WHERE \?ELS263
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-776 (17585)
+ EQUAL? STACK,WHERE \?ELS181
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-768 (17539)
+ ZERO? VAL \?CND261
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-778 (17647)
+ ZERO? VAL \?CND180
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-770 (17583)
+ EQUAL? I-WALK-TRAIN,STACK /?CND261
+ EQUAL? HERE,WHERE \?CND261
+ FSET? PERSON,NDESCBIT /?CND261
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-780 (17691)
+ EQUAL? I-WALK-TRAIN,STACK /?CND180
+ EQUAL? HERE,WHERE \?CND180
+ FSET? PERSON,NDESCBIT /?CND180
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-777 (17773)
+ JUMP ?CND261
+?ELS263: SET 'GOAL-PERSON,PERSON
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-787 (17881)
+ JUMP ?CND180
+?ELS181: SET 'GOAL-PERSON,PERSON
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-781 (17889)
+?CND261:
+?CND257: ZERO? DEBUG /?CND273
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-791 (17997)
+?CND180:
+?CND178: ZERO? DEBUG /?CND187
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-790 (18080)
+ ZERO? STACK /?CND279
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-800 (18188)
+ ZERO? STACK /?CND191
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-795 (18164)
+?CND279: PRINTI ".]"
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-805 (18272)
+?CND191: PRINTI ".]"
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-798 (18207)
+?CND273: RETURN VAL
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-808 (18315)
+?CND187: RETURN VAL
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-802 (18271)
+ EQUAL? HERE,VESTIBULE-REAR,VESTIBULE-REAR-DINER \?ELS3
+ EQUAL? THERE,ROOF \?ELS3
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-812 (18379)
+ EQUAL? HERE,VESTIBULE-REAR,VESTIBULE-REAR-DINER \?ELS2
+ EQUAL? THERE,ROOF \?ELS2
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-805 (18369)
+?ELS3: EQUAL? HERE,PLATFORM-A \?ELS7
+ EQUAL? THERE,PLATFORM-B \?ELS7
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-815 (18477)
+?ELS2: EQUAL? HERE,PLATFORM-A \?ELS4
+ EQUAL? THERE,PLATFORM-B \?ELS4
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-808 (18457)
+?ELS7: EQUAL? HERE,PLATFORM-B \?ELS11
+ EQUAL? THERE,PLATFORM-A \?ELS11
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-818 (18565)
+?ELS4: EQUAL? HERE,PLATFORM-B \?ELS6
+ EQUAL? THERE,PLATFORM-A \?ELS6
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-811 (18547)
+?ELS11: EQUAL? THERE,VESTIBULE-REAR,VESTIBULE-REAR-DINER,OTHER-VESTIBULE-REAR \?ELS15
+ EQUAL? HERE,ROOF,OTHER-ROOF \?ELS15
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-821 (18653)
+?ELS6: EQUAL? THERE,VESTIBULE-REAR,VESTIBULE-REAR-DINER,OTHER-VESTIBULE-REAR \?ELS8
+ EQUAL? HERE,ROOF,OTHER-ROOF \?ELS8
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-814 (18688)
+?ELS15: EQUAL? HERE,VESTIBULE-REAR,VESTIBULE-REAR-DINER,OTHER-VESTIBULE-REAR \?ELS19
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-824 (18791)
+?ELS8: EQUAL? HERE,VESTIBULE-REAR,VESTIBULE-REAR-DINER,OTHER-VESTIBULE-REAR \?ELS10
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-816 (18800)
+ ZERO? STACK /?ELS19
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-826 (18902)
+ ZERO? STACK /?ELS10
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-818 (18838)
+?ELS19: EQUAL? THERE,VESTIBULE-REAR,VESTIBULE-REAR-DINER,OTHER-VESTIBULE-REAR \?ELS23
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-828 (18940)
+?ELS10: EQUAL? THERE,VESTIBULE-REAR,VESTIBULE-REAR-DINER,OTHER-VESTIBULE-REAR \?ELS12
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-820 (18950)
+ ZERO? STACK /?ELS23
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-830 (19052)
+ ZERO? STACK /?ELS12
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-822 (18986)
+?ELS23: EQUAL? HERE,VESTIBULE-FWD,OTHER-VESTIBULE-FWD \?ELS31
+ EQUAL? THERE,LIMBO-FWD,OTHER-LIMBO-FWD /?THN28
+?ELS31: EQUAL? HERE,VESTIBULE-FWD-DINER \?ELS27
+ EQUAL? THERE,LIMBO-FWD-DINER \?ELS27
+?THN28: RETURN P?NORTH
+?ELS27: EQUAL? HERE,VESTIBULE-REAR,OTHER-VESTIBULE-REAR \?ELS39
+ EQUAL? THERE,LIMBO-REAR,OTHER-LIMBO-REAR /?THN36
+?ELS39: EQUAL? HERE,VESTIBULE-REAR-DINER \?CND1
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-832 (19088)
+?ELS12: EQUAL? HERE,VESTIBULE-FWD,OTHER-VESTIBULE-FWD \?ELS15
+ EQUAL? THERE,LIMBO-FWD,OTHER-LIMBO-FWD /?THN14
+?ELS15: EQUAL? HERE,VESTIBULE-FWD-DINER \?ELS16
+ EQUAL? THERE,LIMBO-FWD-DINER \?ELS16
+?THN14: RETURN P?NORTH
+?ELS16: EQUAL? HERE,VESTIBULE-REAR,OTHER-VESTIBULE-REAR \?ELS19
+ EQUAL? THERE,LIMBO-REAR,OTHER-LIMBO-REAR /?THN18
+?ELS19: EQUAL? HERE,VESTIBULE-REAR-DINER \?CND1
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-831 (19414)
+?THN36: RETURN P?SOUTH
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-841 (19516)
+?THN18: RETURN P?SOUTH
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-833 (19481)
+ ZERO? STACK /?ELS44
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-843 (19583)
+ ZERO? STACK /?ELS23
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-835 (19517)
+?ELS44: CALL DIR-FROM-TEST,HERE,THERE,P?OUT
+ ZERO? STACK /?CND42
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-845 (19619)
+?ELS23: CALL DIR-FROM-TEST,HERE,THERE,P?OUT
+ ZERO? STACK /?CND22
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-838 (19599)
+?CND42:
+?PRG47: NEXTP HERE,P >P
+ LESS? P,LOW-DIRECTION \?ELS51
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-848 (19701)
+?CND22:
+?PRG25: NEXTP HERE,P >P
+ LESS? P,LOW-DIRECTION \?ELS28
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-842 (19677)
+?ELS51: CALL DIR-FROM-TEST,HERE,THERE,P >D
+ ZERO? D /?PRG47
+ LESS? D,LOW-DIRECTION \?ELS56
+ ZERO? V \?ELS56
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-852 (19779)
+?ELS28: CALL DIR-FROM-TEST,HERE,THERE,P >D
+ ZERO? D /?PRG25
+ LESS? D,LOW-DIRECTION \?ELS31
+ ZERO? V \?ELS31
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-847 (19800)
+ JUMP ?PRG47
+?ELS56: RETURN P
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-857 (19902)
+ JUMP ?CND30
+?ELS31: RETURN P
+?CND30: JUMP ?PRG25
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-862 (20065)
+?PRG1: IGRTR? 'CNT,CHARACTER-MAX \?ELS5
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-873 (20188)
+?PRG1: IGRTR? 'CNT,CHARACTER-MAX \?ELS4
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-864 (20119)
+?ELS5: GET GOAL-TABLES,CNT >GT
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-875 (20242)
+?ELS4: GET GOAL-TABLES,CNT >GT
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-879 (20410)
+ EQUAL? ARG,G-ENROUTE \?ELS5
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-890 (20533)
+ EQUAL? ARG,G-ENROUTE \?ELS4
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-881 (20497)
+ ZERO? VAL /?ELS10
+ EQUAL? NOW-LURCHING,MOVES /?THN13
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-892 (20620)
+ ZERO? VAL /?ELS8
+ EQUAL? NOW-LURCHING,MOVES /?THN9
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-884 (20566)
+ LESS? 50,STACK /?ELS10
+?THN13: GETP VAL,P?LDESC
+ ZERO? STACK \?CND15
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-895 (20687)
+ LESS? 50,STACK /?ELS8
+?THN9: GETP VAL,P?LDESC
+ ZERO? STACK \?CND11
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-890 (20707)
+?CND15: CALL DIR-FROM,HERE,LAST-PLAYER-LOC
+ ZERO? STACK \?CND18
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-901 (20826)
+?CND11: CALL DIR-FROM,HERE,LAST-PLAYER-LOC
+ ZERO? STACK \?CND13
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-893 (20781)
+?CND18: EQUAL? NOW-LURCHING,MOVES \?ELS23
+ EQUAL? VAL,PICKPOCKET \?CND24
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-904 (20900)
+?CND13: EQUAL? NOW-LURCHING,MOVES \?ELS16
+ EQUAL? VAL,PICKPOCKET \?CND17
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-896 (20879)
+?CND24: PRINTI "As the train lurches,"
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-907 (20998)
+?CND17: PRINTI "As the train lurches,"
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-899 (20964)
+ JUMP ?CND21
+?ELS23: CALL START-SENTENCE,VAL
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-910 (21083)
+ JUMP ?CND15
+?ELS16: CALL START-SENTENCE,VAL
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-902 (21040)
+?CND21: PRINTR " at this point."
+?ELS10: PRINTI "("
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-913 (21159)
+?CND15: PRINTR " at this point."
+?ELS8: PRINTI "("
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-910 (21181)
+?ELS5: EQUAL? ARG,G-REACHED /TRUE
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-921 (21299)
+?ELS4: EQUAL? ARG,G-REACHED /TRUE
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-916 (21279)
+ LESS? 2,STACK \?ELS3
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-927 (21397)
+ LESS? 2,STACK \?ELS2
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-919 (21338)
+?ELS3: FIRST? POCKET >X /?CND1
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-930 (21456)
+?ELS2: FIRST? POCKET >X /?CND1
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-922 (21403)
+?CND1: NEXT? X >Y \?CND12
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-933 (21521)
+?CND1: NEXT? X >Y \?CND7
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-924 (21441)
+?CND12: EQUAL? X,BRIEFCASE /FALSE
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-935 (21558)
+?CND7: EQUAL? X,BRIEFCASE /FALSE
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-935 (21670)
+ EQUAL? GARG,G-REACHED \?CND7
+ EQUAL? L,VESTIBULE-REAR,VESTIBULE-REAR-DINER,OTHER-VESTIBULE-REAR \?ELS12
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-946 (21786)
+ EQUAL? GARG,G-REACHED \?CND5
+ EQUAL? L,VESTIBULE-REAR,VESTIBULE-REAR-DINER,OTHER-VESTIBULE-REAR \?ELS8
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-938 (21805)
+ GRTR? P,PLATFORM-MAX \?CND13
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-949 (21920)
+ GRTR? P,PLATFORM-MAX \?CND9
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-940 (21858)
+?CND13: GET STATION-ROOMS,P
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-951 (21972)
+?CND9: GET STATION-ROOMS,P
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-945 (22012)
+ EQUAL? STACK,I-TRAVELER-FINDS-CONTACT \?ELS18
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-956 (22125)
+ EQUAL? STACK,I-TRAVELER-FINDS-CONTACT \?ELS12
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-948 (22153)
+ JUMP ?CND10
+?ELS18: CALL ESTABLISH-GOAL,GOAL-PERSON,PLATFORM-B
+ JUMP ?CND10
+?ELS12: EQUAL? L,PLATFORM-B \?ELS22
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-959 (22266)
+ JUMP ?CND7
+?ELS12: CALL ESTABLISH-GOAL,GOAL-PERSON,PLATFORM-B
+ JUMP ?CND7
+?ELS8: EQUAL? L,PLATFORM-B \?ELS13
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-953 (22298)
+ ZERO? STACK /?CND23
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-964 (22408)
+ ZERO? STACK /?CND14
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-959 (22470)
+ IN? BRIEFCASE,GOAL-PERSON \?CND28
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-970 (22580)
+ IN? BRIEFCASE,GOAL-PERSON \?CND18
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-961 (22536)
+?CND28: PRINTI "to"
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-972 (22646)
+?CND18: PRINTI "to"
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-965 (22606)
+?CND23: CALL ESTABLISH-GOAL,GOAL-PERSON,PLATFORM-A
+ JUMP ?CND7
+?ELS22: EQUAL? L,PLATFORM-A \?ELS36
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-976 (22716)
+?CND14: CALL ESTABLISH-GOAL,GOAL-PERSON,PLATFORM-A
+ JUMP ?CND5
+?ELS13: EQUAL? L,PLATFORM-A \?ELS24
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-972 (22827)
+ EQUAL? EGO,BAD-SPY \?CND37
+ EQUAL? P,BAD-SPY-C \?CND37
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-983 (22937)
+ EQUAL? EGO,BAD-SPY \?CND25
+ EQUAL? P,BAD-SPY-C \?CND25
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-976 (22966)
+?CND37: GET CHAR-LOCS,P >?TMP1
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-987 (23076)
+?CND25: GET CHAR-LOCS,P >?TMP1
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-979 (23068)
+ JUMP ?CND7
+?ELS36: PRINTI "[!! LEAVE-TRAIN GOAL? ("
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-990 (23178)
+ JUMP ?CND5
+?ELS24: PRINTI "[!! LEAVE-TRAIN GOAL? ("
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-987 (23212)
+?CND10:
+?CND7: ZERO? IDEBUG /?CND46
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-998 (23322)
+?CND7:
+?CND5: ZERO? IDEBUG /?CND30
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-993 (23298)
+?CND46: RETURN VAL
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1004 (23407)
+?CND30: RETURN VAL
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1005 (23593)
+ EQUAL? GARG,G-ENROUTE \?ELS9
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1016 (23702)
+ EQUAL? GARG,G-ENROUTE \?ELS6
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1007 (23666)
+ JUMP ?CND7
+?ELS9: EQUAL? GARG,G-REACHED \?CND7
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1018 (23775)
+ JUMP ?CND5
+?ELS6: EQUAL? GARG,G-REACHED \?CND5
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1010 (23747)
+ EQUAL? L,LIMBO-FWD,LIMBO-FWD-DINER,OTHER-LIMBO-FWD \?ELS14
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1021 (23856)
+ EQUAL? L,LIMBO-FWD,LIMBO-FWD-DINER,OTHER-LIMBO-FWD \?ELS9
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1016 (23930)
+ EQUAL? CAR,CARH \?ELS17
+ EQUAL? CARH,DINER-CAR,CAR-HERE /?CND18
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1027 (24038)
+ EQUAL? CAR,CARH \?ELS11
+ EQUAL? CARH,DINER-CAR,CAR-HERE /?CND12
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1019 (24021)
+?CND18: CALL ESTABLISH-GOAL,GOAL-PERSON,GOAL,2
+ JUMP ?CND12
+?ELS17: CALL L-FWD,CARH
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1030 (24129)
+?CND12: CALL ESTABLISH-GOAL,GOAL-PERSON,GOAL,2
+ JUMP ?CND8
+?ELS11: CALL L-FWD,CARH
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1023 (24150)
+ JUMP ?CND12
+?ELS14: EQUAL? L,LIMBO-REAR,LIMBO-REAR-DINER,OTHER-LIMBO-REAR \?ELS24
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1034 (24257)
+ JUMP ?CND8
+?ELS9: EQUAL? L,LIMBO-REAR,LIMBO-REAR-DINER,OTHER-LIMBO-REAR \?ELS14
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1030 (24356)
+ EQUAL? CAR,CARH \?ELS27
+ EQUAL? CARH,DINER-CAR,CAR-HERE /?CND28
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1041 (24461)
+ EQUAL? CAR,CARH \?ELS16
+ EQUAL? CARH,DINER-CAR,CAR-HERE /?CND17
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1033 (24447)
+?CND28: CALL ESTABLISH-GOAL,GOAL-PERSON,GOAL,2
+ JUMP ?CND12
+?ELS27: CALL L-REAR,CARH
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1044 (24552)
+?CND17: CALL ESTABLISH-GOAL,GOAL-PERSON,GOAL,2
+ JUMP ?CND8
+?ELS16: CALL L-REAR,CARH
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1037 (24577)
+ JUMP ?CND12
+?ELS24: PRINTI "[!! WALK-TRAIN GOAL? ("
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1048 (24681)
+ JUMP ?CND8
+?ELS14: PRINTI "[!! WALK-TRAIN GOAL? ("
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1045 (24721)
+?CND12:
+?CND7: ZERO? IDEBUG /?CND37
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1056 (24824)
+?CND8:
+?CND5: ZERO? IDEBUG /?CND21
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1051 (24807)
+?CND37: RETURN VAL
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1062 (24909)
+?CND21: RETURN VAL
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1055 (24864)
+ FIRST? OBJ >F /?KLU15
+?KLU15:
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1066 (24966)
+ FIRST? OBJ >F /?KLU9
+?KLU9:
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1058 (24920)
+ NEXT? F >N /?KLU16
+?KLU16: GETP F,P?CAR
+ ZERO? STACK /?CND9
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1069 (25020)
+ NEXT? F >N /?CND3
+?CND3: GETP F,P?CAR
+ ZERO? STACK /?CND5
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1062 (25003)
+ FIRST? F \?CND9
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1073 (25101)
+ FIRST? F \?CND5
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1064 (25046)
+?CND9: SET 'F,N
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1075 (25144)
+?CND5: SET 'F,N
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1074 (25253)
+ ZERO? GARG \?ELS11
+ EQUAL? CLERK,EXTRA /?ELS11
+ ZERO? ON-TRAIN \?CND14
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1085 (25351)
+ ZERO? GARG \?ELS8
+ EQUAL? CLERK,EXTRA /?ELS8
+ ZERO? ON-TRAIN \?CND10
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1083 (25421)
+?CND14: RANDOM 2
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1094 (25517)
+?CND10: RANDOM 2
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1087 (25494)
+ LESS? NCAR,1 \?ELS25
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1098 (25590)
+ LESS? NCAR,1 \?ELS17
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1089 (25531)
+ JUMP ?CND23
+?ELS25: GRTR? NCAR,CAR-MAX \?CND23
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1100 (25627)
+ JUMP ?CND16
+?ELS17: GRTR? NCAR,CAR-MAX \?CND16
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1092 (25601)
+?CND23: EQUAL? NCAR,DINER-CAR \?ELS30
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1103 (25697)
+?CND16: EQUAL? NCAR,DINER-CAR \?ELS20
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1094 (25679)
+ JUMP ?CND28
+?ELS30: CALL PICK-ONE,CAR-ROOMS-COMPS >DEST
+?CND28: ZERO? DEBUG /?CND33
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1105 (25775)
+ JUMP ?CND19
+?ELS20: CALL PICK-ONE,CAR-ROOMS-COMPS >DEST
+?CND19: ZERO? DEBUG /?CND21
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1110 (25968)
+?CND33: EQUAL? NCAR,GAS-CAR \?CND39
+ EQUAL? DEST,GAS-CAR-RM \?CND39
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1121 (26064)
+?CND21: EQUAL? NCAR,GAS-CAR \?CND25
+ EQUAL? DEST,GAS-CAR-RM \?CND25
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1113 (26064)
+?CND39: GET GOAL-TABLES,EXTRA-C
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1124 (26160)
+?CND25: GET GOAL-TABLES,EXTRA-C
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1120 (26230)
+?ELS11: EQUAL? GARG,G-ENROUTE \?ELS54
+ EQUAL? L,HERE \?CND55
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1131 (26326)
+?ELS8: EQUAL? GARG,G-ENROUTE \?ELS33
+ EQUAL? L,HERE \?CND34
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1126 (26376)
+?CND55: CALL VISIBLE?,LAST-EXTRA-LOC >VLEL
+ ZERO? VL /?ELS68
+ ZERO? VLEL \?ELS68
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1137 (26471)
+?CND34: CALL VISIBLE?,LAST-EXTRA-LOC >VLEL
+ ZERO? VL /?ELS43
+ ZERO? VLEL \?ELS43
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1133 (26550)
+?ELS68: ZERO? VL \?ELS80
+ ZERO? VLEL /?ELS80
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1144 (26645)
+?ELS43: ZERO? VL \?ELS51
+ ZERO? VLEL /?ELS51
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1139 (26687)
+?ELS80: SET 'LAST-EXTRA-LOC,L
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1150 (26782)
+?ELS51: SET 'LAST-EXTRA-LOC,L
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1144 (26772)
+?ELS54: EQUAL? GARG,G-REACHED \?CND52
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1155 (26867)
+?ELS33: EQUAL? GARG,G-REACHED \?CND32
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1149 (26922)
+?CND52: EQUAL? CAR-HERE,DINER-CAR \?ELS103
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1160 (27017)
+?CND32: EQUAL? CAR-HERE,DINER-CAR \?ELS65
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1151 (27005)
+ JUMP ?CND101
+?ELS103: CALL PICK-ONE,CAR-ROOMS-COMPS >DEST
+?CND101: CALL CALL-FOR-EXTRA,DEST,CAR-HERE,EXTRA >EXTRA
+ ZERO? EXTRA /?ELS108
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1162 (27099)
+ JUMP ?CND64
+?ELS65: CALL PICK-ONE,CAR-ROOMS-COMPS >DEST
+?CND64: CALL CALL-FOR-EXTRA,DEST,CAR-HERE,EXTRA >EXTRA
+ ZERO? EXTRA /?ELS67
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1160 (27291)
+ JUMP ?CND106
+?ELS108: CALL QUEUE,I-EXTRA,5
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1171 (27381)
+ JUMP ?CND66
+?ELS67: CALL QUEUE,I-EXTRA,5
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1163 (27353)
+?CND106: ZERO? IDEBUG /?CND112
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1174 (27441)
+?CND66: ZERO? IDEBUG /?CND68
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1167 (27418)
+?CND112: RETURN VL
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1178 (27504)
+?CND68: RETURN VL
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1172 (27490)
+ ZERO? TICKETS-PUNCHED? /?ELS3
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1183 (27575)
+ ZERO? TICKETS-PUNCHED? /?ELS2
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1174 (27551)
+?ELS3: ZERO? ON-TRAIN /FALSE
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1185 (27636)
+?ELS2: ZERO? ON-TRAIN /FALSE
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1179 (27658)
+ ZERO? X \?THN13
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1190 (27743)
+ ZERO? X \?THN7
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1181 (27695)
+ ZERO? X /?CND10
+?THN13: GET X,REXIT >X
+?CND10: ZERO? X /FALSE
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1192 (27779)
+ ZERO? X /?CND6
+?THN7: CALL GET-REXIT-ROOM,X >X
+?CND6: ZERO? X /FALSE
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1192 (27910)
+ ZERO? GARG \?ELS11
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1203 (28001)
+ ZERO? GARG \?ELS8
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1198 (28048)
+?ELS11: EQUAL? GARG,G-REACHED \?ELS19
+ EQUAL? L,PLATFORM-A \?ELS24
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1209 (28138)
+?ELS8: EQUAL? GARG,G-REACHED \?ELS13
+ EQUAL? L,PLATFORM-A \?ELS17
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1204 (28224)
+ ZERO? STACK /?ELS29
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1215 (28313)
+ ZERO? STACK /?ELS21
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1210 (28350)
+?ELS29: ZERO? IDEBUG /FALSE
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1221 (28439)
+?ELS21: ZERO? IDEBUG /FALSE
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1214 (28413)
+?ELS24: EQUAL? L,VESTIBULE-FWD,OTHER-VESTIBULE-FWD \?ELS47
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1225 (28502)
+?ELS17: EQUAL? L,VESTIBULE-FWD,OTHER-VESTIBULE-FWD \?ELS32
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1217 (28574)
+ ZERO? IDEBUG /?CND48
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1228 (28663)
+ ZERO? IDEBUG /?CND33
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1222 (28640)
+?CND48: RETURN X
+?ELS47: EQUAL? L,VESTIBULE-REAR,OTHER-VESTIBULE-REAR \?ELS55
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1233 (28729)
+?CND33: RETURN X
+?ELS32: EQUAL? L,VESTIBULE-REAR,OTHER-VESTIBULE-REAR \?ELS37
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1228 (28882)
+ ZERO? IDEBUG /?CND56
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1239 (28971)
+ ZERO? IDEBUG /?CND38
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1233 (28948)
+?CND56: RETURN X
+?ELS55: ZERO? IDEBUG /FALSE
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1244 (29037)
+?CND38: RETURN X
+?ELS37: ZERO? IDEBUG /FALSE
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1238 (29029)
+?ELS19: EQUAL? GARG,G-ENROUTE \FALSE
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1249 (29118)
+?ELS13: EQUAL? GARG,G-ENROUTE \FALSE
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1240 (29090)
+ ZERO? STACK /?CND72
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1251 (29179)
+ ZERO? STACK /?CND47
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1244 (29207)
+ ZERO? DEBUG \?THN78
+ EQUAL? X,FALSE-VALUE,PLAYER-NOT-FACING /?CND72
+?THN78: ZERO? DEBUG /?CND80
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1255 (29296)
+ ZERO? DEBUG \?THN50
+ EQUAL? X,FALSE-VALUE,PLAYER-NOT-FACING /?CND47
+?THN50: ZERO? DEBUG /?CND52
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1248 (29320)
+?CND80: CALL THIS-IS-IT,TICKET
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1259 (29409)
+?CND52: CALL THIS-IS-IT,TICKET
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1250 (29384)
+ IN? CONDUCTOR,HERE /?CND88
+ ZERO? X /?CND88
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1261 (29473)
+ IN? CONDUCTOR,HERE /?CND58
+ ZERO? X /?CND58
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1257 (29539)
+?CND88: PRINTI " stops "
+ IN? CONDUCTOR,HERE \?CND99
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1268 (29628)
+?CND58: PRINTI " stops "
+ IN? CONDUCTOR,HERE \?CND67
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1260 (29611)
+?CND99: PRINTI "to "
+ ZERO? CUSTOMS-SWEEP /?ELS108
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1271 (29700)
+?CND67: PRINTI "to "
+ ZERO? CUSTOMS-SWEEP /?ELS74
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1263 (29710)
+ JUMP ?CND106
+?ELS108: PRINTI "punch tickets."
+?CND106: ZERO? X \?CND116
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1274 (29798)
+ JUMP ?CND73
+?ELS74: PRINTI "punch tickets."
+?CND73: ZERO? X \?CND79
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1267 (29799)
+?CND116: CRLF
+?CND72: ZERO? IDEBUG /FALSE
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1278 (29883)
+?CND79: CRLF
+?CND47: ZERO? IDEBUG /FALSE
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1284 (30116)
+ EQUAL? L,STACK \?ELS3
+ EQUAL? CAR,CAR-HERE \?ELS3
+ ZERO? CUSTOMS-SWEEP \?THN6
+ FSET? PLAYER,LOCKED \?ELS3
+?THN6: RETURN PLAYER
+?ELS3: EQUAL? L,GAS-CAR-RM \?CND1
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1295 (30199)
+ EQUAL? L,STACK \?ELS2
+ EQUAL? CAR,CAR-HERE \?ELS2
+ ZERO? CUSTOMS-SWEEP \?THN3
+ FSET? PLAYER,LOCKED \?ELS2
+?THN3: RETURN PLAYER
+?ELS2: EQUAL? L,GAS-CAR-RM \?CND1
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1291 (30312)
+ ZERO? CUSTOMS-SWEEP \?THN12
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1302 (30395)
+ ZERO? CUSTOMS-SWEEP \?THN6
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1293 (30374)
+?THN12: SET 'CONDUCTOR-KNOWS,BRIEFCASE
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1304 (30456)
+?THN6: SET 'CONDUCTOR-KNOWS,BRIEFCASE
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1295 (30424)
+?CND1: FIRST? L >O /?KLU29
+?KLU29:
+?PRG14: ZERO? O \?ELS18
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1306 (30505)
+?CND1: FIRST? L >O /?KLU18
+?KLU18:
+?PRG8: ZERO? O \?ELS11
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1299 (30500)
+?ELS18: FSET? O,PERSONBIT \?CND16
+ FSET? O,LOCKED \?CND16
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1310 (30580)
+?ELS11: FSET? O,PERSONBIT \?CND10
+ FSET? O,LOCKED \?CND10
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1302 (30575)
+ EQUAL? CAR,STACK \?CND16
+ ZERO? VAL \?CND23
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1313 (30655)
+ EQUAL? CAR,STACK \?CND10
+ ZERO? VAL \?CND14
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1305 (30635)
+?CND23: CALL IN-MOTION?,O
+ ZERO? STACK /?CND16
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1316 (30715)
+?CND14: CALL IN-MOTION?,O
+ ZERO? STACK /?CND10
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1310 (30765)
+?CND16: NEXT? O >O /?KLU30
+?KLU30: JUMP ?PRG14
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1321 (30845)
+?CND10: NEXT? O >O /?KLU19
+?KLU19: JUMP ?PRG8
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1324 (31073)
+ ZERO? IDEBUG /?CND19
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1335 (31152)
+ ZERO? IDEBUG /?CND15
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1327 (31120)
+?CND19: RETURN 2
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1338 (31199)
+?CND15: RETURN 2
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1333 (31217)
+?CND1: ZERO? GARG /?CND7
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1344 (31296)
+?CND1: ZERO? GARG /?CND5
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1338 (31299)
+?CND7: EQUAL? HERE,ROOF \?ELS19
+ ZERO? SUPPRESS-I-BOND \?ELS22
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1349 (31378)
+?CND5: EQUAL? HERE,ROOF \?ELS12
+ ZERO? SUPPRESS-I-BOND \?ELS14
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1346 (31481)
+ JUMP ?CND17
+?ELS22: SET 'SUPPRESS-I-BOND,FALSE-VALUE
+ JUMP ?CND17
+?ELS19: INC 'BOND-CTR
+ EQUAL? 1,BOND-CTR \?ELS31
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1357 (31560)
+ JUMP ?CND11
+?ELS14: SET 'SUPPRESS-I-BOND,FALSE-VALUE
+ JUMP ?CND11
+?ELS12: INC 'BOND-CTR
+ EQUAL? 1,BOND-CTR \?ELS18
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1353 (31668)
+ JUMP ?CND17
+?ELS31: EQUAL? 2,BOND-CTR \?ELS33
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1364 (31747)
+ JUMP ?CND11
+?ELS18: EQUAL? 2,BOND-CTR \?ELS19
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1359 (31818)
+ EQUAL? CAR,CAR-HERE /?CND29
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1370 (31897)
+ EQUAL? CAR,CAR-HERE /?CND17
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1361 (31871)
+ JUMP ?CND29
+?ELS33: EQUAL? 3,BOND-CTR \?ELS38
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1372 (31950)
+ JUMP ?CND17
+?ELS19: EQUAL? 3,BOND-CTR \?ELS22
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1365 (31961)
+ ZERO? STACK \?PRD42
+ PUSH 1
+ JUMP ?PRD43
+?PRD42: PUSH 0
+?PRD43: SET 'VAL,STACK
+ ZERO? VAL /?CND29
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1376 (32040)
+ ZERO? STACK \?PRD24
+ SET 'VAL,1
+ JUMP ?PRD25
+?PRD24: SET 'VAL,0
+?PRD25: ZERO? VAL /?CND17
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1373 (32141)
+ JUMP ?CND29
+?ELS38: EQUAL? 4,BOND-CTR \?ELS47
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1383 (32211)
+ JUMP ?CND17
+?ELS22: EQUAL? 4,BOND-CTR \?ELS29
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1378 (32262)
+ ZERO? VAL /?CND29
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1388 (32332)
+ ZERO? VAL /?CND17
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1383 (32428)
+ JUMP ?CND29
+?ELS47: EQUAL? 5,BOND-CTR \?CND17
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1393 (32498)
+ JUMP ?CND17
+?ELS29: EQUAL? 5,BOND-CTR \?CND11
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1386 (32503)
+?CND29:
+?CND17: ZERO? IDEBUG /?CND55
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1396 (32573)
+?CND17:
+?CND11: ZERO? IDEBUG /?CND35
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1392 (32590)
+?CND55: RETURN VAL
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1402 (32660)
+?CND35: RETURN VAL
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1432 (33094)
+ GRTR? ATT,0 /?CND6
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1442 (33164)
+ GRTR? ATT,0 /?CND5
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1434 (33128)
+?CND6: DEC 'ATT
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1444 (33198)
+?CND5: DEC 'ATT
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1436 (33176)
+ ZERO? PER \?ELS11
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1446 (33246)
+ ZERO? PER \?ELS8
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1439 (33233)
+ JUMP ?CND9
+?ELS11: ZERO? ATT \?ELS15
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1449 (33302)
+ JUMP ?CND7
+?ELS8: ZERO? ATT \?ELS11
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1442 (33295)
+ EQUAL? PER,BAD-SPY \?ELS18
+ ZERO? BAD-SPY-DONE-PEEKING \?ELS18
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1452 (33363)
+ EQUAL? PER,BAD-SPY \?ELS13
+ ZERO? BAD-SPY-DONE-PEEKING \?ELS13
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1445 (33393)
+ JUMP ?CND16
+?ELS18: EQUAL? PER,CONDUCTOR \?ELS22
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1455 (33461)
+ JUMP ?CND12
+?ELS13: EQUAL? PER,CONDUCTOR \?ELS15
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1448 (33467)
+ JUMP ?CND16
+?ELS22: PUTP PER,P?LDESC,14
+?CND16: EQUAL? PER,CONDUCTOR \?THN28
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1458 (33535)
+ JUMP ?CND12
+?ELS15: PUTP PER,P?LDESC,14
+?CND12: EQUAL? PER,CONDUCTOR \?THN17
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1452 (33571)
+ ZERO? STACK \?CND9
+?THN28: PUT GT,GOAL-ENABLE,TRUE-VALUE
+ JUMP ?CND9
+?ELS15: EQUAL? ATT,1 \?CND9
+ IN? PER,HERE \?CND9
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1462 (33639)
+ ZERO? STACK \?CND7
+?THN17: PUT GT,GOAL-ENABLE,TRUE-VALUE
+ JUMP ?CND7
+?ELS11: EQUAL? ATT,1 \?CND7
+ IN? PER,HERE \?CND7
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1459 (33759)
+ ZERO? STACK /?CND9
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1469 (33827)
+ ZERO? STACK /?CND7
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1461 (33802)
+?CND9: PUT GT,ATTENTION,ATT
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1471 (33870)
+?CND7: PUT GT,ATTENTION,ATT
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1472 (34049)
+ ZERO? STACK /?CND4
+ ZERO? LEN /?ELS9
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1482 (34117)
+ ZERO? STACK /?CND3
+ ZERO? LEN /?ELS6
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1475 (34104)
+ JUMP ?CND7
+?ELS9: GET GT,ATTENTION-SPAN >ATT
+?CND7: PUT GT,ATTENTION,ATT
+ ZERO? ATT \?ELS15
+ EQUAL? PERSON,CONDUCTOR \?THN19
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1485 (34172)
+ JUMP ?CND5
+?ELS6: GET GT,ATTENTION-SPAN >ATT
+?CND5: PUT GT,ATTENTION,ATT
+ ZERO? ATT \?ELS8
+ EQUAL? PERSON,CONDUCTOR \?THN10
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1482 (34279)
+?THN19: PUT GT,GOAL-ENABLE,TRUE-VALUE
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1492 (34346)
+?THN10: PUT GT,GOAL-ENABLE,TRUE-VALUE
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1484 (34328)
+?ELS15: GET GT,GOAL-ENABLE
+ ZERO? STACK /?CND4
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1494 (34395)
+?ELS8: GET GT,GOAL-ENABLE
+ ZERO? STACK /?CND3
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1487 (34410)
+?CND4: CALL SAID-TO,PERSON
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1497 (34476)
+?CND3: CALL SAID-TO,PERSON
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1496 (34605)
+ ZERO? X \?THN9
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1506 (34671)
+ ZERO? X \?THN5
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1498 (34641)
+ ZERO? X /?CND6
+?THN9: GET X,REXIT >L1
+?CND6: CALL STOP-CONDUCTOR? >PER
+ ZERO? PER /?ELS15
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1508 (34707)
+ ZERO? X /?CND4
+?THN5: CALL GET-REXIT-ROOM,X >L1
+?CND4: CALL STOP-CONDUCTOR? >PER
+ ZERO? PER /?ELS10
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1505 (34832)
+ EQUAL? PER,PLAYER \?ELS20
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1515 (34908)
+ EQUAL? PER,PLAYER \?ELS15
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1507 (34876)
+ EQUAL? HERE,STACK \?ELS25
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1517 (34952)
+ EQUAL? HERE,STACK \?ELS17
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1509 (34936)
+ JUMP ?CND23
+?ELS25: CALL FIND-FLAG-LG,HERE,DOORBIT >X
+ ZERO? X /?CND30
+ FSET? X,LOCKED \?CND30
+ ZERO? TICKET-KNOCK /?ELS37
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1519 (35012)
+ JUMP ?CND16
+?ELS17: CALL FIND-FLAG-LG,HERE,DOORBIT >X
+ ZERO? X /?CND20
+ FSET? X,LOCKED \?CND20
+ ZERO? TICKET-KNOCK /?ELS24
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1515 (35083)
+ JUMP ?CND30
+?ELS37: SET 'TICKET-KNOCK,TRUE-VALUE
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1525 (35159)
+ JUMP ?CND20
+?ELS24: SET 'TICKET-KNOCK,TRUE-VALUE
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1518 (35176)
+?CND30: SET 'TICKET-KNOCK,FALSE-VALUE
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1528 (35252)
+?CND20: SET 'TICKET-KNOCK,FALSE-VALUE
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1524 (35323)
+?CND23: EQUAL? PRSA,V?SAY,V?TELL \?ELS47
+ JUMP ?CND45
+?ELS47: GET GESTURE-TABLE,0
+ LESS? TICKET-COUNT,STACK \?ELS49
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1534 (35399)
+?CND16: EQUAL? PRSA,V?SAY,V?TELL \?ELS30
+ JUMP ?CND29
+?ELS30: GET GESTURE-TABLE,0
+ LESS? TICKET-COUNT,STACK \?ELS31
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1529 (35463)
+ JUMP ?CND45
+?ELS49: CALL ARREST-PLAYER
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1539 (35539)
+ JUMP ?CND29
+?ELS31: CALL ARREST-PLAYER
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1532 (35555)
+?CND45: PRINTI " makes a gesture"
+ LESS? 1,TICKET-COUNT \?CND56
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1542 (35631)
+?CND29: PRINTI " makes a gesture"
+ LESS? 1,TICKET-COUNT \?CND36
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1536 (35668)
+?CND56: SET 'VAL,TRUE-VALUE
+ ZERO? CUSTOMS-SWEEP /?ELS63
+ GRTR? 5,TICKET-COUNT \?ELS67
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1546 (35744)
+?CND36: SET 'VAL,TRUE-VALUE
+ ZERO? CUSTOMS-SWEEP /?ELS41
+ GRTR? 5,TICKET-COUNT \?ELS43
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1540 (35785)
+ JUMP ?CND65
+?ELS67: PRINTI ", demanding that you"
+?CND65: PRINTI " leave the train."
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1550 (35861)
+ JUMP ?CND42
+?ELS43: PRINTI ", demanding that you"
+?CND42: PRINTI " leave the train."
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1544 (35882)
+ JUMP ?CND61
+?ELS63: EQUAL? PER,PLAYER \?CND61
+ GRTR? 5,TICKET-COUNT \?ELS80
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1554 (35958)
+ JUMP ?CND40
+?ELS41: EQUAL? PER,PLAYER \?CND40
+ GRTR? 5,TICKET-COUNT \?ELS52
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1548 (35987)
+ JUMP ?CND78
+?ELS80: PRINTI ", demanding "
+?CND78: CALL THIS-IS-IT,TICKET
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1558 (36063)
+ JUMP ?CND51
+?ELS52: PRINTI ", demanding "
+?CND51: CALL THIS-IS-IT,TICKET
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1554 (36101)
+?CND61: CALL ARREST-MCGUFFIN?
+ EQUAL? EGO,BAD-SPY \?CND94
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1564 (36177)
+?CND40: CALL ARREST-MCGUFFIN?
+ EQUAL? EGO,BAD-SPY \?CND62
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1557 (36189)
+?CND94: RETURN VAL
+?ELS20: FCLEAR PER,LOCKED
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1567 (36265)
+?CND62: RETURN VAL
+?ELS15: FCLEAR PER,LOCKED
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1562 (36307)
+ ZERO? STACK /?CND99
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1572 (36383)
+ ZERO? STACK /?CND64
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1565 (36387)
+?CND99: CALL VISIBLE?,PER >X
+ EQUAL? X,FALSE-VALUE,PLAYER-NOT-FACING \?THN107
+ ZERO? DEBUG /FALSE
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1575 (36463)
+?CND64: CALL VISIBLE?,PER >X
+ EQUAL? X,FALSE-VALUE,PLAYER-NOT-FACING \?THN69
+ ZERO? DEBUG /?PRD68
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1569 (36501)
+?THN107: CALL START-SENTENCE,CONDUCTOR
+ ZERO? CUSTOMS-SWEEP /?ELS117
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1579 (36577)
+ ZERO? 1 /?PRD68
+?THN69: CALL START-SENTENCE,CONDUCTOR
+ ZERO? CUSTOMS-SWEEP /?ELS77
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1574 (36639)
+ JUMP ?CND115
+?ELS117: EQUAL? EGO,BAD-SPY \?CND123
+ EQUAL? PER,BAD-SPY \?CND123
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1585 (36731)
+ JUMP ?CND76
+?ELS77: EQUAL? EGO,BAD-SPY \?CND80
+ EQUAL? PER,BAD-SPY \?CND80
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1579 (36765)
+?CND123: PRINTI " punches"
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1590 (36853)
+?CND80: PRINTI " punches"
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1582 (36833)
+?CND115: ZERO? X \?CND130
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1593 (36920)
+?CND76: ZERO? X \?CND85
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1584 (36873)
+?CND130: CRLF
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1595 (36958)
+?CND85: CRLF
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1586 (36898)
+?ELS15: GET GOAL-TABLES,CONDUCTOR-C
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1597 (36982)
+?PRD68: PUSH 0
+ RSTACK
+?ELS10: GET GOAL-TABLES,CONDUCTOR-C
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1589 (36999)
+ ZERO? X /?CND137
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1602 (37109)
+ ZERO? X /?CND89
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1591 (37057)
+ ZERO? STACK \?THN143
+ ZERO? L1 /?ELS142
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1604 (37166)
+ ZERO? STACK \?THN92
+ ZERO? L1 /?ELS93
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1594 (37140)
+ ZERO? STACK /?ELS142
+?THN143: SET 'TOUCH-CAP?,TRUE-VALUE
+ JUMP ?CND137
+?ELS142: SET 'TOUCH-CAP?,FALSE-VALUE
+?CND137: GETP L,P?STATION
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1607 (37247)
+ ZERO? STACK /?ELS93
+?THN92: SET 'TOUCH-CAP?,TRUE-VALUE
+ JUMP ?CND89
+?ELS93: SET 'TOUCH-CAP?,FALSE-VALUE
+?CND89: GETP L,P?STATION
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1609 (37464)
+ EQUAL? X,PLAYER /?THN9
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1622 (37566)
+ EQUAL? X,PLAYER /?THN6
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1615 (37603)
+?THN9: MOVE OBJ,LIMBO-FWD
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1628 (37705)
+?THN6: MOVE OBJ,LIMBO-FWD
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1635 (38122)
+ ZERO? PER \?CND11
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1648 (38224)
+ ZERO? PER \?CND7
+***************
+
+**** FILE PS:<SWG>GOAL.ZAP.1, 1-1637 (38163)
+?CND11: CALL START-SENTENCE,PER
+**** FILE PS:<SWG>GOAL.ZAP.3, 1-1650 (38264)
+?CND7: CALL START-SENTENCE,PER
+***************
+
diff --git a/goal.zap b/goal.zap
new file mode 100644
index 0000000..19504e5
--- /dev/null
+++ b/goal.zap
@@ -0,0 +1,2130 @@
+
+
+ .FUNCT DIR-PRINT,DIR,CNT=0,TBL,X
+ ZERO? DIR \?CND1
+ PRINTI "out of view"
+ RTRUE
+?CND1: SET 'TBL,DIR-STRINGS
+ ZERO? ON-TRAIN /?CND6
+ ZERO? IN-STATION /?THN13
+ EQUAL? DIR,P?DOWN /?CND6
+?THN13: SET 'TBL,NAUTICAL-DIR-STRINGS
+?CND6:
+?PRG15: GET TBL,CNT >X
+ ZERO? X \?ELS19
+ PRINTI "out of view"
+ RTRUE
+?ELS19: EQUAL? X,DIR \?CND17
+ EQUAL? DIR,P?UP,P?DOWN /?CND24
+ PRINTI "the "
+?CND24: ZERO? ON-TRAIN /?ELS31
+ ZERO? IN-STATION /?ELS31
+ EQUAL? DIR,P?DOWN \?ELS31
+ PRINTI "down the steps"
+ RTRUE
+?ELS31: ADD CNT,1
+ GET TBL,STACK
+ PRINT STACK
+ RTRUE
+?CND17: ADD CNT,2 >CNT
+ JUMP ?PRG15
+
+
+ .FUNCT OPP-DIR,DIR,CNT=0,X
+?PRG1: GET DIR-STRINGS,CNT >X
+ ZERO? X /FALSE
+ EQUAL? X,DIR \?CND3
+ MOD CNT,4
+ ZERO? STACK \?ELS10
+ ADD CNT,2
+ GET DIR-STRINGS,STACK
+ RETURN STACK
+?ELS10: SUB CNT,2
+ GET DIR-STRINGS,STACK
+ RETURN STACK
+?CND3: ADD CNT,2 >CNT
+ JUMP ?PRG1
+
+
+ .FUNCT GET-LINE,LN
+ EQUAL? LN,1 \?ELS5
+ RETURN TRAIN-LINE
+?ELS5: EQUAL? LN,2 \?ELS7
+ RETURN OTHER-LINE
+?ELS7: EQUAL? LN,3 \?ELS9
+ RETURN DINER-LINE
+?ELS9: EQUAL? LN,4 \?ELS11
+ RETURN PLATF-LINE
+?ELS11: EQUAL? LN,5 \?ELS13
+ RETURN STATN-LINE
+?ELS13: EQUAL? LN,6 \FALSE
+ RETURN FANCY-LINE
+
+
+ .FUNCT FOLLOW-GOAL,PERSON,HERE,GT,GOAL,FLG,IGOAL=0,X
+ LOC PERSON >HERE
+ IN? HERE,ROOMS /?CND1
+ CALL2 META-LOC,HERE >HERE
+ MOVE PERSON,HERE
+?CND1: GETP PERSON,P?CHARACTER
+ GET GOAL-TABLES,STACK >GT
+ GET GT,GOAL-F
+ EQUAL? HERE,STACK \?ELS6
+ CALL2 GOAL-REACHED,PERSON
+ RSTACK
+?ELS6: GET GT,GOAL-ENABLE
+ ZERO? STACK /FALSE
+?CND4: GETP HERE,P?STATION >X
+ EQUAL? HERE,X /?CND9
+ ZERO? X \?CND12
+ SET 'X,HERE
+ PRINTI "[!! NO STATION AT "
+ PRINTD HERE
+ PRINTI "]"
+ CRLF
+?CND12: CALL ZMEMQ,HERE,CAR-ROOMS-REST
+ ZERO? STACK /?CND17
+ CALL FIND-FLAG-LG,HERE,DOORBIT
+ FCLEAR STACK,LOCKED
+?CND17: CALL MOVE-PERSON,PERSON,X
+ RSTACK
+?CND9: GET GT,GOAL-I >IGOAL
+ GET TRANSFER-TABLE,IGOAL >GOAL
+ ZERO? GOAL \?CND20
+ SET 'IGOAL,FALSE-VALUE
+ GET GT,GOAL-S >GOAL
+?CND20: ZERO? GOAL /FALSE
+ EQUAL? HERE,GOAL \?CND23
+ ZERO? IGOAL /?ELS30
+ ADD IGOAL,1
+ GET TRANSFER-TABLE,STACK >FLG
+ ZERO? FLG \?CND32
+ SET 'FLG,HERE
+ PRINTI "[!! NO TRANSFER #"
+ PRINTN IGOAL
+ PRINTI "]"
+ CRLF
+?CND32: CALL MOVE-PERSON,PERSON,FLG >FLG
+ GET GT,GOAL-F
+ CALL ESTABLISH-GOAL,PERSON,STACK
+ RETURN FLG
+?ELS30: GET GT,GOAL-F >FLG
+ EQUAL? HERE,FLG /?ELS38
+ ZERO? FLG \?CND39
+ SET 'FLG,HERE
+ PRINTI "[!! NO GOAL FOR "
+ CALL2 TELL-$WHERE,PERSON
+ PRINTI "]"
+ CRLF
+?CND39: EQUAL? PERSON,CONDUCTOR,CUSTOMS-AGENT /?CND46
+ FCLEAR PERSON,TOUCHBIT
+ PUTP PERSON,P?LDESC,3
+?CND46: CALL ZMEMQ,FLG,CAR-ROOMS-REST
+ ZERO? STACK /?CND49
+ EQUAL? PERSON,PLAYER /?ELS54
+ GETP PERSON,P?CAR
+ CALL OCCUPIED?,FLG,STACK
+ ZERO? STACK /?ELS54
+ CALL2 GOAL-REACHED,PERSON
+ RSTACK
+?ELS54: CALL FIND-FLAG-LG,FLG,DOORBIT
+ FSET STACK,LOCKED
+?CND49: CALL MOVE-PERSON,PERSON,FLG >FLG
+ RETURN FLG
+?ELS38: CALL2 GOAL-REACHED,PERSON
+ RSTACK
+?CND23: CALL FOLLOW-GOAL-NEXT,HERE,GOAL,PERSON >FLG
+ EQUAL? HERE,FLG \?CND61
+ GETP GOAL,P?OTHER
+ CALL FOLLOW-GOAL-NEXT,HERE,STACK,PERSON >FLG
+?CND61: CALL MOVE-PERSON,PERSON,FLG
+ RSTACK
+
+
+ .FUNCT FOLLOW-GOAL-DIR,HERE,GOAL,PERSON=0,LINE,LOC
+ GETP GOAL,P?LINE >LINE
+ ZERO? LINE /FALSE
+ GETP HERE,P?LINE
+ EQUAL? LINE,STACK \FALSE
+ GETP HERE,P?STATION >LOC
+ EQUAL? HERE,LOC /?CND6
+ CALL DIR-FROM,HERE,LOC
+ RSTACK
+?CND6: GETP GOAL,P?STATION >LOC
+ EQUAL? GOAL,LOC /?CND9
+ EQUAL? HERE,LOC \?ELS14
+ CALL DIR-FROM,HERE,GOAL
+ RSTACK
+?ELS14: SET 'GOAL,LOC
+?CND9: CALL FOLLOW-GOAL-NEXT,HERE,GOAL,PERSON >LOC
+ EQUAL? LOC,HERE \?CND17
+ GETP GOAL,P?OTHER
+ CALL FOLLOW-GOAL-NEXT,HERE,STACK,PERSON >LOC
+?CND17: CALL DIR-FROM,HERE,LOC
+ RSTACK
+
+
+ .FUNCT FOLLOW-GOAL-NEXT,HERE,GOAL,PERSON=0,LINE,CNT=1,RM,GOAL-FLAG=0,LOC
+ ZERO? PERSON \?CND1
+ SET 'PERSON,GAME
+?CND1: GETP GOAL,P?LINE
+ CALL2 GET-LINE,STACK >LINE
+ ZERO? LINE \?ELS6
+ PRINTI "[!! STUCK ("
+ PRINTD PERSON
+ PRINTI "): GOAL="
+ PRINTD GOAL
+ PRINTI "]"
+ CRLF
+ RETURN HERE
+?ELS6: GETP HERE,P?LINE
+ CALL2 GET-LINE,STACK
+ EQUAL? LINE,STACK /?CND4
+ EQUAL? HERE,VESTIBULE-REAR,VESTIBULE-REAR-DINER /?THN16
+ EQUAL? HERE,OTHER-VESTIBULE-REAR,VESTIBULE-REAR-FANCY \?ELS13
+?THN16: CALL2 ON-PLATFORM?,GOAL
+ ZERO? STACK /?ELS13
+ GETP PERSON,P?CAR
+ GET STATION-ROOMS,STACK >HERE
+ CALL MOVE-PERSON,PERSON,HERE
+ JUMP ?CND4
+?ELS13: PRINTI "[!! STUCK: "
+ CALL TELL-$WHERE,PERSON,HERE
+ PRINTI "GOAL: "
+ CALL TELL-$WHERE,PERSON,GOAL
+ PRINTI "]"
+ CRLF
+ RETURN HERE
+?CND4:
+?PRG26: GET LINE,CNT >RM
+ EQUAL? RM,HERE \?ELS30
+ ZERO? GOAL-FLAG /?ELS33
+ SUB CNT,3
+ GET LINE,STACK >LOC
+ RETURN LOC
+?ELS33: ADD CNT,3
+ GET LINE,STACK >LOC
+ RETURN LOC
+?ELS30: EQUAL? RM,GOAL \?CND28
+ SET 'GOAL-FLAG,TRUE-VALUE
+?CND28: ADD CNT,3 >CNT
+ JUMP ?PRG26
+
+
+ .FUNCT COR-GRAB-ATTENTION
+ CALL CORRIDOR-LOOK,FALSE-VALUE,FALSE-VALUE,TRUE-VALUE
+ RSTACK
+
+
+ .FUNCT CORRIDOR-LOOK,ITM=0,CAR=0,GRAB=0,C,Z,COR,VAL,FOUND=0
+ ZERO? ITM /?CND1
+ ZERO? CAR \?CND1
+ GETP ITM,P?CAR >CAR
+?CND1: GETP HERE,P?CORRIDOR >C
+ ZERO? C /FALSE
+ LESS? C,0 \?ELS15
+ CALL CORRIDOR-CHECK,FALSE-VALUE,ITM,CAR,GRAB
+ RSTACK
+?ELS15:
+?PRG18: SUB C,16384 >Z
+ LESS? Z,0 /?ELS22
+ SET 'COR,COR-40000
+ JUMP ?CND20
+?ELS22: SUB C,8192 >Z
+ LESS? Z,0 /?ELS24
+ SET 'COR,COR-20000
+ JUMP ?CND20
+?ELS24: SUB C,4096 >Z
+ LESS? Z,0 /?ELS26
+ SET 'COR,COR-10000
+ JUMP ?CND20
+?ELS26: SUB C,2048 >Z
+ LESS? Z,0 /?ELS28
+ SET 'COR,COR-4000
+ JUMP ?CND20
+?ELS28: SUB C,1024 >Z
+ LESS? Z,0 /?ELS30
+ SET 'COR,COR-2000
+ JUMP ?CND20
+?ELS30: SUB C,512 >Z
+ LESS? Z,0 /?ELS32
+ SET 'COR,COR-1000
+ JUMP ?CND20
+?ELS32: SUB C,256 >Z
+ LESS? Z,0 /?ELS34
+ SET 'COR,COR-400
+ JUMP ?CND20
+?ELS34: SUB C,128 >Z
+ LESS? Z,0 /?ELS36
+ SET 'COR,COR-200
+ JUMP ?CND20
+?ELS36: SUB C,64 >Z
+ LESS? Z,0 /?ELS38
+ SET 'COR,COR-100
+ JUMP ?CND20
+?ELS38: SUB C,32 >Z
+ LESS? Z,0 /?ELS40
+ SET 'COR,COR-40
+ JUMP ?CND20
+?ELS40: SUB C,16 >Z
+ LESS? Z,0 /?ELS42
+ SET 'COR,COR-20
+ JUMP ?CND20
+?ELS42: SUB C,8 >Z
+ LESS? Z,0 /?ELS44
+ SET 'COR,COR-10
+ JUMP ?CND20
+?ELS44: SUB C,4 >Z
+ LESS? Z,0 /?ELS46
+ SET 'COR,COR-4
+ JUMP ?CND20
+?ELS46: SUB C,2 >Z
+ LESS? Z,0 /?ELS48
+ SET 'COR,COR-2
+ JUMP ?CND20
+?ELS48: SUB C,1 >Z
+ LESS? Z,0 /?REP19
+ SET 'COR,COR-1
+?CND20: CALL CORRIDOR-CHECK,COR,ITM,CAR,GRAB >VAL
+ ZERO? FOUND \?CND53
+ SET 'FOUND,VAL
+?CND53: SET 'C,Z
+ JUMP ?PRG18
+?REP19: RETURN FOUND
+
+
+ .FUNCT CORRIDOR-CHECK,COR,ITM,CAR,GRAB=0,CNT=2,PAST=0,FOUND=0,RM=0,OBJ,DIR,NCAR=0,X,Y=0
+ ZERO? COR /?ORP4
+ PUSH COR
+ JUMP ?THN1
+?ORP4: PUSH COR-1
+?THN1: GET STACK,PAST >DIR
+?PRG5: ZERO? COR /?ELS9
+ GET COR,CNT >RM
+ ZERO? RM \?CND7
+ CALL1 COR-TELL-PER
+ RETURN Y
+?ELS9: EQUAL? HERE,ROOF,BESIDE-TRACKS \?ELS14
+ EQUAL? HERE,ROOF \?ELS17
+ SET 'RM,OTHER-ROOF
+ JUMP ?CND15
+?ELS17: SET 'RM,OTHER-BESIDE-TRACKS
+?CND15: ZERO? NCAR \?ELS22
+ SUB CAR-HERE,1 >NCAR
+ ZERO? NCAR \?CND7
+ SET 'PAST,1
+ ZERO? COR /?ORP29
+ PUSH COR
+ JUMP ?THN26
+?ORP29: PUSH COR-1
+?THN26: GET STACK,PAST >DIR
+ ADD CAR-HERE,1 >NCAR
+ JUMP ?CND7
+?ELS22: ZERO? PAST \?ELS31
+ DEC 'NCAR
+ ZERO? NCAR \?CND7
+ SET 'PAST,1
+ ZERO? COR /?ORP38
+ PUSH COR
+ JUMP ?THN35
+?ORP38: PUSH COR-1
+?THN35: GET STACK,PAST >DIR
+ ADD CAR-HERE,1 >NCAR
+ JUMP ?CND7
+?ELS31: INC 'NCAR
+ GRTR? NCAR,CAR-MAX \?CND7
+ CALL1 COR-TELL-PER
+ RETURN Y
+?ELS14: ZERO? RM /?ELS45
+ CALL1 COR-TELL-PER
+ RETURN Y
+?ELS45: EQUAL? HERE,VESTIBULE-REAR,VESTIBULE-REAR-DINER,VESTIBULE-REAR-FANCY \?ELS47
+ SET 'PAST,1
+ ZERO? COR /?ORP51
+ PUSH COR
+ JUMP ?THN48
+?ORP51: PUSH COR-1
+?THN48: GET STACK,PAST >DIR
+ ADD CAR-HERE,1 >NCAR
+ CALL2 V-FWD,NCAR >RM
+ JUMP ?CND7
+?ELS47: EQUAL? HERE,VESTIBULE-FWD,VESTIBULE-FWD-DINER,VESTIBULE-FWD-FANCY \?CND7
+ SUB CAR-HERE,1 >NCAR
+ CALL2 V-REAR,NCAR >RM
+?CND7: EQUAL? RM,HERE \?ELS56
+ SET 'PAST,1
+ ZERO? COR /?ORP62
+ PUSH COR
+ JUMP ?THN59
+?ORP62: PUSH COR-1
+?THN59: GET STACK,PAST >DIR
+ JUMP ?CND54
+?ELS56: SET 'OBJ,RM
+ EQUAL? ITM,OBJ /?THN65
+ FIRST? RM >OBJ \?CND54
+?THN65:
+?PRG67: ZERO? ITM /?ELS71
+ EQUAL? OBJ,ITM \?CND69
+ ZERO? COR /?ELS77
+ GET COR,PAST >FOUND
+ JUMP ?REP68
+?ELS77: EQUAL? NCAR,CAR \?CND69
+ GET COR-1,PAST >FOUND
+ JUMP ?REP68
+?ELS71: ZERO? COR-ALL-DIRS \?THN84
+ EQUAL? DIR,PLAYER-NOT-FACING /?CND69
+?THN84: EQUAL? OBJ,BRIEFCASE /?THN86
+ GETP OBJ,P?CHARACTER
+ ZERO? STACK /?CND69
+?THN86: ZERO? COR \?THN88
+ GETP OBJ,P?CAR
+ EQUAL? NCAR,STACK \?CND69
+?THN88: FSET? OBJ,NDESCBIT /?CND69
+ ZERO? GRAB \?THN90
+ CALL2 IN-MOTION?,OBJ
+ ZERO? STACK \?CND69
+?THN90: ZERO? GRAB /?ELS94
+ CALL2 GRAB-ATTENTION,OBJ >X
+ ZERO? X /?CND95
+ FCLEAR OBJ,TOUCHBIT
+ PUTP OBJ,P?LDESC,21
+ CALL HE-SHE-IT,OBJ,TRUE-VALUE,STR?211
+ PRINTI " toward you."
+ CRLF
+?CND95: ZERO? Y \?CND92
+ SET 'Y,X
+ JUMP ?CND92
+?ELS94: CALL COR-ADD-PER,OBJ,DIR
+ ZERO? STACK /?ELS104
+ JUMP ?CND69
+?ELS104: CALL HE-SHE-IT,OBJ,TRUE-VALUE,STR?1
+ CALL WHERE?,OBJ,DIR
+ PRINTI "."
+ CRLF
+?CND92:
+?CND69: NEXT? OBJ >OBJ /?KLU117
+?KLU117: ZERO? OBJ \?PRG67
+?REP68: ZERO? FOUND /?CND54
+ RETURN FOUND
+?CND54: INC 'CNT
+ JUMP ?PRG5
+
+
+ .FUNCT COR-ADD-PER,PER,DIR,T,L
+ CALL ZMEMQ,DIR,COR-DIR-TBL >L
+ ZERO? L /FALSE
+ GET COR-PER-TBLS,L >T
+ GET T,0 >L
+?PRG4: GET T,L
+ ZERO? STACK \?ELS8
+ PUT T,L,PER
+ RTRUE
+?ELS8: DLESS? 'L,1 \?PRG4
+ RFALSE
+
+
+ .FUNCT COR-TELL-PER,TBL,LEN,T,L,FIRST,P,OP,NUM
+ SET 'TBL,COR-PER-TBLS
+ GET TBL,0 >LEN
+?PRG1: GET TBL,LEN >T
+ GET T,0 >L
+ SET 'FIRST,TRUE-VALUE
+ SET 'NUM,0
+?PRG3: GET T,L >P
+ ZERO? P /?CND5
+ SET 'OP,P
+ INC 'NUM
+ PUT T,L,0
+ ZERO? FIRST /?ELS10
+ SET 'FIRST,FALSE-VALUE
+ CALL2 START-SENTENCE,P
+ JUMP ?CND5
+?ELS10: EQUAL? L,1 /?THN19
+ SUB L,1
+ GET T,STACK
+ ZERO? STACK \?ELS18
+?THN19: PRINTI " and"
+ JUMP ?CND16
+?ELS18: PRINTI ","
+?CND16: CALL2 PRINTT,P
+ CALL2 THIS-IS-IT,P
+?CND5: DLESS? 'L,1 \?PRG3
+ ZERO? NUM \?ELS34
+ JUMP ?REP4
+?ELS34: EQUAL? NUM,1 \?ELS36
+ FSET? OP,PLURALBIT /?ELS36
+ PRINTI " is"
+ JUMP ?CND32
+?ELS36: PRINTI " are"
+?CND32: GET COR-DIR-TBL,LEN
+ CALL WHERE?,OP,STACK
+ PRINTI "."
+ CRLF
+?REP4: DLESS? 'LEN,1 \?PRG1
+ RTRUE
+
+
+ .FUNCT IN-MOTION?,PERSON,DISABLED-OK=0,GT,L,F,C,?TMP1
+ EQUAL? PERSON,BOND /TRUE
+ GETP PERSON,P?CHARACTER >C
+ EQUAL? EXTRA-C,C \?CND4
+ GET GLOBAL-CHARACTER-TABLE,C
+ EQUAL? PERSON,STACK \FALSE
+ ZERO? DISABLED-OK \TRUE
+?CND4: GET GOAL-TABLES,C >GT
+ GET GT,GOAL-S
+ ZERO? STACK /FALSE
+ LOC PERSON >L
+ GET GT,GOAL-F >F
+ EQUAL? L,F /FALSE
+ ZERO? DISABLED-OK \TRUE
+ GET GT,GOAL-ENABLE
+ ZERO? STACK /FALSE
+ CALL FOLLOW-GOAL-DIR,L,F,PERSON
+ RSTACK
+
+
+ .FUNCT START-MOVEMENT
+ CALL2 I-EXTRA,M-OTHER
+ RANDOM 9
+ CALL QUEUE,I-STAR,STACK
+ PUT STACK,0,1
+ CALL QUEUE,G-LEAVE-TRAIN,0
+ CALL QUEUE,I-CONDUCTOR,1
+ PUT STACK,0,1
+ CALL QUEUE,I-FOLLOW,-1
+ PUT STACK,0,1
+ CALL QUEUE,I-ATTENTION,-1
+ PUT STACK,0,1
+ CALL QUEUE,I-LEAVE-TRAIN,0
+ CALL QUEUE,I-TICKETS-PLEASE,-1
+ PUT STACK,0,1
+ RTRUE
+
+
+ .FUNCT ESTABLISH-GOAL,PERSON,GOAL,WALK-TRAIN=0,HERE,HL,GL,GT,?TMP1
+ ZERO? PERSON \?CND1
+ PRINTI "[!! E-G: PERSON=0, GOAL="
+ PRINTD GOAL
+ PRINTI ", W-T="
+ PRINTN WALK-TRAIN
+ PRINTI ".]"
+ CRLF
+?CND1: LOC PERSON >HERE
+ GETP PERSON,P?CHARACTER
+ GET GOAL-TABLES,STACK >GT
+ GETP HERE,P?LINE
+ SUB STACK,1
+ MUL STACK,GOAL-I-MULTIPLIER >?TMP1
+ GETP GOAL,P?LINE
+ SUB STACK,1
+ MUL STACK,2
+ ADD ?TMP1,STACK
+ PUT GT,GOAL-I,STACK
+ GETP GOAL,P?STATION
+ PUT GT,GOAL-S,STACK
+ PUT GT,GOAL-F,GOAL
+ EQUAL? 2,WALK-TRAIN \?CND6
+ GET GT,GOAL-SCRIPT
+ PUT GT,GOAL-FUNCTION,STACK
+?CND6: ZERO? WALK-TRAIN \?CND9
+ EQUAL? PERSON,CONDUCTOR,CUSTOMS-AGENT /?CND9
+ FCLEAR PERSON,TOUCHBIT
+ PUTP PERSON,P?LDESC,13
+?CND9: LOC PERSON
+ RSTACK
+
+
+ .FUNCT ESTABLISH-GOAL-TRAIN,PERSON,GOAL,CAR,GT,CARH
+ LOC PERSON
+ EQUAL? STACK,BESIDE-TRACKS,OTHER-BESIDE-TRACKS /?THN4
+ LOC PERSON
+ CALL ZMEMQ,STACK,STATION-ROOMS
+ ZERO? STACK /?CND1
+?THN4: PRINTI "[!! "
+ PRINTD PERSON
+ PRINTR " not on train!]"
+?CND1: GETP PERSON,P?CAR >CARH
+ GETP PERSON,P?CHARACTER
+ GET GOAL-TABLES,STACK >GT
+ EQUAL? CAR,CARH /?ELS10
+ PUT GT,GOAL-CAR,CAR
+ PUT GT,GOAL-QUEUED,GOAL
+ PUT GT,GOAL-FUNCTION,I-WALK-TRAIN
+ LESS? CAR,CARH \?ELS13
+ CALL2 L-FWD,CARH >GOAL
+ JUMP ?CND8
+?ELS13: CALL2 L-REAR,CARH >GOAL
+ JUMP ?CND8
+?ELS10: GET GT,GOAL-SCRIPT
+ PUT GT,GOAL-FUNCTION,STACK
+ EQUAL? CAR,CAR-HERE,DINER-CAR,FANCY-CAR /?CND8
+ GETP GOAL,P?OTHER >GOAL
+?CND8: CALL ESTABLISH-GOAL,PERSON,GOAL
+ RSTACK
+
+
+ .FUNCT GOAL-REACHED,PERSON,GT
+ GETP PERSON,P?CHARACTER
+ GET GOAL-TABLES,STACK >GT
+ EQUAL? PERSON,CONDUCTOR,CUSTOMS-AGENT,BAD-SPY /?CND1
+ GET GT,GOAL-FUNCTION
+ EQUAL? I-WALK-TRAIN,STACK /?CND1
+ CALL2 NEW-LDESC,PERSON
+?CND1: LOC PERSON
+ EQUAL? STACK,BOOTH-1,BOOTH-2,BOOTH-3 \?CND6
+ EQUAL? HERE,PANTRY \?ELS11
+ PRINTI "A concealed bell tinkles merrily."
+ CRLF
+ JUMP ?CND6
+?ELS11: IN? WAITER,PANTRY \?CND6
+ LOC PERSON
+ CALL ESTABLISH-GOAL,WAITER,STACK
+?CND6: GET GT,GOAL-S
+ ZERO? STACK /FALSE
+ PUT GT,GOAL-S,FALSE-VALUE
+ SET 'GOAL-PERSON,PERSON
+ GET GT,GOAL-FUNCTION
+ CALL D-APPLY,STR?314,STACK,G-REACHED
+ RSTACK
+
+
+ .FUNCT ENTERS?,DIR,OWHERE
+ EQUAL? DIR,P?IN /TRUE
+ CALL ZMEMQ,HERE,CAR-ROOMS-CORRID
+ ZERO? STACK /FALSE
+ CALL ZMEMQ,OWHERE,CAR-ROOMS-COMPS
+ ZERO? STACK \TRUE
+ EQUAL? OWHERE,BOOTH-1,BOOTH-2,BOOTH-3 /TRUE
+ CALL ZMEMQ,OWHERE,CAR-ROOMS-REST
+ ZERO? STACK \TRUE
+ RFALSE
+
+
+ .FUNCT TELL-THE-NOT-OTHER,RM
+ CALL ZMEMQ,RM,STATION-ROOMS
+ ZERO? STACK \?THN6
+ CALL ZMEMQ,RM,CAR-ROOMS-DINER
+ ZERO? STACK \?THN6
+ CALL ZMEMQ,RM,CAR-ROOMS-FANCY
+ ZERO? STACK \?THN6
+ CALL ZMEMQ,RM,CAR-ROOMS
+ ZERO? STACK /?ELS5
+?THN6: CALL2 PRINTT,RM
+ RSTACK
+?ELS5: GETP RM,P?OTHER
+ CALL2 PRINTT,STACK
+ RSTACK
+
+
+ .FUNCT DESCRIBE-MOVER?,PERSON
+ EQUAL? PRSA,V?EXAMINE \?ELS5
+ EQUAL? PRSO,PERSON /FALSE
+?ELS5: EQUAL? PRSA,V?WAIT-UNTIL,V?WAIT-FOR /FALSE
+ FSET? PERSON,ONBIT \FALSE
+ EQUAL? PERSON,CONDUCTOR \TRUE
+ GETP PERSON,P?LDESC
+ EQUAL? STACK,19 /FALSE
+ RTRUE
+
+
+ .FUNCT MOVE-PERSON,PERSON,WHERE,LIMBO?=0,DIR,GT=0,OL,COR,PCOR,CHR,OWHERE,DOOR=0,VAL=0,X,CAR,NCAR
+ GETP PERSON,P?CHARACTER >CHR
+ GETP PERSON,P?CAR >CAR
+ SET 'NCAR,CAR
+ GET GOAL-TABLES,CHR >GT
+ LOC PERSON >OL
+ CALL DIR-FROM,OL,WHERE >DIR
+ SET 'OWHERE,WHERE
+ EQUAL? OL,VESTIBULE-FWD,VESTIBULE-FWD-DINER /?THN7
+ EQUAL? OL,OTHER-VESTIBULE-FWD,VESTIBULE-FWD-FANCY \?ELS6
+?THN7: EQUAL? WHERE,LIMBO-FWD,LIMBO-FWD-FANCY /?THN12
+ EQUAL? WHERE,OTHER-LIMBO-FWD,LIMBO-FWD-DINER \?CND4
+?THN12: DEC 'NCAR
+ CALL2 V-REAR,NCAR >OWHERE
+ JUMP ?CND4
+?ELS6: EQUAL? OL,VESTIBULE-REAR,VESTIBULE-REAR-DINER /?THN16
+ EQUAL? OL,OTHER-VESTIBULE-REAR,VESTIBULE-REAR-FANCY \?CND4
+?THN16: EQUAL? WHERE,LIMBO-REAR,LIMBO-REAR-FANCY /?THN21
+ EQUAL? WHERE,OTHER-LIMBO-REAR,LIMBO-REAR-DINER \?CND4
+?THN21: INC 'NCAR
+ CALL2 V-FWD,NCAR >OWHERE
+?CND4: ZERO? DIR /?CND23
+ GETPT OL,DIR >X
+ ZERO? X /?CND23
+ PTSIZE X
+ EQUAL? STACK,DEXIT \?CND23
+ GET X,DEXITOBJ >DOOR
+?CND23: EQUAL? PERSON,PLAYER \?ELS30
+ CALL COMPASS-EQV,HERE,DIR >OL
+ ZERO? OL /?CND31
+ CALL2 OPP-DIR,OL >PLAYER-NOT-FACING
+?CND31: ZERO? DOOR /?CND28
+ CALL2 WALK-THRU-DOOR?,X
+ ZERO? STACK \?CND28
+ CRLF
+ RETURN 2
+?ELS30: FSET? PERSON,NDESCBIT \?ELS42
+ JUMP ?CND28
+?ELS42: CALL PREVENTS-YOU?,OL,DIR,PERSON
+ ZERO? STACK /?ELS44
+ CALL2 VISIBLE?,PERSON
+ ZERO? STACK /?CND28
+ SET 'VAL,TRUE-VALUE
+ CALL HE-SHE-IT,CONDUCTOR,TRUE-VALUE
+ PRINTI " prevents"
+ CALL2 PRINTT,PERSON
+ PRINTI " from passing him."
+ CRLF
+ JUMP ?CND28
+?ELS44: EQUAL? OL,HERE \?ELS51
+ CALL2 DESCRIBE-MOVER?,PERSON
+ ZERO? STACK /?CND52
+ FCLEAR PERSON,ONBIT
+ CALL DESCRIBE-OBJECT,PERSON,0
+?CND52: SET 'VAL,TRUE-VALUE
+ IN? BRIEFCASE,PERSON \?ELS57
+ FSET? BRIEFCASE,SEENBIT /?ELS57
+ CALL START-SENTENCE,PERSON,TRUE-VALUE
+ JUMP ?CND55
+?ELS57: CALL HE-SHE-IT,PERSON,TRUE-VALUE
+?CND55: EQUAL? PERSON,CONDUCTOR \?CND64
+ ZERO? TOUCH-CAP? /?CND64
+ SET 'TOUCH-CAP?,FALSE-VALUE
+ PRINTI " touches a finger to his cap and"
+?CND64: ZERO? DOOR /?CND71
+ CALL HE-SHE-IT,PERSON,-1,STR?12
+ CALL2 HIM-HER-IT,DOOR
+ PRINTI " for a moment and"
+?CND71: EQUAL? DIR,P?OUT /?THN80
+ CALL ZMEMQ,HERE,CAR-ROOMS-COMPS
+ ZERO? STACK \?THN80
+ EQUAL? HERE,BOOTH-1,BOOTH-2,BOOTH-3 \?ELS79
+?THN80: CALL HE-SHE-IT,PERSON,-1,STR?315
+ PRINTI "."
+ CRLF
+ JUMP ?CND28
+?ELS79: CALL ENTERS?,DIR,OWHERE
+ ZERO? STACK /?ELS85
+ CALL HE-SHE-IT,PERSON,-1,STR?316
+ CALL2 TELL-THE-NOT-OTHER,OWHERE
+ ZERO? DOOR /?CND90
+ FSET? DOOR,LOCKED \?CND90
+ PRINTI ", locking the door"
+?CND90: PRINTI "."
+ CRLF
+ JUMP ?CND28
+?ELS85: EQUAL? CAR,CAR-MAX \?ELS100
+ EQUAL? OL,VESTIBULE-REAR \?ELS100
+ EQUAL? WHERE,LIMBO-REAR \?ELS100
+ CALL HE-SHE-IT,PERSON,-1,STR?317
+ CALL HIM-HER-IT,PERSON,FALSE-VALUE,TRUE-VALUE
+ PRINTI " pocket for a minute."
+ CRLF
+ JUMP ?CND28
+?ELS100: CALL HE-SHE-IT,PERSON,-1,STR?318
+ PRINTC 32
+ EQUAL? DIR,P?UP,P?DOWN /?CND109
+ PRINTI "off to "
+?CND109: CALL2 DIR-PRINT,DIR
+ ZERO? DOOR /?CND114
+ FSET? DOOR,LOCKED \?CND114
+ PRINTI ", locking the door"
+?CND114: PRINTI "."
+ CRLF
+ JUMP ?CND28
+?ELS51: EQUAL? OWHERE,HERE \?ELS124
+ ZERO? GT /?THN128
+ GET GT,GOAL-F
+ EQUAL? HERE,STACK /?CND28
+?THN128: ZERO? TICKETS-PUNCHED? /?ELS136
+ ZERO? CUSTOMS-SWEEP /?THN133
+?ELS136: EQUAL? PERSON,CONDUCTOR /?CND28
+?THN133: SET 'VAL,TRUE-VALUE
+ CALL START-SENTENCE,PERSON,TRUE-VALUE
+ ZERO? DOOR /?CND137
+ CALL HE-SHE-IT,PERSON,-1,STR?12
+ CALL2 HIM-HER-IT,DOOR
+ PRINTI " for a moment and"
+?CND137: CALL HE-SHE-IT,PERSON,-1,STR?319
+ PRINTC 32
+ EQUAL? PRSA,V?WALK \?ELS147
+ EQUAL? OL,LAST-PLAYER-LOC \?ELS147
+ PRINTI "along with you"
+ JUMP ?CND145
+?ELS147: PRINTI "past you"
+ EQUAL? DIR,P?IN,P?OUT /?CND145
+ PRINTI " from "
+ CALL2 OPP-DIR,DIR
+ CALL2 DIR-PRINT,STACK
+?CND145: PRINTI "."
+ CRLF
+ JUMP ?CND28
+?ELS124: GETP HERE,P?CORRIDOR >COR
+ ZERO? COR /?CND28
+ CALL CORRIDOR-LOOK,PERSON,CAR >PCOR
+ EQUAL? PCOR,FALSE-VALUE,PLAYER-NOT-FACING /?ELS167
+ CALL CORRIDOR-LOOK,OWHERE,NCAR
+ EQUAL? STACK,FALSE-VALUE,PLAYER-NOT-FACING \?ELS170
+ SET 'VAL,TRUE-VALUE
+ EQUAL? PERSON,P-HER-OBJECT \?ELS173
+ FSET? HER,TOUCHBIT \?ELS173
+ PRINTI "She"
+ JUMP ?CND171
+?ELS173: EQUAL? PERSON,P-HIM-OBJECT \?ELS179
+ FSET? HIM,TOUCHBIT \?ELS179
+ PRINTI "He"
+ JUMP ?CND171
+?ELS179: EQUAL? PERSON,P-THEM-OBJECT \?ELS185
+ FSET? THEM,TOUCHBIT \?ELS185
+ PRINTI "They"
+ JUMP ?CND171
+?ELS185: CALL START-SENTENCE,PERSON,TRUE-VALUE
+ ZERO? STACK \?CND192
+ PRINTI ","
+?CND192: CALL WHERE?,PERSON,PCOR
+ PRINTI ","
+?CND171: ZERO? DOOR /?CND199
+ CALL HE-SHE-IT,PERSON,-1,STR?12
+ CALL2 HIM-HER-IT,DOOR
+ PRINTI " for a moment and"
+?CND199: CALL ENTERS?,DIR,OWHERE
+ ZERO? STACK /?ELS207
+ CALL HE-SHE-IT,PERSON,-1,STR?316
+ CALL2 TELL-THE-NOT-OTHER,OWHERE
+ JUMP ?CND205
+?ELS207: CALL HE-SHE-IT,PERSON,-1,STR?320
+ PRINTC 32
+ EQUAL? DIR,P?UP,P?DOWN /?CND216
+ PRINTI "to "
+?CND216: CALL2 DIR-PRINT,DIR
+?CND205: ZERO? DOOR /?CND221
+ FSET? DOOR,LOCKED \?CND221
+ PRINTI ", locking the door"
+?CND221: PRINTI "."
+ CRLF
+ JUMP ?CND165
+?ELS170: SET 'VAL,TRUE-VALUE
+ CALL START-SENTENCE,PERSON,TRUE-VALUE
+ CALL HE-SHE-IT,PERSON,-1,STR?1
+ CALL WHERE?,PERSON,PCOR
+ PRINTI ", heading "
+ EQUAL? PCOR,DIR \?ELS238
+ PRINTI "away from you"
+ JUMP ?CND236
+?ELS238: CALL2 OPP-DIR,DIR
+ EQUAL? PCOR,STACK \?ELS242
+ PRINTI "toward you"
+ JUMP ?CND236
+?ELS242: EQUAL? DIR,P?UP,P?DOWN /?CND247
+ PRINTI "toward "
+?CND247: CALL2 DIR-PRINT,DIR
+?CND236: PRINTI "."
+ CRLF
+ JUMP ?CND165
+?ELS167: CALL CORRIDOR-LOOK,OWHERE,NCAR >PCOR
+ EQUAL? PCOR,FALSE-VALUE,PLAYER-NOT-FACING /?CND28
+ SET 'VAL,TRUE-VALUE
+ CALL WHERE?,PERSON,PCOR,TRUE-VALUE
+ CALL2 HE-SHE-IT,PERSON
+ IN? BRIEFCASE,PERSON \?CND258
+ FSET? BRIEFCASE,SEENBIT /?CND258
+ FSET BRIEFCASE,SEENBIT
+ PRINTI ", carrying"
+ CALL2 HIM-HER-IT,BRIEFCASE
+ PRINTI ","
+?CND258: CALL HE-SHE-IT,PERSON,-1,STR?321
+ CALL DIR-FROM,OWHERE,OL >DIR
+ EQUAL? DIR,P?IN /?CND267
+ PRINTI " from"
+ CALL2 TELL-THE-NOT-OTHER,OL
+?CND267: PRINTI "."
+ CRLF
+?CND165:
+?CND28: ZERO? PERSON \?ELS276
+ PRINTI "[PERSON=0!]"
+ CRLF
+ JUMP ?CND274
+?ELS276: CALL2 ON-PLATFORM?,WHERE
+ ZERO? STACK /?CND281
+ GETP WHERE,P?CAR
+ PUTP PERSON,P?CAR,STACK
+?CND281: MOVE PERSON,WHERE
+?CND274: EQUAL? PERSON,PLAYER /?CND284
+ EQUAL? PERSON,PEEKER /?THN290
+ EQUAL? PERSON,BAD-SPY \?ELS289
+ ZERO? BAD-SPY-DONE-PEEKING \?ELS289
+?THN290: PUTP PERSON,P?LDESC,PEEKING-CODE
+ JUMP ?CND284
+?ELS289: EQUAL? PERSON,CONDUCTOR,CUSTOMS-AGENT /?CND284
+ PUTP PERSON,P?LDESC,14
+?CND284: ZERO? GT /?CND296
+ GET GT,GOAL-F
+ EQUAL? STACK,WHERE \?ELS302
+ CALL2 GOAL-REACHED,PERSON >VAL
+ ZERO? VAL \?CND300
+ GET GT,GOAL-FUNCTION
+ EQUAL? I-WALK-TRAIN,STACK /?CND300
+ EQUAL? HERE,WHERE \?CND300
+ FSET? PERSON,NDESCBIT /?CND300
+ SET 'VAL,TRUE-VALUE
+ CALL HE-SHE-IT,PERSON,TRUE-VALUE,STR?210
+ PRINTI " here."
+ CRLF
+ JUMP ?CND300
+?ELS302: SET 'GOAL-PERSON,PERSON
+ GET GT,GOAL-FUNCTION
+ CALL D-APPLY,STR?322,STACK,G-ENROUTE >VAL
+?CND300:
+?CND296: ZERO? DEBUG /?CND312
+ PRINTI "["
+ CALL TELL-$WHERE,PERSON,WHERE
+ PRINTI "]"
+ CRLF
+?CND312: ZERO? VAL /?CND320
+ CALL2 THIS-IS-IT,PERSON
+ RETURN VAL
+?CND320: RETURN VAL
+
+
+ .FUNCT DIR-FROM,HERE,THERE,V=0,P,D
+ CALL2 ON-PLATFORM?,HERE >P
+ CALL2 ON-PLATFORM?,THERE >D
+ ZERO? P /?ELS3
+ ZERO? D /?ELS3
+ LESS? P,D \?ELS8
+ RETURN P?SOUTH
+?ELS8: GRTR? P,D \FALSE
+ RETURN P?NORTH
+?ELS3: EQUAL? THERE,ROOF,OTHER-ROOF \?ELS14
+ EQUAL? HERE,VESTIBULE-REAR-FANCY /?THN17
+ EQUAL? HERE,VESTIBULE-REAR,VESTIBULE-REAR-DINER,OTHER-VESTIBULE-REAR \?ELS14
+?THN17: RETURN P?UP
+?ELS14: EQUAL? HERE,ROOF,OTHER-ROOF \?ELS20
+ EQUAL? THERE,VESTIBULE-REAR-FANCY /?THN23
+ EQUAL? THERE,VESTIBULE-REAR,VESTIBULE-REAR-DINER,OTHER-VESTIBULE-REAR \?ELS20
+?THN23: RETURN P?DOWN
+?ELS20: ZERO? P \?THN29
+ EQUAL? HERE,BESIDE-TRACKS,OTHER-BESIDE-TRACKS \?ELS26
+?THN29: EQUAL? THERE,VESTIBULE-REAR-FANCY /?THN31
+ EQUAL? THERE,VESTIBULE-REAR,VESTIBULE-REAR-DINER,OTHER-VESTIBULE-REAR \?ELS26
+?THN31: RETURN P?UP
+?ELS26: ZERO? D \?THN37
+ EQUAL? THERE,BESIDE-TRACKS,OTHER-BESIDE-TRACKS \?ELS34
+?THN37: EQUAL? HERE,VESTIBULE-REAR-FANCY /?THN39
+ EQUAL? HERE,VESTIBULE-REAR,VESTIBULE-REAR-DINER,OTHER-VESTIBULE-REAR \?ELS34
+?THN39: RETURN P?DOWN
+?ELS34: EQUAL? HERE,VESTIBULE-FWD-DINER,VESTIBULE-FWD-FANCY,VESTIBULE-FWD \?THN47
+ EQUAL? THERE,VESTIBULE-REAR-FANCY,VESTIBULE-REAR /?THN47
+ EQUAL? THERE,VESTIBULE-REAR-DINER,OTHER-VESTIBULE-REAR /?THN47
+ EQUAL? THERE,LIMBO-FWD-DINER,LIMBO-FWD-FANCY,LIMBO-FWD /?THN43
+?THN47: EQUAL? HERE,OTHER-VESTIBULE-FWD \?ELS42
+ EQUAL? THERE,OTHER-LIMBO-FWD \?ELS42
+?THN43: RETURN P?NORTH
+?ELS42: EQUAL? HERE,VESTIBULE-REAR-DINER,VESTIBULE-REAR-FANCY,VESTIBULE-REAR \?THN57
+ EQUAL? THERE,VESTIBULE-FWD-FANCY,VESTIBULE-FWD /?THN57
+ EQUAL? THERE,VESTIBULE-FWD-DINER,OTHER-VESTIBULE-FWD /?THN57
+ EQUAL? THERE,LIMBO-REAR-DINER,LIMBO-REAR-FANCY,LIMBO-REAR /?THN53
+?THN57: EQUAL? HERE,OTHER-VESTIBULE-REAR \?CND1
+ EQUAL? THERE,OTHER-LIMBO-REAR \?CND1
+?THN53: RETURN P?SOUTH
+?CND1: CALL DIR-FROM-TEST,HERE,THERE,P?IN
+ ZERO? STACK /?ELS63
+ RETURN P?IN
+?ELS63: CALL DIR-FROM-TEST,HERE,THERE,P?OUT
+ ZERO? STACK /?CND61
+ RETURN P?OUT
+?CND61: SET 'P,0
+?PRG66: NEXTP HERE,P >P
+ LESS? P,LOW-DIRECTION \?ELS70
+ RETURN V
+?ELS70: CALL DIR-FROM-TEST,HERE,THERE,P >D
+ ZERO? D /?PRG66
+ LESS? D,LOW-DIRECTION \?ELS75
+ ZERO? V \?ELS75
+ SET 'V,P
+ JUMP ?PRG66
+?ELS75: RETURN P
+
+
+ .FUNCT DIR-FROM-TEST,HERE,THERE,P,L,TBL
+ GETPT HERE,P >TBL
+ ZERO? TBL /FALSE
+ PTSIZE TBL >L
+ EQUAL? L,DEXIT,UEXIT,CEXIT \FALSE
+ GET TBL,REXIT
+ EQUAL? STACK,THERE \FALSE
+ RETURN P
+
+
+ .FUNCT I-FOLLOW,GARG=0,FLG=0,CNT=0,GT,VAL
+ ZERO? IDEBUG \?THN4
+ EQUAL? GARG,G-DEBUG \?CND1
+?THN4: PRINTI "[I-FOLLOW:"
+ EQUAL? GARG,G-DEBUG /FALSE
+?CND1:
+?PRG11: IGRTR? 'CNT,CHARACTER-MAX \?ELS15
+ JUMP ?REP12
+?ELS15: GET GOAL-TABLES,CNT >GT
+ GET GT,GOAL-S
+ ZERO? STACK /?PRG11
+ GET GT,GOAL-ENABLE
+ ZERO? STACK /?PRG11
+ GET CHARACTER-TABLE,CNT
+ CALL2 FOLLOW-GOAL,STACK >VAL
+ ZERO? VAL /?PRG11
+ EQUAL? FLG,M-FATAL /?PRG11
+ SET 'FLG,VAL
+ JUMP ?PRG11
+?REP12: ZERO? IDEBUG /?CND28
+ PRINTN FLG
+ PRINTI "]"
+ CRLF
+ RETURN FLG
+?CND28: RETURN FLG
+
+
+ .FUNCT I-PLAYER,ARG,VAL
+ LOC PLAYER >HERE
+ CALL ZMEMQ,HERE,STATION-ROOMS
+ ZERO? STACK /?CND1
+ GETP HERE,P?CAR
+ CALL NEXT-CAR-SWITCHEROO,CAR-HERE,STACK
+?CND1: EQUAL? ARG,G-ENROUTE \?ELS8
+ CALL FIND-FLAG-HERE-NOT,PERSONBIT,NDESCBIT,PLAYER >VAL
+ ZERO? VAL /FALSE
+ EQUAL? NOW-LURCHING,PRESENT-TIME /?THN16
+ RANDOM 100
+ LESS? 50,STACK /FALSE
+?THN16: GETP VAL,P?LDESC
+ ZERO? STACK \?CND18
+ CALL2 NEW-LDESC,VAL
+?CND18: CALL DIR-FROM,HERE,LAST-PLAYER-LOC
+ ZERO? STACK /?ELS23
+ PRINTI "You have just started walking, when"
+ JUMP ?CND21
+?ELS23: PRINTI "You walk along as far as"
+ CALL2 PRINTT,HERE
+ PRINTI ", where"
+?CND21: EQUAL? NOW-LURCHING,PRESENT-TIME \?ELS34
+ EQUAL? VAL,PICKPOCKET \?CND35
+ CALL2 PICK-POCKET,VAL
+?CND35: PRINTI " the train lurches, and"
+ CALL HE-SHE-IT,VAL,0,STR?323
+ PRINTR " into you."
+?ELS34: CALL HE-SHE-IT,VAL,0,STR?324
+ PRINTR " in your way."
+?ELS8: EQUAL? ARG,G-REACHED /TRUE
+ RFALSE
+
+
+ .FUNCT PICK-POCKET,PER,X,Y
+ CALL2 CCOUNT,PLAYER
+ LESS? 2,STACK \?ELS3
+ FIRST? PLAYER >X /?CND1
+ RFALSE
+?ELS3: FIRST? POCKET >X /?CND1
+ PUTP PLAYER,P?SOUTH,0
+ RFALSE
+?CND1: NEXT? X >Y \?CND12
+ SET 'X,Y
+?CND12: EQUAL? X,BRIEFCASE /FALSE
+ FSET? X,WORNBIT /FALSE
+ FSET X,NDESCBIT
+ MOVE X,PER
+ RTRUE
+
+
+ .FUNCT I-LEAVE-TRAIN,GARG=0,VAL=0,X
+ ZERO? IDEBUG \?THN4
+ EQUAL? GARG,G-DEBUG \?CND1
+?THN4: PRINTI "[I-LEAVE-TRAIN:"
+ EQUAL? GARG,G-DEBUG /FALSE
+?CND1: SET 'X,LEAVE-TRAIN-PERSON
+ ZERO? X \?ELS13
+ CALL2 LEAVE-TRAIN,VESTIBULE-REAR >VAL
+ CALL2 LEAVE-TRAIN,VESTIBULE-REAR-DINER
+ ZERO? STACK /?CND14
+ SET 'VAL,TRUE-VALUE
+?CND14: CALL2 LEAVE-TRAIN,VESTIBULE-REAR-FANCY
+ ZERO? STACK /?CND17
+ SET 'VAL,TRUE-VALUE
+?CND17: CALL2 LEAVE-TRAIN,OTHER-VESTIBULE-REAR
+ ZERO? STACK /?CND11
+ SET 'VAL,TRUE-VALUE
+ JUMP ?CND11
+?ELS13: EQUAL? -1,X \?ELS27
+ GETP BAD-SPY,P?CAR >X
+ JUMP ?CND25
+?ELS27: GETP X,P?CAR >X
+?CND25: ZERO? IN-STATION /?ELS32
+ GET STATION-ROOMS,X >VAL
+ JUMP ?CND30
+?ELS32: EQUAL? X,CAR-HERE \?ELS35
+ SET 'VAL,BESIDE-TRACKS
+ JUMP ?CND30
+?ELS35: SET 'VAL,OTHER-BESIDE-TRACKS
+?CND30: EQUAL? -1,LEAVE-TRAIN-PERSON \?ELS40
+ CALL2 V-REAR,X
+ CALL MOVE-PERSON,BAD-SPY,STACK >VAL
+ JUMP ?CND11
+?ELS40: CALL MOVE-PERSON,LEAVE-TRAIN-PERSON,VAL >VAL
+?CND11: ZERO? IDEBUG /?CND43
+ PRINTN VAL
+ PRINTI "]"
+ CRLF
+ RETURN VAL
+?CND43: RETURN VAL
+
+
+ .FUNCT LEAVE-TRAIN,RM,PER,NXT,VAL=0
+ FIRST? RM >PER /?KLU15
+?KLU15:
+?PRG1: ZERO? PER \?ELS5
+ RETURN VAL
+?ELS5: FSET? PER,PERSONBIT \?THN8
+ FSET? PER,MUNGBIT /?THN8
+ GETP PER,P?CHARACTER
+ GET GOAL-TABLES,STACK
+ GET STACK,GOAL-FUNCTION
+ EQUAL? G-LEAVE-TRAIN,STACK /?ELS7
+?THN8: NEXT? PER >PER /?KLU16
+?KLU16: JUMP ?PRG1
+?ELS7: NEXT? PER >NXT /?KLU17
+?KLU17: GETP PER,P?CAR
+ GET STATION-ROOMS,STACK
+ CALL MOVE-PERSON,PER,STACK
+ ZERO? STACK /?CND12
+ SET 'VAL,TRUE-VALUE
+?CND12: SET 'PER,NXT
+ JUMP ?PRG1
+
+
+ .FUNCT G-LEAVE-TRAIN,GARG=0,L,VAL=0,P,GT,?TMP1
+ ZERO? IDEBUG \?THN4
+ EQUAL? GARG,G-DEBUG \?CND1
+?THN4: PRINTI "[G-LEAVE-TRAIN:"
+ EQUAL? GARG,G-DEBUG /FALSE
+?CND1: LOC GOAL-PERSON >L
+ EQUAL? GARG,G-REACHED \?CND11
+ EQUAL? L,VESTIBULE-REAR-FANCY,VESTIBULE-REAR-DINER /?THN17
+ EQUAL? L,VESTIBULE-REAR,OTHER-VESTIBULE-REAR \?ELS16
+?THN17: GETP GOAL-PERSON,P?CAR >P
+ GRTR? P,PLATFORM-MAX \?CND19
+ SET 'P,PLATFORM-MAX
+?CND19: CALL QUEUE,I-LEAVE-TRAIN,1
+ PUT STACK,0,1
+ GETP GOAL-PERSON,P?CHARACTER
+ GET GOAL-TABLES,STACK >GT
+ GET GT,GOAL-SCRIPT
+ EQUAL? STACK,I-TRAVELER-FINDS-CONTACT \?ELS24
+ PUT GT,GOAL-FUNCTION,I-TRAVELER-FINDS-CONTACT
+ CALL ESTABLISH-GOAL,GOAL-PERSON,PLATFORM-A
+ CALL2 I-TRAVELER-FINDS-CONTACT,G-ENROUTE
+ JUMP ?CND14
+?ELS24: CALL ESTABLISH-GOAL,GOAL-PERSON,PLATFORM-B
+ JUMP ?CND14
+?ELS16: EQUAL? L,PLATFORM-B \?ELS28
+ CALL2 VISIBLE?,GOAL-PERSON
+ ZERO? STACK /?CND29
+ SET 'VAL,TRUE-VALUE
+ CALL HE-SHE-IT,GOAL-PERSON,TRUE-VALUE,STR?325
+ CALL HIM-HER-IT,GOAL-PERSON,FALSE-VALUE,TRUE-VALUE
+ PRINTI " passport "
+ IN? BRIEFCASE,GOAL-PERSON \?CND34
+ PRINTI "and the briefcase "
+?CND34: PRINTI "to"
+ CALL2 HIM-HER-IT,CUSTOMS-AGENT
+ PRINTI "."
+ CRLF
+?CND29: CALL ESTABLISH-GOAL,GOAL-PERSON,PLATFORM-A
+ JUMP ?CND11
+?ELS28: EQUAL? L,PLATFORM-A \?ELS42
+ PUTP GOAL-PERSON,P?CAR,1
+ CALL2 V-REAR,1
+ CALL MOVE-PERSON,GOAL-PERSON,STACK >VAL
+ GETP GOAL-PERSON,P?CHARACTER >P
+ EQUAL? VARIATION,3,4 \?CND43
+ EQUAL? P,BAD-SPY-C \?CND43
+ GET GOAL-TABLES,BAD-SPY-C
+ PUT STACK,GOAL-SCRIPT,I-TRAVELER-PASSED-CUSTOMS
+?CND43: GET CHAR-LOCS,P >?TMP1
+ GET CHAR-CARS,P
+ CALL ESTABLISH-GOAL-TRAIN,GOAL-PERSON,?TMP1,STACK
+ JUMP ?CND11
+?ELS42: PRINTI "[!! LEAVE-TRAIN GOAL? "
+ CALL TELL-$WHERE,GOAL-PERSON,L
+ PRINTI "]"
+ CRLF
+ SET 'VAL,TRUE-VALUE
+?CND14:
+?CND11: ZERO? IDEBUG /?CND54
+ PRINTN VAL
+ PRINTI "]"
+ CRLF
+ RETURN VAL
+?CND54: RETURN VAL
+
+
+ .FUNCT I-WALK-TRAIN,GARG=0,L,CAR,CARH,FCN,VAL=0,GT,GOAL
+ ZERO? IDEBUG \?THN4
+ EQUAL? GARG,G-DEBUG \?CND1
+?THN4: PRINTI "[I-WALK-TRAIN:"
+ EQUAL? GARG,G-DEBUG /FALSE
+?CND1: LOC GOAL-PERSON >L
+ GETP GOAL-PERSON,P?CHARACTER
+ GET GOAL-TABLES,STACK >GT
+ GET GT,GOAL-SCRIPT >FCN
+ GET GT,GOAL-CAR >CAR
+ GET GT,GOAL-QUEUED >GOAL
+ EQUAL? GARG,G-ENROUTE \?ELS13
+ CALL D-APPLY,STR?322,FCN,G-ENROUTE >VAL
+ JUMP ?CND11
+?ELS13: EQUAL? GARG,G-REACHED \?CND11
+ GETP GOAL-PERSON,P?CAR >CARH
+ EQUAL? L,LIMBO-FWD-FANCY,LIMBO-FWD /?THN19
+ EQUAL? L,LIMBO-FWD-DINER,OTHER-LIMBO-FWD \?ELS18
+?THN19: DEC 'CARH
+ PUTP GOAL-PERSON,P?CAR,CARH
+ CALL OBJ-TO-NEXT,GOAL-PERSON,CARH
+ CALL2 V-REAR,CARH
+ MOVE GOAL-PERSON,STACK
+ EQUAL? CAR,CARH \?ELS23
+ EQUAL? GOAL,VESTIBULE-REAR-DINER,VESTIBULE-REAR-FANCY,VESTIBULE-REAR \?ELS26
+ CALL2 V-REAR,CARH >GOAL
+ JUMP ?CND24
+?ELS26: EQUAL? GOAL,VESTIBULE-FWD-DINER,VESTIBULE-FWD-FANCY,VESTIBULE-FWD \?ELS28
+ CALL2 V-FWD,CARH >GOAL
+ JUMP ?CND24
+?ELS28: EQUAL? CARH,DINER-CAR,FANCY-CAR,CAR-HERE /?CND24
+ GETP GOAL,P?OTHER >GOAL
+?CND24: CALL ESTABLISH-GOAL,GOAL-PERSON,GOAL,2
+ JUMP ?CND16
+?ELS23: CALL2 L-FWD,CARH
+ CALL ESTABLISH-GOAL,GOAL-PERSON,STACK,1
+ JUMP ?CND16
+?ELS18: EQUAL? L,LIMBO-REAR-FANCY,LIMBO-REAR /?THN35
+ EQUAL? L,LIMBO-REAR-DINER,OTHER-LIMBO-REAR \?ELS34
+?THN35: INC 'CARH
+ PUTP GOAL-PERSON,P?CAR,CARH
+ CALL OBJ-TO-NEXT,GOAL-PERSON,CARH
+ CALL2 V-FWD,CARH
+ MOVE GOAL-PERSON,STACK
+ EQUAL? CAR,CARH \?ELS39
+ EQUAL? GOAL,VESTIBULE-REAR-DINER,VESTIBULE-REAR-FANCY,VESTIBULE-REAR \?ELS42
+ CALL2 V-REAR,CARH >GOAL
+ JUMP ?CND40
+?ELS42: EQUAL? GOAL,VESTIBULE-FWD-DINER,VESTIBULE-FWD-FANCY,VESTIBULE-FWD \?ELS44
+ CALL2 V-FWD,CARH >GOAL
+ JUMP ?CND40
+?ELS44: EQUAL? CARH,DINER-CAR,FANCY-CAR,CAR-HERE /?CND40
+ GETP GOAL,P?OTHER >GOAL
+?CND40: CALL ESTABLISH-GOAL,GOAL-PERSON,GOAL,2
+ JUMP ?CND16
+?ELS39: CALL2 L-REAR,CARH
+ CALL ESTABLISH-GOAL,GOAL-PERSON,STACK,1
+ JUMP ?CND16
+?ELS34: PRINTI "[!! WALK-TRAIN GOAL? "
+ CALL TELL-$WHERE,GOAL-PERSON,L
+ PRINTI "]"
+ CRLF
+ SET 'VAL,TRUE-VALUE
+?CND16:
+?CND11: ZERO? IDEBUG /?CND55
+ PRINTN VAL
+ PRINTI "]"
+ CRLF
+ RETURN VAL
+?CND55: RETURN VAL
+
+
+ .FUNCT OBJ-TO-NEXT,OBJ,CAR,F,N
+ FIRST? OBJ >F /?KLU15
+?KLU15:
+?PRG1: ZERO? F /TRUE
+ NEXT? F >N /?KLU16
+?KLU16: GETP F,P?CAR
+ ZERO? STACK /?CND9
+ PUTP F,P?CAR,CAR
+ FIRST? F \?CND9
+ CALL OBJ-TO-NEXT,F,CAR
+?CND9: SET 'F,N
+ JUMP ?PRG1
+
+
+ .FUNCT I-EXTRA,GARG=0,DEST,NCAR,EXTRA,L,VL,VLEL
+ ZERO? IDEBUG \?THN4
+ EQUAL? GARG,G-DEBUG \?CND1
+?THN4: PRINTI "[I-EXTRA:"
+ EQUAL? GARG,G-DEBUG /FALSE
+?CND1: GET CHARACTER-TABLE,EXTRA-C >EXTRA
+ LOC EXTRA >L
+ CALL2 VISIBLE?,L >VL
+ ZERO? GARG \?ELS15
+ EQUAL? CLERK,EXTRA /?ELS15
+ ZERO? ON-TRAIN \?CND18
+ CALL QUEUE,I-EXTRA,1
+ PUT STACK,0,1
+ ZERO? IDEBUG /FALSE
+ PRINTI "0]"
+ CRLF
+ RFALSE
+?CND18: RANDOM 2
+ MUL 2,STACK
+ SUB STACK,3
+ ADD CAR-HERE,STACK >NCAR
+ EQUAL? NCAR,FANCY-CAR \?CND27
+ DEC 'NCAR
+?CND27: LESS? NCAR,1 \?ELS32
+ SET 'NCAR,1
+ JUMP ?CND30
+?ELS32: GRTR? NCAR,CAR-MAX \?CND30
+ SET 'NCAR,CAR-MAX
+?CND30: EQUAL? NCAR,DINER-CAR \?ELS37
+ CALL1 PICK-ONE-BOOTH >DEST
+ JUMP ?CND35
+?ELS37: CALL2 PICK-ONE,CAR-ROOMS-COMPS >DEST
+?CND35: ZERO? DEBUG \?THN43
+ ZERO? IDEBUG /?CND40
+?THN43: PRINTI "[GOAL: "
+ PRINTD EXTRA
+ PRINTI " at "
+ PRINTD L
+ PRINTI " (car #"
+ GETP EXTRA,P?CAR
+ PRINTN STACK
+ PRINTI ") to "
+ PRINTD DEST
+ PRINTI " (car #"
+ PRINTN NCAR
+ PRINTI ").]"
+ CRLF
+?CND40: EQUAL? NCAR,GAS-CAR \?CND47
+ EQUAL? DEST,GAS-CAR-RM \?CND47
+ SET 'DEST,COMPARTMENT-4
+?CND47: GET GOAL-TABLES,EXTRA-C
+ PUT STACK,GOAL-ENABLE,1
+ CALL ESTABLISH-GOAL-TRAIN,EXTRA,DEST,NCAR
+ ZERO? IDEBUG /FALSE
+ PRINTI "0]"
+ CRLF
+ RFALSE
+?ELS15: EQUAL? GARG,G-ENROUTE \?ELS62
+ EQUAL? L,HERE \?CND63
+ SET 'LAST-EXTRA-LOC,L
+ ZERO? IDEBUG /TRUE
+ PRINTI "(EXTRA HERE)"
+ PRINTR "1]"
+?CND63: CALL2 VISIBLE?,LAST-EXTRA-LOC >VLEL
+ ZERO? VL /?ELS76
+ ZERO? VLEL \?ELS76
+ SET 'LAST-EXTRA-LOC,L
+ ZERO? IDEBUG /TRUE
+ PRINTI "(EXTRA NOW VISIBLE)"
+ PRINTR "1]"
+?ELS76: ZERO? VL \?ELS88
+ ZERO? VLEL /?ELS88
+ SET 'LAST-EXTRA-LOC,L
+ ZERO? IDEBUG /TRUE
+ PRINTI "(EXTRA NOT VISIBLE)"
+ PRINTR "1]"
+?ELS88: SET 'LAST-EXTRA-LOC,L
+ ZERO? IDEBUG /FALSE
+ PRINTI "0]"
+ CRLF
+ RFALSE
+?ELS62: EQUAL? GARG,G-REACHED \?CND60
+ GET CHARACTER-TABLE,EXTRA-C >EXTRA
+ CALL2 NEW-LDESC,EXTRA
+?CND60: EQUAL? CAR-HERE,DINER-CAR \?ELS111
+ CALL1 PICK-ONE-BOOTH >DEST
+ JUMP ?CND109
+?ELS111: CALL2 PICK-ONE,CAR-ROOMS-COMPS >DEST
+?CND109: CALL CALL-FOR-EXTRA,DEST,CAR-HERE,EXTRA >EXTRA
+ ZERO? EXTRA /?ELS116
+ SET 'LAST-EXTRA-LOC,DEST
+ PUT CHARACTER-TABLE,EXTRA-C,EXTRA
+ PUT GLOBAL-CHARACTER-TABLE,EXTRA-C,EXTRA
+ CALL QUEUE,I-EXTRA,1
+ PUT STACK,0,1
+ JUMP ?CND114
+?ELS116: CALL QUEUE,I-EXTRA,5
+ PUT STACK,0,1
+?CND114: ZERO? IDEBUG /?CND120
+ PRINTN VL
+ PRINTI "]"
+ CRLF
+?CND120: RETURN VL
+
+
+ .FUNCT I-STAR,GARG=0,DEST,NCAR,STAR,L,VL,VLEL
+ ZERO? IDEBUG \?THN4
+ EQUAL? GARG,G-DEBUG \?CND1
+?THN4: PRINTI "[I-STAR:"
+ EQUAL? GARG,G-DEBUG /FALSE
+?CND1: SET 'STAR,STAR-C
+ ZERO? STAR \?ELS13
+ CALL PICK-ONE-NOT,SPY-TABLE,BAD-SPY,PEEKER >STAR
+ GETP STAR,P?CHARACTER >STAR-C
+ JUMP ?CND11
+?ELS13: GET CHARACTER-TABLE,STAR >STAR
+?CND11: LOC STAR >L
+ CALL2 VISIBLE?,L >VL
+ ZERO? GARG \?ELS20
+ ZERO? ON-TRAIN \?CND21
+ CALL QUEUE,I-STAR,1
+ PUT STACK,0,1
+ ZERO? IDEBUG /FALSE
+ PRINTI "0]"
+ CRLF
+ RFALSE
+?CND21: SET 'LAST-STAR-LOC,L
+ GETP STAR,P?CAR
+ EQUAL? DINER-CAR,STACK /?ELS32
+ SET 'NCAR,DINER-CAR
+ JUMP ?CND30
+?ELS32: LESS? CAR-HERE,DINER-CAR \?ELS34
+ SUB CAR-HERE,1 >NCAR
+ JUMP ?CND30
+?ELS34: ADD CAR-HERE,1 >NCAR
+?CND30: EQUAL? NCAR,FANCY-CAR \?CND37
+ DEC 'NCAR
+?CND37: LESS? NCAR,1 \?ELS42
+ SET 'NCAR,1
+ JUMP ?CND40
+?ELS42: GRTR? NCAR,CAR-MAX \?CND40
+ SET 'NCAR,CAR-MAX
+?CND40: EQUAL? NCAR,DINER-CAR \?ELS47
+ CALL1 PICK-ONE-BOOTH >DEST
+ JUMP ?CND45
+?ELS47: CALL2 PICK-ONE,CAR-ROOMS-COMPS >DEST
+?CND45: EQUAL? NCAR,GAS-CAR \?CND50
+ EQUAL? DEST,GAS-CAR-RM \?CND50
+ SET 'DEST,COMPARTMENT-4
+?CND50: ZERO? DEBUG \?THN58
+ ZERO? IDEBUG /?CND55
+?THN58: PRINTI "[GOAL: "
+ PRINTD STAR
+ PRINTI " at "
+ PRINTD L
+ PRINTI " (car #"
+ GETP STAR,P?CAR
+ PRINTN STACK
+ PRINTI ") to "
+ PRINTD DEST
+ PRINTI " (car #"
+ PRINTN NCAR
+ PRINTI ").]"
+ CRLF
+?CND55: GETP STAR,P?CHARACTER
+ GET GOAL-TABLES,STACK
+ PUT STACK,GOAL-ENABLE,1
+ CALL ESTABLISH-GOAL-TRAIN,STAR,DEST,NCAR
+ ZERO? IDEBUG /FALSE
+ PRINTI "0]"
+ CRLF
+ RFALSE
+?ELS20: EQUAL? GARG,G-ENROUTE \?ELS72
+ EQUAL? L,HERE \?CND73
+ SET 'LAST-STAR-LOC,L
+ ZERO? IDEBUG /TRUE
+ PRINTI "(STAR HERE)"
+ PRINTR "1]"
+?CND73: CALL2 VISIBLE?,LAST-STAR-LOC >VLEL
+ ZERO? VL /?ELS86
+ ZERO? VLEL \?ELS86
+ SET 'LAST-STAR-LOC,L
+ ZERO? IDEBUG /TRUE
+ PRINTI "(STAR NOW VISIBLE)"
+ PRINTR "1]"
+?ELS86: ZERO? VL \?ELS98
+ ZERO? VLEL /?ELS98
+ SET 'LAST-STAR-LOC,L
+ ZERO? IDEBUG /TRUE
+ PRINTI "(STAR NOT VISIBLE)"
+ PRINTR "1]"
+?ELS98: SET 'LAST-STAR-LOC,L
+ ZERO? IDEBUG /FALSE
+ PRINTI "0]"
+ CRLF
+ RFALSE
+?ELS72: EQUAL? GARG,G-REACHED \?CND70
+ GET CHARACTER-TABLE,STAR-C >STAR
+ CALL2 NEW-LDESC,STAR
+ SET 'STAR-C,0
+ RANDOM 9
+ CALL QUEUE,I-STAR,STACK
+ PUT STACK,0,1
+?CND70: ZERO? IDEBUG /?CND119
+ PRINTN VL
+ PRINTI "]"
+ CRLF
+?CND119: RETURN VL
+
+
+ .FUNCT PICK-ONE-NOT,TBL,NOT1=0,NOT2=0,L,CNT,X
+ GET TBL,0 >L
+ RANDOM L >CNT
+?PRG1: GET TBL,CNT >X
+ EQUAL? X,NOT1,NOT2 /?ELS5
+ RETURN X
+?ELS5: IGRTR? 'CNT,L \?PRG1
+ SET 'CNT,1
+ JUMP ?PRG1
+
+
+ .FUNCT STOP-CONDUCTOR?,L,LL=0,X
+ LOC CONDUCTOR >L
+ GETPT L,P?IN >X
+ ZERO? X \?THN4
+ GETPT L,P?OUT >X
+ ZERO? X /?CND1
+?THN4: GET X,REXIT >LL
+?CND1: CALL ANY-TICKETS?,L,PERSONBIT >X
+ ZERO? X /?ELS10
+ RETURN X
+?ELS10: CALL ANY-TICKETS?,L,MUNGBIT >X
+ ZERO? X /?ELS12
+ RETURN X
+?ELS12: ZERO? LL /?ELS14
+ CALL ANY-TICKETS?,LL,PERSONBIT >X
+ ZERO? X /?ELS14
+ RETURN X
+?ELS14: ZERO? LL /?ELS18
+ CALL ANY-TICKETS?,LL,MUNGBIT >X
+ ZERO? X /?ELS18
+ RETURN X
+?ELS18: ZERO? TICKETS-PUNCHED? /?ELS22
+ ZERO? CUSTOMS-SWEEP /FALSE
+?ELS22: ZERO? ON-TRAIN /FALSE
+ CALL2 ANY-TICKETS?,L >X
+ ZERO? X /?ELS28
+ RETURN X
+?ELS28: ZERO? LL /FALSE
+ CALL2 ANY-TICKETS?,LL
+ RSTACK
+
+
+ .FUNCT I-CONDUCTOR,GARG=0,L,OBJ,DEST,X,Y
+ ZERO? IDEBUG \?THN4
+ EQUAL? GARG,G-DEBUG \?CND1
+?THN4: PRINTI "[I-CONDUCTOR:"
+ EQUAL? GARG,G-DEBUG /FALSE
+?CND1: LOC CONDUCTOR >L
+ ZERO? GARG \?ELS15
+ CALL ESTABLISH-GOAL-TRAIN,CONDUCTOR,VESTIBULE-REAR,CAR-MAX
+ ZERO? IDEBUG /FALSE
+ PRINTI "(0)]"
+ CRLF
+ RFALSE
+?ELS15: EQUAL? GARG,G-REACHED \?ELS23
+ EQUAL? L,PLATFORM-A \?ELS28
+ FSET CONDUCTOR,NDESCBIT
+ FCLEAR CONDUCTOR,TOUCHBIT
+ PUTP CONDUCTOR,P?LDESC,15
+ CALL2 ON-PLATFORM?,HERE
+ ZERO? STACK /?ELS33
+ CALL HE-SHE-IT,CONDUCTOR,TRUE-VALUE
+ PRINTI " stops walking."
+ CRLF
+ ZERO? IDEBUG /TRUE
+ PRINTR "(1)]"
+?ELS33: ZERO? IDEBUG /FALSE
+ PRINTI "(0)]"
+ CRLF
+ RFALSE
+?ELS28: EQUAL? L,VESTIBULE-FWD,OTHER-VESTIBULE-FWD \?ELS51
+ CALL ESTABLISH-GOAL-TRAIN,CONDUCTOR,VESTIBULE-REAR,CAR-MAX
+ CALL TURNS-AROUND?,L,VESTIBULE-FWD >X
+ ZERO? IDEBUG /?CND52
+ PRINTN X
+ PRINTI "]"
+ CRLF
+ RETURN X
+?CND52: RETURN X
+?ELS51: EQUAL? L,VESTIBULE-REAR,OTHER-VESTIBULE-REAR \?ELS59
+ CALL2 I-CONDUCTOR,G-ENROUTE
+ ZERO? STACK /?CND60
+ ZERO? IDEBUG /TRUE
+ PRINTR "(1)]"
+?CND60: SET 'TICKETS-PUNCHED?,TRUE-VALUE
+ CALL QUEUE,I-TICKETS-PLEASE,0
+ CALL ESTABLISH-GOAL-TRAIN,CONDUCTOR,VESTIBULE-FWD,1
+ CALL TURNS-AROUND?,L,VESTIBULE-REAR >X
+ ZERO? IDEBUG /?CND69
+ PRINTN X
+ PRINTI "]"
+ CRLF
+ RETURN X
+?CND69: RETURN X
+?ELS59: ZERO? IDEBUG /FALSE
+ PRINTI "(0)]"
+ CRLF
+ RFALSE
+?ELS23: EQUAL? GARG,G-ENROUTE \FALSE
+ CALL1 STOP-CONDUCTOR? >Y
+ ZERO? Y /?CND85
+ GET GOAL-TABLES,CONDUCTOR-C
+ PUT STACK,GOAL-ENABLE,0
+ CALL VISIBLE?,CONDUCTOR,TRUE-VALUE >X
+ FSET? Y,PERSONBIT /?ELS90
+ MOVE Y,LIMBO-FWD
+ SET 'VICTIM-KNOWN,Y
+ JUMP ?CND88
+?ELS90: FSET? Y,MUNGBIT \?CND88
+ CALL QUEUE,I-COME-TO,1
+?CND88: ZERO? DEBUG \?THN96
+ EQUAL? X,FALSE-VALUE,PLAYER-NOT-FACING /?CND85
+?THN96: EQUAL? X,FALSE-VALUE,PLAYER-NOT-FACING \?CND98
+ PRINTI "["
+?CND98: CALL HE-SHE-IT,CONDUCTOR,TRUE-VALUE
+ ZERO? X /?CND105
+ CALL2 WHERE?,CONDUCTOR
+ ZERO? STACK /?CND105
+ PRINTC 44
+?CND105: PRINTI " stops "
+ IN? CONDUCTOR,HERE \?CND112
+ PRINTI "here "
+?CND112: PRINTI "to "
+ FSET? Y,PERSONBIT /?ELS121
+ PRINTI "remove"
+ CALL HIM-HER-IT,Y,FALSE-VALUE,TRUE-VALUE
+ PRINTI " body."
+ CALL2 THIS-IS-IT,Y
+ EQUAL? L,HERE \?CND119
+ CALL ARREST-PLAYER,STR?28,CONDUCTOR,TRUE-VALUE,PLAYER
+ JUMP ?CND119
+?ELS121: FSET? Y,MUNGBIT \?ELS128
+ PRINTI "try to revive"
+ CALL2 HIM-HER-IT,Y
+ PRINTI "."
+ CALL2 THIS-IS-IT,Y
+ JUMP ?CND119
+?ELS128: ZERO? CUSTOMS-SWEEP /?ELS132
+ PRINTI "ask passengers to leave the train."
+ JUMP ?CND119
+?ELS132: PRINTI "punch tickets."
+?CND119: CRLF
+ ZERO? IDEBUG /TRUE
+ PRINTR "(1)]"
+?CND85: ZERO? IDEBUG /FALSE
+ PRINTI "(0)]"
+ CRLF
+ RFALSE
+
+
+ .FUNCT TURNS-AROUND?,L,RM
+ EQUAL? HERE,RM \FALSE
+ EQUAL? L,RM \FALSE
+ CALL HE-SHE-IT,CONDUCTOR,TRUE-VALUE,STR?321
+ PRINTR " and turns around."
+
+
+ .FUNCT WHERE?,PER,X=0,CAP=0
+ IN? PER,HERE /FALSE
+ ZERO? X \?CND6
+ PRINTC 44
+ CALL CORRIDOR-LOOK,PER,CAR-HERE >X
+?CND6: ZERO? CAP \?CND9
+ PRINTC 32
+?CND9: EQUAL? X,P?WEST,P?IN \?ELS14
+ ZERO? CAP \?ELS17
+ PRINTI "in"
+ JUMP ?CND15
+?ELS17: PRINTI "In"
+?CND15: LOC PER
+ CALL2 PRINTT,STACK
+ RTRUE
+?ELS14: EQUAL? X,P?EAST,P?OUT \?ELS27
+ ZERO? CAP \?ELS30
+ PRINTC 106
+ JUMP ?CND28
+?ELS30: PRINTC 74
+?CND28: PRINTI "ust outside"
+ RTRUE
+?ELS27: ZERO? CAP \?ELS39
+ PRINTC 111
+ JUMP ?CND37
+?ELS39: PRINTC 79
+?CND37: PRINTI "ff to "
+ CALL2 DIR-PRINT,X
+ RTRUE
+
+
+ .FUNCT ANY-TICKETS?,L,BIT=0,O,VAL=0,CAR
+ ZERO? BIT \?CND1
+ SET 'BIT,LOCKED
+?CND1: GETP CONDUCTOR,P?CAR >CAR
+ CALL2 META-LOC,PLAYER
+ EQUAL? L,STACK \?ELS6
+ EQUAL? CAR,CAR-HERE \?ELS6
+ ZERO? CUSTOMS-SWEEP \?THN9
+ EQUAL? BIT,PERSONBIT /?ELS6
+ FSET? PLAYER,BIT \?ELS6
+?THN9: RETURN PLAYER
+?ELS6: EQUAL? L,GAS-CAR-RM \?CND4
+ EQUAL? CAR,GAS-CAR \?CND4
+ ZERO? CUSTOMS-SWEEP \?THN17
+ ZERO? TICKETS-PUNCHED? \?CND4
+?THN17: SET 'CONDUCTOR-KNOWS,BRIEFCASE
+ RFALSE
+?CND4: FIRST? L >O /?KLU40
+?KLU40:
+?PRG19: ZERO? O \?ELS23
+ RETURN VAL
+?ELS23: GETP O,P?CAR
+ EQUAL? CAR,STACK \?CND21
+ EQUAL? BIT,PERSONBIT \?ELS31
+ GETP O,P?CHARACTER
+ ZERO? STACK /?ELS31
+ FSET? O,PERSONBIT \?THN28
+?ELS31: EQUAL? BIT,PERSONBIT /?CND21
+ FSET? O,BIT \?CND21
+ FSET? O,PERSONBIT \?CND21
+?THN28: ZERO? VAL \?CND34
+ SET 'VAL,O
+?CND34: CALL2 IN-MOTION?,O
+ ZERO? STACK /?CND21
+ GETP O,P?CHARACTER
+ GET GOAL-TABLES,STACK
+ PUT STACK,GOAL-ENABLE,0
+?CND21: NEXT? O >O /?KLU41
+?KLU41: JUMP ?PRG19
+
+
+ .FUNCT I-WAITER,GARG=0,L
+ ZERO? IDEBUG \?THN4
+ EQUAL? GARG,G-DEBUG \?CND1
+?THN4: PRINTI "[I-WAITER:"
+ EQUAL? GARG,G-DEBUG /FALSE
+?CND1: LOC WAITER >L
+ EQUAL? GARG,G-REACHED \FALSE
+ EQUAL? L,PANTRY \?ELS20
+ IN? FOOD,WAITER \?CND21
+ FCLEAR FOOD,TAKEBIT
+ FSET FOOD,NDESCBIT
+ MOVE FOOD,PANTRY
+?CND21: IN? CUP-A,WAITER \?CND24
+ FCLEAR CUP-A,TAKEBIT
+ MOVE CUP-A,GLOBAL-OBJECTS
+?CND24: IN? CUP-B,WAITER \?CND27
+ FCLEAR CUP-B,TAKEBIT
+ MOVE CUP-B,GLOBAL-OBJECTS
+?CND27: ZERO? IDEBUG /FALSE
+ PRINTI "(0)]"
+ CRLF
+ RFALSE
+?ELS20: EQUAL? L,HERE \?ELS37
+ CALL HE-SHE-IT,WAITER,TRUE-VALUE,STR?316
+ PRINTI ", ready to take your order."
+ CRLF
+ PUTP WAITER,P?LDESC,25
+ ZERO? IDEBUG /?CND40
+ PRINTI "(2)]"
+ CRLF
+?CND40: RETURN 2
+?ELS37: CALL2 META-LOC,FOOD
+ EQUAL? L,STACK \?CND50
+ MOVE FOOD,WAITER
+?CND50: CALL2 META-LOC,CUP-A
+ EQUAL? L,STACK \?CND53
+ MOVE CUP-A,WAITER
+?CND53: CALL2 META-LOC,CUP-B
+ EQUAL? L,STACK \?CND56
+ MOVE CUP-B,WAITER
+?CND56: CALL ESTABLISH-GOAL,WAITER,PANTRY
+ ZERO? IDEBUG /FALSE
+ PRINTI "(0)]"
+ CRLF
+ RFALSE
+
+
+ .FUNCT I-BOND,GARG=0,VAL=0,CAR
+ ZERO? IDEBUG \?THN4
+ EQUAL? GARG,G-DEBUG \?CND1
+?THN4: PRINTI "[I-BOND:"
+ EQUAL? GARG,G-DEBUG /FALSE
+?CND1: INC 'BOND-CTR
+ EQUAL? 1,BOND-CTR \?ELS13
+ CALL QUEUE,I-BOND,1
+ CALL MOVE-PERSON,BOND,VESTIBULE-REAR >VAL
+ JUMP ?CND11
+?ELS13: EQUAL? 2,BOND-CTR \?ELS15
+ CALL QUEUE,I-BOND,3
+ CALL MOVE-PERSON,BOND,ROOF >VAL
+ ADD 1,CAR-START >CAR
+ PUTP BOND,P?CAR,CAR
+ EQUAL? CAR,CAR-HERE /?CND11
+ MOVE BOND,OTHER-ROOF
+ JUMP ?CND11
+?ELS15: EQUAL? 3,BOND-CTR \?ELS20
+ CALL QUEUE,I-BOND,2
+ CALL2 NOISY?,HERE
+ ZERO? STACK \?PRD24
+ PUSH 1
+ JUMP ?PRD25
+?PRD24: PUSH 0
+?PRD25: SET 'VAL,STACK
+ ZERO? VAL /?CND11
+ PRINTI "You hear some kind of noise from the roof of the train."
+ CRLF
+ JUMP ?CND11
+?ELS20: EQUAL? 4,BOND-CTR \?ELS29
+ CALL QUEUE,I-BOND,1
+ MOVE BOND,LIMBO-FWD
+ CALL2 WINDOW-IN?,HERE >VAL
+ ZERO? VAL /?CND11
+ PRINTI "Something outside the window catches your eye. It looks like"
+ CALL2 PRINTT,BOND
+ PRINTI " falling off the roof of the train."
+ CRLF
+ JUMP ?CND11
+?ELS29: EQUAL? 5,BOND-CTR \?CND11
+ CALL1 START-BAD-SPY >VAL
+?CND11: ZERO? IDEBUG /?CND37
+ PRINTN VAL
+ PRINTI "]"
+ CRLF
+ RETURN VAL
+?CND37: RETURN VAL
+
+
+ .FUNCT I-BOND-OTHER,GARG=0,VAL=0
+ ZERO? IDEBUG \?THN4
+ EQUAL? GARG,G-DEBUG \?CND1
+?THN4: PRINTI "[I-BOND-OTHER:"
+ EQUAL? GARG,G-DEBUG /FALSE
+?CND1: ZERO? SUPPRESS-INTERRUPT \?ELS13
+ RANDOM 100
+ LESS? 90,STACK /?ELS16
+ SET 'VAL,TRUE-VALUE
+ CALL HE-SHE-IT,BOND-OTHER,TRUE-VALUE
+ CALL2 PICK-ONE-NEW,BOND-OTHER-ACTIONS
+ PRINT STACK
+ PRINTI "."
+ CRLF
+ JUMP ?CND11
+?ELS16: CALL HE-SHE-IT,BOND-OTHER,TRUE-VALUE
+ PRINTI " leaps at you and tries to kick your feet out from under you. You respond with your best moves. But after wrestling together for what seems like ages, you both reach the edge of the roof and plunge over it!"
+ CRLF
+ CALL1 FINISH
+ JUMP ?CND11
+?ELS13: SET 'SUPPRESS-INTERRUPT,FALSE-VALUE
+?CND11: ZERO? IDEBUG /?CND25
+ PRINTN VAL
+ PRINTI "]"
+ CRLF
+ RETURN VAL
+?CND25: RETURN VAL
+
+
+ .FUNCT I-COOK,GARG=0,L
+ RFALSE
+
+
+ .FUNCT I-GUARD,GARG=0,L
+ RFALSE
+
+
+ .FUNCT I-ATTENTION,GARG=0,FLG=0,CNT=0,ATT,GT,PER
+ ZERO? IDEBUG \?THN4
+ EQUAL? GARG,G-DEBUG \?CND1
+?THN4: PRINTI "[I-ATTENTION:"
+ EQUAL? GARG,G-DEBUG /FALSE
+?CND1:
+?PRG11: IGRTR? 'CNT,CHARACTER-MAX \?CND13
+ JUMP ?REP12
+?CND13: GET GOAL-TABLES,CNT >GT
+ GET GT,ATTENTION >ATT
+ GRTR? ATT,0 /?CND16
+ JUMP ?PRG11
+?CND16: DEC 'ATT
+ GET CHARACTER-TABLE,CNT >PER
+ ZERO? PER \?ELS21
+ PRINTI "[!! I-ATT: PER=0]"
+ CRLF
+ JUMP ?CND19
+?ELS21: ZERO? ATT \?ELS25
+ FCLEAR PER,TOUCHBIT
+ EQUAL? PER,PEEKER /?THN29
+ EQUAL? PER,BAD-SPY \?ELS28
+ ZERO? BAD-SPY-DONE-PEEKING \?ELS28
+?THN29: PUTP PER,P?LDESC,PEEKING-CODE
+ JUMP ?CND26
+?ELS28: EQUAL? PER,CONDUCTOR \?ELS34
+ PUTP PER,P?LDESC,19
+ JUMP ?CND26
+?ELS34: PUTP PER,P?LDESC,14
+?CND26: EQUAL? PER,CONDUCTOR \?THN40
+ CALL1 STOP-CONDUCTOR?
+ ZERO? STACK \?CND19
+?THN40: PUT GT,GOAL-ENABLE,1
+ JUMP ?CND19
+?ELS25: EQUAL? ATT,1 \?CND19
+ IN? PER,HERE \?CND19
+ GET GT,GOAL-FUNCTION
+ CALL D-APPLY,STR?329,STACK,G-IMPATIENT
+ ZERO? STACK /?CND19
+ SET 'FLG,TRUE-VALUE
+?CND19: PUT GT,ATTENTION,ATT
+ JUMP ?PRG11
+?REP12: ZERO? IDEBUG /?CND46
+ PRINTN FLG
+ PRINTI "]"
+ CRLF
+ RETURN FLG
+?CND46: RETURN FLG
+
+
+ .FUNCT GRAB-ATTENTION,PERSON,LEN=0,CHR,GT,ATT
+ GETP PERSON,P?CHARACTER >CHR
+ FSET? PERSON,PERSONBIT /?ELS3
+ CALL TOO-BAD-BUT,PERSON,STR?117
+ RFALSE
+?ELS3: FSET? PERSON,MUNGBIT \?ELS5
+ CALL TOO-BAD-BUT,PERSON,STR?115
+ RFALSE
+?ELS5: GETP PERSON,P?LDESC
+ EQUAL? STACK,2 \?ELS7
+ CALL TOO-BAD-BUT,PERSON,STR?330
+ RFALSE
+?ELS7: FSET? PERSON,BUSYBIT \?CND1
+ CALL TOO-BAD-BUT,PERSON,STR?331
+ RFALSE
+?CND1: GET GOAL-TABLES,CHR >GT
+ GET GT,GOAL-S
+ ZERO? STACK /?CND10
+ ZERO? LEN /?ELS15
+ SET 'ATT,LEN
+ JUMP ?CND13
+?ELS15: GET GT,ATTENTION-SPAN >ATT
+?CND13: PUT GT,ATTENTION,ATT
+ ZERO? ATT \?ELS21
+ EQUAL? PERSON,CONDUCTOR \?THN25
+ CALL1 STOP-CONDUCTOR?
+ ZERO? STACK \FALSE
+?THN25: PUT GT,GOAL-ENABLE,1
+ RFALSE
+?ELS21: GET GT,GOAL-ENABLE
+ ZERO? STACK /?CND10
+ PUT GT,GOAL-ENABLE,0
+?CND10: CALL2 SAID-TO,PERSON
+ RTRUE
+
+
+ .FUNCT I-TICKETS-PLEASE,GARG=0,L,L1=0,PER,X,VAL=0
+ ZERO? IDEBUG \?THN4
+ EQUAL? GARG,G-DEBUG \?CND1
+?THN4: PRINTI "[I-TICKETS-PLEASE:"
+ EQUAL? GARG,G-DEBUG /FALSE
+?CND1: ZERO? TICKETS-PUNCHED? /?CND11
+ ZERO? CUSTOMS-SWEEP \?CND11
+ CALL QUEUE,I-TICKETS-PLEASE,0
+ RFALSE
+?CND11: ZERO? IDEBUG /?CND16
+ PRINTI "[I-TICKETS-PLEASE:"
+?CND16: LOC CONDUCTOR >L
+ GETPT L,P?IN >X
+ ZERO? X \?THN25
+ GETPT L,P?OUT >X
+ ZERO? X /?CND22
+?THN25: GET X,REXIT >L1
+?CND22: CALL1 STOP-CONDUCTOR? >PER
+ ZERO? PER /?ELS31
+ GET GOAL-TABLES,CONDUCTOR-C
+ PUT STACK,GOAL-ENABLE,0
+ SET 'TOUCH-CAP?,FALSE-VALUE
+ CALL VISIBLE?,PER,TRUE-VALUE >X
+ FSET? PER,PERSONBIT /?ELS36
+ MOVE PER,LIMBO-FWD
+ SET 'VICTIM-KNOWN,PER
+ EQUAL? X,FALSE-VALUE,PLAYER-NOT-FACING \?THN42
+ ZERO? DEBUG /FALSE
+ PRINTI "["
+?THN42: CALL HE-SHE-IT,CONDUCTOR,TRUE-VALUE
+ PRINTI " removes"
+ CALL HIM-HER-IT,PER,FALSE-VALUE,TRUE-VALUE
+ PRINTI " body."
+ ZERO? DEBUG /?CND50
+ PRINTI "]"
+?CND50: CRLF
+ RTRUE
+?ELS36: FSET? PER,MUNGBIT \?ELS57
+ CALL QUEUE,I-COME-TO,1
+ EQUAL? X,FALSE-VALUE,PLAYER-NOT-FACING \?THN63
+ ZERO? DEBUG /FALSE
+ PRINTI "["
+?THN63: CALL HE-SHE-IT,CONDUCTOR,TRUE-VALUE
+ PRINTI " tries to revive"
+ CALL2 HIM-HER-IT,PER
+ PRINTI "."
+ CALL2 THIS-IS-IT,PER
+ ZERO? DEBUG /?CND71
+ PRINTI "]"
+?CND71: CRLF
+ RTRUE
+?ELS57: EQUAL? PER,PLAYER \?ELS78
+ LOC CONDUCTOR
+ EQUAL? HERE,STACK \?ELS81
+ CALL HE-SHE-IT,CONDUCTOR,TRUE-VALUE
+ JUMP ?CND79
+?ELS81: CALL FIND-FLAG-LG,HERE,DOORBIT >X
+ ZERO? X /?CND86
+ FSET? X,LOCKED \?CND86
+ ZERO? TICKET-KNOCK /?ELS93
+ FCLEAR X,LOCKED
+ JUMP ?CND86
+?ELS93: SET 'TICKET-KNOCK,TRUE-VALUE
+ PRINTI "You hear a knock on the door."
+ CRLF
+ ZERO? IDEBUG /TRUE
+ PRINTR "(1)]"
+?CND86: SET 'TICKET-KNOCK,FALSE-VALUE
+ SET 'TICKET-COUNT,0
+ MOVE CONDUCTOR,HERE
+ CRLF
+ CALL HE-SHE-IT,CONDUCTOR,TRUE-VALUE,STR?321
+ PRINTI " and"
+?CND79: EQUAL? PRSA,V?SAY,V?TELL \?ELS109
+ JUMP ?CND107
+?ELS109: GET GESTURE-TABLE,0
+ LESS? TICKET-COUNT,STACK \?ELS111
+ INC 'TICKET-COUNT
+ JUMP ?CND107
+?ELS111: CALL2 ARREST-PLAYER,STR?33
+ PRINTI " throws up his hands and hurries away."
+ CRLF
+ ZERO? IDEBUG /TRUE
+ PRINTR "(0)]"
+?CND107: PRINTI " makes a gesture"
+ LESS? 1,TICKET-COUNT \?CND124
+ GET GESTURE-TABLE,TICKET-COUNT
+ PRINT STACK
+?CND124: SET 'VAL,TRUE-VALUE
+ ZERO? CUSTOMS-SWEEP /?ELS131
+ GRTR? 5,TICKET-COUNT \?ELS135
+ PRINTI ", asking you to"
+ JUMP ?CND133
+?ELS135: PRINTI ", demanding that you"
+?CND133: PRINTI " leave the train."
+ CRLF
+ JUMP ?CND129
+?ELS131: EQUAL? PER,PLAYER \?CND129
+ GRTR? 5,TICKET-COUNT \?ELS148
+ PRINTI ", asking for "
+ JUMP ?CND146
+?ELS148: PRINTI ", demanding "
+?CND146: CALL2 THIS-IS-IT,TICKET
+ PRINTD TICKET
+ PRINTI "."
+ CRLF
+?CND129: CALL1 ARREST-MCGUFFIN?
+ CALL ARREST-MCGUFFIN?,GUN,STR?61
+ ZERO? IDEBUG /?CND162
+ PRINTN VAL
+ PRINTI "]"
+ CRLF
+?CND162: RETURN VAL
+?ELS78: FCLEAR PER,LOCKED
+ GETP PER,P?CHARACTER
+ GET GOAL-TABLES,STACK
+ GET STACK,GOAL-S
+ ZERO? STACK /?CND170
+ GETP PER,P?CHARACTER
+ GET GOAL-TABLES,STACK
+ PUT STACK,GOAL-ENABLE,1
+?CND170: EQUAL? X,FALSE-VALUE,PLAYER-NOT-FACING \?THN178
+ ZERO? DEBUG /FALSE
+ PRINTI "["
+?THN178: CALL HE-SHE-IT,CONDUCTOR,TRUE-VALUE
+ ZERO? CUSTOMS-SWEEP /?ELS188
+ PRINTI " asks"
+ CALL2 HIM-HER-IT,PER
+ PRINTI " to leave the train."
+ JUMP ?CND186
+?ELS188: PRINTI " punches"
+ CALL HIM-HER-IT,PER,FALSE-VALUE,TRUE-VALUE
+ PRINTI " ticket."
+?CND186: ZERO? DEBUG /?CND196
+ PRINTI "]"
+?CND196: CRLF
+ RTRUE
+?ELS31: GET GOAL-TABLES,CONDUCTOR-C
+ PUT STACK,GOAL-ENABLE,1
+ CALL2 VISIBLE?,CONDUCTOR >X
+ ZERO? X /?CND204
+ CALL FIND-FLAG,L,PERSONBIT,CONDUCTOR
+ ZERO? STACK \?THN210
+ ZERO? L1 /?ELS209
+ CALL FIND-FLAG,L1,PERSONBIT,CONDUCTOR
+ ZERO? STACK /?ELS209
+?THN210: SET 'TOUCH-CAP?,TRUE-VALUE
+ JUMP ?CND204
+?ELS209: SET 'TOUCH-CAP?,FALSE-VALUE
+?CND204: GETP L,P?STATION
+ EQUAL? L,STACK /?CND216
+ GETP L,P?STATION
+ CALL MOVE-PERSON,CONDUCTOR,STACK
+?CND216: ZERO? IDEBUG /FALSE
+ PRINTI "(0)]"
+ CRLF
+ RFALSE
+
+
+ .FUNCT ARREST-MCGUFFIN?,OBJ=0,STR=0,X
+ ZERO? OBJ \?CND1
+ SET 'OBJ,MCGUFFIN
+ SET 'STR,STR?337
+?CND1: LOC OBJ >X
+ EQUAL? X,PLAYER /?THN9
+ CALL2 META-LOC,OBJ
+ EQUAL? STACK,HERE \FALSE
+ FSET? X,PERSONBIT /FALSE
+ CALL2 HIDDEN?,OBJ
+ ZERO? STACK \FALSE
+?THN9: MOVE OBJ,LIMBO-FWD
+ CALL2 ARREST-PLAYER,STR
+ PRINTI "Then he notices"
+ CALL2 HIM-HER-IT,OBJ
+ PRINTR ", confiscates it, and leaves in a hurry."
+
+
+ .FUNCT ARREST-PLAYER,STR,PER=0,TELL?=0,OBJ=0
+ ZERO? PER \?CND1
+ SET 'PER,CONDUCTOR
+?CND1: ZERO? TELL? /?CND4
+ CALL HE-SHE-IT,PER,TRUE-VALUE
+ CALL2 WHERE?,PER
+ ZERO? STACK /?CND10
+ PRINTC 44
+?CND10: CALL HE-SHE-IT,PER,-1,STR?338
+ PRINTI " at"
+ CALL2 HIM-HER-IT,OBJ
+ PRINTI " for a moment, not believing"
+ CALL HIM-HER-IT,PER,FALSE-VALUE,TRUE-VALUE
+ PRINTI " eyes. Then"
+ CALL HE-SHE-IT,PER,0,STR?315
+ PRINTI " in a hurry."
+ EQUAL? PER,CONDUCTOR /?CND15
+ CALL2 VISIBLE?,CONDUCTOR
+ ZERO? STACK /?CND15
+ PRINTI " So does"
+ CALL2 HE-SHE-IT,CONDUCTOR
+ PRINTI "."
+?CND15: CRLF
+?CND4: CALL QUEUE,I-TICKETS-PLEASE,0
+ CALL2 QUEUED?,I-TRAIN-ARREST
+ ZERO? STACK \?CND22
+ CALL QUEUE,I-TRAIN-ARREST,5
+ PUT STACK,0,1
+?CND22: SET 'ARREST-REASON,STR
+ MOVE PER,OTHER-LIMBO-FWD
+ GETP PER,P?CHARACTER
+ GET GOAL-TABLES,STACK
+ PUT STACK,GOAL-ENABLE,0
+ MOVE CONDUCTOR,OTHER-LIMBO-FWD
+ GET GOAL-TABLES,CONDUCTOR-C
+ PUT STACK,GOAL-ENABLE,0
+ RTRUE
+
+ .ENDI
diff --git a/goal.zil b/goal.zil
new file mode 100644
index 0000000..2ae82d5
--- /dev/null
+++ b/goal.zil
@@ -0,0 +1,1916 @@
+"GOAL for CHECKPOINT
+Copyright (C) 1985 Infocom, Inc. All rights reserved."
+
+"This code is the local T system."
+
+<ROUTINE DIR-PRINT (DIR "AUX" (CNT 0) TBL X)
+ <COND (<NOT .DIR>
+ <TELL "out of view">
+ <RTRUE>)>
+ <SET TBL ,DIR-STRINGS>
+ <COND (,ON-TRAIN
+ <COND (<OR <NOT ,IN-STATION> <NOT <==? .DIR ,P?DOWN>>>
+ <SET TBL ,NAUTICAL-DIR-STRINGS>)>)>
+ <REPEAT ()
+ <SET X <GET .TBL .CNT>>
+ <COND (<ZERO? .X>
+ <TELL "out of view">
+ <RTRUE>)
+ (<==? .X .DIR>
+ <COND (<NOT <EQUAL? .DIR ,P?UP ,P?DOWN>>
+ <TELL "the ">)>
+ <COND (<AND ,ON-TRAIN ,IN-STATION <==? .DIR ,P?DOWN>>
+ <TELL "down the steps">)
+ (T <PRINT <GET .TBL <+ .CNT 1>>>)>
+ <RTRUE>)>
+ <SET CNT <+ .CNT 2>>>>
+
+<GLOBAL DIR-STRINGS
+ <PTABLE P?SOUTH "south" P?NORTH "north"
+ P?EAST "east" P?WEST "west"
+ P?UP "up the steps" P?DOWN "down the steps"
+ P?IN "in" P?OUT "out"
+ 0>>
+
+<GLOBAL NAUTICAL-DIR-STRINGS
+ <PTABLE P?NORTH "front" P?SOUTH "rear"
+ P?EAST "right side of the train"
+ P?WEST "left side of the train"
+ P?UP "up the ladder" P?DOWN "down the ladder"
+ P?IN "in" P?OUT "out"
+ 0>>
+
+<ROUTINE OPP-DIR (DIR "AUX" (CNT 0) X)
+ <REPEAT ()
+ <SET X <GET ,DIR-STRINGS .CNT>>
+ <COND (<ZERO? .X> <RFALSE>)
+ (<==? .X .DIR>
+ <COND (<0? <MOD .CNT 4>>
+ <RETURN <GET ,DIR-STRINGS <+ .CNT 2>>>)
+ (T
+ <RETURN <GET ,DIR-STRINGS <- .CNT 2>>>)>)>
+ <SET CNT <+ .CNT 2>>>>
+
+"Rapid Transit Line Definitions and Identifiers"
+
+<CONSTANT TRAIN-LINE-C 1>
+<CONSTANT OTHER-LINE-C 2>
+<CONSTANT DINER-LINE-C 3>
+<CONSTANT PLATF-LINE-C 4>
+<CONSTANT STATN-LINE-C 5>
+<CONSTANT FANCY-LINE-C 6>
+"<CONSTANT NUMBER-OF-LINES 6>"
+<CONSTANT GOAL-I-MULTIPLIER 12> "<* 2 ,NUMBER-OF-LINES>"
+
+<ROUTINE GET-LINE (LN)
+ <COND (<==? .LN 1> ,TRAIN-LINE)
+ (<==? .LN 2> ,OTHER-LINE)
+ (<==? .LN 3> ,DINER-LINE)
+ (<==? .LN 4> ,PLATF-LINE)
+ (<==? .LN 5> ,STATN-LINE)
+ (<==? .LN 6> ,FANCY-LINE)>>
+
+<GLOBAL TRAIN-LINE
+ <PTABLE 0 LIMBO-FWD P?SOUTH
+ P?NORTH VESTIBULE-FWD P?SOUTH
+ P?NORTH HALL-1 P?SOUTH
+ P?NORTH HALL-2 P?SOUTH
+ P?NORTH HALL-3 P?SOUTH
+ P?NORTH HALL-4 P?SOUTH
+ P?NORTH HALL-5 P?SOUTH
+ P?NORTH VESTIBULE-REAR P?SOUTH
+ P?NORTH LIMBO-REAR 0>>
+
+<GLOBAL OTHER-LINE
+ <PTABLE 0 OTHER-LIMBO-FWD P?SOUTH
+ P?NORTH OTHER-VESTIBULE-FWD P?SOUTH
+ P?NORTH OTHER-HALL-1 P?SOUTH
+ P?NORTH OTHER-HALL-2 P?SOUTH
+ P?NORTH OTHER-HALL-3 P?SOUTH
+ P?NORTH OTHER-HALL-4 P?SOUTH
+ P?NORTH OTHER-HALL-5 P?SOUTH
+ P?NORTH OTHER-VESTIBULE-REAR P?SOUTH
+ P?NORTH OTHER-LIMBO-REAR 0>>
+
+<GLOBAL DINER-LINE
+ <PTABLE 0 LIMBO-FWD-DINER P?SOUTH
+ P?NORTH VESTIBULE-FWD-DINER P?SOUTH
+ P?NORTH HALL-1-DINER P?SOUTH
+ P?NORTH HALL-2-DINER P?SOUTH
+ P?NORTH HALL-3-DINER P?SOUTH
+ P?NORTH HALL-4-DINER P?SOUTH
+ P?NORTH HALL-5-DINER P?SOUTH
+ P?NORTH VESTIBULE-REAR-DINER P?SOUTH
+ P?NORTH LIMBO-REAR-DINER 0>>
+
+<GLOBAL FANCY-LINE
+ <PTABLE 0 LIMBO-FWD-FANCY P?SOUTH
+ P?NORTH VESTIBULE-FWD-FANCY P?SOUTH
+ P?NORTH HALL-1-FANCY P?SOUTH
+ P?NORTH HALL-2-FANCY P?SOUTH
+ P?NORTH HALL-3-FANCY P?SOUTH
+ P?NORTH VESTIBULE-REAR-FANCY P?SOUTH
+ P?NORTH LIMBO-REAR-FANCY 0>>
+
+<GLOBAL PLATF-LINE
+ <PTABLE 0 PLATFORM-A P?SOUTH
+ P?NORTH PLATFORM-B P?SOUTH
+ P?NORTH PLATFORM-C P?SOUTH
+ P?NORTH PLATFORM-D P?SOUTH
+ P?NORTH PLATFORM-E 0>>
+
+<GLOBAL STATN-LINE
+ <PTABLE 0 WAITING-ROOM P?NORTH
+ P?SOUTH CAFE 0>>
+
+<GLOBAL TRANSFER-TABLE
+ <PTABLE ;"transfers for TRAIN-LINE"
+ 0 0
+ 0 0
+ 0 0
+ 0 0
+ 0 0
+ 0 0
+ ;"transfers for OTHER-LINE"
+ 0 0
+ 0 0
+ 0 0
+ 0 0
+ 0 0
+ 0 0
+ ;"transfers for DINER-LINE"
+ 0 0
+ 0 0
+ 0 0
+ 0 0
+ 0 0
+ 0 0
+ ;"transfers for PLATF-LINE"
+ 0 0
+ 0 0
+ 0 0
+ 0 0
+ PLATFORM-C WAITING-ROOM
+ 0 0
+ ;"transfers for STATN-LINE"
+ 0 0
+ 0 0
+ 0 0
+ WAITING-ROOM PLATFORM-C
+ 0 0
+ 0 0
+ ;"transfers for FANCY-LINE"
+ 0 0
+ 0 0
+ 0 0
+ 0 0
+ 0 0
+ 0 0>>
+
+<GLOBAL COR-1
+ <PTABLE P?NORTH P?SOUTH
+ HALL-1 HALL-2 HALL-3 HALL-4 HALL-5 0>>
+
+<GLOBAL COR-2
+ <PTABLE P?NORTH P?SOUTH
+ HALL-1-DINER HALL-2-DINER HALL-3-DINER HALL-4-DINER HALL-5-DINER 0>>
+
+<GLOBAL COR-10
+ <PTABLE P?NORTH P?SOUTH
+ HALL-1-FANCY HALL-2-FANCY HALL-3-FANCY 0>>
+
+<GLOBAL COR-4
+ <PTABLE P?NORTH P?SOUTH
+ PLATFORM-A PLATFORM-B PLATFORM-C 0>>
+
+"<GLOBAL COR-10
+ <PTABLE P?NORTH P?SOUTH
+ PLATFORM-B PLATFORM-C PLATFORM-D 0>>"
+<GLOBAL COR-20
+ <PTABLE P?NORTH P?SOUTH
+ PLATFORM-C PLATFORM-D PLATFORM-E 0>>
+
+<GLOBAL CAR-ROOMS-CORRIDS <PLTABLE *40* *100* *200* *400* *1000*>>
+
+<GLOBAL COR-40 <PTABLE P?WEST P?EAST COMPARTMENT-1 HALL-1 0>>
+<GLOBAL COR-100 <PTABLE P?WEST P?EAST COMPARTMENT-2 HALL-2 0>>
+<GLOBAL COR-200 <PTABLE P?WEST P?EAST COMPARTMENT-3 HALL-3 0>>
+<GLOBAL COR-400 <PTABLE P?WEST P?EAST COMPARTMENT-4 HALL-4 0>>
+<GLOBAL COR-1000 <PTABLE P?WEST P?EAST COMPARTMENT-5 HALL-5 0>>
+
+<GLOBAL COR-2000 <PTABLE P?WEST P?EAST BOOTH-1 HALL-1-DINER 0>>
+<GLOBAL COR-4000 <PTABLE P?WEST P?EAST BOOTH-2 HALL-2-DINER 0>>
+<GLOBAL COR-10000 <PTABLE P?WEST P?EAST BOOTH-3 HALL-3-DINER 0>>
+<GLOBAL COR-20000 <PTABLE P?WEST P?EAST PANTRY HALL-4-DINER 0>>
+<GLOBAL COR-40000 <PTABLE P?WEST P?EAST GALLEY HALL-5-DINER 0>>
+
+"up to 16 corridors (65536)"
+
+"CODE"
+
+<ROUTINE FOLLOW-GOAL (PERSON
+ "AUX" (HERE <LOC .PERSON>) GT GOAL FLG (IGOAL <>) X)
+ <COND (<NOT <IN? .HERE ,ROOMS>>
+ <SET HERE <META-LOC .HERE>>
+ <MOVE .PERSON .HERE>)>
+ <SET GT <GT-O .PERSON>>
+ <COND (<==? .HERE <GET .GT ,GOAL-F>>
+ <RETURN <GOAL-REACHED .PERSON>>)
+ (<ZERO? <GET .GT ,GOAL-ENABLE>> <RFALSE>)>
+ <COND (<NOT <EQUAL? .HERE <SET X <GETP .HERE ,P?STATION>>>>
+ <COND (<ZERO? .X>
+ <SET X .HERE>
+ <TELL "[!! NO STATION AT " D .HERE "]" CR>)>
+ <COND (<ZMEMQ .HERE ,CAR-ROOMS-REST>
+ <FCLEAR <FIND-FLAG-LG .HERE ,DOORBIT> ,LOCKED>)>
+ <RETURN <MOVE-PERSON .PERSON .X>>)>
+ <SET IGOAL <GET .GT ,GOAL-I>>
+ <SET GOAL <GET ,TRANSFER-TABLE .IGOAL>>
+ <COND (<ZERO? .GOAL>
+ <SET IGOAL <>>
+ <SET GOAL <GET .GT ,GOAL-S>>)>
+ <COND (<NOT .GOAL> <RFALSE>)
+ (<==? .HERE .GOAL>
+ <COND (.IGOAL
+ <SET FLG <GET ,TRANSFER-TABLE <+ .IGOAL 1>>>
+ <COND (<ZERO? .FLG>
+ <SET FLG .HERE>
+ <TELL "[!! NO TRANSFER #" N .IGOAL "]" CR>)>
+ <SET FLG <MOVE-PERSON .PERSON .FLG>>
+ <ESTABLISH-GOAL .PERSON <GET .GT ,GOAL-F>>
+ <RETURN .FLG>)
+ (<NOT <==? .HERE <SET FLG <GET .GT ,GOAL-F>>>>
+ ;<PUT .GT ,GOAL-S <>>
+ <COND (<ZERO? .FLG>
+ <SET FLG .HERE>
+ <TELL "[!! NO GOAL FOR ">
+ <TELL-$WHERE .PERSON>
+ <TELL "]" CR>)>
+ ;<COND (<AND <==? .PERSON ,PLAYER>
+ <OR <ZMEMQ ,HERE ,CAR-ROOMS-VESTIB>
+ <ZMEMQ ,HERE ,CAR-ROOMS-CORRID>>
+ <OR <AND <SET X
+ <FIND-FLAG-LG ,HERE ,DOORBIT>>
+ <FSET? .X ,LOCKED>>
+ <AND <ZMEMQ .FLG ,CAR-ROOMS-REST>
+ <OCCUPIED? .FLG ,CAR-HERE>>>>
+ <TELL CTHE .X " is locked." CR>
+ <RTRUE>)>
+ <COND (<NOT <EQUAL? .PERSON ,CONDUCTOR ,CUSTOMS-AGENT>>
+ <FCLEAR .PERSON ,TOUCHBIT>
+ <PUTP .PERSON ,P?LDESC 3>)>
+ <COND (<ZMEMQ .FLG ,CAR-ROOMS-REST>
+ <COND (<AND <NOT <==? .PERSON ,PLAYER>>
+ <OCCUPIED? .FLG
+ <GETP .PERSON ,P?CAR>>>
+ <RETURN <GOAL-REACHED .PERSON>>)
+ (T
+ <FSET <FIND-FLAG-LG .FLG ,DOORBIT>
+ ,LOCKED>)>)>
+ <SET FLG <MOVE-PERSON .PERSON .FLG>>
+ <RETURN .FLG>)
+ (T
+ <RETURN <GOAL-REACHED .PERSON>>)>)>
+ <SET FLG <FOLLOW-GOAL-NEXT .HERE .GOAL .PERSON>>
+ <COND (<==? .HERE .FLG>
+ <SET FLG<FOLLOW-GOAL-NEXT .HERE <GETP .GOAL ,P?OTHER>.PERSON>>)>
+ <MOVE-PERSON .PERSON .FLG>>
+
+<ROUTINE FOLLOW-GOAL-DIR (HERE GOAL "OPTIONAL" (PERSON <>) "AUX" LINE LOC)
+ <SET LINE <GETP .GOAL ,P?LINE>>
+ <COND (<ZERO? .LINE> <RFALSE>)
+ (<NOT <EQUAL? .LINE <GETP .HERE ,P?LINE>>>
+ <RFALSE>)>
+ <COND (<NOT <EQUAL? .HERE <SET LOC <GETP .HERE ,P?STATION>>>>
+ <RETURN <DIR-FROM .HERE .LOC>>
+ ;<SET HERE .LOC>)>
+ <COND (<NOT <EQUAL? .GOAL <SET LOC <GETP .GOAL ,P?STATION>>>>
+ <COND (<==? .HERE .LOC>
+ <RETURN <DIR-FROM .HERE .GOAL>>)
+ (T <SET GOAL .LOC>)>)>
+ <SET LOC <FOLLOW-GOAL-NEXT .HERE .GOAL .PERSON>>
+ <COND (<==? .LOC .HERE>
+ <SET LOC<FOLLOW-GOAL-NEXT .HERE <GETP .GOAL ,P?OTHER>.PERSON>>)>
+ <DIR-FROM .HERE .LOC>>
+
+<ROUTINE FOLLOW-GOAL-NEXT (HERE GOAL "OPTIONAL" (PERSON <>)
+ "AUX" LINE (CNT 1) RM (GOAL-FLAG <>) LOC)
+ <COND (<NOT .PERSON> <SET PERSON ,GAME>)>
+ <SET LINE <GET-LINE <GETP .GOAL ,P?LINE>>>
+ <COND (<ZERO? .LINE>
+ <TELL "[!! STUCK (" D .PERSON "): GOAL=" D .GOAL "]" CR>
+ <RETURN .HERE>)
+ (<NOT <==? .LINE <GET-LINE <GETP .HERE ,P?LINE>>>>
+ <COND (<AND <OR <EQUAL? .HERE ,VESTIBULE-REAR
+ ,VESTIBULE-REAR-DINER>
+ <EQUAL? .HERE ,OTHER-VESTIBULE-REAR
+ ,VESTIBULE-REAR-FANCY>>
+ <ON-PLATFORM? .GOAL>
+ ;<ZMEMQ .GOAL ,STATION-ROOMS>>
+ <SET HERE <GET ,STATION-ROOMS <GETP .PERSON ,P?CAR>>>
+ <MOVE-PERSON .PERSON .HERE>)
+ (T
+ <TELL "[!! STUCK: ">
+ <TELL-$WHERE .PERSON .HERE>
+ <TELL "GOAL: ">
+ <TELL-$WHERE .PERSON .GOAL>
+ <TELL "]" CR>
+ <RETURN .HERE>)>)>
+ <REPEAT ()
+ <SET RM <GET .LINE .CNT>>
+ <COND (<==? .RM .HERE>
+ <COND (.GOAL-FLAG
+ <SET LOC <GET .LINE <- .CNT 3>>>)
+ (T
+ <SET LOC <GET .LINE <+ .CNT 3>>>)>
+ <RETURN .LOC>)
+ (<==? .RM .GOAL>
+ <SET GOAL-FLAG T>)>
+ <SET CNT <+ .CNT 3>>>>
+
+;<ROUTINE COR-DIR (HERE THERE CAR "AUX" COR RM (PAST 0) (CNT 2))
+ <COND (<EQUAL? .HERE ,ROOF ,BESIDE-TRACKS>
+ <COND (<AND <EQUAL? .HERE ,ROOF>
+ <NOT <==? .THERE ,OTHER-ROOF>>>
+ <RFALSE>)
+ (<AND <EQUAL? .HERE ,BESIDE-TRACKS>
+ <NOT <==? .THERE ,OTHER-BESIDE-TRACKS>>>
+ <RFALSE>)
+ (<L? .CAR ,CAR-HERE>
+ <RETURN ,P?NORTH>)
+ (T <RETURN ,P?SOUTH>)>)
+ (<EQUAL? .HERE ,VESTIBULE-FWD
+ ,VESTIBULE-FWD-DINER ,VESTIBULE-FWD-FANCY>
+ <COND (<AND <==? .CAR <- ,CAR-HERE 1>>
+ <==? .THERE <V-REAR .CAR>>>
+ <RETURN ,P?NORTH>)
+ (T <RETURN <>>)>)
+ (<EQUAL? .HERE ,VESTIBULE-REAR
+ ,VESTIBULE-REAR-DINER ,VESTIBULE-REAR-FANCY>
+ <COND (<AND <==? .CAR <+ ,CAR-HERE 1>>
+ <==? .THERE <V-FWD .CAR>>>
+ <RETURN ,P?SOUTH>)
+ (T <RETURN <>>)>)>
+ <SET RM <BAND <GETP .THERE ,P?CORRIDOR> <GETP .HERE ,P?CORRIDOR>>>
+ <COND (<ZERO? .RM>
+ <COND (<OR <ZMEMQ .HERE ,CAR-ROOMS-COMPS>
+ <ZMEMQ .HERE ,CAR-ROOMS-COMPS-DINER>
+ <EQUAL? .HERE ,SUITE-1 ,SUITE-2 ,SUITE-3>>
+ <RETURN <DIR-FROM .HERE .THERE>>)
+ (T <RFALSE>)>)>
+ <SET COR <GET-COR .RM>>
+ <REPEAT ()
+ <COND (<==? <SET RM <GET .COR .CNT>> .HERE>
+ <SET PAST 1>
+ <RETURN>)
+ (<==? .RM .THERE>
+ <RETURN>)>
+ <SET CNT <+ .CNT 1>>>
+ <GET .COR .PAST>>
+
+;<ROUTINE GET-COR (NUM)
+ ;#DECL ((NUM) FIX)
+ <COND (<==? .NUM 1> ,COR-1)
+ (<==? .NUM 2> ,COR-2)
+ (<==? .NUM 4> ,COR-4)
+ (<==? .NUM *10*> ,COR-10)
+ (<==? .NUM *20*> ,COR-20)
+ (<==? .NUM *40*> ,COR-40)
+ (<==? .NUM *100*> ,COR-100)
+ (<==? .NUM *200*> ,COR-200)
+ (<==? .NUM *400*> ,COR-400)
+ (<==? .NUM *1000*> ,COR-1000)
+ (<==? .NUM *2000*> ,COR-2000)
+ (<==? .NUM *4000*> ,COR-4000)
+ (<==? .NUM *10000*> ,COR-10000)
+ (<==? .NUM *20000*> ,COR-20000)
+ (T ,COR-40000)>>
+
+"Routines to do looking down corridors"
+
+<ROUTINE COR-GRAB-ATTENTION () <CORRIDOR-LOOK <> <> T>>
+
+<ROUTINE CORRIDOR-LOOK ("OPTIONAL" (ITM <>) (CAR <>) (GRAB <>)
+ "AUX" C Z COR VAL (FOUND <>))
+ <COND (<AND .ITM <NOT .CAR>>
+ <SET CAR <GETP .ITM ,P?CAR>>)>
+ <COND (<SET C <GETP ,HERE ,P?CORRIDOR>>
+ <COND (<L? .C 0>
+ <CORRIDOR-CHECK <> .ITM .CAR .GRAB>)
+ (T
+ <REPEAT ()
+ <COND (<NOT <L? <SET Z <- .C *40000*>> 0>>
+ <SET COR ,COR-40000>)
+ (<NOT <L? <SET Z <- .C *20000*>> 0>>
+ <SET COR ,COR-20000>)
+ (<NOT <L? <SET Z <- .C *10000*>> 0>>
+ <SET COR ,COR-10000>)
+ (<NOT <L? <SET Z <- .C *4000*>> 0>>
+ <SET COR ,COR-4000>)
+ (<NOT <L? <SET Z <- .C *2000*>> 0>>
+ <SET COR ,COR-2000>)
+ (<NOT <L? <SET Z <- .C *1000*>> 0>>
+ <SET COR ,COR-1000>)
+ (<NOT <L? <SET Z <- .C *400*>> 0>>
+ <SET COR ,COR-400>)
+ (<NOT <L? <SET Z <- .C *200*>> 0>>
+ <SET COR ,COR-200>)
+ (<NOT <L? <SET Z <- .C *100*>> 0>>
+ <SET COR ,COR-100>)
+ (<NOT <L? <SET Z <- .C *40*>> 0>>
+ <SET COR ,COR-40>)
+ (<NOT <L? <SET Z <- .C *20*>> 0>>
+ <SET COR ,COR-20>)
+ (<NOT <L? <SET Z <- .C *10*>> 0>>
+ <SET COR ,COR-10>)
+ (<NOT <L? <SET Z <- .C 4>> 0>>
+ <SET COR ,COR-4>)
+ (<NOT <L? <SET Z <- .C 2>> 0>>
+ <SET COR ,COR-2>)
+ (<NOT <L? <SET Z <- .C 1>> 0>>
+ <SET COR ,COR-1>)
+ (T <RETURN>)>
+ <SET VAL <CORRIDOR-CHECK .COR .ITM .CAR .GRAB>>
+ <COND (<NOT .FOUND> <SET FOUND .VAL>)>
+ <SET C .Z>>
+ .FOUND)>)>>
+
+<GLOBAL COR-ALL-DIRS <>>
+
+<ROUTINE CORRIDOR-CHECK (COR ITM CAR "OPTIONAL" (GRAB <>)
+ "AUX" (CNT 2) (PAST 0) (FOUND <>) (RM <>) OBJ DIR (NCAR 0) X (Y <>))
+ <SET DIR <GET <OR .COR ,COR-1> .PAST>>
+ <REPEAT ()
+ <COND (<NOT <ZERO? .COR>>
+ <SET RM <GET .COR .CNT>>
+ <COND (<ZERO? .RM>
+ <COR-TELL-PER>
+ <RETURN .Y>)>)
+ (<EQUAL? ,HERE ,ROOF ,BESIDE-TRACKS>
+ <COND (<EQUAL? ,HERE ,ROOF> <SET RM ,OTHER-ROOF>)
+ (T <SET RM ,OTHER-BESIDE-TRACKS>)>
+ <COND (<ZERO? .NCAR>
+ <SET NCAR <- ,CAR-HERE 1>>
+ <COND (<ZERO? .NCAR>
+ <SET PAST 1>
+ <SET DIR <GET <OR .COR ,COR-1> .PAST>>
+ <SET NCAR <+ ,CAR-HERE 1>>)>)
+ (<ZERO? .PAST>
+ <SET NCAR <- .NCAR 1>>
+ <COND (<ZERO? .NCAR>
+ <SET PAST 1>
+ <SET DIR <GET <OR .COR ,COR-1> .PAST>>
+ <SET NCAR <+ ,CAR-HERE 1>>)>)
+ (T
+ <SET NCAR <+ .NCAR 1>>
+ <COND (<G? .NCAR ,CAR-MAX>
+ <COR-TELL-PER>
+ <RETURN .Y>)>)>)
+ (<NOT <ZERO? .RM>>
+ <COR-TELL-PER>
+ <RETURN .Y>)
+ (<EQUAL? ,HERE ,VESTIBULE-REAR
+ ,VESTIBULE-REAR-DINER ,VESTIBULE-REAR-FANCY>
+ <SET PAST 1>
+ <SET DIR <GET <OR .COR ,COR-1> .PAST>>
+ <SET NCAR <+ ,CAR-HERE 1>>
+ <SET RM <V-FWD .NCAR>>)
+ (<EQUAL? ,HERE ,VESTIBULE-FWD
+ ,VESTIBULE-FWD-DINER ,VESTIBULE-FWD-FANCY>
+ <SET NCAR <- ,CAR-HERE 1>>
+ <SET RM <V-REAR .NCAR>>)>
+ <COND (<AND <==? .RM ,HERE>>
+ <SET PAST 1>
+ <SET DIR <GET <OR .COR ,COR-1> .PAST>>)
+ (<OR <==? .ITM <SET OBJ .RM>>
+ <SET OBJ <FIRST? .RM>>>
+ <REPEAT ()
+ <COND (<NOT <ZERO? .ITM>>
+ <COND (<==? .OBJ .ITM>
+ <COND (<NOT <ZERO? .COR>>
+ <SET FOUND <GET .COR .PAST>>
+ <RETURN>)
+ (<==? .NCAR .CAR>
+ <SET FOUND <GET ,COR-1 .PAST>>
+ <RETURN>)>)>)
+ (<AND <OR ,COR-ALL-DIRS
+ <NOT <==? .DIR ,PLAYER-NOT-FACING>>>
+ <OR <EQUAL? .OBJ ,BRIEFCASE>
+ <GETP .OBJ ,P?CHARACTER>>
+ <OR .COR
+ <==? .NCAR <GETP .OBJ ,P?CAR>>>
+ <NOT <FSET? .OBJ ,NDESCBIT ;INVISIBLE>>
+ <OR .GRAB
+ <NOT <IN-MOTION? .OBJ>>>>
+ <COND (<NOT <ZERO? .GRAB>>
+ <COND (<SET X <GRAB-ATTENTION .OBJ>>
+ <FCLEAR .OBJ ,TOUCHBIT>
+ <PUTP .OBJ ,P?LDESC 21 ;"listening ...">
+ <TELL CHE .OBJ turn " toward you." CR>)>
+ <COND (<NOT .Y> <SET Y .X>)>)
+ (<COR-ADD-PER .OBJ .DIR> T)
+ (T
+ ;<HE-SHE-IT .OBJ T "is">
+ <TELL CHE .OBJ is>
+ <WHERE? .OBJ .DIR>
+ <TELL "." CR>)>)>
+ <SET OBJ <NEXT? .OBJ>>
+ <COND (<ZERO? .OBJ> <RETURN>)>>
+ <COND (<NOT <ZERO? .FOUND>>
+ <RETURN .FOUND>)>)>
+ <SET CNT <+ .CNT 1>>>>
+
+;<ROUTINE CLEAR-TABLES (TBL "AUX" LEN T L)
+ <SET LEN <GET .TBL 0>>
+ <REPEAT ()
+ <SET T <GET .TBL .LEN>>
+ <SET L <GET .T 0>>
+ <REPEAT ()
+ <PUT .T .L 0>
+ <COND (<DLESS? L 1> <RETURN>)>>
+ <COND (<DLESS? LEN 1> <RETURN>)>>>
+
+<ROUTINE COR-ADD-PER (PER DIR "AUX" T L)
+ <COND (<NOT <SET L <ZMEMQ .DIR ,COR-DIR-TBL>>>
+ <RFALSE>)>
+ <SET T <GET ,COR-PER-TBLS .L>>
+ <SET L <GET .T 0>>
+ <REPEAT ()
+ <COND (<ZERO? <GET .T .L>>
+ <PUT .T .L .PER>
+ <RTRUE>)
+ (<DLESS? L 1>
+ <RFALSE>)>>>
+
+<ROUTINE COR-TELL-PER ("AUX" TBL LEN T L FIRST P OP NUM)
+ <SET TBL ,COR-PER-TBLS>
+ <SET LEN <GET .TBL 0>>
+ <REPEAT ()
+ <SET T <GET .TBL .LEN>>
+ <SET L <GET .T 0>>
+ <SET FIRST T>
+ <SET NUM 0>
+ <REPEAT ()
+ <COND (<NOT <ZERO? <SET P <GET .T .L>>>>
+ <SET OP .P>
+ <INC NUM>
+ <PUT .T .L 0>
+ <COND (.FIRST
+ <SET FIRST <>>
+ <TELL CTHE .P>)
+ (T
+ <COND (<OR <1? .L>
+ <ZERO? <GET .T <- .L 1>>>>
+ <TELL " and">)
+ (T <TELL ",">)>
+ <TELL THE .P>
+ <THIS-IS-IT .P>)>)>
+ <COND (<DLESS? L 1>
+ <COND (<0? .NUM> <RETURN>)
+ (<AND <1? .NUM>
+ <NOT <FSET? .OP ,PLURALBIT>>>
+ <TELL " is">)
+ (T <TELL " are">)>
+ <WHERE? .OP <GET ,COR-DIR-TBL .LEN>>
+ <TELL "." CR>
+ <RETURN>)>>
+ <COND (<DLESS? LEN 1> <RETURN>)>>>
+
+<GLOBAL COR-DIR-TBL <PLTABLE P?NORTH P?SOUTH P?EAST P?WEST>>
+<GLOBAL COR-PER-TBLS
+ <PLTABLE <LTABLE 0 0 0 0 0>
+ <LTABLE 0 0 0 0 0>
+ <LTABLE 0 0 0 0 0>
+ <LTABLE 0 0 0 0 0>>>
+
+<ROUTINE IN-MOTION? (PERSON "OPTIONAL" (DISABLED-OK <>) "AUX" GT L F C)
+ <COND (<EQUAL? .PERSON ,BOND> <RTRUE>)>
+ <SET C <GETP .PERSON ,P?CHARACTER>>
+ <COND (<==? ,EXTRA-C .C>
+ <COND (<NOT <==? .PERSON <GET ,GLOBAL-CHARACTER-TABLE .C>>>
+ <RFALSE>)
+ (.DISABLED-OK <RTRUE>)
+ ;(T <RTRUE>)>)>
+ <SET GT <GET ,GOAL-TABLES .C>>
+ <COND (<AND <GET .GT ,GOAL-S>
+ <NOT <==? <SET L <LOC .PERSON>>
+ <SET F <GET .GT ,GOAL-F>>>>>
+ <COND (.DISABLED-OK <RTRUE>)
+ (<NOT <ZERO? <GET .GT ,GOAL-ENABLE>>>
+ <FOLLOW-GOAL-DIR .L .F .PERSON>)>)>>
+
+<ROUTINE START-MOVEMENT ()
+ <I-EXTRA ,M-OTHER>
+ <ENABLE <QUEUE I-STAR <RANDOM 9>>>
+ <QUEUE G-LEAVE-TRAIN 0>
+ <ENABLE <QUEUE I-CONDUCTOR 1>>
+ <ENABLE <QUEUE I-FOLLOW -1>>
+ <ENABLE <QUEUE I-ATTENTION -1>>
+ <QUEUE I-LEAVE-TRAIN 0>
+ <ENABLE <QUEUE I-TICKETS-PLEASE -1>>>
+
+"Goal tables for the characters, offset by a constant,
+which, for a given character, is the P?CHARACTER property of the object."
+
+<GLOBAL GOAL-TABLES
+ <PTABLE <TABLE <> <> <> 1 <> I-PLAYER 5 0 0 I-PLAYER>
+ <TABLE <> <> <> 1 <> I-CONDUCTOR 5 0 0 I-CONDUCTOR>
+ <TABLE <> <> <> 1 <> I-WAITER 5 0 0 I-WAITER>
+ <TABLE <> <> <> 1 <> I-COOK 5 0 0 I-COOK>
+ <TABLE <> <> <> 1 <> I-EXTRA 5 0 0 I-EXTRA>
+ <TABLE <> <> <> 1 <> I-BOND 5 0 0 I-BOND>
+ <TABLE <> <> <> 1 <> I-STAR 5 0 0 STOP-WALKING-F>
+ <TABLE <> <> <> 1 <> I-STAR 5 0 0 STOP-WALKING-F>
+ <TABLE <> <> <> 1 <> I-STAR 5 0 0 STOP-WALKING-F>
+ <TABLE <> <> <> 1 <> I-STAR 5 0 0 STOP-WALKING-F>
+ <TABLE <> <> <> 1 <> I-STAR 5 0 0 STOP-WALKING-F>
+ <TABLE <> <> <> 1 <> I-STAR 5 0 0 STOP-WALKING-F>
+ <TABLE <> <> <> 1 <> I-GUARD 5 0 0 I-GUARD>
+ <TABLE <> <> <> 1 <> I-STAR 5 0 0 STOP-WALKING-F>
+ <TABLE <> <> <> 1 <> I-STAR 5 0 0 STOP-WALKING-F>>>
+[
+"Offsets into GOAL-TABLEs"
+
+<CONSTANT GOAL-F 0> "final goal"
+<CONSTANT GOAL-S 1> "station of final goal"
+<CONSTANT GOAL-I 2> "intermediate goal (transfer point)"
+<CONSTANT GOAL-ENABLE 3> "character can move: 0=no 1=slow 2=fast"
+<CONSTANT GOAL-QUEUED 4> "secondary goal to go to when proper car reached"
+<CONSTANT GOAL-FUNCTION 5> "routine to apply on arrival"
+<CONSTANT ATTENTION-SPAN 6> "how long character will wait when interrupted"
+<CONSTANT ATTENTION 7> "used to count down from ATTENTION-SPAN to 0"
+<CONSTANT GOAL-CAR 8> "car number to go with GOAL-QUEUED"
+<CONSTANT GOAL-SCRIPT 9> "second routine to apply on arrival"
+]
+"Goal-function constants, similar to M-xxx in MAIN"
+
+<CONSTANT G-REACHED 1>
+<CONSTANT G-ENROUTE 2>
+<CONSTANT G-IMPATIENT 3>
+<CONSTANT G-DEBUG 4>
+
+"Movement etc."
+
+<ROUTINE ESTABLISH-GOAL (PERSON GOAL "OPTIONAL" (WALK-TRAIN 0)
+ "AUX" HERE HL GL GT)
+ <COND (<ZERO? .PERSON>
+ <TELL
+"[!! E-G: PERSON=0, GOAL=" D .GOAL ", W-T=" N .WALK-TRAIN ".]" CR>)>
+ <SET HERE <LOC .PERSON>>
+ ;<COND (<==? .HERE .GOAL>
+ <RETURN .HERE>)>
+ <SET GT <GT-O .PERSON>>
+ <PUT .GT ,GOAL-I <+ <* <- <GETP .HERE ,P?LINE> 1> ,GOAL-I-MULTIPLIER>
+ <* <- <GETP .GOAL ,P?LINE> 1> 2>>>
+ <PUT .GT ,GOAL-S <GETP .GOAL ,P?STATION>>
+ <PUT .GT ,GOAL-F .GOAL>
+ ;"WALK-TRAIN: 0=normal, 1=continuing walk, 2=finishing walk"
+ <COND (<EQUAL? 2 .WALK-TRAIN>
+ <PUT .GT ,GOAL-FUNCTION <GET .GT ,GOAL-SCRIPT>>)>
+ <COND (<AND <ZERO? .WALK-TRAIN>
+ <NOT <EQUAL? .PERSON;,PLAYER ,CONDUCTOR ,CUSTOMS-AGENT>>>
+ <FCLEAR .PERSON ,TOUCHBIT>
+ <PUTP .PERSON ,P?LDESC 13 ;"about to leave">)>
+ <LOC .PERSON>>
+
+<ROUTINE ESTABLISH-GOAL-TRAIN (PERSON GOAL CAR "AUX" GT CARH)
+ <COND (<OR <EQUAL? <LOC .PERSON> ,BESIDE-TRACKS ,OTHER-BESIDE-TRACKS>
+ <ZMEMQ <LOC .PERSON> ,STATION-ROOMS>>
+ <TELL "[!! " D .PERSON " not on train!]" CR>
+ <RTRUE>)>
+ <SET CARH <GETP .PERSON ,P?CAR>>
+ <SET GT <GT-O .PERSON>>
+ <COND (<NOT <==? .CAR .CARH>>
+ <PUT .GT ,GOAL-CAR .CAR>
+ <PUT .GT ,GOAL-QUEUED .GOAL>
+ <PUT .GT ,GOAL-FUNCTION ,I-WALK-TRAIN>
+ <COND (<L? .CAR .CARH>
+ <SET GOAL <L-FWD .CARH>>)
+ (T <SET GOAL <L-REAR .CARH>>)>)
+ (T
+ <PUT .GT ,GOAL-FUNCTION <GET .GT ,GOAL-SCRIPT>>
+ <COND (<NOT <EQUAL? .CAR ,CAR-HERE ,DINER-CAR ,FANCY-CAR>>
+ <SET GOAL <GETP .GOAL ,P?OTHER>>)>)>
+ <ESTABLISH-GOAL .PERSON .GOAL>>
+
+<GLOBAL GOAL-PERSON <>>
+<ROUTINE GOAL-REACHED (PERSON "AUX" GT)
+ <SET GT <GT-O .PERSON>>
+ <COND (<AND <NOT <EQUAL? .PERSON ,CONDUCTOR ,CUSTOMS-AGENT ,BAD-SPY>>
+ <NOT <==? ,I-WALK-TRAIN <GET .GT ,GOAL-FUNCTION>>>>
+ <NEW-LDESC .PERSON>)>
+ <COND (<EQUAL? <LOC .PERSON> ,BOOTH-1 ,BOOTH-2 ,BOOTH-3>
+ <COND (<EQUAL? ,HERE ,PANTRY>
+ <TELL "A concealed bell tinkles merrily." CR>)
+ (<IN? ,WAITER ,PANTRY>
+ <ESTABLISH-GOAL ,WAITER <LOC .PERSON>>)>)>
+ <COND (<GET .GT ,GOAL-S>
+ <PUT .GT ,GOAL-S <>>
+ <SETG GOAL-PERSON .PERSON>
+ <D-APPLY "Reached" <GET .GT ,GOAL-FUNCTION> ,G-REACHED>)>>
+
+<ROUTINE ENTERS? (DIR OWHERE)
+ <COND (<==? .DIR ,P?IN> <RTRUE>)
+ (<NOT <ZMEMQ ,HERE ,CAR-ROOMS-CORRID>> <RFALSE>)
+ (<ZMEMQ .OWHERE ,CAR-ROOMS-COMPS> <RTRUE>)
+ (<EQUAL? .OWHERE ,BOOTH-1 ,BOOTH-2 ,BOOTH-3> <RTRUE>)
+ (<ZMEMQ .OWHERE ,CAR-ROOMS-REST> <RTRUE>)>>
+
+<ROUTINE TELL-THE-NOT-OTHER (RM)
+ <COND (<OR <ZMEMQ .RM ,STATION-ROOMS>
+ <ZMEMQ .RM ,CAR-ROOMS-DINER>
+ <ZMEMQ .RM ,CAR-ROOMS-FANCY>
+ <ZMEMQ .RM ,CAR-ROOMS>>
+ <TELL THE .RM>)
+ (T <TELL THE <GETP .RM ,P?OTHER>>)>>
+
+<ROUTINE DESCRIBE-MOVER? (PERSON)
+ <COND (<AND <VERB? EXAMINE> <==? ,PRSO .PERSON>>
+ <RFALSE>)
+ (<VERB? WAIT-FOR WAIT-UNTIL>
+ <RFALSE>)
+ (<NOT <FSET? .PERSON ,ONBIT>>
+ <RFALSE>)
+ (<NOT <EQUAL? .PERSON ,CONDUCTOR>>
+ <RTRUE>)
+ (<NOT <EQUAL? <GETP .PERSON ,P?LDESC> 19 ;"making his rounds">>
+ <RTRUE>)
+ (T <RFALSE>)>>
+
+<ROUTINE MOVE-PERSON (PERSON WHERE "OPTIONAL" (LIMBO? <>)
+ "AUX" DIR (GT <>) OL COR PCOR CHR OWHERE
+ (DOOR <>) (VAL <>) X CAR NCAR)
+ ;#DECL ((PERSON WHERE) OBJECT)
+ <SET CHR <GETP .PERSON ,P?CHARACTER>>
+ <SET CAR <GETP .PERSON ,P?CAR>>
+ <SET NCAR .CAR>
+ <COND (T ;.CHR <SET GT <GET ,GOAL-TABLES .CHR>>)>
+ <SET OL <LOC .PERSON>>
+ <SET DIR <DIR-FROM .OL .WHERE>>
+ <SET OWHERE .WHERE>
+ <COND (<OR <EQUAL? .OL ,VESTIBULE-FWD ,VESTIBULE-FWD-DINER>
+ <EQUAL? .OL ,OTHER-VESTIBULE-FWD ,VESTIBULE-FWD-FANCY>>
+ <COND (<OR <EQUAL? .WHERE ,LIMBO-FWD ,LIMBO-FWD-FANCY>
+ <EQUAL? .WHERE ,OTHER-LIMBO-FWD ,LIMBO-FWD-DINER>>
+ <DEC NCAR>
+ <SET OWHERE <V-REAR .NCAR>>)>)
+ (<OR <EQUAL? .OL ,VESTIBULE-REAR ,VESTIBULE-REAR-DINER>
+ <EQUAL? .OL ,OTHER-VESTIBULE-REAR ,VESTIBULE-REAR-FANCY>>
+ <COND (<OR <EQUAL? .WHERE ,LIMBO-REAR ,LIMBO-REAR-FANCY>
+ <EQUAL? .WHERE ,OTHER-LIMBO-REAR,LIMBO-REAR-DINER>>
+ <INC NCAR>
+ <SET OWHERE <V-FWD .NCAR>>)>)>
+ <COND (<AND <NOT <ZERO? .DIR>>
+ <SET X <GETPT .OL .DIR>>
+ <==? <PTSIZE .X> ,DEXIT>>
+ <SET DOOR <GET-DOOR-OBJ .X>>
+ ;<COND (<ZMEMQ .OL ,CAR-ROOMS-REST>
+ <SET DOOR <>>)>)>
+ <COND (<EQUAL? .PERSON ,PLAYER>
+ <COND (<SET OL <COMPASS-EQV ,HERE .DIR>>
+ ;<SETG PLAYER-NOT-FACING-OLD ,PLAYER-NOT-FACING>
+ <SETG PLAYER-NOT-FACING <OPP-DIR .OL>>)>
+ <COND (<AND .DOOR <NOT <WALK-THRU-DOOR? .X>>>
+ <CRLF>
+ <RFATAL>)>)
+ (<FSET? .PERSON ,NDESCBIT ;INVISIBLE> T)
+ (<PREVENTS-YOU? .OL .DIR .PERSON>
+ <COND (<VISIBLE? .PERSON>
+ <SET VAL T>
+ <TELL
+CHE ,CONDUCTOR " prevents" THE .PERSON " from passing him." CR>)>)
+ (<==? .OL ,HERE>
+ <COND (<DESCRIBE-MOVER? .PERSON>
+ <FCLEAR .PERSON ,ONBIT> ;"un-special the case"
+ <DESCRIBE-OBJECT .PERSON 0>)>
+ <SET VAL T>
+ <COND (<AND <IN? ,BRIEFCASE .PERSON>
+ <NOT <FSET? ,BRIEFCASE ,SEENBIT>>>
+ <START-SENTENCE .PERSON T>)
+ (T <TELL CHE .PERSON>)>
+ <COND (<AND <==? .PERSON ,CONDUCTOR> ,TOUCH-CAP?>
+ <SETG TOUCH-CAP? <>>
+ <TELL " touches a finger to his cap and">)>
+ <COND (.DOOR
+ ;<HE-SHE-IT .PERSON -1 "open">
+ <TELL V .PERSON open HIM .DOOR " for a moment and">)>
+ <COND (<OR <==? .DIR ,P?OUT>
+ <ZMEMQ ,HERE ,CAR-ROOMS-COMPS>
+ <EQUAL? ,HERE ,BOOTH-1 ,BOOTH-2 ,BOOTH-3>>
+ <TELL V .PERSON leave "." CR>)
+ (<AND ;.DOOR <ENTERS? .DIR .OWHERE>>
+ ;<HE-SHE-IT .PERSON -1 "enter">
+ <TELL V .PERSON enter>
+ <TELL-THE-NOT-OTHER .OWHERE>
+ <COND (<AND .DOOR <FSET? .DOOR ,LOCKED>>
+ <TELL ", locking the door">)>
+ <TELL "." CR>)
+ (<AND <==? .CAR ,CAR-MAX>
+ <EQUAL? .OL ,VESTIBULE-REAR>
+ <EQUAL? .WHERE ,LIMBO-REAR>>
+ <TELL
+V .PERSON check HIS .PERSON " pocket for a minute." CR>)
+ (T
+ <TELL V .PERSON head C !\ >
+ <COND (<NOT <EQUAL? .DIR ,P?UP ,P?DOWN>>
+ <TELL "off to ">)>
+ <DIR-PRINT .DIR>
+ <COND (<AND .DOOR <FSET? .DOOR ,LOCKED>>
+ <TELL ", locking the door" ;" again">)>
+ <TELL "." CR>)>)
+ (<==? .OWHERE ,HERE>
+ <COND (<OR <NOT .GT>
+ <NOT <==? ,HERE <GET .GT ,GOAL-F>>>>
+ <COND (<OR <AND ,TICKETS-PUNCHED? <NOT ,CUSTOMS-SWEEP>>
+ <NOT <==? .PERSON ,CONDUCTOR>>>
+ <SET VAL T ;,M-FATAL>
+ <START-SENTENCE .PERSON T>
+ <COND (.DOOR
+ <TELL
+V .PERSON open HIM .DOOR " for a moment and">)>
+ <TELL V .PERSON walk C !\ >
+ <COND (<AND <VERB? WALK>
+ ;<==? .OWHERE ,HERE>
+ <==? .OL ,LAST-PLAYER-LOC>>
+ <TELL "along with you">)
+ (T
+ <TELL "past you">
+ <COND (<NOT <EQUAL? .DIR ,P?IN ,P?OUT>>
+ <TELL " from ">
+ <DIR-PRINT <OPP-DIR .DIR>>)>)>
+ <TELL "." CR>)>)>)
+ (<SET COR <GETP ,HERE ,P?CORRIDOR>>
+ <SET PCOR <CORRIDOR-LOOK .PERSON .CAR>>
+ <COND (<NOT <EQUAL? .PCOR ,FALSE-VALUE ,PLAYER-NOT-FACING>>
+ <COND (<EQUAL? <CORRIDOR-LOOK .OWHERE .NCAR>
+ ,FALSE-VALUE ,PLAYER-NOT-FACING>
+ <SET VAL T>
+ <COND (<AND <EQUAL? .PERSON ,P-HER-OBJECT>
+ <FSET? ,HER ,TOUCHBIT>>
+ <TELL "She">)
+ (<AND <EQUAL? .PERSON ,P-HIM-OBJECT>
+ <FSET? ,HIM ,TOUCHBIT>>
+ <TELL "He">)
+ (<AND <EQUAL? .PERSON ,P-THEM-OBJECT>
+ <FSET? ,THEM ,TOUCHBIT>>
+ <TELL "They">)
+ (T
+ <COND (<NOT <START-SENTENCE .PERSON T>>
+ <TELL ",">)>
+ <WHERE? .PERSON .PCOR>
+ <TELL ",">)>
+ <COND (.DOOR
+ ;<HE-SHE-IT .PERSON -1 "open">
+ <TELL
+V .PERSON open HIM .DOOR " for a moment and">)>
+ <COND (<AND ;.DOOR <ENTERS? .DIR .OWHERE>>
+ <TELL V .PERSON enter>
+ <TELL-THE-NOT-OTHER .OWHERE>)
+ (T
+ <TELL V .PERSON disappear C !\ >
+ <COND (<NOT <EQUAL? .DIR ,P?UP ,P?DOWN>>
+ <TELL "to ">)>
+ <DIR-PRINT .DIR>)>
+ <COND (<AND .DOOR <FSET? .DOOR ,LOCKED>>
+ <TELL ", locking the door" ;" again">)>
+ <TELL "." CR>)
+ (T
+ <SET VAL T>
+ <START-SENTENCE .PERSON T>
+ ;<HE-SHE-IT .PERSON -1 "is">
+ <TELL V .PERSON is>
+ <WHERE? .PERSON .PCOR>
+ <TELL ", heading ">
+ <COND (<==? .PCOR .DIR>
+ <TELL "away from you">)
+ (<==? .PCOR <OPP-DIR .DIR>>
+ <TELL "toward you">)
+ (T
+ <COND (<NOT <EQUAL? .DIR ,P?UP ,P?DOWN>>
+ <TELL "toward ">)>
+ <DIR-PRINT .DIR>)>
+ <TELL "." CR>)>)
+ (<NOT <EQUAL? <SET PCOR <CORRIDOR-LOOK .OWHERE .NCAR>>
+ ,FALSE-VALUE ,PLAYER-NOT-FACING>>
+ <SET VAL T>
+ <WHERE? .PERSON .PCOR T>
+ ;<TELL "To ">
+ ;<DIR-PRINT .PCOR>
+ <TELL HE .PERSON>
+ <COND (<AND <IN? ,BRIEFCASE .PERSON>
+ <NOT <FSET? ,BRIEFCASE ,SEENBIT>>>
+ <FSET ,BRIEFCASE ,SEENBIT>
+ <TELL ", carrying" HIM ,BRIEFCASE ",">)>
+ ;<HE-SHE-IT .PERSON -1 "appear">
+ <TELL V .PERSON appear>
+ <SET DIR <DIR-FROM .OWHERE .OL>>
+ <COND (<NOT <EQUAL? .DIR ,P?IN>>
+ <TELL " from">
+ <TELL-THE-NOT-OTHER .OL>
+ ;<DIR-PRINT .DIR>)>
+ <TELL "." CR>)>)>
+ <COND (<ZERO? .PERSON> <TELL "[PERSON=0!]" CR>)
+ (T
+ <COND (<ON-PLATFORM? .WHERE>
+ <PUTP .PERSON ,P?CAR <GETP .WHERE ,P?CAR>>)>
+ <MOVE .PERSON .WHERE>)>
+ <COND (<NOT <==? .PERSON ,PLAYER>>
+ ;<FCLEAR .PERSON ,TOUCHBIT>
+ <COND (<OR <==? .PERSON ,PEEKER>
+ <AND <==? .PERSON ,BAD-SPY>
+ <NOT ,BAD-SPY-DONE-PEEKING>>>
+ <PUTP .PERSON ,P?LDESC ,PEEKING-CODE>)
+ (<NOT <EQUAL? .PERSON ,CONDUCTOR ,CUSTOMS-AGENT>>
+ <PUTP .PERSON ,P?LDESC 14 ;"walking along">)>)>
+ <COND (.GT
+ <COND (<==? <GET .GT ,GOAL-F> ;.OWHERE .WHERE>
+ <SET VAL <GOAL-REACHED .PERSON>>
+ <COND (<AND <NOT .VAL>
+ <NOT <==? ,I-WALK-TRAIN
+ <GET .GT ,GOAL-FUNCTION>>>
+ <==? ,HERE .WHERE ;.OWHERE>
+ <NOT <FSET? .PERSON ,NDESCBIT ;INVISIBLE>>>
+ <SET VAL T ;,M-FATAL>
+ ;<HE-SHE-IT .PERSON 1 "stop">
+ <TELL CHE .PERSON stop " here." CR>)>)
+ (T
+ <SETG GOAL-PERSON .PERSON>
+ <SET VAL <D-APPLY "Enroute" <GET .GT ,GOAL-FUNCTION>
+ ,G-ENROUTE>>)>)>
+ <COND (,DEBUG
+ <TELL "[">
+ ;<TELL THE .PERSON" just went into (car #"N .NCAR")"THE .WHERE>
+ ;<COND (<ON-PLATFORM? .WHERE>
+ <TELL " (" N <GETP .WHERE ,P?CAR> ")">)>
+ <TELL-$WHERE .PERSON .WHERE>
+ <TELL "]" CR>)>
+ <COND (.VAL <THIS-IS-IT .PERSON>)>
+ .VAL>
+
+<ROUTINE DIR-FROM (HERE THERE "AUX" (V <>) P D)
+ <SET P <ON-PLATFORM? .HERE>>
+ <SET D <ON-PLATFORM? .THERE>>
+ <COND (<AND .P .D>
+ <COND (<L? .P .D> <RETURN ,P?SOUTH>)
+ (<G? .P .D> <RETURN ,P?NORTH>)
+ (T <RFALSE>)>)
+ (<AND <EQUAL? .THERE ,ROOF ,OTHER-ROOF>
+ <OR <EQUAL? .HERE ,VESTIBULE-REAR-FANCY>
+ <EQUAL? .HERE ,VESTIBULE-REAR ,VESTIBULE-REAR-DINER
+ ,OTHER-VESTIBULE-REAR>>>
+ <RETURN ,P?UP>)
+ (<AND <EQUAL? .HERE ,ROOF ,OTHER-ROOF>
+ <OR <EQUAL? .THERE ,VESTIBULE-REAR-FANCY>
+ <EQUAL? .THERE ,VESTIBULE-REAR ,VESTIBULE-REAR-DINER
+ ,OTHER-VESTIBULE-REAR>>>
+ <RETURN ,P?DOWN>)
+ (<AND <OR .P <EQUAL? .HERE ,BESIDE-TRACKS ,OTHER-BESIDE-TRACKS>>
+ <OR <EQUAL? .THERE ,VESTIBULE-REAR-FANCY>
+ <EQUAL? .THERE ,VESTIBULE-REAR ,VESTIBULE-REAR-DINER
+ ,OTHER-VESTIBULE-REAR>>>
+ <RETURN ,P?UP>)
+ (<AND <OR .D <EQUAL? .THERE ,BESIDE-TRACKS ,OTHER-BESIDE-TRACKS>>
+ <OR <EQUAL? .HERE ,VESTIBULE-REAR-FANCY>
+ <EQUAL? .HERE ,VESTIBULE-REAR ,VESTIBULE-REAR-DINER
+ ,OTHER-VESTIBULE-REAR>>>
+ <RETURN ,P?DOWN>)
+ (<OR <AND <EQUAL? .HERE ,VESTIBULE-FWD-DINER
+ ,VESTIBULE-FWD-FANCY ,VESTIBULE-FWD>
+ <OR <EQUAL? .THERE ,VESTIBULE-REAR-FANCY ,VESTIBULE-REAR>
+ <EQUAL? .THERE ,VESTIBULE-REAR-DINER
+ ,OTHER-VESTIBULE-REAR>
+ <EQUAL? .THERE ,LIMBO-FWD-DINER
+ ,LIMBO-FWD-FANCY ,LIMBO-FWD>>>
+ <AND <EQUAL? .HERE ,OTHER-VESTIBULE-FWD>
+ <EQUAL? .THERE ,OTHER-LIMBO-FWD>>>
+ <RETURN ,P?NORTH>)
+ (<OR <AND <EQUAL? .HERE ,VESTIBULE-REAR-DINER
+ ,VESTIBULE-REAR-FANCY ,VESTIBULE-REAR>
+ <OR <EQUAL? .THERE ,VESTIBULE-FWD-FANCY ,VESTIBULE-FWD>
+ <EQUAL? .THERE ,VESTIBULE-FWD-DINER ,OTHER-VESTIBULE-FWD>
+ <EQUAL? .THERE ,LIMBO-REAR-DINER
+ ,LIMBO-REAR-FANCY ,LIMBO-REAR>>>
+ <AND <EQUAL? .HERE ,OTHER-VESTIBULE-REAR>
+ <EQUAL? .THERE ,OTHER-LIMBO-REAR>>>
+ <RETURN ,P?SOUTH>)>
+ <COND (<DIR-FROM-TEST .HERE .THERE ,P?IN> <RETURN ,P?IN>)
+ (<DIR-FROM-TEST .HERE .THERE ,P?OUT> <RETURN ,P?OUT>)>
+ <SET P 0>
+ <REPEAT ()
+ <COND (<L? <SET P <NEXTP .HERE .P>> ,LOW-DIRECTION>
+ <RETURN .V>)
+ (<SET D <DIR-FROM-TEST .HERE .THERE .P>>
+ <COND (<AND <L? .D ,LOW-DIRECTION> <NOT .V>>
+ <SET V .P>)
+ (T <RETURN .P>)>)>>>
+
+<ROUTINE DIR-FROM-TEST (HERE THERE P "AUX" L TBL)
+ <COND (<ZERO? <SET TBL <GETPT .HERE .P>>>
+ <RFALSE>)>
+ <SET L <PTSIZE .TBL>>
+ <COND (<AND <EQUAL? .L ,DEXIT ,UEXIT ,CEXIT>
+ <==? <GET-REXIT-ROOM .TBL> .THERE>>
+ <RETURN .P>)
+ ;(<EQUAL? .L ,FEXIT>
+ <RTRUE>)>>
+
+<ROUTINE I-FOLLOW ("OPTIONAL" (GARG <>) "AUX" (FLG <>) (CNT 0) GT VAL)
+ <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[I-FOLLOW:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> ,CHARACTER-MAX>
+ <RETURN>)
+ (<AND <GET <SET GT <GET ,GOAL-TABLES .CNT>> ,GOAL-S>
+ <OR <NOT <ZERO? <GET .GT ,GOAL-ENABLE>>>
+ ;<0? <GET .GT ,ATTENTION>>>>
+ ;<PUT .GT ,GOAL-ENABLE 1>
+ <COND (<SET VAL
+ <FOLLOW-GOAL <GET ,CHARACTER-TABLE .CNT>>>
+ <COND (<NOT <==? .FLG ,M-FATAL>>
+ ;<TELL
+"[!! CHAR=" D <GET ,CHARACTER-TABLE .CNT> ", CNT=" N .CNT "]" CR>
+ <SET FLG .VAL>)>)>)>>
+ <COND (,IDEBUG <TELL N .FLG "]" CR>)>
+ .FLG>
+
+<ROUTINE I-PLAYER (ARG "AUX" VAL)
+ ;<SETG LAST-PLAYER-LOC ,HERE>
+ <SETG HERE <LOC ,PLAYER>>
+ <COND (<ZMEMQ ,HERE ,STATION-ROOMS>
+ <NEXT-CAR-SWITCHEROO ,CAR-HERE <GETP ,HERE ,P?CAR>>)>
+ <COND (<==? .ARG ,G-ENROUTE>
+ <SET VAL <FIND-FLAG-HERE-NOT ,PERSONBIT ,NDESCBIT ,PLAYER>>
+ <COND (<AND .VAL
+ <OR <==? ,NOW-LURCHING ,PRESENT-TIME> <PROB 50>>>
+ <COND (<ZERO? <GETP .VAL ,P?LDESC>>
+ <NEW-LDESC .VAL>)>
+ <COND (<DIR-FROM ,HERE ,LAST-PLAYER-LOC>
+ <TELL "You have just started walking, when">)
+ (T <TELL
+"You walk along as far as" THE ,HERE ", where">)>
+ <COND (<==? ,NOW-LURCHING ,PRESENT-TIME>
+ <COND (<==? .VAL ,PICKPOCKET> <PICK-POCKET .VAL>)>
+ <TELL
+" the train lurches, and" HE .VAL bump " into you." CR>)
+ (T
+ <TELL HE .VAL get " in your way." CR>)>
+ ;<TELL " at this point." CR>)
+ (T
+ ;<TELL "(" D ,HERE ")" CR>
+ ;<APPLY <GETP ,HERE ,P?ACTION> ,M-ENTER>
+ <RFALSE>)>)
+ (<==? .ARG ,G-REACHED>
+ <RTRUE>)>>
+
+<ROUTINE PICK-POCKET (PER "AUX" X Y)
+ <COND (<L? 2 <CCOUNT ,PLAYER>> ;<PROB 20>
+ <COND (<NOT <SET X <FIRST? ,PLAYER>>>
+ <RFALSE>)>)
+ (T
+ <COND (<NOT <SET X <FIRST? ,POCKET>>>
+ <PUTP ,PLAYER ,P?SOUTH 0>
+ <RFALSE>)>)>
+ <COND (<SET Y <NEXT? .X>>
+ <SET X .Y>)>
+ <COND (<AND <NOT <EQUAL? .X ,BRIEFCASE>>
+ <NOT <FSET? .X ,WORNBIT>>>
+ <FSET .X ,NDESCBIT>
+ <MOVE .X .PER>)>>
+
+<ROUTINE I-LEAVE-TRAIN ("OPTIONAL" (GARG <>) "AUX" (VAL <>) X)
+ <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[I-LEAVE-TRAIN:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>
+ <SET X ,LEAVE-TRAIN-PERSON>
+ <COND (<ZERO? .X>
+ <SET VAL <LEAVE-TRAIN ,VESTIBULE-REAR>>
+ <COND (<LEAVE-TRAIN ,VESTIBULE-REAR-DINER>
+ <SET VAL T>)>
+ <COND (<LEAVE-TRAIN ,VESTIBULE-REAR-FANCY>
+ <SET VAL T>)>
+ <COND (<LEAVE-TRAIN ,OTHER-VESTIBULE-REAR>
+ <SET VAL T>)>)
+ (T
+ <COND (<==? -1 .X> <SET X <GETP ,BAD-SPY ,P?CAR>>)
+ (T <SET X <GETP .X ,P?CAR>>)>
+ <COND (,IN-STATION
+ <SET VAL <GET ,STATION-ROOMS .X>>) ;"? CAR-MAX"
+ (<==? .X ,CAR-HERE>
+ <SET VAL ,BESIDE-TRACKS>)
+ (T <SET VAL ,OTHER-BESIDE-TRACKS>)>
+ <COND (<==? -1 ,LEAVE-TRAIN-PERSON>
+ <SET VAL <MOVE-PERSON ,BAD-SPY <V-REAR .X>>>)
+ (T
+ <SET VAL <MOVE-PERSON ,LEAVE-TRAIN-PERSON .VAL>>)>)>
+ <COND (,IDEBUG <TELL N .VAL "]" CR>)>
+ .VAL>
+
+<GLOBAL LEAVE-TRAIN-PERSON <>>
+
+<ROUTINE LEAVE-TRAIN (RM "AUX" PER NXT (VAL <>))
+ <SET PER <FIRST? .RM>>
+ <REPEAT ()
+ <COND (<ZERO? .PER> <RETURN .VAL>)
+ (<OR <NOT <FSET? .PER ,PERSONBIT>>
+ <FSET? .PER ,MUNGBIT>
+ <NOT <==? ,G-LEAVE-TRAIN
+ <GET <GT-O .PER> ,GOAL-FUNCTION>>>>
+ <SET PER <NEXT? .PER>>
+ <AGAIN>)
+ (T
+ <SET NXT <NEXT? .PER>>
+ <COND (<MOVE-PERSON .PER<GET ,STATION-ROOMS<GETP .PER ,P?CAR>>>
+ <SET VAL T>)>
+ <SET PER .NXT>)>>>
+
+<ROUTINE G-LEAVE-TRAIN ("OPTIONAL" (GARG <>) "AUX" L (VAL <>) P GT)
+ <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[G-LEAVE-TRAIN:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>
+ <SET L <LOC ,GOAL-PERSON>>
+ <COND (<==? .GARG ,G-REACHED>
+ <COND (<OR <EQUAL? .L ,VESTIBULE-REAR-FANCY ,VESTIBULE-REAR-DINER>
+ <EQUAL? .L ,VESTIBULE-REAR ,OTHER-VESTIBULE-REAR>>
+ <SET P <GETP ,GOAL-PERSON ,P?CAR>>
+ <COND (<G? .P ,PLATFORM-MAX> <SET P ,PLATFORM-MAX>)>
+ ;<SET VAL <MOVE-PERSON ,GOAL-PERSON <GET ,STATION-ROOMS .P>>>
+ ;<SETG LEAVE-TRAIN-PERSON ,GOAL-PERSON>
+ <ENABLE <QUEUE I-LEAVE-TRAIN 1>>
+ <SET GT <GT-O ,GOAL-PERSON>>
+ <COND (<EQUAL? <GET .GT ,GOAL-SCRIPT>
+ ,I-TRAVELER-FINDS-CONTACT>
+ ;<AND <SPY?>
+ <EQUAL? ,GOAL-PERSON ,BAD-SPY>
+ <EQUAL? ,SCENERY-OBJ ,STATION-FRBZ ,STATION-GOLA>>
+ <PUT .GT ,GOAL-FUNCTION ,I-TRAVELER-FINDS-CONTACT>
+ <ESTABLISH-GOAL ,GOAL-PERSON ,PLATFORM-A ;2>
+ <I-TRAVELER-FINDS-CONTACT ,G-ENROUTE>)
+ (T<ESTABLISH-GOAL ,GOAL-PERSON ,PLATFORM-B ;2>)>)
+ (<EQUAL? .L ,PLATFORM-B>
+ <COND (<VISIBLE? ,GOAL-PERSON>
+ <SET VAL T>
+ <TELL
+CHE ,GOAL-PERSON show HIS ,GOAL-PERSON " passport ">
+ <COND (<IN? ,BRIEFCASE ,GOAL-PERSON>
+ <TELL "and the briefcase ">)>
+ <TELL "to" HIM ,CUSTOMS-AGENT "." CR>)>
+ <ESTABLISH-GOAL ,GOAL-PERSON ,PLATFORM-A ;2>)
+ (<EQUAL? .L ,PLATFORM-A>
+ <PUTP ,GOAL-PERSON ,P?CAR 1>
+ <SET VAL <MOVE-PERSON ,GOAL-PERSON <V-REAR 1>>>
+ <SET P <GETP ,GOAL-PERSON ,P?CHARACTER>>
+ <COND (<AND <SPY?> <EQUAL? .P ,BAD-SPY-C>>
+ <PUT <GET ,GOAL-TABLES ,BAD-SPY-C>
+ ,GOAL-SCRIPT
+ ,I-TRAVELER-PASSED-CUSTOMS>)>
+ <ESTABLISH-GOAL-TRAIN ,GOAL-PERSON
+ <GET ,CHAR-LOCS .P>
+ <GET ,CHAR-CARS .P>>)
+ (T
+ <TELL "[!! LEAVE-TRAIN GOAL? ">
+ <TELL-$WHERE ,GOAL-PERSON .L>
+ ;<TELL D ,GOAL-PERSON "@" D .L>
+ <TELL "]" CR>
+ <SET VAL T>)>)>
+ <COND (,IDEBUG <TELL N .VAL "]" CR>)>
+ .VAL>
+
+<ROUTINE I-WALK-TRAIN ("OPTIONAL" (GARG <>)
+ "AUX" L CAR CARH FCN (VAL <>) GT GOAL)
+ <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[I-WALK-TRAIN:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>
+ <SET L <LOC ,GOAL-PERSON>>
+ <SET GT <GT-O ,GOAL-PERSON>>
+ <SET FCN <GET .GT ,GOAL-SCRIPT>>
+ <SET CAR <GET .GT ,GOAL-CAR>>
+ <SET GOAL <GET .GT ,GOAL-QUEUED>>
+ <COND (<==? .GARG ,G-ENROUTE>
+ <SET VAL <D-APPLY "Enroute" .FCN ,G-ENROUTE>>)
+ (<==? .GARG ,G-REACHED>
+ <SET CARH <GETP ,GOAL-PERSON ,P?CAR>>
+ <COND (<OR <EQUAL? .L ,LIMBO-FWD-FANCY ,LIMBO-FWD>
+ <EQUAL? .L ,LIMBO-FWD-DINER ,OTHER-LIMBO-FWD>>
+ <SET CARH <- .CARH 1>>
+ <PUTP ,GOAL-PERSON ,P?CAR .CARH>
+ <OBJ-TO-NEXT ,GOAL-PERSON .CARH>
+ <MOVE ,GOAL-PERSON <V-REAR .CARH>>
+ ;<SET VAL <MOVE-PERSON ,GOAL-PERSON <V-REAR ;L-REAR .CARH> T>>
+ <COND (<==? .CAR .CARH>
+ ;<PUT .GT ,GOAL-FUNCTION .FCN>
+ <COND (<EQUAL? .GOAL ,VESTIBULE-REAR-DINER
+ ,VESTIBULE-REAR-FANCY
+ ,VESTIBULE-REAR>
+ <SET GOAL <V-REAR .CARH>>)
+ (<EQUAL? .GOAL ,VESTIBULE-FWD-DINER
+ ,VESTIBULE-FWD-FANCY
+ ,VESTIBULE-FWD>
+ <SET GOAL <V-FWD .CARH>>)
+ (<NOT <EQUAL? .CARH
+ ,DINER-CAR ,FANCY-CAR ,CAR-HERE>>
+ <SET GOAL <GETP .GOAL ,P?OTHER>>)>
+ <ESTABLISH-GOAL ,GOAL-PERSON .GOAL 2>)
+ (T
+ <ESTABLISH-GOAL ,GOAL-PERSON <L-FWD .CARH> 1>)>
+ ;.VAL)
+ (<OR <EQUAL? .L ,LIMBO-REAR-FANCY ,LIMBO-REAR>
+ <EQUAL? .L ,LIMBO-REAR-DINER ,OTHER-LIMBO-REAR>>
+ <SET CARH <+ .CARH 1>>
+ <PUTP ,GOAL-PERSON ,P?CAR .CARH>
+ <OBJ-TO-NEXT ,GOAL-PERSON .CARH>
+ <MOVE ,GOAL-PERSON <V-FWD .CARH>>
+ ;<SET VAL <MOVE-PERSON ,GOAL-PERSON <V-FWD ;L-FWD .CARH> T>>
+ <COND (<==? .CAR .CARH>
+ ;<PUT .GT ,GOAL-FUNCTION .FCN>
+ <COND (<EQUAL? .GOAL ,VESTIBULE-REAR-DINER
+ ,VESTIBULE-REAR-FANCY
+ ,VESTIBULE-REAR>
+ <SET GOAL <V-REAR .CARH>>)
+ (<EQUAL? .GOAL ,VESTIBULE-FWD-DINER
+ ,VESTIBULE-FWD-FANCY
+ ,VESTIBULE-FWD>
+ <SET GOAL <V-FWD .CARH>>)
+ (<NOT <EQUAL? .CARH
+ ,DINER-CAR ,FANCY-CAR ,CAR-HERE>>
+ <SET GOAL <GETP .GOAL ,P?OTHER>>)>
+ <ESTABLISH-GOAL ,GOAL-PERSON .GOAL 2>)
+ (T
+ <ESTABLISH-GOAL ,GOAL-PERSON <L-REAR .CARH> 1>)>
+ ;.VAL)
+ (T
+ <TELL "[!! WALK-TRAIN GOAL? ">
+ ;<TELL D ,GOAL-PERSON "@" D .L ", car #" N .CARH>
+ <TELL-$WHERE ,GOAL-PERSON .L>
+ <TELL "]" CR>
+ <SET VAL T>)>)>
+ <COND (,IDEBUG <TELL N .VAL "]" CR>)>
+ .VAL>
+
+<ROUTINE OBJ-TO-NEXT (OBJ CAR "AUX" F N)
+ <SET F <FIRST? .OBJ>>
+ <REPEAT ()
+ <COND (.F <SET N <NEXT? .F>>)
+ (T <RETURN>)>
+ <COND (<GETP .F ,P?CAR>
+ ;<OR <FSET? .F ,TAKEBIT> <FSET? .F ,TRYTAKEBIT>>
+ <PUTP .F ,P?CAR .CAR>
+ <COND (<FIRST? .F>
+ <OBJ-TO-NEXT .F .CAR>)>)>
+ <SET F .N>>>
+
+<GLOBAL LAST-EXTRA-LOC <>>
+
+<ROUTINE I-EXTRA ("OPTIONAL" (GARG <>) "AUX" DEST NCAR EXTRA L VL VLEL)
+ <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[I-EXTRA:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>
+ <SET EXTRA <GET ,CHARACTER-TABLE ,EXTRA-C>>
+ <SET L <LOC .EXTRA>>
+ <SET VL <VISIBLE? .L>>
+ <COND (<AND <ZERO? .GARG>
+ <NOT <==? ,CLERK .EXTRA>>>
+ <COND (<NOT ,ON-TRAIN> ;<ON-PLATFORM? ,HERE>
+ <ENABLE <QUEUE I-EXTRA 1>>
+ <COND (,IDEBUG <TELL "0]" CR>)>
+ <RFALSE>)>
+ <SET NCAR <+ ,CAR-HERE <- <* 2 <RANDOM 2>> 3>>> ;"+-1"
+ <COND (<==? .NCAR ,FANCY-CAR> <DEC NCAR>)>
+ <COND (<L? .NCAR 1> <SET NCAR 1>)
+ (<G? .NCAR ,CAR-MAX> <SET NCAR ,CAR-MAX>)>
+ <COND (<==? .NCAR ,DINER-CAR>
+ <SET DEST <PICK-ONE-BOOTH>>)
+ (T
+ <SET DEST <PICK-ONE ,CAR-ROOMS-COMPS>>)>
+ <COND (<OR ,DEBUG ,IDEBUG>
+ <TELL
+"[GOAL: " D .EXTRA " at " D .L " (car #" N <GETP .EXTRA ,P?CAR>
+") to " D .DEST " (car #" N .NCAR ").]" CR>)>
+ <COND (<AND <==? .NCAR ,GAS-CAR> <==? .DEST ,GAS-CAR-RM>>
+ <SET DEST ,COMPARTMENT-4>)>
+ <PUT <GET ,GOAL-TABLES ,EXTRA-C> ,GOAL-ENABLE 1>
+ <ESTABLISH-GOAL-TRAIN .EXTRA .DEST .NCAR>
+ <COND (,IDEBUG <TELL "0]" CR>)>
+ <RFALSE>)
+ (T
+ <COND (<==? .GARG ,G-ENROUTE>
+ <COND (<EQUAL? .L ,HERE>
+ <SETG LAST-EXTRA-LOC .L>
+ <COND (,IDEBUG
+ <TELL "(EXTRA HERE)">
+ <TELL "1]" CR>)>
+ <RTRUE>)>
+ <SET VLEL <VISIBLE? ,LAST-EXTRA-LOC>>
+ <COND (<AND .VL <NOT .VLEL>>
+ <SETG LAST-EXTRA-LOC .L>
+ <COND (,IDEBUG
+ <TELL "(EXTRA NOW VISIBLE)">
+ <TELL "1]" CR>)>
+ <RTRUE>)
+ (<AND <NOT .VL> .VLEL>
+ <SETG LAST-EXTRA-LOC .L>
+ <COND (,IDEBUG
+ <TELL "(EXTRA NOT VISIBLE)">
+ <TELL "1]" CR>)>
+ <RTRUE>)
+ (T
+ <SETG LAST-EXTRA-LOC .L>
+ <COND (,IDEBUG <TELL "0]" CR>)>
+ <RFALSE>)>)
+ (<==? .GARG ,G-REACHED>
+ <SET EXTRA <GET ,CHARACTER-TABLE ,EXTRA-C>>
+ <NEW-LDESC .EXTRA>)>
+ <COND (<==? ,CAR-HERE ,DINER-CAR>
+ <SET DEST <PICK-ONE-BOOTH>>)
+ (T
+ <SET DEST <PICK-ONE ,CAR-ROOMS-COMPS>>)>
+ <SET EXTRA <CALL-FOR-EXTRA .DEST ,CAR-HERE .EXTRA>>
+ <COND (.EXTRA
+ <SETG LAST-EXTRA-LOC .DEST>
+ <PUT ,CHARACTER-TABLE ,EXTRA-C .EXTRA>
+ <PUT ,GLOBAL-CHARACTER-TABLE ,EXTRA-C .EXTRA>
+ <ENABLE <QUEUE I-EXTRA 1>>)
+ (T
+ <ENABLE <QUEUE I-EXTRA 5>>)>
+ <COND (,IDEBUG <TELL N .VL "]" CR>)>
+ .VL)>>
+
+<GLOBAL LAST-STAR-LOC 0>
+
+<ROUTINE I-STAR ("OPTIONAL" (GARG <>) "AUX" DEST NCAR STAR L VL VLEL)
+ <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[I-STAR:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>
+ <SET STAR ,STAR-C>
+ <COND (<ZERO? .STAR>
+ <SET STAR <PICK-ONE-NOT ,SPY-TABLE ,BAD-SPY ,PEEKER>>
+ <SETG STAR-C <GETP .STAR ,P?CHARACTER>>)
+ (T
+ <SET STAR <GET ,CHARACTER-TABLE .STAR>>)>
+ <SET L <LOC .STAR>>
+ <SET VL <VISIBLE? .L>>
+ <COND (<ZERO? .GARG>
+ <COND (<NOT ,ON-TRAIN>
+ <ENABLE <QUEUE I-STAR 1>>
+ <COND (,IDEBUG <TELL "0]" CR>)>
+ <RFALSE>)>
+ <SETG LAST-STAR-LOC .L>
+ <COND (<NOT <EQUAL? ,DINER-CAR <GETP .STAR ,P?CAR>>>
+ <SET NCAR ,DINER-CAR>)
+ (<L? ,CAR-HERE ,DINER-CAR>
+ <SET NCAR <- ,CAR-HERE 1>>)
+ (T
+ <SET NCAR <+ ,CAR-HERE 1>>)>
+ <COND (<==? .NCAR ,FANCY-CAR> <DEC NCAR>)>
+ <COND (<L? .NCAR 1> <SET NCAR 1>)
+ (<G? .NCAR ,CAR-MAX> <SET NCAR ,CAR-MAX>)>
+ <COND (<==? .NCAR ,DINER-CAR>
+ <SET DEST <PICK-ONE-BOOTH>>)
+ (T
+ <SET DEST <PICK-ONE ,CAR-ROOMS-COMPS>>)>
+ <COND (<AND <==? .NCAR ,GAS-CAR> <==? .DEST ,GAS-CAR-RM>>
+ <SET DEST ,COMPARTMENT-4>)>
+ <COND (<OR ,DEBUG ,IDEBUG>
+ <TELL
+"[GOAL: " D .STAR " at " D .L " (car #" N <GETP .STAR ,P?CAR>
+") to " D .DEST " (car #" N .NCAR ").]" CR>)>
+ <PUT <GT-O .STAR> ,GOAL-ENABLE 1>
+ <ESTABLISH-GOAL-TRAIN .STAR .DEST .NCAR>
+ <COND (,IDEBUG <TELL "0]" CR>)>
+ <RFALSE>)
+ (T
+ <COND (<==? .GARG ,G-ENROUTE>
+ <COND (<EQUAL? .L ,HERE>
+ <SETG LAST-STAR-LOC .L>
+ <COND (,IDEBUG
+ <TELL "(STAR HERE)">
+ <TELL "1]" CR>)>
+ <RTRUE>)>
+ <SET VLEL <VISIBLE? ,LAST-STAR-LOC>>
+ <COND (<AND .VL <NOT .VLEL>>
+ <SETG LAST-STAR-LOC .L>
+ <COND (,IDEBUG
+ <TELL "(STAR NOW VISIBLE)">
+ <TELL "1]" CR>)>
+ <RTRUE>)
+ (<AND <NOT .VL> .VLEL>
+ <SETG LAST-STAR-LOC .L>
+ <COND (,IDEBUG
+ <TELL "(STAR NOT VISIBLE)">
+ <TELL "1]" CR>)>
+ <RTRUE>)
+ (T
+ <SETG LAST-STAR-LOC .L>
+ <COND (,IDEBUG <TELL "0]" CR>)>
+ <RFALSE>)>)
+ (<==? .GARG ,G-REACHED>
+ <SET STAR <GET ,CHARACTER-TABLE ,STAR-C>>
+ <NEW-LDESC .STAR>
+ <SETG STAR-C 0>
+ <ENABLE <QUEUE I-STAR <RANDOM 9>>>)>
+ <COND (,IDEBUG <TELL N .VL "]" CR>)>
+ .VL)>>
+
+<ROUTINE PICK-ONE-NOT (TBL "OPTIONAL" (NOT1 <>) (NOT2 <>) "AUX" L CNT X)
+ <SET L <GET .TBL 0>>
+ <SET CNT <RANDOM .L>>
+ <REPEAT ()
+ <SET X <GET .TBL .CNT>>
+ <COND (<NOT <EQUAL? .X .NOT1 .NOT2>>
+ <RETURN .X>)
+ (<IGRTR? CNT .L>
+ <SET CNT 1>)>>>
+
+<ROUTINE STOP-CONDUCTOR? ("AUX" L (LL <>) X)
+ <SET L <LOC ,CONDUCTOR>>
+ <COND (<OR <SET X <GETPT .L ,P?IN>>
+ <SET X <GETPT .L ,P?OUT>>>
+ <SET LL <GET-REXIT-ROOM .X>>)>
+ <COND (<SET X <ANY-TICKETS? .L ,PERSONBIT>>
+ <RETURN .X>)
+ (<SET X <ANY-TICKETS? .L ,MUNGBIT>>
+ <RETURN .X>)
+ (<AND <NOT <ZERO? .LL>>
+ <SET X <ANY-TICKETS? .LL ,PERSONBIT>>>
+ <RETURN .X>)
+ (<AND <NOT <ZERO? .LL>>
+ <SET X <ANY-TICKETS? .LL ,MUNGBIT>>>
+ <RETURN .X>)
+ (<AND ,TICKETS-PUNCHED? <NOT ,CUSTOMS-SWEEP>>
+ <RFALSE>)
+ (<NOT ,ON-TRAIN>
+ <RFALSE>)
+ (<SET X <ANY-TICKETS? .L>>
+ <RETURN .X>)
+ (<NOT <ZERO? .LL>>
+ <RETURN <ANY-TICKETS? .LL>>)>>
+
+<GLOBAL VICTIM-KNOWN <>>
+
+<ROUTINE I-CONDUCTOR ("OPTIONAL" (GARG <>) "AUX" L OBJ DEST X Y)
+ <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[I-CONDUCTOR:">
+ <COND (<==? .GARG ,G-DEBUG>
+ ;<COND (,IDEBUG <TELL "(0)]" CR>)>
+ <RFALSE>)>)>
+ <SET L <LOC ,CONDUCTOR>>
+ <COND (<NOT .GARG>
+ <ESTABLISH-GOAL-TRAIN ,CONDUCTOR ,VESTIBULE-REAR ,CAR-MAX>
+ <COND (,IDEBUG <TELL "(0)]" CR>)>
+ <RFALSE>)
+ (<==? .GARG ,G-REACHED>
+ <COND (<EQUAL? .L ,PLATFORM-A>
+ <FSET ,CONDUCTOR ,NDESCBIT>
+ <FCLEAR ,CONDUCTOR ,TOUCHBIT>
+ <PUTP ,CONDUCTOR ,P?LDESC 15 ;"waiting for the train to start">
+ <COND (<ON-PLATFORM? ,HERE>
+ <TELL CHE ,CONDUCTOR " stops walking." CR>
+ <COND (,IDEBUG <TELL "(1)]" CR>)>
+ <RTRUE>)
+ (T
+ <COND (,IDEBUG <TELL "(0)]" CR>)>
+ <RFALSE>)>)
+ (<EQUAL? .L ,VESTIBULE-FWD ,OTHER-VESTIBULE-FWD>
+ <ESTABLISH-GOAL-TRAIN ,CONDUCTOR ,VESTIBULE-REAR ,CAR-MAX>
+ <SET X <TURNS-AROUND? .L ,VESTIBULE-FWD>>
+ <COND (,IDEBUG <TELL N .X "]" CR>)>
+ <RETURN .X>)
+ (<EQUAL? .L ,VESTIBULE-REAR ,OTHER-VESTIBULE-REAR>
+ <COND (<I-CONDUCTOR ,G-ENROUTE>
+ <COND (,IDEBUG <TELL "(1)]" CR>)>
+ <RTRUE>)>
+ <SETG TICKETS-PUNCHED? T>
+ <QUEUE I-TICKETS-PLEASE 0>
+ <ESTABLISH-GOAL-TRAIN ,CONDUCTOR ,VESTIBULE-FWD 1>
+ <SET X <TURNS-AROUND? .L ,VESTIBULE-REAR>>
+ <COND (,IDEBUG <TELL N .X "]" CR>)>
+ <RETURN .X>)
+ (T
+ <COND (,IDEBUG <TELL "(0)]" CR>)>
+ <RFALSE>)>)
+ (<==? .GARG ,G-ENROUTE>
+ <COND (<SET Y <STOP-CONDUCTOR?>>;"need to merge with I-TICKETS-PLEASE"
+ <PUT <GET ,GOAL-TABLES ,CONDUCTOR-C> ,GOAL-ENABLE 0>
+ <SET X <VISIBLE? ,CONDUCTOR T>>
+ <COND (<NOT <FSET? .Y ,PERSONBIT>>
+ <MOVE .Y ,LIMBO-FWD>
+ <SETG VICTIM-KNOWN .Y>)
+ (<FSET? .Y ,MUNGBIT>
+ <QUEUE I-COME-TO 1>)>
+ <COND (<OR ,DEBUG
+ <NOT <EQUAL? .X ,FALSE-VALUE ,PLAYER-NOT-FACING>>>
+ <COND (<EQUAL? .X ,FALSE-VALUE ,PLAYER-NOT-FACING>
+ <TELL "[">)>
+ <TELL CHE ,CONDUCTOR>
+ <COND (<AND .X <WHERE? ,CONDUCTOR>>
+ <PRINTC %<ASCII !\,>>)>
+ <TELL " stops ">
+ <COND (<IN? ,CONDUCTOR ,HERE> <TELL "here ">)>
+ <TELL "to ">
+ <COND (<NOT <FSET? .Y ,PERSONBIT>>
+ <TELL "remove" HIS .Y " body.">
+ <THIS-IS-IT .Y>
+ <COND (<EQUAL? .L ,HERE>
+ <ARREST-PLAYER "homicide"
+ ,CONDUCTOR T ,PLAYER>)>)
+ (<FSET? .Y ,MUNGBIT>
+ <TELL "try to revive" HIM .Y ".">
+ <THIS-IS-IT .Y>)
+ (,CUSTOMS-SWEEP
+ ;<THIS-IS-IT ,TRAIN>
+ <TELL "ask passengers to leave the train.">)
+ (T
+ ;<THIS-IS-IT ,TICKET>
+ <TELL "punch tickets.">)>
+ <CRLF>
+ <COND (,IDEBUG <TELL "(1)]" CR>)>
+ <RTRUE>)>)>
+ <COND (,IDEBUG <TELL "(0)]" CR>)>
+ <RFALSE>)>>
+
+<ROUTINE TURNS-AROUND? (L RM)
+ <COND (<AND <==? ,HERE .RM>
+ ;<==? ,CAR-HERE <GETP ,CONDUCTOR ,P?CAR>>
+ <==? .L .RM>>
+ <TELL CHE ,CONDUCTOR appear " and turns around." CR>
+ <RTRUE>)>>
+
+<ROUTINE WHERE? (PER "OPTIONAL" (X 0) (CAP 0))
+ <COND (<NOT <IN? .PER ,HERE>>
+ <COND (<ZERO? .X>
+ <PRINTC %<ASCII !\,>>
+ <SET X <CORRIDOR-LOOK .PER ,CAR-HERE>>
+ ;<SET X <COR-DIR ,HERE <LOC .PER> <GETP .PER ,P?CAR>>>)>
+ <COND (<ZERO? .CAP> <PRINTC 32>)>
+ <COND (<EQUAL? .X ,P?WEST ,P?IN>
+ <COND (<ZERO? .CAP> <TELL "in">) (T <TELL "In">)>
+ <TELL THE <LOC .PER>>)
+ (<EQUAL? .X ,P?EAST ,P?OUT>
+ <COND (<ZERO? .CAP> <PRINTC %<ASCII !\j>>)
+ (T <PRINTC %<ASCII !\J>>)>
+ <TELL "ust outside">)
+ (T
+ <COND (<ZERO? .CAP> <PRINTC %<ASCII !\o>>)
+ (T <PRINTC %<ASCII !\O>>)>
+ <TELL "ff to ">
+ <DIR-PRINT .X>)>
+ <RTRUE>)>>
+
+<GLOBAL CONDUCTOR-KNOWS <>>
+
+<ROUTINE ANY-TICKETS? (L "OPTIONAL" (BIT <>) "AUX" O (VAL <>) CAR)
+ <COND (<ZERO? .BIT> <SET BIT ,LOCKED>)>
+ <SET CAR <GETP ,CONDUCTOR ,P?CAR>>
+ <COND (<AND <==? .L <META-LOC ,PLAYER>>
+ <==? .CAR ,CAR-HERE>
+ <OR ,CUSTOMS-SWEEP
+ <AND <NOT <==? .BIT ,PERSONBIT>>
+ <FSET? ,PLAYER .BIT>>>>
+ <RETURN ,PLAYER>)
+ (<AND <==? .L ,GAS-CAR-RM>
+ <==? .CAR ,GAS-CAR>
+ <OR ,CUSTOMS-SWEEP <NOT ,TICKETS-PUNCHED?>>>
+ <SETG CONDUCTOR-KNOWS ,BRIEFCASE>
+ <RFALSE>)>
+ <SET O <FIRST? .L>>
+ <REPEAT ()
+ <COND (<NOT .O> <RETURN>)
+ (<AND <==? .CAR <GETP .O ,P?CAR>>
+ <OR <AND <==? .BIT ,PERSONBIT>
+ <NOT <ZERO? <GETP .O ,P?CHARACTER>>>
+ <NOT <FSET? .O ,PERSONBIT>>>
+ <AND <NOT <==? .BIT ,PERSONBIT>>
+ <FSET? .O .BIT>
+ <FSET? .O ,PERSONBIT>>>>
+ <COND ;(<EQUAL? .O ,PLAYER>
+ <SET VAL .O>)
+ (<NOT .VAL>
+ <SET VAL .O>)>
+ <COND (<IN-MOTION? .O>
+ <PUT <GT-O .O> ,GOAL-ENABLE 0>)>)>
+ <SET O <NEXT? .O>>>
+ .VAL>
+
+<ROUTINE I-WAITER ("OPTIONAL" (GARG <>) "AUX" L)
+ <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[I-WAITER:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>
+ <SET L <LOC ,WAITER>>
+ <COND (<==? .GARG ,G-REACHED>
+ <COND (<EQUAL? .L ,PANTRY>
+ <COND (<IN? ,FOOD ,WAITER>
+ <FCLEAR ,FOOD ,TAKEBIT>
+ <FSET ,FOOD ,NDESCBIT>
+ <MOVE ,FOOD ,PANTRY>)>
+ <COND (<IN? ,CUP-A ,WAITER>
+ <FCLEAR ,CUP-A ,TAKEBIT>
+ <MOVE ,CUP-A ,GLOBAL-OBJECTS>)>
+ <COND (<IN? ,CUP-B ,WAITER>
+ <FCLEAR ,CUP-B ,TAKEBIT>
+ <MOVE ,CUP-B ,GLOBAL-OBJECTS>)>
+ <COND (,IDEBUG <TELL "(0)]" CR>)>
+ <RFALSE>)
+ (<EQUAL? .L ,HERE>
+ <TELL CHE ,WAITER enter ", ready to take your order." CR>
+ <PUTP ,WAITER ,P?LDESC 25>
+ <COND (,IDEBUG <TELL "(2)]" CR>)>
+ <RFATAL>)
+ (T
+ <COND (<EQUAL? .L <META-LOC ,FOOD>>
+ <MOVE ,FOOD ,WAITER>)>
+ <COND (<EQUAL? .L <META-LOC ,CUP-A>>
+ <MOVE ,CUP-A ,WAITER>)>
+ <COND (<EQUAL? .L <META-LOC ,CUP-B>>
+ <MOVE ,CUP-B ,WAITER>)>
+ <ESTABLISH-GOAL ,WAITER ,PANTRY>
+ <COND (,IDEBUG <TELL "(0)]" CR>)>
+ <RFALSE>)>)>>
+
+<GLOBAL BOND-CTR 0>
+
+<ROUTINE I-BOND ("OPTIONAL" (GARG <>) "AUX" (VAL <>) CAR)
+ <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[I-BOND:">
+ <COND (<==? .GARG ,G-DEBUG>
+ ;<COND (,IDEBUG <TELL "(0)]" CR>)>
+ <RFALSE>)>)>
+ <SETG BOND-CTR <+ 1 ,BOND-CTR>>
+ <COND (<==? 1 ,BOND-CTR>
+ <QUEUE I-BOND 1>
+ <SET VAL <MOVE-PERSON ,BOND ,VESTIBULE-REAR>>)
+ (<==? 2 ,BOND-CTR>
+ <QUEUE I-BOND 3>
+ <SET VAL <MOVE-PERSON ,BOND ,ROOF>>
+ <SET CAR <+ 1 ,CAR-START>>
+ <PUTP ,BOND ,P?CAR .CAR>
+ <COND (<NOT <==? .CAR ,CAR-HERE>> <MOVE ,BOND ,OTHER-ROOF>)>)
+ (<==? 3 ,BOND-CTR>
+ <QUEUE I-BOND 2>
+ <COND (<SET VAL <NOT <NOISY? ,HERE>>>
+ <TELL
+"You hear some kind of noise from the roof of the train." CR>)>)
+ (<==? 4 ,BOND-CTR>
+ <QUEUE I-BOND 1>
+ <MOVE ,BOND ,LIMBO-FWD>
+ <COND (<SET VAL <WINDOW-IN? ,HERE>>
+ <TELL
+"Something outside the window catches your eye. It looks like"
+THE ,BOND " falling off the roof of the train." CR>)>)
+ (<==? 5 ,BOND-CTR>
+ <SET VAL <START-BAD-SPY>>)>
+ <COND (,IDEBUG <TELL N .VAL "]" CR>)>
+ .VAL>
+
+<GLOBAL SUPPRESS-INTERRUPT <>>
+<GLOBAL BOND-OTHER-ACTIONS
+ <LTABLE 0
+ " crouches low and prepares to lunge"
+ " slips but then regains his footing"
+ " creeps a little closer">>
+
+<ROUTINE I-BOND-OTHER ("OPTIONAL" (GARG <>) "AUX" (VAL <>))
+ <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[I-BOND-OTHER:">
+ <COND (<==? .GARG ,G-DEBUG>
+ ;<COND (,IDEBUG <TELL "(0)]" CR>)>
+ <RFALSE>)>)>
+ <COND (<ZERO? ,SUPPRESS-INTERRUPT>
+ <COND (<PROB 90>
+ <SET VAL T>
+ <TELL
+CHE ,BOND-OTHER <PICK-ONE-NEW ,BOND-OTHER-ACTIONS> "." CR>)
+ (T <TELL
+CHE ,BOND-OTHER " leaps at you and tries to kick your feet out from
+under you. You respond with your best moves. But after wrestling
+together for what seems like ages, you both reach the edge of the roof
+and plunge over it!" CR>
+ <FINISH>)>)
+ (T
+ <SETG SUPPRESS-INTERRUPT <>>)>
+ <COND (,IDEBUG <TELL N .VAL "]" CR>)>
+ .VAL>
+
+<ROUTINE I-COOK ("OPTIONAL" (GARG <>) "AUX" L) <RFALSE>>
+
+"<ROUTINE I-THIN-MAN ('OPTIONAL' (GARG <>) 'AUX' L) <RFALSE>>
+<ROUTINE I-FAT-MAN ('OPTIONAL' (GARG <>) 'AUX' L) <RFALSE>>
+<ROUTINE I-HUNK ('OPTIONAL' (GARG <>) 'AUX' L) <RFALSE>>
+<ROUTINE I-PEEL ('OPTIONAL' (GARG <>) 'AUX' L) <RFALSE>>
+<ROUTINE I-DUCHESS ('OPTIONAL' (GARG <>) 'AUX' L) <RFALSE>>
+<ROUTINE I-NATASHA ('OPTIONAL' (GARG <>) 'AUX' L) <RFALSE>>"
+
+<ROUTINE I-GUARD ("OPTIONAL" (GARG <>) "AUX" L) <RFALSE>>
+
+<ROUTINE I-ATTENTION ("OPTIONAL" (GARG <>) "AUX" (FLG <>) (CNT 0) ATT GT PER)
+ <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[I-ATTENTION:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> ,CHARACTER-MAX> <RETURN>)>
+ <SET GT <GET ,GOAL-TABLES .CNT>>
+ <SET ATT <GET .GT ,ATTENTION>>
+ <COND (<NOT <G? .ATT 0>> <AGAIN>)>
+ <DEC ATT>
+ <SET PER <GET ,CHARACTER-TABLE .CNT>>
+ <COND (<0? .PER>
+ <TELL "[!! I-ATT: PER=0]" CR>)
+ (<0? .ATT>
+ <FCLEAR .PER ,TOUCHBIT>
+ <COND (<OR <==? .PER ,PEEKER>
+ <AND <==? .PER ,BAD-SPY>
+ <NOT ,BAD-SPY-DONE-PEEKING>>>
+ <PUTP .PER ,P?LDESC ,PEEKING-CODE>)
+ (<EQUAL? .PER ,CONDUCTOR ;,CUSTOMS-AGENT>
+ <PUTP .PER ,P?LDESC 19 ;"making rounds">)
+ (T
+ <PUTP .PER ,P?LDESC 14 ;"walking along">)>
+ <COND (<OR <NOT <==? .PER ,CONDUCTOR>>
+ <NOT <STOP-CONDUCTOR?>>>
+ <PUT .GT ,GOAL-ENABLE 1>)>)
+ (<AND <==? .ATT 1>
+ <IN? .PER ,HERE>
+ <D-APPLY "Impatient"<GET .GT ,GOAL-FUNCTION>,G-IMPATIENT>>
+ <SET FLG T>)>
+ <PUT .GT ,ATTENTION .ATT>>
+ <COND (,IDEBUG <TELL N .FLG "]" CR>)>
+ .FLG>
+
+<ROUTINE GRAB-ATTENTION (PERSON "OPTIONAL" (LEN <>)
+ "AUX" (CHR <GETP .PERSON ,P?CHARACTER>) GT ATT)
+ <COND (<NOT <FSET? .PERSON ,PERSONBIT>>
+ <TOO-BAD-BUT .PERSON "dead">
+ <RFALSE>)
+ (<FSET? .PERSON ,MUNGBIT>
+ <TOO-BAD-BUT .PERSON "out cold">
+ <RFALSE>)
+ (<EQUAL? <GETP .PERSON ,P?LDESC> 2 ;"snoozing">
+ <TOO-BAD-BUT .PERSON "asleep">
+ <RFALSE>)
+ (<FSET? .PERSON ,BUSYBIT>
+ <TOO-BAD-BUT .PERSON "busy">
+ <RFALSE>)>
+ <SET GT <GET ,GOAL-TABLES .CHR>>
+ <COND (<GET .GT ,GOAL-S>
+ <COND (.LEN <SET ATT .LEN>)
+ (ELSE <SET ATT <GET .GT ,ATTENTION-SPAN>>)>
+ <PUT .GT ,ATTENTION .ATT>
+ <COND (<==? .ATT 0>
+ <COND (<OR <NOT <==? .PERSON ,CONDUCTOR>>
+ <NOT <STOP-CONDUCTOR?>>>
+ <PUT .GT ,GOAL-ENABLE 1>)>
+ <RFALSE>)
+ (<NOT <ZERO? <GET .GT ,GOAL-ENABLE>>>
+ <PUT .GT ,GOAL-ENABLE 0>)>)>
+ <SAID-TO .PERSON>
+ <RTRUE>>
+
+<GLOBAL TOUCH-CAP? <>>
+<GLOBAL TICKET-KNOCK <>>
+<GLOBAL TICKET-COUNT 0 ;1>
+<GLOBAL GESTURE-TABLE
+ <PLTABLE 0
+ " again" " strongly" " forcefully" " wildly" " frantically">>
+
+<ROUTINE I-TICKETS-PLEASE ("OPTIONAL" (GARG <>)
+ "AUX" L (L1 <>) PER X (VAL <>))
+ <COND (<OR ,IDEBUG <==? .GARG ,G-DEBUG>>
+ <TELL "[I-TICKETS-PLEASE:">
+ <COND (<==? .GARG ,G-DEBUG> <RFALSE>)>)>
+ <COND (<AND ,TICKETS-PUNCHED? <NOT ,CUSTOMS-SWEEP>>
+ <QUEUE I-TICKETS-PLEASE 0>
+ <RFALSE>)>
+ <COND (,IDEBUG <TELL "[I-TICKETS-PLEASE:">)>
+ <SET L <LOC ,CONDUCTOR>>
+ <COND (<OR <SET X <GETPT .L ,P?IN>>
+ <SET X <GETPT .L ,P?OUT>>>
+ <SET L1 <GET-REXIT-ROOM .X>>)>
+ <COND (<SET PER <STOP-CONDUCTOR?>> ;"need to merge with I-CONDUCTOR"
+ <PUT <GET ,GOAL-TABLES ,CONDUCTOR-C> ,GOAL-ENABLE 0>
+ <SETG TOUCH-CAP? <>>
+ <SET X <VISIBLE? .PER T>>
+ <COND (<NOT <FSET? .PER ,PERSONBIT>>
+ <MOVE .PER ,LIMBO-FWD>
+ <SETG VICTIM-KNOWN .PER>
+ <COND (<OR <NOT <EQUAL? .X ,FALSE-VALUE ,PLAYER-NOT-FACING>>
+ <AND ,DEBUG <TELL "[">>>
+ <TELL CHE ,CONDUCTOR " removes" HIS .PER " body.">
+ <COND (,DEBUG ;<ZERO? .X> <TELL "]">)>
+ <CRLF>)>)
+ (<FSET? .PER ,MUNGBIT>
+ <QUEUE I-COME-TO 1>
+ <COND (<OR <NOT <EQUAL? .X ,FALSE-VALUE ,PLAYER-NOT-FACING>>
+ <AND ,DEBUG <TELL "[">>>
+ <TELL CHE ,CONDUCTOR " tries to revive" HIM .PER ".">
+ <THIS-IS-IT .PER>
+ <COND (,DEBUG ;<ZERO? .X> <TELL "]">)>
+ <CRLF>)>)
+ (<EQUAL? .PER ,PLAYER>
+ <COND (<==? ,HERE <LOC ,CONDUCTOR>>
+ <TELL CHE ,CONDUCTOR>)
+ (T
+ <SET X <FIND-FLAG-LG ,HERE ,DOORBIT>>
+ ;<COND (.X
+ <TELL "[Debugging info: X=" D .X " L="
+ <COND (<FSET? .X ,LOCKED> "1") (T "0")>
+ " TK=" N ,TICKET-KNOCK "]" CR>)>
+ <COND (<AND .X <FSET? .X ,LOCKED>>
+ <COND (,TICKET-KNOCK
+ <FCLEAR .X ,LOCKED>)
+ (T
+ <SETG TICKET-KNOCK T>
+ <TELL "You hear a knock on the door." CR>
+ <COND (,IDEBUG <TELL "(1)]" CR>)>
+ <RTRUE>)>)>
+ <SETG TICKET-KNOCK <>>
+ <SETG TICKET-COUNT 0>
+ <MOVE ,CONDUCTOR ,HERE>
+ <TELL CR CHE ,CONDUCTOR appear " and">)>
+ <COND (<VERB? TELL SAY> T)
+ (<L? ,TICKET-COUNT <GET ,GESTURE-TABLE 0>>
+ <SETG TICKET-COUNT <+ 1 ,TICKET-COUNT>>)
+ (T
+ <ARREST-PLAYER "proper tickets">
+ <TELL " throws up his hands and hurries away." CR>
+ <COND (,IDEBUG <TELL "(0)]" CR>)>
+ <RTRUE>)>
+ <TELL " makes a gesture">
+ <COND (<L? 1 ,TICKET-COUNT>
+ <TELL <GET ,GESTURE-TABLE ,TICKET-COUNT>>)>
+ <SET VAL T>
+ <COND (,CUSTOMS-SWEEP
+ <COND (<G? 5 ,TICKET-COUNT> <TELL ", asking you to">)
+ (T <TELL ", demanding that you">)>
+ <TELL " leave the train." CR>)
+ (<==? .PER ,PLAYER>
+ <COND (<G? 5 ,TICKET-COUNT> <TELL ", asking for ">)
+ (T <TELL ", demanding ">)>
+ <THIS-IS-IT ,TICKET>
+ <TELL D ,TICKET>
+ <TELL "." CR>)>
+ <ARREST-MCGUFFIN?>
+ <COND (T ;<SPY?> <ARREST-MCGUFFIN? ,GUN "carrying weapons">)>
+ <COND (,IDEBUG <TELL N .VAL "]" CR>)>
+ .VAL)
+ (T
+ <FCLEAR .PER ,LOCKED>
+ <COND (<GET <GT-O .PER> ,GOAL-S>
+ <PUT <GT-O .PER> ,GOAL-ENABLE 1>)>
+ <COND (<OR <NOT <EQUAL? .X ,FALSE-VALUE ,PLAYER-NOT-FACING>>
+ <AND ,DEBUG <TELL "[">>>
+ <TELL CHE ,CONDUCTOR>
+ <COND (,CUSTOMS-SWEEP
+ <TELL " asks" HIM .PER " to leave the train.">)
+ (T
+ <TELL " punches" HIS .PER " ticket.">)>
+ <COND (,DEBUG ;<ZERO? .X> <TELL "]">)>
+ <CRLF>)>)>)
+ (T
+ <PUT <GET ,GOAL-TABLES ,CONDUCTOR-C> ,GOAL-ENABLE 1>
+ <COND (<SET X <VISIBLE? ,CONDUCTOR>>
+ <COND (<OR <FIND-FLAG .L ,PERSONBIT ,CONDUCTOR>
+ <AND .L1 <FIND-FLAG .L1 ,PERSONBIT ,CONDUCTOR>>>
+ <SETG TOUCH-CAP? T>)
+ (T <SETG TOUCH-CAP? <>>)>)>
+ <COND (<NOT <==? .L <GETP .L ,P?STATION>>>
+ <MOVE-PERSON ,CONDUCTOR <GETP .L ,P?STATION>>)>
+ <COND (,IDEBUG <TELL "(0)]" CR>)>
+ <RFALSE>)>>
+
+<ROUTINE ARREST-MCGUFFIN? ("OPTIONAL" (OBJ <>) (STR <>) "AUX" X)
+ <COND (<ZERO? .OBJ>
+ <SET OBJ ,MCGUFFIN>
+ <SET STR "smuggling">)>
+ <SET X <LOC .OBJ>>
+ <COND (<OR <EQUAL? .X ,PLAYER>
+ <AND <EQUAL? <META-LOC .OBJ> ,HERE>
+ <NOT <FSET? .X ,PERSONBIT>>
+ <NOT <HIDDEN? .OBJ>>>>
+ <MOVE .OBJ ,LIMBO-FWD ;CONDUCTOR>
+ <ARREST-PLAYER .STR>
+ <TELL
+"Then he notices" HIM .OBJ ", confiscates it, and leaves in a hurry." CR>)>>
+
+<GLOBAL ARREST-REASON 0>
+
+<ROUTINE ARREST-PLAYER (STR "OPTIONAL" (PER <>) (TELL? <>) (OBJ <>))
+ <COND (<NOT .PER>
+ <SET PER ,CONDUCTOR>)>
+ <COND (.TELL?
+ <TELL CHE .PER>
+ <COND (<WHERE? .PER> <PRINTC %<ASCII !\,>>)>
+ <TELL
+V .PER stare " at" HIM .OBJ " for a moment, not believing" HIS .PER
+" eyes. Then" HE .PER leave " in a hurry.">
+ <COND (<AND <NOT <==? .PER ,CONDUCTOR>>
+ <VISIBLE? ,CONDUCTOR>>
+ <TELL " So does" HE ,CONDUCTOR ".">)>
+ <CRLF>)>
+ <QUEUE I-TICKETS-PLEASE 0>
+ <COND (<NOT <QUEUED? ,I-TRAIN-ARREST>>
+ <ENABLE <QUEUE I-TRAIN-ARREST 5>>)>
+ <SETG ARREST-REASON .STR>
+ <MOVE .PER ,OTHER-LIMBO-FWD>
+ <PUT <GT-O .PER> ,GOAL-ENABLE 0>
+ <MOVE ,CONDUCTOR ,OTHER-LIMBO-FWD>
+ <PUT <GET ,GOAL-TABLES ,CONDUCTOR-C> ,GOAL-ENABLE 0>
+ <RTRUE>>
diff --git a/i1.zil b/i1.zil
new file mode 100644
index 0000000..8bb2a4b
--- /dev/null
+++ b/i1.zil
@@ -0,0 +1,56 @@
+"EXTENDED COMPILE/LOAD FILE for CHECKPOINT
+Copyright (C) 1985 Infocom, Inc. All rights reserved."
+
+<COND (<GASSIGNED? PREDGEN>
+ <PRINC "Compiling">
+ <SETG ZSTR-ON <SETG ZSTR-OFF ,TIME>>
+ <ID 0>)
+ (T <PRINC "Loading">)>
+
+<PRINC " CHECKPOINT: interactive fiction from Infocom!
+">
+
+<COND (<GASSIGNED? MUDDLE>
+ <BLOAT 90000 0 0 3500 0 0 0 0 0 512>)>
+
+<SET REDEFINE T>
+
+"<GLOBAL BIGFIX 10000>"
+
+<OR <GASSIGNED? ZILCH>
+ <SETG WBREAKS <STRING !\" !,WBREAKS>>>
+
+<DEFINE IFILE (STR "OPTIONAL" (FLOAD? <>) "AUX" (TIM <TIME>))
+ <INSERT-FILE .STR .FLOAD?>>
+
+<DIRECTIONS ;"Do not change the order of the first eight
+ without consulting MARC! -- ENCHANTER"
+ NORTH ;NE EAST ;SE SOUTH ;SW WEST ;NW UP DOWN IN OUT>
+
+<IFILE "MACROS" T>
+<IFILE "SYNTAX" T>
+<IFILE "MAIN" T>
+<IFILE "THINGS" T>
+<IFILE "PEOPLE" T>
+<IFILE "PLACES" T>
+<IFILE "GLOBAL" T>
+
+<CONSTANT SERIAL 0>
+
+<IFILE "CLOCK" T>
+<IFILE "PARSER" T>
+<IFILE "VERBS" T>
+<IFILE "TRAIN" T>
+<IFILE "CARS" T>
+<IFILE "STATION" T>
+<IFILE "GOAL" T>
+<IFILE "SPIES" T>
+
+<PROPDEF SIZE 5>
+<PROPDEF CAPACITY 0>
+
+<DEFINE ISL () <INIT-STATUS-LINE>>
+
+<GC-MON T>
+<COND (<GASSIGNED? MUDDLE>
+ <GC 0 T 5>)>
diff --git a/macros.cmp b/macros.cmp
new file mode 100644
index 0000000..e49fe85
--- /dev/null
+++ b/macros.cmp
@@ -0,0 +1,368 @@
+
+;COMPARISON OF PS:<SWG>MACROS.ZAP.1 AND PS:<SWG>MACROS.ZAP.3
+;OPTIONS ARE /1
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-8 (112)
+?CND1: EQUAL? OBJ,POCKET \?CND6
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-8 (112)
+?CND1: EQUAL? OBJ,POCKET \?CND5
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-11 (177)
+?CND6: EQUAL? OBJ,TICKET \?CND11
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-11 (177)
+?CND5: EQUAL? OBJ,TICKET \?CND9
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-14 (243)
+?CND11: EQUAL? OBJ,PASSPORT \?CND16
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-14 (242)
+?CND9: EQUAL? OBJ,PASSPORT \?CND13
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-17 (314)
+?CND16: FSET? OBJ,NARTICLEBIT /?CND21
+ FSET? OBJ,SEENBIT /?THN27
+ FSET? OBJ,PERSONBIT /?ELS26
+?THN27: PRINTI "The "
+ JUMP ?CND21
+?ELS26: FSET? OBJ,VOWELBIT \?ELS32
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-17 (312)
+?CND13: FSET? OBJ,NARTICLEBIT /?CND17
+ FSET? OBJ,SEENBIT /?THN20
+ FSET? OBJ,PERSONBIT /?ELS21
+?THN20: PRINTI "The "
+ JUMP ?CND17
+?ELS21: FSET? OBJ,VOWELBIT \?ELS24
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-24 (499)
+ JUMP ?CND21
+?ELS32: PRINTI "A "
+?CND21: FSET? OBJ,PERSONBIT \?CND39
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-24 (497)
+ JUMP ?CND17
+?ELS24: PRINTI "A "
+?CND17: FSET? OBJ,PERSONBIT \?CND29
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-28 (590)
+?CND39: PRINTD OBJ
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-28 (588)
+?CND29: PRINTD OBJ
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-41 (825)
+ EQUAL? O,TURN \?ELS5
+ LESS? 1,P-NUMBER \?ELS5
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-41 (823)
+ EQUAL? O,TURN \?ELS4
+ LESS? 1,P-NUMBER \?ELS4
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-47 (934)
+?ELS5: CALL THE?,O
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-47 (932)
+?ELS4: CALL THE?,O
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-55 (1040)
+ FSET? OBJ,SEENBIT /?THN7
+ FSET? OBJ,PERSONBIT /?ELS6
+?THN7: PRINTI " the"
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-55 (1038)
+ FSET? OBJ,SEENBIT /?THN4
+ FSET? OBJ,PERSONBIT /?ELS5
+?THN4: PRINTI " the"
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-59 (1131)
+?ELS6: FSET? OBJ,VOWELBIT \?ELS12
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-59 (1129)
+?ELS5: FSET? OBJ,VOWELBIT \?ELS8
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-62 (1194)
+?ELS12: PRINTI " a"
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-62 (1191)
+?ELS8: PRINTI " a"
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-69 (1300)
+ EQUAL? O,INTNUM \?ELS3
+ ZERO? P-DOLLAR-FLAG /?ELS3
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-69 (1296)
+ EQUAL? O,INTNUM \?ELS2
+ ZERO? P-DOLLAR-FLAG /?ELS2
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-73 (1380)
+?ELS3: FSET? O,NARTICLEBIT \?ELS9
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-73 (1376)
+?ELS2: FSET? O,NARTICLEBIT \?ELS7
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-75 (1428)
+?ELS9: FSET? O,VOWELBIT \?ELS13
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-75 (1424)
+?ELS7: FSET? O,VOWELBIT \?ELS8
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-78 (1489)
+?ELS13: PRINTI "a "
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-78 (1484)
+?ELS8: PRINTI "a "
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-84 (1576)
+ FSET? OBJ,PERSONBIT /?ELS3
+ ZERO? CAP /?ELS6
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-84 (1570)
+ FSET? OBJ,PERSONBIT /?ELS2
+ ZERO? CAP /?ELS4
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-88 (1651)
+?ELS6: PRINTI "it"
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-88 (1645)
+?ELS4: PRINTI "it"
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-90 (1684)
+?ELS3: EQUAL? OBJ,PLAYER \?ELS15
+ ZERO? CAP /?ELS18
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-90 (1678)
+?ELS2: EQUAL? OBJ,PLAYER \?ELS9
+ ZERO? CAP /?ELS11
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-94 (1766)
+?ELS18: PRINTI "you"
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-94 (1759)
+?ELS11: PRINTI "you"
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-96 (1801)
+?ELS15: FSET? OBJ,FEMALE \?ELS27
+ ZERO? CAP /?ELS30
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-96 (1794)
+?ELS9: FSET? OBJ,FEMALE \?ELS16
+ ZERO? CAP /?ELS18
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-100 (1883)
+?ELS30: PRINTI "she"
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-100 (1875)
+?ELS18: PRINTI "she"
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-102 (1918)
+?ELS27: CALL ZMEMQ,OBJ,COUPLE-TABLE
+ ZERO? STACK /?ELS39
+ ZERO? CAP /?ELS42
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-102 (1910)
+?ELS16: CALL ZMEMQ,OBJ,COUPLE-TABLE
+ ZERO? STACK /?ELS23
+ ZERO? CAP /?ELS25
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-107 (2026)
+?ELS42: PRINTI "they"
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-107 (2018)
+?ELS25: PRINTI "they"
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-109 (2062)
+?ELS39: ZERO? CAP /?ELS54
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-109 (2054)
+?ELS23: ZERO? CAP /?ELS31
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-112 (2116)
+?ELS54: PRINTI "he"
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-112 (2108)
+?ELS31: PRINTI "he"
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-115 (2175)
+ EQUAL? VERB,STR?1 \?ELS72
+ EQUAL? OBJ,PLAYER /?THN78
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-115 (2167)
+ EQUAL? VERB,STR?1 \?ELS43
+ EQUAL? OBJ,PLAYER /?THN47
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-118 (2261)
+ ZERO? STACK /?ELS77
+?THN78: PRINTI "are"
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-118 (2253)
+ ZERO? STACK /?ELS48
+?THN47: PRINTI "are"
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-121 (2314)
+?ELS77: PRINTI "is"
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-121 (2306)
+?ELS48: PRINTI "is"
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-123 (2344)
+?ELS72: PRINT VERB
+ EQUAL? OBJ,PLAYER /FALSE
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-123 (2336)
+?ELS43: PRINT VERB
+ EQUAL? OBJ,PLAYER /?PRD57
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-126 (2421)
+ ZERO? STACK \FALSE
+ EQUAL? VERB,STR?2,STR?3 \?CND97
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-126 (2414)
+ ZERO? STACK \?PRD57
+ EQUAL? VERB,STR?2,STR?3 \?CND60
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-129 (2489)
+?CND97: PRINTI "s"
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-129 (2483)
+?CND60: PRINTI "s"
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-133 (2522)
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-131 (2512)
+?PRD57: PUSH 0
+ RSTACK
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-134 (2563)
+ FSET? OBJ,PERSONBIT /?ELS3
+ ZERO? CAP /?ELS6
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-136 (2583)
+ FSET? OBJ,PERSONBIT /?ELS2
+ ZERO? CAP /?ELS4
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-137 (2625)
+ JUMP ?CND4
+?ELS6: PRINTI "it"
+?CND4: ZERO? POSSESS? /TRUE
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-139 (2645)
+ JUMP ?CND3
+?ELS4: PRINTI "it"
+?CND3: ZERO? POSSESS? /TRUE
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-142 (2709)
+?ELS3: EQUAL? OBJ,PLAYER \?ELS21
+ ZERO? CAP /?ELS24
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-144 (2729)
+?ELS2: EQUAL? OBJ,PLAYER \?ELS13
+ ZERO? CAP /?ELS15
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-145 (2778)
+ JUMP ?CND22
+?ELS24: PRINTI "you"
+?CND22: ZERO? POSSESS? /TRUE
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-147 (2798)
+ JUMP ?CND14
+?ELS15: PRINTI "you"
+?CND14: ZERO? POSSESS? /TRUE
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-150 (2866)
+?ELS21: CALL ZMEMQ,OBJ,COUPLE-TABLE
+ ZERO? STACK /?ELS39
+ ZERO? POSSESS? /?ELS42
+ ZERO? CAP /?ELS46
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-152 (2886)
+?ELS13: CALL ZMEMQ,OBJ,COUPLE-TABLE
+ ZERO? STACK /?ELS24
+ ZERO? POSSESS? /?ELS26
+ ZERO? CAP /?ELS28
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-156 (2996)
+?ELS46: PRINTI "their"
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-158 (3016)
+?ELS28: PRINTI "their"
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-158 (3029)
+?ELS42: ZERO? CAP /?ELS58
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-160 (3049)
+?ELS26: ZERO? CAP /?ELS34
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-161 (3081)
+?ELS58: PRINTI "them"
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-163 (3101)
+?ELS34: PRINTI "them"
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-163 (3113)
+?ELS39: FSET? OBJ,FEMALE \?ELS67
+ ZERO? CAP /?ELS70
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-165 (3133)
+?ELS24: FSET? OBJ,FEMALE \?ELS39
+ ZERO? CAP /?ELS41
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-167 (3191)
+?ELS70: PRINTI "her"
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-169 (3211)
+?ELS41: PRINTI "her"
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-169 (3222)
+?ELS67: ZERO? POSSESS? /?ELS79
+ ZERO? CAP /?ELS83
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-171 (3242)
+?ELS39: ZERO? POSSESS? /?ELS46
+ ZERO? CAP /?ELS48
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-173 (3298)
+?ELS83: PRINTI "his"
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-175 (3318)
+?ELS48: PRINTI "his"
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-175 (3329)
+?ELS79: ZERO? CAP /?ELS95
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-177 (3349)
+?ELS46: ZERO? CAP /?ELS54
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-178 (3380)
+?ELS95: PRINTI "him"
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-180 (3400)
+?ELS54: PRINTI "him"
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-189 (3567)
+ ZERO? THIS /?ELS3
+ ZERO? CNT \?ELS3
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-191 (3587)
+ ZERO? THIS /?ELS2
+ ZERO? CNT \?ELS2
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-193 (3635)
+?ELS3: SUB L,CNT
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-195 (3655)
+?ELS2: SUB L,CNT
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-200 (3765)
+ EQUAL? CNT,L \?CND8
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-202 (3785)
+ EQUAL? CNT,L \?CND4
+***************
+
+**** FILE PS:<SWG>MACROS.ZAP.1, 1-202 (3800)
+?CND8: PUT FROB,0,CNT
+**** FILE PS:<SWG>MACROS.ZAP.3, 1-204 (3820)
+?CND4: PUT FROB,0,CNT
+***************
+
diff --git a/macros.zap b/macros.zap
new file mode 100644
index 0000000..42c6dad
--- /dev/null
+++ b/macros.zap
@@ -0,0 +1,270 @@
+
+
+ .FUNCT START-SENTENCE,OBJ,INV?=0
+ CALL2 THIS-IS-IT,OBJ
+ EQUAL? OBJ,PLAYER \?ELS3
+ PRINTI "You"
+ RTRUE
+?ELS3: EQUAL? OBJ,POCKET \?ELS7
+ PRINTI "Your pocket"
+ RTRUE
+?ELS7: EQUAL? OBJ,TICKET \?ELS11
+ PRINTI "Your ticket"
+ RTRUE
+?ELS11: EQUAL? OBJ,PASSPORT \?ELS15
+ PRINTI "Your passport"
+ RTRUE
+?ELS15: EQUAL? OBJ,HEAD \?ELS19
+ PRINTI "Your head"
+ RTRUE
+?ELS19: EQUAL? OBJ,HANDS \?CND1
+ PRINTI "Your hands"
+ RTRUE
+?CND1: FSET? OBJ,NARTICLEBIT /?CND26
+ FSET? OBJ,PERSONBIT \?THN32
+ FSET? OBJ,SEENBIT \?ELS31
+?THN32: PRINTI "The "
+ JUMP ?CND26
+?ELS31: FSET? OBJ,VOWELBIT \?ELS37
+ PRINTI "An "
+ JUMP ?CND26
+?ELS37: PRINTI "A "
+?CND26: FSET? OBJ,PERSONBIT \?CND44
+ FSET OBJ,SEENBIT
+?CND44: PRINTD OBJ
+ ZERO? INV? /FALSE
+ IN? BRIEFCASE,OBJ \FALSE
+ FSET? BRIEFCASE,SEENBIT /FALSE
+ FSET BRIEFCASE,SEENBIT
+ PRINTI ", carrying"
+ CALL2 HIM-HER-IT,BRIEFCASE
+ PRINTI ","
+ RTRUE
+
+
+ .FUNCT PRINTT,OBJ
+ EQUAL? OBJ,TURN \?ELS5
+ LESS? 1,P-NUMBER \?ELS5
+ PRINTI " "
+ PRINTN P-NUMBER
+ PRINTI " minutes"
+ RTRUE
+?ELS5: EQUAL? OBJ,INTNUM \?ELS11
+ ZERO? P-DOLLAR-FLAG /?ELS11
+ PRINTI " that amount"
+ RTRUE
+?ELS11: FSET? OBJ,WINDOWBIT \?ELS17
+ PRINTI " the window"
+ RTRUE
+?ELS17: CALL2 THE?,OBJ
+ PRINTI " "
+ PRINTD OBJ
+ RTRUE
+
+
+ .FUNCT THE?,OBJ
+ FSET? OBJ,NARTICLEBIT /?CND1
+ FSET? OBJ,PERSONBIT \?THN7
+ FSET? OBJ,SEENBIT \?ELS6
+?THN7: PRINTI " the"
+ JUMP ?CND1
+?ELS6: FSET? OBJ,VOWELBIT \?ELS12
+ PRINTI " an"
+ JUMP ?CND1
+?ELS12: PRINTI " a"
+?CND1: FSET? OBJ,PERSONBIT \FALSE
+ FSET OBJ,SEENBIT
+ RTRUE
+
+
+ .FUNCT PRINTA,O
+ EQUAL? O,INTNUM \?ELS3
+ ZERO? P-DOLLAR-FLAG /?ELS3
+ PRINTI "money"
+ RTRUE
+?ELS3: FSET? O,NARTICLEBIT \?ELS9
+ JUMP ?CND1
+?ELS9: FSET? O,VOWELBIT \?ELS13
+ PRINTI "an "
+ JUMP ?CND1
+?ELS13: PRINTI "a "
+?CND1: PRINTD O
+ RTRUE
+
+
+ .FUNCT NO-PRONOUN?,OBJ,CAP=0
+ EQUAL? OBJ,PLAYER /FALSE
+ FSET? OBJ,PERSONBIT /?ELS5
+ EQUAL? OBJ,P-IT-OBJECT \?CND1
+ FSET? IT,TOUCHBIT \?CND1
+ RFALSE
+?ELS5: FSET? OBJ,FEMALE \?ELS12
+ EQUAL? OBJ,P-HER-OBJECT \?CND1
+ FSET? HER,TOUCHBIT \?CND1
+ RFALSE
+?ELS12: FSET? OBJ,PLURALBIT \?ELS19
+ EQUAL? OBJ,P-THEM-OBJECT \?CND1
+ FSET? THEM,TOUCHBIT \?CND1
+ RFALSE
+?ELS19: EQUAL? OBJ,P-HIM-OBJECT \?CND1
+ FSET? HIM,TOUCHBIT /FALSE
+?CND1: ZERO? CAP \?ELS34
+ CALL2 PRINTT,OBJ
+ RTRUE
+?ELS34: CALL2 ONE?,CAP
+ ZERO? STACK /TRUE
+ CALL2 START-SENTENCE,OBJ
+ RTRUE
+
+
+ .FUNCT HE-SHE-IT,OBJ,CAP=0,VERB=0
+ CALL NO-PRONOUN?,OBJ,CAP
+ ZERO? STACK /?ELS3
+ JUMP ?CND1
+?ELS3: FSET? OBJ,PERSONBIT /?ELS5
+ ZERO? CAP \?ELS8
+ PRINTI " it"
+ JUMP ?CND1
+?ELS8: CALL2 ONE?,CAP
+ ZERO? STACK /?CND1
+ PRINTI "It"
+ JUMP ?CND1
+?ELS5: EQUAL? OBJ,PLAYER \?ELS16
+ ZERO? CAP \?ELS19
+ PRINTI " you"
+ JUMP ?CND1
+?ELS19: CALL2 ONE?,CAP
+ ZERO? STACK /?CND1
+ PRINTI "You"
+ JUMP ?CND1
+?ELS16: FSET? OBJ,FEMALE \?ELS27
+ ZERO? CAP \?ELS30
+ PRINTI " she"
+ JUMP ?CND1
+?ELS30: CALL2 ONE?,CAP
+ ZERO? STACK /?CND1
+ PRINTI "She"
+ JUMP ?CND1
+?ELS27: FSET? OBJ,PLURALBIT \?ELS38
+ ZERO? CAP \?ELS41
+ PRINTI " they"
+ JUMP ?CND1
+?ELS41: CALL2 ONE?,CAP
+ ZERO? STACK /?CND1
+ PRINTI "They"
+ JUMP ?CND1
+?ELS38: ZERO? CAP \?ELS52
+ PRINTI " he"
+ JUMP ?CND1
+?ELS52: CALL2 ONE?,CAP
+ ZERO? STACK /?CND1
+ PRINTI "He"
+?CND1: ZERO? VERB /FALSE
+ PRINTC 32
+ EQUAL? OBJ,PLAYER /?THN70
+ FSET? OBJ,PLURALBIT \?ELS69
+?THN70: EQUAL? VERB,STR?1 \?ELS76
+ PRINTI "are"
+ RTRUE
+?ELS76: EQUAL? VERB,STR?2 \?ELS80
+ PRINTI "have"
+ RTRUE
+?ELS80: PRINT VERB
+ RTRUE
+?ELS69: PRINT VERB
+ EQUAL? VERB,STR?3,STR?4,STR?5 \?CND91
+ PRINTI "e"
+?CND91: EQUAL? VERB,STR?1,STR?2 /FALSE
+ PRINTI "s"
+ RTRUE
+
+
+ .FUNCT ONE?,NUM
+ EQUAL? NUM,1,TRUE-VALUE /TRUE
+ RFALSE
+
+
+ .FUNCT HIM-HER-IT,OBJ,CAP=0,POSSESS?=0
+ CALL NO-PRONOUN?,OBJ,CAP
+ ZERO? STACK /?ELS3
+ ZERO? POSSESS? /TRUE
+ PRINTI "'s"
+ RTRUE
+?ELS3: FSET? OBJ,PERSONBIT /?ELS11
+ ZERO? CAP \?ELS14
+ PRINTI " it"
+ JUMP ?CND12
+?ELS14: PRINTI "It"
+?CND12: ZERO? POSSESS? /TRUE
+ PRINTI "s"
+ RTRUE
+?ELS11: EQUAL? OBJ,PLAYER \?ELS28
+ ZERO? CAP /?ELS31
+ PRINTI "You"
+ JUMP ?CND29
+?ELS31: PRINTI " you"
+?CND29: ZERO? POSSESS? /TRUE
+ PRINTI "r"
+ RTRUE
+?ELS28: FSET? OBJ,PLURALBIT \?ELS46
+ ZERO? POSSESS? /?ELS49
+ ZERO? CAP \?ELS53
+ PRINTI " their"
+ RTRUE
+?ELS53: PRINTI "Their"
+ RTRUE
+?ELS49: ZERO? CAP \?ELS64
+ PRINTI " them"
+ RTRUE
+?ELS64: PRINTI "Them"
+ RTRUE
+?ELS46: FSET? OBJ,FEMALE \?ELS72
+ ZERO? CAP \?ELS75
+ PRINTI " her"
+ RTRUE
+?ELS75: PRINTI "Her"
+ RTRUE
+?ELS72: ZERO? POSSESS? /?ELS86
+ ZERO? CAP \?ELS90
+ PRINTI " his"
+ RTRUE
+?ELS90: PRINTI "His"
+ RTRUE
+?ELS86: ZERO? CAP \?ELS101
+ PRINTI " him"
+ RTRUE
+?ELS101: PRINTI "Him"
+ RTRUE
+
+
+ .FUNCT PICK-ONE-NEW,FROB,THIS=0,L,CNT,RND,MSG,RFROB
+ GET FROB,0 >L
+ GET FROB,1 >CNT
+ DEC 'L
+ ADD FROB,2 >FROB
+ MUL CNT,2
+ ADD FROB,STACK >RFROB
+ ZERO? THIS /?ELS3
+ ZERO? CNT \?ELS3
+ SET 'RND,THIS
+ JUMP ?CND1
+?ELS3: SUB L,CNT
+ RANDOM STACK >RND
+?CND1: GET RFROB,RND >MSG
+ GET RFROB,1
+ PUT RFROB,RND,STACK
+ PUT RFROB,1,MSG
+ INC 'CNT
+ EQUAL? CNT,L \?CND8
+ SET 'CNT,0
+?CND8: PUT FROB,0,CNT
+ RETURN MSG
+
+
+ .FUNCT PICK-ONE,FROB
+ GET FROB,0
+ RANDOM STACK
+ GET FROB,STACK
+ RSTACK
+
+ .ENDI
diff --git a/macros.zil b/macros.zil
new file mode 100644
index 0000000..9c11e17
--- /dev/null
+++ b/macros.zil
@@ -0,0 +1,347 @@
+"MACROS for CHECKPOINT
+Copyright (c) 1985 Infocom, Inc. All rights reserved."
+
+<SETG C-ENABLED? 0>
+<SETG C-ENABLED 1>
+<SETG C-DISABLED 0>
+
+<ZSTR-OFF>
+
+<DEFMAC TELL ("ARGS" A)
+ <FORM PROG ()
+ !<MAPF ,LIST
+ <FUNCTION ("AUX" E P O)
+ <COND (<EMPTY? .A> <MAPSTOP>)
+ (<SET E <NTH .A 1>>
+ <SET A <REST .A>>)>
+ <COND (<TYPE? .E ATOM>
+ <COND (<OR <=? <SET P <SPNAME .E>>
+ "CRLF">
+ <=? .P "CR">>
+ <MAPRET '<CRLF>>)
+ (<EMPTY? .A>
+ <ERROR INDICATOR-AT-END? .E>)
+ (ELSE
+ <SET O <NTH .A 1>>
+ <SET A <REST .A>>
+ <COND (<OR <=? <SET P <SPNAME .E>>
+ "DESC">
+ <=? .P "D">
+ <=? .P "OBJ">
+ <=? .P "O">>
+ <MAPRET <FORM PRINTD .O>>)
+ (<OR <=? .P "A">
+ <=? .P "AN">>
+ <MAPRET <FORM PRINTA .O>>)
+ (<OR ;<=? .P "T">
+ <=? .P "THE">>
+ <MAPRET <FORM PRINTT .O>>)
+ (<OR ;<=? .P "CT">
+ <=? .P "CTHE">>
+ <MAPRET <FORM START-SENTENCE .O>>)
+ (<=? .P "CHE">
+ <COND (<OR <EMPTY? .A>
+ <NOT <TYPE? <NTH .A 1> ATOM>>>
+ <MAPRET <FORM HE-SHE-IT .O T>>)
+ (T
+ <SET P <SPNAME <NTH .A 1>>>
+ <SET A <REST .A>>
+ <MAPRET <FORM HE-SHE-IT .O T .P>>)>)
+ (<=? .P "HE">
+ <COND (<OR <EMPTY? .A>
+ <NOT <TYPE? <NTH .A 1> ATOM>>>
+ <MAPRET <FORM HE-SHE-IT .O>>)
+ (T
+ <SET P <SPNAME <NTH .A 1>>>
+ <SET A <REST .A>>
+ <MAPRET <FORM HE-SHE-IT .O 0 .P>>)>)
+ (<=? .P "V">
+ <SET P <SPNAME <NTH .A 1>>>
+ <SET A <REST .A>>
+ <MAPRET <FORM HE-SHE-IT .O -1 .P>>)
+ (<=? .P "HIM">
+ <MAPRET <FORM HIM-HER-IT .O>>)
+ ;(<=? .P "CHIM">
+ <MAPRET <FORM HIM-HER-IT .O T>>)
+ (<=? .P "HIS">
+ <MAPRET <FORM HIM-HER-IT .O '<> T>>)
+ (<=? .P "CHIS">
+ <MAPRET <FORM HIM-HER-IT .O T T>>)
+ (<OR <=? .P "NUM">
+ <=? .P "N">>
+ <MAPRET <FORM PRINTN .O>>)
+ (<OR ;<=? .P "CHAR">
+ ;<=? .P "CHR">
+ <=? .P "C">>
+ <MAPRET <FORM PRINTC <ASCII .O>>>)
+ (ELSE
+ <MAPRET <FORM PRINT <FORM GETP .O .E>>>)>)>)
+ (<TYPE? .E STRING ZSTRING>
+ <COND ;(<==? 1 <LENGTH .E>>
+ <MAPRET <FORM PRINTC <ASCII <1 .E>>>>)
+ (T <MAPRET <FORM PRINTI .E>>)>)
+ (<TYPE? .E FORM LVAL GVAL>
+ <MAPRET <FORM PRINT .E>>)
+ (ELSE <ERROR UNKNOWN-TYPE .E>)>>>>>
+
+<ROUTINE START-SENTENCE (OBJ "OPTIONAL" (INV? <>))
+ <THIS-IS-IT .OBJ>
+ <COND (<EQUAL? .OBJ ,PLAYER> <TELL "You"> <RTRUE>)
+ (<EQUAL? .OBJ ,POCKET> <TELL "Your pocket"> <RTRUE>)
+ (<EQUAL? .OBJ ,TICKET> <TELL "Your ticket"> <RTRUE>)
+ (<EQUAL? .OBJ ,PASSPORT> <TELL "Your passport"> <RTRUE>)
+ (<EQUAL? .OBJ ,HEAD> <TELL "Your head"> <RTRUE>)
+ (<EQUAL? .OBJ ,HANDS> <TELL "Your hands"> <RTRUE>)>
+ <COND (<NOT <FSET? .OBJ ,NARTICLEBIT>>
+ <COND (<OR <NOT <FSET? .OBJ ,PERSONBIT>>
+ <FSET? .OBJ ,SEENBIT>>
+ <TELL "The ">)
+ (<FSET? .OBJ ,VOWELBIT>
+ <TELL "An ">)
+ (T <TELL "A ">)>)>
+ <COND (<FSET? .OBJ ,PERSONBIT>
+ <FSET .OBJ ,SEENBIT>)>
+ <TELL D .OBJ>
+ <COND (<AND .INV?
+ <IN? ,BRIEFCASE .OBJ>
+ <NOT <FSET? ,BRIEFCASE ,SEENBIT>>>
+ <FSET ,BRIEFCASE ,SEENBIT>
+ <TELL ", carrying" HIM ,BRIEFCASE ",">
+ <RTRUE>)>>
+
+<ROUTINE PRINTT (OBJ)
+ <COND (<AND <EQUAL? .OBJ ,TURN> <L? 1 ,P-NUMBER>>
+ <TELL " " N ,P-NUMBER " minutes">)
+ (<AND <EQUAL? .OBJ ,INTNUM> ,P-DOLLAR-FLAG>
+ <TELL " that amount">)
+ (<FSET? .OBJ ,WINDOWBIT>
+ <TELL " the window">)
+ ;(<AND <EQUAL? .OBJ ,P-IT-OBJECT>
+ <FSET? ,IT ,TOUCHBIT>>
+ <TELL " it">
+ <RTRUE>)
+ (T
+ <THE? .OBJ>
+ <TELL " " D .OBJ>)>
+ ;<THIS-IS-IT .OBJ>>
+
+<ROUTINE THE? (OBJ)
+ <COND (<NOT <FSET? .OBJ ,NARTICLEBIT>>
+ <COND (<OR <NOT <FSET? .OBJ ,PERSONBIT>>
+ <FSET? .OBJ ,SEENBIT>>
+ <TELL " the">)
+ (<FSET? .OBJ ,VOWELBIT>
+ <TELL " an">)
+ (T <TELL " a">)>)>
+ <COND (<FSET? .OBJ ,PERSONBIT>
+ <FSET .OBJ ,SEENBIT>)>>
+
+<ROUTINE PRINTA (O)
+ <COND (<AND <EQUAL? .O ,INTNUM> ,P-DOLLAR-FLAG>
+ <TELL "money">
+ <RTRUE>)
+ (<OR ;<FSET? .O ,PERSONBIT> <FSET? .O ,NARTICLEBIT>> T)
+ (<FSET? .O ,VOWELBIT> <TELL "an ">)
+ (T <TELL "a ">)>
+ <TELL D .O>>
+
+<ROUTINE NO-PRONOUN? (OBJ "OPTIONAL" (CAP 0))
+ <COND (<EQUAL? .OBJ ,PLAYER>
+ <RFALSE>)
+ (<NOT <FSET? .OBJ ,PERSONBIT>>
+ <COND (<AND <EQUAL? .OBJ ,P-IT-OBJECT>
+ <FSET? ,IT ,TOUCHBIT>>
+ <RFALSE>)>)
+ (<FSET? .OBJ ,FEMALE>
+ <COND (<AND <EQUAL? .OBJ ,P-HER-OBJECT>
+ <FSET? ,HER ,TOUCHBIT>>
+ <RFALSE>)>)
+ (<FSET? .OBJ ,PLURALBIT>
+ <COND (<AND <EQUAL? .OBJ ,P-THEM-OBJECT>
+ <FSET? ,THEM ,TOUCHBIT>>
+ <RFALSE>)>)
+ (T
+ <COND (<AND <EQUAL? .OBJ ,P-HIM-OBJECT>
+ <FSET? ,HIM ,TOUCHBIT>>
+ <RFALSE>)>)>
+ <COND (<ZERO? .CAP> <TELL THE .OBJ>)
+ (<ONE? .CAP> <TELL CTHE .OBJ>)>
+ <RTRUE>>
+
+<ROUTINE HE-SHE-IT (OBJ "OPTIONAL" (CAP 0) (VERB <>))
+ <COND (<NO-PRONOUN? .OBJ .CAP>
+ T)
+ (<NOT <FSET? .OBJ ,PERSONBIT>>
+ <COND (<ZERO? .CAP> <TELL " it">)
+ (<ONE? .CAP> <TELL "It">)>)
+ (<==? .OBJ ,PLAYER>
+ <COND (<ZERO? .CAP> <TELL " you">)
+ (<ONE? .CAP> <TELL "You">)>)
+ (<FSET? .OBJ ,FEMALE>
+ <COND (<ZERO? .CAP> <TELL " she">)
+ (<ONE? .CAP> <TELL "She">)>)
+ (<FSET? .OBJ ,PLURALBIT>
+ <COND (<ZERO? .CAP> <TELL " they">)
+ (<ONE? .CAP> <TELL "They">)>)
+ (T
+ <COND (<ZERO? .CAP> <TELL " he">)
+ (<ONE? .CAP> <TELL "He">)>)>
+ <COND (.VERB
+ <PRINTC 32>
+ <COND (<OR <EQUAL? .OBJ ,PLAYER>
+ <FSET? .OBJ ,PLURALBIT>>
+ <COND (<=? .VERB "is"> <TELL "are">)
+ (<=? .VERB "has"><TELL "have">)
+ (T <TELL .VERB>)>)
+ (T
+ <TELL .VERB>
+ <COND (<EQUAL? .VERB "do" "kiss" "push">
+ <TELL "e">)>
+ <COND (<NOT <EQUAL? .VERB "is" "has">>
+ <TELL "s">)>)>)>>
+
+<ROUTINE ONE? (NUM) <EQUAL? .NUM 1 T>>
+
+<ROUTINE HIM-HER-IT (OBJ "OPTIONAL" (CAP 0) (POSSESS? <>))
+ <COND (<NO-PRONOUN? .OBJ .CAP>
+ <COND (.POSSESS? <TELL "'s">)>)
+ (<NOT <FSET? .OBJ ,PERSONBIT>>
+ <COND (<ZERO? .CAP> <TELL " it">) (T <TELL "It">)>
+ <COND (.POSSESS? <TELL "s">)>)
+ (<==? .OBJ ,PLAYER>
+ <COND (.CAP <TELL "You">) (T <TELL " you">)>
+ <COND (.POSSESS? <TELL "r">)>)
+ (<FSET? .OBJ ,PLURALBIT>
+ <COND (.POSSESS?
+ <COND (<ZERO? .CAP> <TELL " their">)
+ (T <TELL "Their">)>)
+ (T
+ <COND (<ZERO? .CAP> <TELL " them">)
+ (T <TELL "Them">)>)>)
+ (<FSET? .OBJ ,FEMALE>
+ <COND (<ZERO? .CAP> <TELL " her">) (T <TELL "Her">)>)
+ (T
+ <COND (.POSSESS?
+ <COND (<ZERO? .CAP> <TELL " his">)
+ (T <TELL "His">)>)
+ (T
+ <COND (<ZERO? .CAP> <TELL " him">)
+ (T <TELL "Him">)>)>)>
+ <RTRUE>>
+
+<DEFMAC VERB? ("TUPLE" ATMS "AUX" (O ()) (L ()))
+ <REPEAT ()
+ <COND (<EMPTY? .ATMS>
+ <RETURN!- <COND (<LENGTH? .O 1> <NTH .O 1>)
+ (ELSE <FORM OR !.O>)>>)>
+ <REPEAT ()
+ <COND (<EMPTY? .ATMS> <RETURN!->)>
+ <SET ATM <NTH .ATMS 1>>
+ <SET L
+ (<CHTYPE <PARSE <STRING "V?"<SPNAME .ATM>>> GVAL>
+ !.L)>
+ <SET ATMS <REST .ATMS>>
+ <COND (<==? <LENGTH .L> 3> <RETURN!->)>>
+ <SET O (<FORM EQUAL? ',PRSA !.L> !.O)>
+ <SET L ()>>>
+
+<DEFMAC DOBJ? ("TUPLE" ATMS "AUX" (O ()) (L ()))
+ <REPEAT ()
+ <COND (<EMPTY? .ATMS>
+ <RETURN!- <COND (<LENGTH? .O 1> <NTH .O 1>)
+ (ELSE <FORM OR !.O>)>>)>
+ <REPEAT ()
+ <COND (<EMPTY? .ATMS> <RETURN!->)>
+ <SET ATM <NTH .ATMS 1>>
+ <SET L (<CHTYPE .ATM GVAL> !.L)>
+ <SET ATMS <REST .ATMS>>
+ <COND (<==? <LENGTH .L> 3> <RETURN!->)>>
+ <SET O (<FORM EQUAL? ',PRSO !.L> !.O)>
+ <SET L ()>>>
+
+<DEFMAC IOBJ? ("TUPLE" ATMS "AUX" (O ()) (L ()))
+ <REPEAT ()
+ <COND (<EMPTY? .ATMS>
+ <RETURN!- <COND (<LENGTH? .O 1> <NTH .O 1>)
+ (ELSE <FORM OR !.O>)>>)>
+ <REPEAT ()
+ <COND (<EMPTY? .ATMS> <RETURN!->)>
+ <SET ATM <NTH .ATMS 1>>
+ <SET L (<CHTYPE .ATM GVAL> !.L)>
+ <SET ATMS <REST .ATMS>>
+ <COND (<==? <LENGTH .L> 3> <RETURN!->)>>
+ <SET O (<FORM EQUAL? ',PRSI !.L> !.O)>
+ <SET L ()>>>
+
+<DEFMAC RFATAL ()
+ '<PROG () <PUSH 2> <RSTACK>>>
+
+<DEFMAC PROB ('BASE?)
+ <FORM NOT <FORM L? .BASE? '<RANDOM 100>>>>
+
+<ROUTINE PICK-ONE-NEW (FROB "OPTIONAL" (THIS <>) "AUX" L CNT RND MSG RFROB)
+ <SET L <GET .FROB 0>>
+ <SET CNT <GET .FROB 1>>
+ <SET L <- .L 1>>
+ <SET FROB <REST .FROB 2>>
+ <SET RFROB <REST .FROB <* .CNT 2>>>
+ <COND (<AND .THIS <ZERO? .CNT>>
+ <SET RND .THIS>)
+ (T <SET RND <RANDOM <- .L .CNT>>>)>
+ <SET MSG <GET .RFROB .RND>>
+ <PUT .RFROB .RND <GET .RFROB 1>>
+ <PUT .RFROB 1 .MSG>
+ <SET CNT <+ .CNT 1>>
+ <COND (<==? .CNT .L> <SET CNT 0>)>
+ <PUT .FROB 0 .CNT>
+ .MSG>
+
+<ROUTINE PICK-ONE (FROB) <GET .FROB <RANDOM <GET .FROB 0>>>>
+
+<DEFMAC ENABLE ('INT) <FORM PUT .INT ,C-ENABLED? 1>>
+
+<DEFMAC DISABLE ('INT) <FORM PUT .INT ,C-ENABLED? 0>>
+
+;<DEFMAC FLAMING? ('OBJ)
+ <FORM AND <FORM FSET? .OBJ ',FLAMEBIT>
+ <FORM FSET? .OBJ ',ONBIT>>>
+
+<DEFMAC OPENABLE? ('OBJ)
+ <FORM OR <FORM FSET? .OBJ ',DOORBIT>
+ <FORM FSET? .OBJ ',CONTBIT>>>
+
+<DEFMAC ABS ('NUM)
+ <FORM COND (<FORM L? .NUM 0> <FORM - 0 .NUM>)
+ (T .NUM)>>
+
+<DEFMAC GET-REXIT-ROOM ('PT)
+ <COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>
+ <FORM GET .PT ',REXIT>)
+ (T <FORM GETB .PT ',REXIT>)>>
+
+<DEFMAC GET-DOOR-OBJ ('PT)
+ <COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>
+ <FORM GET .PT ',DEXITOBJ>)
+ (T <FORM GETB .PT ',DEXITOBJ>)>>
+
+<DEFMAC GET/B ('TBL 'PTR)
+ <COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>
+ <FORM GET .TBL .PTR>)
+ (T <FORM GETB .TBL .PTR>)>>
+
+<DEFMAC RMGL-SIZE ('TBL)
+ <COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>
+ <FORM - <FORM / <FORM PTSIZE .TBL> 2> 1>)
+ (T <FORM - <FORM PTSIZE .TBL> 1>)>>
+
+<DEFMAC GT-O ('OBJ)
+ <FORM GET ',GOAL-TABLES <FORM GETP .OBJ ',P?CHARACTER>>>
+
+<DEFMAC HARD? () '<EQUAL? ,VARIATION 2 4>>
+<DEFMAC SPY? () '<EQUAL? ,VARIATION 3 4>>
+
+<ZSTR-ON>
+
+<SETG PLUS-MODE T>
+
+<OBJECT LAST-OBJECT> "for MOBY-FIND"
diff --git a/main.cmp b/main.cmp
new file mode 100644
index 0000000..efd9d79
--- /dev/null
+++ b/main.cmp
@@ -0,0 +1,406 @@
+
+;COMPARISON OF PS:<SWG>MAIN.ZAP.1 AND PS:<SWG>MAIN.ZAP.3
+;OPTIONS ARE /1
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-36 (832)
+ EQUAL? N,W?SPY,W?S \?ELS11
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-36 (832)
+ EQUAL? N,W?SPY,W?S \?ELS10
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-39 (893)
+?ELS11: SET 'VARIATION,1
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-39 (893)
+?ELS10: SET 'VARIATION,1
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-44 (1074)
+ EQUAL? N,W?L,W?LONG \?CND23
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-44 (1074)
+ EQUAL? N,W?L,W?LONG \?CND18
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-47 (1145)
+?CND23: CALL TAKE-YOUR-PLACES
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-47 (1145)
+?CND18: CALL TAKE-YOUR-PLACES
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-51 (1227)
+ EQUAL? EGO,BAD-SPY \?ELS28
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-51 (1227)
+ EQUAL? EGO,BAD-SPY \?ELS21
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-66 (2493)
+ JUMP ?CND26
+?ELS28: PRINTI "With your business deal behind you, you want only to get out of this bleak corner of Eastern Europe. The frontier is now only a few hours away, and from there it's not far to Vienna, and civilization....
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-66 (2493)
+ JUMP ?CND20
+?ELS21: PRINTI "With your business deal behind you, you want only to get out of this bleak corner of Eastern Europe. The frontier is now only a few hours away, and from there it's not far to Vienna, and civilization....
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-74 (3456)
+ ZERO? HARD? /?ELS37
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-74 (3456)
+ ZERO? HARD? /?ELS27
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-83 (3701)
+ JUMP ?CND35
+?ELS37: PRINTI "deliver a "
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-83 (3701)
+ JUMP ?CND26
+?ELS27: PRINTI "deliver a "
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-86 (3762)
+?CND35: PRINTI " to our special agent in Gola. An enemy agent spotted me on the train, and I only barely managed to escape."" He groans softly, examining his wound.
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-86 (3762)
+?CND26: PRINTI " to our special agent in Gola. An enemy agent spotted me on the train, and I only barely managed to escape."" He groans softly, examining his wound.
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-89 (4249)
+ ZERO? HARD? /?ELS49
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-89 (4249)
+ ZERO? HARD? /?ELS35
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-91 (4293)
+ JUMP ?CND47
+?ELS49: PRINTD STATION-GOLA
+?CND47: PRINTI " is "
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-91 (4293)
+ JUMP ?CND34
+?ELS35: PRINTD STATION-GOLA
+?CND34: PRINTI " is "
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-96 (4417)
+ ZERO? HARD? \?CND57
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-96 (4417)
+ ZERO? HARD? \?CND40
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-99 (4495)
+ EQUAL? PASSWORD,CAMERA,HANKY,SCARF \?CND62
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-99 (4495)
+ EQUAL? PASSWORD,CAMERA,HANKY,SCARF \?CND44
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-101 (4553)
+?CND62: PRINTI " '"
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-101 (4553)
+?CND44: PRINTI " '"
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-104 (4606)
+?CND57: PRINTI "...."" Then he stops and listens. Before you can say anything, he checks the corridor and races out.
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-104 (4606)
+?CND40: PRINTI "...."" Then he stops and listens. Before you can say anything, he checks the corridor and races out.
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-109 (4767)
+?CND26: CALL V-VERSION
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-109 (4767)
+?CND20: CALL V-VERSION
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-122 (5009)
+?PRG6: GET P-LEXV,L >N
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-122 (5009)
+?PRG5: GET P-LEXV,L >N
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-124 (5059)
+ ZERO? STACK \?CND8
+ JUMP ?REP7
+?CND8: ADD L,P-LEXELEN >L
+ JUMP ?PRG6
+?REP7: EQUAL? N,WD1,WD2 /?THN14
+ EQUAL? N,WD3,WD4 \?CND11
+?THN14: RETURN N
+?CND11: CALL WT?,N,PS?VERB,P1?VERB >N
+ EQUAL? N,ACT?QUIT \?ELS18
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-124 (5059)
+ ZERO? STACK \?CND7
+ JUMP ?REP6
+?CND7: ADD L,P-LEXELEN >L
+ JUMP ?PRG5
+?REP6: EQUAL? N,WD1,WD2 /?THN10
+ EQUAL? N,WD3,WD4 \?CND9
+?THN10: RETURN N
+?CND9: CALL WT?,N,PS?VERB,P1?VERB >N
+ EQUAL? N,ACT?QUIT \?ELS13
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-137 (5321)
+?ELS18: EQUAL? N,ACT?RESTART \?ELS22
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-137 (5319)
+?ELS13: EQUAL? N,ACT?RESTART \?ELS16
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-142 (5405)
+?ELS22: EQUAL? N,ACT?$VERIFY \?ELS26
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-142 (5403)
+?ELS16: EQUAL? N,ACT?$VERIFY \?ELS19
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-145 (5472)
+?ELS26: EQUAL? N,ACT?RELEASE \?ELS28
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-145 (5470)
+?ELS19: EQUAL? N,ACT?RELEASE \?ELS20
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-148 (5539)
+?ELS28: EQUAL? N,ACT?RESTORE \?CND16
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-148 (5537)
+?ELS20: EQUAL? N,ACT?RESTORE \?CND12
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-154 (5649)
+?CND16: CALL PLEASE-TYPE-OR,WD1,WD2
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-154 (5647)
+?CND12: CALL PLEASE-TYPE-OR,WD1,WD2
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-171 (5918)
+ GRTR? N,L \?ELS5
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-171 (5916)
+ GRTR? N,L \?ELS4
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-173 (5948)
+?ELS5: RETURN N
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-173 (5946)
+?ELS4: RETURN N
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-186 (6332)
+ EQUAL? VARIATION,1,2 \?ELS3
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-186 (6330)
+ EQUAL? VARIATION,1,2 \?ELS2
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-197 (6623)
+?ELS3: EQUAL? VARIATION,3,4 \?CND1
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-197 (6621)
+?ELS2: EQUAL? VARIATION,3,4 \?CND1
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-207 (6873)
+?PRG6: IGRTR? 'N,L \?ELS10
+ JUMP ?REP7
+?ELS10: GET BRIEFCASE-TBL,N >P
+ ZERO? P /?PRG6
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-207 (6871)
+?PRG4: IGRTR? 'N,L \?ELS7
+ JUMP ?REP5
+?ELS7: GET BRIEFCASE-TBL,N >P
+ ZERO? P /?PRG4
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-212 (6982)
+ JUMP ?PRG6
+?REP7: PUTP BAD-SPY,P?ACTION,TRAVELER-F
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-212 (6978)
+ JUMP ?PRG4
+?REP5: PUTP BAD-SPY,P?ACTION,TRAVELER-F
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-230 (7487)
+ ZERO? HARD? /?CND13
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-230 (7483)
+ ZERO? HARD? /?CND9
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-236 (7657)
+ EQUAL? PICKPOCKET,BAD-SPY \?CND13
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-236 (7652)
+ EQUAL? PICKPOCKET,BAD-SPY \?CND9
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-239 (7737)
+?CND13: CALL SET-PASSES
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-239 (7731)
+?CND9: CALL SET-PASSES
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-266 (8263)
+?CND3: ZERO? NEW? \?ELS8
+ EQUAL? L,COMPARTMENT-START \?ELS8
+ EQUAL? N,CAR-START \?ELS8
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-266 (8256)
+?CND3: ZERO? NEW? \?ELS6
+ EQUAL? L,COMPARTMENT-START \?ELS6
+ EQUAL? N,CAR-START \?ELS6
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-270 (8362)
+ JUMP ?CND6
+?ELS8: CALL ZMEMQ,L,CAR-ROOMS-REST
+ ZERO? STACK /?CND6
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-270 (8355)
+ JUMP ?CND5
+?ELS6: CALL ZMEMQ,L,CAR-ROOMS-REST
+ ZERO? STACK /?CND5
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-274 (8462)
+ ZERO? STACK \?THN16
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-274 (8455)
+ ZERO? STACK \?THN10
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-276 (8505)
+ ZERO? STACK /?ELS15
+?THN16: GETPT L,P?OUT
+ GET STACK,REXIT >L
+ JUMP ?CND6
+?ELS15: EQUAL? N,CAR-HERE \?ELS19
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-276 (8498)
+ ZERO? STACK /?ELS11
+?THN10: GETPT L,P?OUT
+ CALL GET-REXIT-ROOM,STACK >L
+ JUMP ?CND5
+?ELS11: EQUAL? N,CAR-HERE \?ELS12
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-283 (8669)
+ JUMP ?CND6
+?ELS19: CALL FIND-FLAG-LG,L,DOORBIT
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-283 (8672)
+ JUMP ?CND5
+?ELS12: CALL FIND-FLAG-LG,L,DOORBIT
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-286 (8741)
+?CND6: CALL TAKE-YOUR-PLACE-TEST,OBJ,STA-ONLY?
+ ZERO? STACK /?CND22
+ EQUAL? N,CAR-HERE \?ELS27
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-286 (8744)
+?CND5: CALL TAKE-YOUR-PLACE-TEST,OBJ,STA-ONLY?
+ ZERO? STACK /?CND13
+ EQUAL? N,CAR-HERE \?ELS16
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-290 (8852)
+ JUMP ?CND25
+?ELS27: GETP L,P?CAR >X
+ ZERO? X /?CND25
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-290 (8855)
+ JUMP ?CND15
+?ELS16: GETP L,P?CAR >X
+ ZERO? X /?CND15
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-294 (8922)
+?CND25: PUTP OBJ,P?CAR,N
+?CND22: ZERO? NEW? /?CND30
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-294 (8925)
+?CND15: PUTP OBJ,P?CAR,N
+?CND13: ZERO? NEW? /?CND18
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-297 (9008)
+ ZERO? X /?CND34
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-297 (9011)
+ ZERO? X /?CND20
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-301 (9096)
+?CND34: EQUAL? OBJ,BAD-SPY /?CND30
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-301 (9099)
+?CND20: EQUAL? OBJ,BAD-SPY /?CND18
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-305 (9196)
+?CND30: DLESS? 'P,1 \?PRG1
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-305 (9199)
+?CND18: DLESS? 'P,1 \?PRG1
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-315 (9422)
+ ZERO? STA-ONLY? /?ELS10
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-315 (9425)
+ ZERO? STA-ONLY? /?ELS7
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-317 (9459)
+?ELS10: ZERO? X /TRUE
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-317 (9461)
+?ELS7: ZERO? X /TRUE
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-322 (9518)
+ EQUAL? L,GAS-CAR-RM \?ELS3
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-322 (9519)
+ EQUAL? L,GAS-CAR-RM \?ELS2
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-324 (9572)
+?ELS3: EQUAL? N,CAR-HERE /?CND1
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-324 (9573)
+?ELS2: EQUAL? N,CAR-HERE /?CND1
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-353 (10089)
+ ZERO? FIRST /?ELS6
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-353 (10090)
+ ZERO? FIRST /?ELS4
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-359 (10182)
+ JUMP ?CND4
+?ELS6: PRINTI "Location:"
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-359 (10183)
+ JUMP ?CND3
+?ELS4: PRINTI "Location:"
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-363 (10252)
+?CND4: BUFOUT TRUE-VALUE
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-363 (10253)
+?CND3: BUFOUT TRUE-VALUE
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-393 (10779)
+ EQUAL? LAST-PLAYER-LOC,HERE \?THN13
+ EQUAL? PLAYER-NOT-FACING-OLD,PLAYER-NOT-FACING /?CND10
+?THN13: SET 'LAST-PLAYER-LOC,HERE
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-393 (10780)
+ EQUAL? LAST-PLAYER-LOC,HERE \?THN7
+ EQUAL? PLAYER-NOT-FACING-OLD,PLAYER-NOT-FACING /?CND6
+?THN7: SET 'LAST-PLAYER-LOC,HERE
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-399 (10997)
+ ZERO? PLAYER-NOT-FACING /?CND17
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-399 (10995)
+ ZERO? PLAYER-NOT-FACING /?CND11
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-403 (11107)
+?CND17: DIROUT D-NORMAL
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-403 (11105)
+?CND11: DIROUT D-NORMAL
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-407 (11183)
+ ZERO? PLAYER-NOT-FACING /?CND24
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-407 (11181)
+ ZERO? PLAYER-NOT-FACING /?CND17
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-410 (11257)
+?CND24: SUB 51,LEN
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-410 (11255)
+?CND17: SUB 51,LEN
+***************
+
+**** FILE PS:<SWG>MAIN.ZAP.1, 1-412 (11303)
+?CND10: CURSET 1,68
+**** FILE PS:<SWG>MAIN.ZAP.3, 1-412 (11301)
+?CND6: CURSET 1,68
+***************
+
diff --git a/main.zap b/main.zap
new file mode 100644
index 0000000..c0c2636
--- /dev/null
+++ b/main.zap
@@ -0,0 +1,474 @@
+
+
+ .FUNCT GO
+START::
+
+?FCN: CALL2 INIT-STATUS-LINE,TRUE-VALUE
+ SET 'LIT,TRUE-VALUE
+ PUTB P-LEXV,0,59
+ PUTB YES-LEXV,0,4
+ SET 'WINNER,PLAYER
+ CALL QUEUE,I-PROMPT,1
+ PUT STACK,0,1
+ CALL1 INTRO
+ FSET HERE,SEENBIT
+ CALL1 START-MOVEMENT
+ CALL1 V-LOOK
+ CALL1 MAIN-LOOP
+ JUMP ?FCN
+
+
+ .FUNCT INTRO,N
+ SET 'HERE,GAME
+ PRINTI "Copyright (c) 1985 Infocom, Inc. All rights reserved.
+
+Welcome to "
+ PRINTD GAME
+ PRINTI " (TM) - interactive fiction from Infocom!
+
+"
+ PRINTI "[Note to testers: this story has the command GO TO, and the concept of not being able to see things behind your back. The unit of currency in this story is the Frotzian slimpuk, whose symbol is """
+ PRINTC CURRENCY-SYMBOL
+ PRINTI """.
+
+Messages in square brackets [] will not be in the final release.
+Remember: you can shorten your words only to NINE (9) letters.
+But you can use C for COMPARTMENT, V for VESTIBULE, and F for FORWARD.]
+
+"
+ PRINTI "Do you want the viewpoint of the traveler or the spy? "
+ CALL READ-WORD,W?TRAVELER,W?SPY,W?T,W?S,W?TRAVELLER >N
+ EQUAL? N,W?SPY,W?S \?ELS11
+ SET 'VARIATION,3
+ JUMP ?CND9
+?ELS11: SET 'VARIATION,1
+?CND9: PRINTI "Do you want the short variation or the long one? "
+ CALL READ-WORD,W?SHORT,W?LONG,W?S,W?L >N
+ PRINTI "Then let the story begin!"
+ CRLF
+ EQUAL? N,W?L,W?LONG \?CND23
+ INC 'VARIATION
+ CALL ZMEMZ,MCGUFFIN,BRIEFCASE-TBL
+ PUT BRIEFCASE-TBL,STACK,0
+ FSET MCGUFFIN,NDESCBIT
+ FCLEAR MCGUFFIN,TAKEBIT
+?CND23: CALL1 TAKE-YOUR-PLACES
+ EQUAL? VARIATION,2,4 \?CND26
+ MOVE MCGUFFIN,LIMBO-REAR
+?CND26: CALL1 START-TRAIN
+ CLEAR 0
+ EQUAL? VARIATION,3,4 \?ELS31
+ REMOVE BOND
+ MOVE BOND-OTHER,HERE
+ CALL QUEUE,I-BOND-OTHER,-1
+ PUT STACK,0,1
+ PRINTI "Why did you want to be a spy anyway? You could have had a nice restful job, like an air-traffic controller. You could have tended flowers behind a white picket fence around your country cottage. At least they could let you grab a few winks between one job and the next. But no -- you finish debriefing in some dirty little city in Frotzerland, and before you can even find a phone book, let alone a hotel, they volunteer you for another assignment.
+
+""You've got to intercept "
+ CALL2 PRINTA,MCGUFFIN
+ PRINTI "!"" they told you. ""Then deliver it to our agent in Gola so the leak can be traced. We don't know where it is for sure, but we think it's in a briefcase that's leaving town on the next train. You're the only agent that's close enough and experienced enough to be sent after it. And at the end of the trip, there will be a plane ticket to home waiting for you.""
+
+So that's why you're climbing all over this stupid train. Finding the briefcase was easy enough, but the dude carrying it was something else. Even your well-placed bullet didn't make him drop. Now, if only he'll take the bait and follow you up here, you can .... Wait! Here he comes from the forward end! But he's not carrying the case!
+
+"
+ JUMP ?CND29
+?ELS31: PRINTI "With your business deal behind you, you want only to get out of this bleak corner of Eastern Europe. The frontier is now only a few hours away, and from there it's not far to Vienna, and civilization....
+
+The ride seems endless, and you're dozing off again. The wheels of the train are ticking like a clock, ticking off the segments of track you're passing, and the compartment is rocking you back and forth, back and forth, making your eyelids slowly close.
+
+Your slumber is cut short as a man staggers into your compartment, panting strangely. From his demeanor, you guess that he has drunk too much. But before you can dismiss him, you notice that he's grasping a bright red spot on his shirt. He speaks quietly, but in a hurry.
+
+""I've got only a moment, so listen carefully! Since you were reading the International Herald over lunch, I assume you're an American. I am an agent of our government, and I've been sent to "
+ EQUAL? VARIATION,2,4 \?ELS40
+ PRINTI "pick up some kind of "
+ PRINTD MCGUFFIN
+ PRINTI " in Frbz and take it"
+ JUMP ?CND38
+?ELS40: PRINTI "deliver a "
+ PRINTD MCGUFFIN
+?CND38: PRINTI " to our special agent in Gola. An enemy agent spotted me on the train, and I only barely managed to escape."" He groans softly, examining his wound.
+
+""The best I can do now is throw the enemy off the scent, but I need you, and your country needs you, to carry out my assignment."" You start to interrupt, a thousand questions racing through your mind. ""There's no time! Here! Take my briefcase, but be careful with it! Our enemies are all around us! My contact in "
+ EQUAL? VARIATION,2,4 \?ELS51
+ PRINTD STATION-FRBZ
+ JUMP ?CND49
+?ELS51: PRINTD STATION-GOLA
+?CND49: PRINTI " is "
+ CALL2 PRINTA,CONTACT
+ PRINTI ", and I was to display "
+ EQUAL? VARIATION,2,4 /?CND58
+ CALL2 PRINTA,PASSOBJECT
+ PRINTI ", then use the word"
+ EQUAL? PASSWORD,CAMERA,HANKY,SCARF \?CND63
+ PRINTI "s"
+?CND63: PRINTI " '"
+ PRINTD PASSWORD
+ PRINTI "' "
+?CND58: PRINTI "...."" Then he stops and listens. Before you can say anything, he checks the corridor and races out.
+
+"
+ CALL QUEUE,I-BOND,1
+ PUT STACK,0,1
+?CND29: CALL1 V-VERSION
+ CRLF
+ CALL1 INIT-STATUS-LINE
+ RSTACK
+
+
+ .FUNCT READ-WORD,WD1,WD2,WD3=0,WD4=0,WD5=0,N,L
+?FCN: PRINTI ">"
+ READ P-INBUF,P-LEXV
+ GETB P-LEXV,P-LEXWORDS
+ ZERO? STACK \?CND3
+ CALL PLEASE-TYPE-OR,WD1,WD2
+ JUMP ?FCN
+?CND3: SET 'L,P-LEXSTART
+?PRG6: GET P-LEXV,L >N
+ CALL WT?,N,PS?BUZZ-WORD
+ ZERO? STACK \?CND8
+ JUMP ?REP7
+?CND8: ADD L,P-LEXELEN >L
+ JUMP ?PRG6
+?REP7: EQUAL? N,WD1,WD2 /?THN14
+ EQUAL? N,WD3,WD4,WD5 \?CND11
+?THN14: RETURN N
+?CND11: CALL WT?,N,PS?VERB,P1?VERB >N
+ EQUAL? N,ACT?QUIT \?ELS18
+ QUIT
+ CALL1 TELL-FAILED
+ JUMP ?FCN
+?ELS18: EQUAL? N,ACT?RESTART \?ELS20
+ RESTART
+ CALL1 TELL-FAILED
+ JUMP ?FCN
+?ELS20: EQUAL? N,ACT?$VERIFY \?ELS22
+ CALL1 V-$VERIFY
+ JUMP ?FCN
+?ELS22: EQUAL? N,ACT?RELEASE \?ELS24
+ CALL1 V-VERSION
+ JUMP ?FCN
+?ELS24: EQUAL? N,ACT?RESTORE \?CND16
+ CALL1 V-RESTORE
+ ZERO? STACK /?FCN
+ CALL1 TELL-FAILED
+ JUMP ?FCN
+?CND16: CALL PLEASE-TYPE-OR,WD1,WD2
+ JUMP ?FCN
+
+
+ .FUNCT PLEASE-TYPE-OR,WD1,WD2
+ PRINTI "Please type """
+ PRINTB WD1
+ PRINTI """ or """
+ PRINTB WD2
+ PRINTI """. "
+ RTRUE
+
+
+ .FUNCT RANDOM-PER-VAR,L,N
+ MUL VARIATION,L
+ DIV STACK,MAX-VAR
+ ADD 1,STACK >N
+ GRTR? N,L \?ELS5
+ RETURN L
+?ELS5: RETURN N
+
+
+ .FUNCT TAKE-YOUR-PLACES,P,N,L,?TMP1
+ PUTP WAITER,P?CAR,DINER-CAR
+ PUTP COOK,P?CAR,DINER-CAR
+ CALL2 PICK-ONE,CAR-ROOMS-COMPS >COMPARTMENT-START
+ EQUAL? VARIATION,3,4 \?CND1
+ ADD 1,CAR-START >CAR-HERE
+?CND1: CALL2 TAKE-YOUR-PLACES-CAST,EXTRA-TABLE
+ CALL2 TAKE-YOUR-PLACES-CAST,SPY-TABLE
+ CALL TAKE-YOUR-PLACES-CAST,MARKS-TABLE,FALSE-VALUE,FALSE-VALUE,FALSE-VALUE
+ GET SPY-TABLE,0
+ CALL2 RANDOM-PER-VAR,STACK
+ GET SPY-TABLE,STACK >BAD-SPY
+ GETP BAD-SPY,P?CHARACTER >BAD-SPY-C
+ GETP BAD-SPY,P?ACTION >BAD-SPY-DEFAULT-F
+ EQUAL? VARIATION,3,4 /?ELS6
+ SET 'HERE,COMPARTMENT-START
+ CALL2 GENERIC-SEAT-F,0 >PLAYER-SEATED
+ MOVE BLOOD-SPOT,HERE
+ MOVE BRIEFCASE,PLAYER-SEATED
+ PUTP BRIEFCASE,P?CAR,CAR-HERE
+ PUTP BAD-SPY,P?ACTION,BAD-SPY-F
+ ADD 1,CAR-START
+ PUTP BAD-SPY,P?CAR,STACK
+ MOVE BAD-SPY,OTHER-ROOF
+ JUMP ?CND4
+?ELS6: SET 'HERE,ROOF
+ PUTP PLAYER,P?CAR,CAR-HERE
+ MOVE BRIEFCASE,BAD-SPY
+ PUTP BRIEFCASE,P?CAR,CAR-START
+ FCLEAR BRIEFCASE,TAKEBIT
+ SET 'N,0
+ GET BRIEFCASE-TBL,0 >L
+?PRG9: IGRTR? 'N,L \?ELS13
+ JUMP ?REP10
+?ELS13: GET BRIEFCASE-TBL,N >P
+ ZERO? P /?PRG9
+ FCLEAR P,TAKEBIT
+ JUMP ?PRG9
+?REP10: RANDOM 6
+ ADD 9,STACK
+ CALL QUEUE,I-TRAVELER-TO-GRNZ,STACK
+ PUT STACK,0,1
+ PUTP BAD-SPY,P?ACTION,TRAVELER-F
+ PUTP BAD-SPY,P?CAR,CAR-START
+ PUTP BAD-SPY,P?LDESC,35
+ GETP COMPARTMENT-START,P?OTHER >L
+ MOVE BAD-SPY,L
+ SET 'BAD-SPY-DONE-PEEKING,TRUE-VALUE
+ MOVE BLOOD-SPOT,L
+ FCLEAR GUN,NDESCBIT
+ FSET GUN,TAKEBIT
+ MOVE GUN,POCKET
+?CND4: MOVE PLAYER,HERE
+ SET 'LAST-CAR-HERE,CAR-HERE
+ ADD 1,CONTACT-MAX >?TMP1
+ CALL2 RANDOM-PER-VAR,CONTACT-MAX
+ SUB ?TMP1,STACK
+ GET EXTRA-TABLE,STACK >CONTACT
+ GETP CONTACT,P?ACTION >CONTACT-DEFAULT-F
+ PUTP CONTACT,P?ACTION,CONTACT-F
+ EQUAL? VARIATION,2,4 \?CND16
+ CALL1 MOVE-CONTACT
+ PUTP TICKET,P?CAPACITY,STATION-WIEN
+ PUTP TICKET-OTHER,P?CAPACITY,STATION-WIEN
+ SET 'LATCH-TURNED,FALSE-VALUE
+ CALL PICK-ONE-NOT,SPY-TABLE,BAD-SPY >PICKPOCKET
+ CALL PICK-ONE-NOT,SPY-TABLE,BAD-SPY >PEEKER
+ ADD 2,CAR-START
+ PUTP PEEKER,P?CAR,STACK
+ MOVE PEEKER,OTHER-VESTIBULE-REAR
+ GETP PEEKER,P?CHARACTER
+ GET GOAL-TABLES,STACK
+ PUT STACK,GOAL-ENABLE,1
+ CALL ESTABLISH-GOAL-TRAIN,PEEKER,VESTIBULE-FWD,1
+ PUTP PEEKER,P?LDESC,PEEKING-CODE
+?CND16: CALL1 SET-PASSES
+ RSTACK
+
+
+ .FUNCT SET-PASSES,NUM=0,L,N,P
+ SET 'PASSWORD-GIVEN,FALSE-VALUE
+ SET 'PASSWORD-GIVEN-OTHER,FALSE-VALUE
+ SET 'PASSOBJECT-GIVEN,FALSE-VALUE
+ SET 'PASSOBJECT-GIVEN-OTHER,FALSE-VALUE
+ ZERO? NUM /?CND1
+ FSET SPY-LIST,MUNGBIT
+?CND1: SET 'L,6
+ ADD NUM,VARIATION >P
+ GET PASS-TABLE,P >PASSOBJECT
+ CALL2 RANDOM-PER-VAR,L
+ ADD NUM,STACK >N
+ EQUAL? P,N \?CND4
+ IGRTR? 'N,L \?CND4
+ SET 'N,1
+?CND4: GET PASS-TABLE,N >PASSWORD
+ RETURN PASSWORD
+
+
+ .FUNCT TAKE-YOUR-PLACES-CAST,TBL,NEW?=0,STA-ONLY?=0,PEOPLE?=1,P,OBJ,N,L,M,X
+ GET TBL,0 >P
+ GET CAR-ROOMS,0 >M
+?PRG1: GET TBL,P >OBJ
+ ZERO? PEOPLE? /?CND3
+ FSET OBJ,LOCKED
+?CND3: RANDOM M
+ GET CAR-ROOMS,STACK >L
+ RANDOM CAR-MAX >N
+ EQUAL? N,DINER-CAR,FANCY-CAR \?CND7
+ DEC 'N
+?CND7: ZERO? PEOPLE? \?ELS12
+ JUMP ?CND10
+?ELS12: ZERO? NEW? \?ELS14
+ EQUAL? L,COMPARTMENT-START \?ELS14
+ EQUAL? N,CAR-START \?ELS14
+ DEC 'N
+ JUMP ?CND10
+?ELS14: CALL ZMEMQ,L,CAR-ROOMS-REST
+ ZERO? STACK /?CND10
+ FSET? OBJ,PLURALBIT /?THN22
+ CALL OCCUPIED?,L,N
+ ZERO? STACK /?ELS21
+?THN22: GETPT L,P?OUT
+ GET STACK,REXIT >L
+ JUMP ?CND10
+?ELS21: EQUAL? N,CAR-HERE \?ELS25
+ CALL FIND-FLAG-LG,L,DOORBIT
+ FSET STACK,LOCKED
+ JUMP ?CND10
+?ELS25: CALL FIND-FLAG-LG,L,DOORBIT
+ FCLEAR STACK,LOCKED
+?CND10: ZERO? PEOPLE? /?THN31
+ CALL TAKE-YOUR-PLACE-TEST,OBJ,STA-ONLY?
+ ZERO? STACK /?CND28
+?THN31: EQUAL? N,CAR-HERE,DINER-CAR,FANCY-CAR \?ELS35
+ MOVE OBJ,L
+ JUMP ?CND33
+?ELS35: GETP L,P?OTHER >X
+ ZERO? X /?CND33
+ MOVE OBJ,X
+?CND33: PUTP OBJ,P?CAR,N
+?CND28: ZERO? NEW? /?CND38
+ ZERO? PEOPLE? /?CND38
+ CALL ZMEMQ,OBJ,EXTRA-TABLE >X
+ ZERO? X /?CND43
+ GET EXTRA-SEEN-TABLE,X
+ SUB 0,STACK
+ PUT EXTRA-SEEN-TABLE,X,STACK
+?CND43: EQUAL? OBJ,BAD-SPY /?CND38
+ FCLEAR OBJ,SEENBIT
+ FCLEAR OBJ,TOUCHBIT
+ PUTP OBJ,P?LDESC,0
+?CND38: DLESS? 'P,1 \?PRG1
+ RTRUE
+
+
+ .FUNCT TAKE-YOUR-PLACE-TEST,OBJ,STA-ONLY?,X
+ EQUAL? OBJ,CONTACT /FALSE
+ CALL IN-MOTION?,OBJ,TRUE-VALUE
+ ZERO? STACK \FALSE
+ CALL2 META-LOC,OBJ
+ CALL ZMEMQ,STACK,STATION-ROOMS >X
+ ZERO? STA-ONLY? /?ELS10
+ RETURN X
+?ELS10: ZERO? X /TRUE
+ RFALSE
+
+
+ .FUNCT OCCUPIED?,L,N
+ EQUAL? L,GAS-CAR-RM \?ELS3
+ EQUAL? N,GAS-CAR /TRUE
+?ELS3: EQUAL? N,CAR-HERE,DINER-CAR,FANCY-CAR /?CND1
+ GETP L,P?OTHER >L
+?CND1: CALL FIND-FLAG-CAR,L,N,PERSONBIT
+ RSTACK
+
+
+ .FUNCT MOVE-CONTACT,N
+ SUB PLATFORM-MAX,1
+ RANDOM STACK
+ ADD 1,STACK >N
+ PUTP CONTACT,P?CAR,N
+ GET STATION-ROOMS,N
+ MOVE CONTACT,STACK
+ FSET CONTACT,NDESCBIT
+ FCLEAR CONTACT,TOUCHBIT
+ PUTP CONTACT,P?LDESC,10
+ RTRUE
+
+
+ .FUNCT INIT-STATUS-LINE,FIRST=0
+ GETB 0,18
+ ZERO? STACK /TRUE
+ ZERO? FIRST /?CND4
+ CLEAR -1
+ SPLIT 2
+?CND4: SCREEN 1
+ BUFOUT FALSE-VALUE
+ CALL2 INVERSE-LINE,1
+ HLIGHT H-INVERSE
+ ZERO? FIRST /?ELS10
+ GETB 0,33
+ SUB STACK,10
+ DIV STACK,2
+ CURSET 1,STACK
+ PRINTD GAME
+ JUMP ?CND8
+?ELS10: CURSET 1,1
+ PRINTI "You are "
+ CURSET 1,63
+ PRINTI "It is now "
+?CND8: SET 'PLAYER-NOT-FACING-OLD,99
+ BUFOUT TRUE-VALUE
+ HLIGHT H-NORMAL
+ SCREEN 0
+ RTRUE
+
+
+ .FUNCT INVERSE-LINE,LIN,CNT=79
+ CURSET LIN,1
+ HLIGHT H-INVERSE
+ CALL2 PRINT-SPACES,CNT
+ HLIGHT H-NORMAL
+ RTRUE
+
+
+ .FUNCT PRINT-SPACES,CNT
+?PRG1: DLESS? 'CNT,0 /TRUE
+ PRINTC 32
+ JUMP ?PRG1
+
+
+ .FUNCT STATUS-LINE,LEN,X=0
+ GETB 0,18
+ ZERO? STACK /TRUE
+ EQUAL? LAST-PLAYER-LOC,HERE \?THN7
+ EQUAL? PLAYER-NOT-FACING-OLD,PLAYER-NOT-FACING \?THN7
+ EQUAL? PLAYER-SEATED-OLD,PLAYER-SEATED /?CND4
+?THN7: SET 'X,TRUE-VALUE
+?CND4: ZERO? X \?CND9
+ ZERO? CLOCK-WAIT \TRUE
+?CND9: BUFOUT FALSE-VALUE
+ SCREEN 1
+ HLIGHT H-INVERSE
+ ZERO? X /?CND16
+ SET 'LAST-PLAYER-LOC,HERE
+ SET 'PLAYER-NOT-FACING-OLD,PLAYER-NOT-FACING
+ SET 'PLAYER-SEATED-OLD,PLAYER-SEATED
+ DIROUT -1
+ DIROUT 3,SL-BUFFER
+ CALL1 TELL-LOCATION
+ DIROUT -3
+ DIROUT 1
+ GET SL-BUFFER,0 >LEN
+ CURSET 1,9
+ CALL1 TELL-LOCATION
+ SUB 54,LEN
+ CALL2 PRINT-SPACES,STACK
+?CND16: CURSET 1,73
+ CALL2 TIME-PRINT,PRESENT-TIME
+ PRINTI ". "
+ SCREEN 0
+ BUFOUT TRUE-VALUE
+ HLIGHT H-NORMAL
+ RTRUE
+
+
+ .FUNCT TELL-LOCATION,DIR
+ EQUAL? HERE,UNCONSCIOUS \?CND1
+ PRINTI "unconscious."
+ RTRUE
+?CND1: ZERO? PLAYER-SEATED \?ELS8
+ JUMP ?CND6
+?ELS8: LESS? 0,PLAYER-SEATED \?ELS10
+ PRINTI "sitting "
+ JUMP ?CND6
+?ELS10: PRINTI "lying "
+?CND6: FSET? HERE,SURFACEBIT \?ELS19
+ PRINTI "on"
+ JUMP ?CND17
+?ELS19: EQUAL? HERE,BESIDE-TRACKS /?CND17
+ PRINTI "in"
+?CND17: CALL2 PRINTT,HERE
+ ZERO? PLAYER-NOT-FACING /?CND28
+ PRINTI ", facing "
+ CALL2 OPP-DIR,PLAYER-NOT-FACING >DIR
+ EQUAL? DIR,P?EAST \?ELS35
+ ZERO? ON-TRAIN /?ELS35
+ PRINTI "the right side"
+ JUMP ?CND28
+?ELS35: EQUAL? DIR,P?WEST \?ELS41
+ ZERO? ON-TRAIN /?ELS41
+ PRINTI "the left side"
+ JUMP ?CND28
+?ELS41: CALL2 DIR-PRINT,DIR
+?CND28: PRINTI "."
+ RTRUE
+
+ .ENDI
diff --git a/main.zil b/main.zil
new file mode 100644
index 0000000..0dbc447
--- /dev/null
+++ b/main.zil
@@ -0,0 +1,512 @@
+"MAIN for CHECKPOINT
+Copyright (C) 1985 Infocom, Inc. All rights reserved."
+
+<ROUTINE GO ()
+ <INIT-STATUS-LINE T>
+ <SETG LIT T>
+ <PUTB ,P-LEXV 0 59>
+ <PUTB ,YES-LEXV 0 4>
+ <SETG WINNER ,PLAYER>
+ <ENABLE <QUEUE I-PROMPT 1>>
+ <INTRO>
+ <FSET ,HERE ,SEENBIT>
+ <START-MOVEMENT>
+ <V-LOOK>
+ <MAIN-LOOP>
+ <AGAIN>>
+
+<GLOBAL VARIATION 0>
+<CONSTANT MAX-VAR 6>
+"<GLOBAL LONG-INTRO <>>
+<GLOBAL HARD? <>>
+<GLOBAL EGO <>>"
+
+<ROUTINE INTRO ("AUX" N)
+ <SETG HERE ,GAME>
+ <TELL
+"Copyright (c) 1985 Infocom, Inc. All rights reserved.|
+|
+Welcome to " D ,GAME " (TM) - interactive fiction from Infocom!|
+|
+">
+ <TELL
+"[Note to testers: this story has the command GO TO,
+and the concept of not being able to see things behind your back.
+The unit of currency in this story is the Frotzian slimpuk, whose
+symbol is \"">
+ <PRINTC ,CURRENCY-SYMBOL>
+ <TELL "\".|
+|
+Messages in square brackets [] will not be in the final release.
+|
+Remember: you can shorten your words only to NINE (9) letters.|
+But you can use C for COMPARTMENT, V for VESTIBULE, and F for FORWARD.]|
+|
+">
+ <TELL "Do you want the viewpoint of the traveler or the spy? ">
+ <SET N <READ-WORD ,W?TRAVELER ,W?SPY ,W?T ,W?S ,W?TRAVELLER>>
+ <COND (<EQUAL? .N ,W?SPY ,W?S>
+ <SETG VARIATION 3>)
+ (T <SETG VARIATION 1>)>
+ <REPEAT ()
+ <TELL
+"Do you want the short variation or the long one? "
+;"Please type a number to choose the one you want this time. ">
+ <SET N <READ-WORD ,W?SHORT ,W?LONG ,W?S ,W?L>>
+ ;<TELL "Is variation #">
+ ;<COND (<L? .N 10> <PRINTC %<ASCII !\0>>)>
+ ;<TELL N .N " the one you want?">
+ <COND (T ;<YES?> <RETURN>)>>
+ <TELL "Then let the story begin!" CR>
+ <COND (<EQUAL? .N ,W?L ,W?LONG>
+ <INC VARIATION>
+ <PUT ,BRIEFCASE-TBL <ZMEMZ ,MCGUFFIN ,BRIEFCASE-TBL> 0>
+ <FSET ,MCGUFFIN ,NDESCBIT>
+ <FCLEAR ,MCGUFFIN ,TAKEBIT>
+ ;"<SETG HARD? T>")>
+ <TAKE-YOUR-PLACES>
+ <COND (<HARD?>
+ <MOVE ,MCGUFFIN ,LIMBO-REAR ;"non-spoiler">)>
+ <START-TRAIN>
+ ;<COND (<==? ,TRAIN-NAME <GET ,TRAIN-TABLE-B 0>>
+ <PUTP ,COAT ,P?CAR ,PLATFORM-MAX>)
+ (T <MOVE ,COAT ,LIMBO-FWD>)>
+ ;<CRLF>
+ <CLEAR 0>
+ <COND (<SPY?> ;<EQUAL? ,VARIATION 3 4>
+ <REMOVE ,BOND>
+ <MOVE ,BOND-OTHER ,HERE>
+ ;"<PUTP ,BOND-OTHER ,P?LDESC 33>
+ <FCLEAR ,BOND-OTHER ,TOUCHBIT>"
+ <ENABLE <QUEUE I-BOND-OTHER -1>>
+ <TELL
+"Why did you want to be a spy anyway? You could have had a nice restful
+job, like an air-traffic controller. You could have tended flowers
+behind a white picket fence around your country cottage. At least they
+could let you grab a few winks between one job and the next. But no --
+you finish debriefing in some dirty little city in Frotzerland, and
+before you can even find a phone book, let alone a hotel, they volunteer
+you for another assignment.|
+|
+\"You've got to intercept " A ,MCGUFFIN "!\" they told you. \"Then
+deliver it to our agent in Gola so the leak can be traced.
+We don't know where it is for sure,
+but we think it's in a briefcase that's leaving town on the next train.
+You're the only agent that's close enough and experienced enough to be
+sent after it. And at the end of the trip, there will be a plane ticket
+to home waiting for you.\"|
+|
+So that's why you're climbing all over this stupid train. Finding the
+briefcase was easy enough, but the dude carrying it was something else.
+Even your well-placed bullet didn't make him drop. Now, if only he'll take
+the bait and follow you up here, you can .... Wait! Here he comes from
+the forward end! But he's not carrying the case!|
+|
+">)
+ (T
+ <TELL
+"With your business deal behind you, you want only to get out of this
+bleak corner of Eastern Europe. The frontier is now only a few hours
+away, and from there it's not far to Vienna, and
+civilization....|
+|
+The ride seems endless, and you're dozing off again. The
+wheels of the train are ticking like a clock, ticking off the segments
+of track you're passing, and the compartment is rocking you back and
+forth, back and forth, making your eyelids slowly close.|
+|
+Your slumber is cut short as a man staggers into your compartment,
+panting strangely. From his demeanor, you guess that he has drunk too
+much. But before you can dismiss him, you notice that he's grasping a
+bright red spot on his shirt. He speaks quietly, but in a hurry.|
+|
+\"I've got only a moment, so listen carefully! Since you were reading
+the International Herald over lunch, I assume you're an
+American. I am an agent of our government, and I've been sent to ">
+ <COND (<HARD?>
+ <TELL
+"pick up some kind of " D ,MCGUFFIN " in Frbz and take it">)
+ (T <TELL "deliver a " D ,MCGUFFIN>)>
+ <TELL " to our special agent in
+Gola. An enemy agent spotted me on the train, and I only barely managed
+to escape.\" He groans softly, examining his wound.|
+|
+\"The best I can do now is throw the enemy off the scent, but I need
+you, and your country needs you, to carry out my assignment.\" You start
+to interrupt, a thousand questions racing through your mind. \"There's
+no time! Here! Take my briefcase, but be careful with it!
+Our enemies are all around us! My contact in ">
+ <COND (<HARD?> <PRINTD ,STATION-FRBZ>)
+ (T <PRINTD ,STATION-GOLA>)>
+ <TELL " is ">
+ <TELL A ,CONTACT ", and I was to display ">
+ <COND (<NOT <HARD?>>
+ <TELL A ,PASSOBJECT ", then use the word">
+ <COND (<EQUAL? ,PASSWORD ,CAMERA ,HANKY ,SCARF>
+ <TELL "s">)>
+ <TELL " '" D ,PASSWORD "' ">)>
+ <TELL
+"....\" Then he stops and listens.
+Before you can say anything, he checks the corridor and races out.|
+|
+">
+ <ENABLE <QUEUE I-BOND 1>>)>
+ <V-VERSION>
+ <CRLF>
+ <INIT-STATUS-LINE>>
+
+<ROUTINE READ-WORD (WD1 WD2 "OPTIONAL" (WD3 <>) (WD4 <>) (WD5 <>) "AUX" N L)
+ <TELL ">">
+ <READ ,P-INBUF ,P-LEXV>
+ <COND (<0? <GETB ,P-LEXV ,P-LEXWORDS>>
+ <PLEASE-TYPE-OR .WD1 .WD2>
+ <AGAIN>)>
+ <SET L ,P-LEXSTART>
+ <REPEAT ()
+ <SET N <GET ,P-LEXV .L>>
+ <COND (<NOT <WT? .N ,PS?BUZZ-WORD>> <RETURN>)>
+ <SET L <+ .L ,P-LEXELEN>>>
+ <COND (<OR <EQUAL? .N .WD1 .WD2>
+ <EQUAL? .N .WD3 .WD4 .WD5>>
+ <RETURN .N>)>
+ <SET N <WT? .N ,PS?VERB ,P1?VERB>>
+ <COND (<EQUAL? .N ,ACT?QUIT>
+ <QUIT>
+ <TELL-FAILED>
+ <AGAIN>)
+ (<EQUAL? .N ,ACT?RESTART>
+ <RESTART>
+ <TELL-FAILED>
+ <AGAIN>)
+ (<EQUAL? .N ,ACT?$VERIFY>
+ <V-$VERIFY>
+ <AGAIN>)
+ (<EQUAL? .N ,ACT?RELEASE>
+ <V-VERSION>
+ <AGAIN>)
+ (<EQUAL? .N ,ACT?RESTORE>
+ <COND (<V-RESTORE>
+ <TELL-FAILED>)>
+ <AGAIN>)>
+ <PLEASE-TYPE-OR .WD1 .WD2>
+ <AGAIN>>
+
+<ROUTINE PLEASE-TYPE-OR (WD1 WD2)
+ <TELL "Please type \"">
+ <PRINTB .WD1>
+ <TELL "\" or \"">
+ <PRINTB .WD2>
+ <TELL "\". ">>
+
+;<ROUTINE READ-NUM ("AUX" N)
+ <TELL ">">
+ <READ ,P-INBUF ,P-LEXV>
+ <COND (<0? <GETB ,P-LEXV ,P-LEXWORDS>>
+ <TELL "I beg your pardon?" CR>
+ <AGAIN>)>
+ <COND (<NUMBER? ,P-LEXSTART>
+ <COND (<==? ,P-NUMBER ,MAX-VAR>
+ <RETURN ,P-NUMBER>)
+ (<L? 0 ,P-NUMBER>
+ <RETURN <MOD ,P-NUMBER ,MAX-VAR>>)>)
+ (<NOT <ZERO? <SET N <GET ,P-LEXV ,P-LEXSTART>>>>
+ <SET N <WT? .N ,PS?VERB ,P1?VERB>>
+ <COND (<EQUAL? .N ,ACT?RESTART>
+ <RESTART>
+ <TELL-FAILED>
+ <AGAIN>)
+ (<EQUAL? .N ,ACT?$VERIFY>
+ <V-$VERIFY>
+ <AGAIN>)
+ (<EQUAL? .N ,ACT?RELEASE>
+ <V-VERSION>
+ <AGAIN>)
+ (<EQUAL? .N ,ACT?RESTORE>
+ <COND (<V-RESTORE>
+ <TELL-FAILED>
+ <AGAIN>)
+ (T
+ <AGAIN>)>)>)>
+ <TELL "Please type a number between 1 and " N ,MAX-VAR ". ">
+ <AGAIN>>
+
+"<GLOBAL RSEED 6969>
+
+<ROUTINE RANDOM-PER-VAR (N) ;'lower digits w/ correction'
+ <SETG RSEED <MOD <* <+ 2 ,VARIATION> <+ 2 ,RSEED>>
+ 10000>>
+ ;<SETG RSEED <+ <+ 1 ,VARIATION> ,RSEED>>
+ %<COND (<NOT <GASSIGNED? PREDGEN>>
+ '<COND (<GASSIGNED? RSEED-LIST>
+ <COND (<MEMQ ,RSEED ,RSEED-LIST>
+ <TELL '[Dup. seed=' N ,RSEED ']' CR>)
+ (T <SETG RSEED-LIST (,RSEED !,RSEED-LIST)>)>)
+ (T <SETG RSEED-LIST (,RSEED)>)>)
+ (T '<COND (,DEBUG <TELL '[Seed=' N ,RSEED ']' CR>)>)>
+ <+ 1 <MOD ,RSEED .N>>>"
+
+<ROUTINE RANDOM-PER-VAR (L "AUX" N)
+ <SET N <+ 1 </ <* ,VARIATION .L> ,MAX-VAR>>>
+ <COND (<G? .N .L> .L) (T .N)>>
+
+<ROUTINE TAKE-YOUR-PLACES ("AUX" P N L)
+ ;<TELL CR "(Take your places ..." CR>
+ <PUTP ,WAITER ,P?CAR ,DINER-CAR>
+ <PUTP ,COOK ,P?CAR ,DINER-CAR>
+ <SETG COMPARTMENT-START <PICK-ONE ,CAR-ROOMS-COMPS>>
+ <COND (<SPY?> <SETG CAR-HERE <+ 1 ,CAR-START>>)>
+ <TAKE-YOUR-PLACES-CAST ,EXTRA-TABLE>
+ <TAKE-YOUR-PLACES-CAST ,SPY-TABLE>
+ <TAKE-YOUR-PLACES-CAST ,MARKS-TABLE <> <> <>>
+
+ <SETG BAD-SPY <GET ,SPY-TABLE <RANDOM-PER-VAR <GET ,SPY-TABLE 0>>>>
+ <SETG BAD-SPY-C <GETP ,BAD-SPY ,P?CHARACTER>>
+ <SETG BAD-SPY-DEFAULT-F <GETP ,BAD-SPY ,P?ACTION>>
+ <COND (<NOT <SPY?>> ;<EQUAL? ,VARIATION 1 2>
+ <SETG HERE ,COMPARTMENT-START>
+ <SETG PLAYER-SEATED <GENERIC-SEAT-F 0>>
+ <MOVE ,BLOOD-SPOT ,HERE>
+ ;"<MOVE ,RACK ,HERE>
+ <MOVE ,OTHER-RACK <GETP ,HERE ,P?OTHER>>"
+ <MOVE ,BRIEFCASE ,PLAYER-SEATED>
+ <PUTP ,BRIEFCASE ,P?CAR ,CAR-HERE>
+ <PUTP ,BAD-SPY ,P?ACTION ,BAD-SPY-F>
+ <PUTP ,BAD-SPY ,P?CAR <+ 1 ,CAR-START>>
+ <MOVE ,BAD-SPY ,OTHER-ROOF>
+ ;"<MOVE ,GUN ,BAD-SPY>")
+ (T ;<EQUAL? ,VARIATION 3 4>
+ ;"<SETG EGO ,BAD-SPY>"
+ ;<SETG CAR-HERE <+ 1 ,CAR-START>>
+ <SETG HERE ,ROOF>
+ <PUTP ,PLAYER ,P?CAR ,CAR-HERE>
+ <MOVE ,BRIEFCASE ,BAD-SPY>
+ <PUTP ,BRIEFCASE ,P?CAR ,CAR-START>
+ <FCLEAR ,BRIEFCASE ,TAKEBIT>
+ <SET N 0>
+ <SET L <GET ,BRIEFCASE-TBL 0>>
+ <REPEAT ()
+ <COND (<IGRTR? N .L> <RETURN>)
+ (<NOT <ZERO? <SET P <GET ,BRIEFCASE-TBL .N>>>>
+ <FCLEAR .P ,TAKEBIT>)>>
+ <ENABLE <QUEUE I-TRAVELER-TO-GRNZ <+ 9 <RANDOM 6>>>>
+ <PUTP ,BAD-SPY ,P?ACTION ,TRAVELER-F>
+ <PUTP ,BAD-SPY ,P?CAR ,CAR-START>
+ <PUTP ,BAD-SPY ,P?LDESC 35 ;"deep in thought">
+ <SET L <GETP ,COMPARTMENT-START ,P?OTHER>>
+ <MOVE ,BAD-SPY .L ;,OTHER-COMPARTMENT-1>
+ <SETG BAD-SPY-DONE-PEEKING T>
+ <MOVE ,BLOOD-SPOT .L>
+ <FCLEAR ,GUN ,NDESCBIT>
+ <FSET ,GUN ,TAKEBIT>
+ <MOVE ,GUN ,POCKET ;,PLAYER>)>
+ <MOVE ,PLAYER ,HERE>
+ ;<SETG LAST-PLAYER-LOC ,HERE>
+ <SETG LAST-CAR-HERE ,CAR-HERE>
+
+ <SETG CONTACT <GET ,EXTRA-TABLE
+ <- <+ 1 ,CONTACT-MAX>
+ <RANDOM-PER-VAR ,CONTACT-MAX>>>>
+ <SETG CONTACT-DEFAULT-F <GETP ,CONTACT ,P?ACTION>>
+ <PUTP ,CONTACT ,P?ACTION ,CONTACT-F>
+ <COND (<HARD?>
+ <MOVE-CONTACT>
+ <PUTP ,TICKET ,P?CAPACITY ,STATION-WIEN>
+ <PUTP ,TICKET-OTHER ,P?CAPACITY ,STATION-WIEN>
+ <SETG LATCH-TURNED <>>
+ <SETG PICKPOCKET <PICK-ONE-NOT ,SPY-TABLE ,BAD-SPY>>
+ <SETG PEEKER <PICK-ONE-NOT ,SPY-TABLE ,BAD-SPY ;,PICKPOCKET>>
+ <PUTP ,PEEKER ,P?CAR <+ 2 ,CAR-START>>
+ <MOVE ,PEEKER ,OTHER-VESTIBULE-REAR>
+ <PUT <GT-O ,PEEKER> ,GOAL-ENABLE 1>
+ <ESTABLISH-GOAL-TRAIN ,PEEKER ,VESTIBULE-FWD 1>
+ <PUTP ,PEEKER ,P?LDESC ,PEEKING-CODE>)>
+ <SET-PASSES>
+ ;"<TELL CR 'Lights ...' CR>
+ <SET N <* 15 ,VARIATION>>
+ <SETG SCORE </ .N 60>>
+ <SETG MOVES <MOD .N 60>>
+ <SETG PRESENT-TIME <+ ,MOVES <* ,SCORE 60>>>
+ <TELL CR 'Action!)' CR>">
+
+<ROUTINE SET-PASSES ("OPTIONAL" (NUM 0) "AUX" L N P)
+ <SETG PASSWORD-GIVEN <>>
+ <SETG PASSWORD-GIVEN-OTHER <>>
+ <SETG PASSOBJECT-GIVEN <>>
+ <SETG PASSOBJECT-GIVEN-OTHER <>>
+ <COND (<NOT <ZERO? .NUM>> <FSET ,SPY-LIST ,MUNGBIT>)>
+ <SET L 6 ;<GET ,PASS-TABLE 0>>
+ <SET P <+ .NUM ,VARIATION>
+ ;<+ 1 <MOD <- ,VARIATION 1> .L>> ;<RANDOM-PER-VAR .L>>
+ <SETG PASSOBJECT <GET ,PASS-TABLE .P>>
+ <SET N <+ .NUM <RANDOM-PER-VAR .L>>>
+ <COND (<==? .P .N>
+ <COND (<IGRTR? N .L> <SET N 1>)>)>
+ <SETG PASSWORD <GET ,PASS-TABLE .N>>>
+
+<ROUTINE TAKE-YOUR-PLACES-CAST
+ (TBL "OPTIONAL" (NEW? <>) (STA-ONLY? <>) (PEOPLE? T)
+ "AUX" P OBJ N L M X)
+ <SET P <GET .TBL 0>>
+ <SET M <GET ,CAR-ROOMS 0>>
+ <REPEAT ()
+ ;<COND (<AND ;,LONG-INTRO <NOT .NEW?>> <CRLF> <CRLF>)>
+ <SET OBJ <GET .TBL .P>>
+ <COND (.PEOPLE? <FSET .OBJ ,LOCKED>)> ;"ticket not punched"
+ <SET L <GET ,CAR-ROOMS <RANDOM ;-PER-VAR .M>>>
+ <SET N <RANDOM ;-PER-VAR ,CAR-MAX>>
+ <COND (<EQUAL? .N ,DINER-CAR ,FANCY-CAR>
+ <DEC N>)>
+ <COND (<ZERO? .PEOPLE?> T)
+ (<AND <NOT .NEW?>
+ <EQUAL? .L ,COMPARTMENT-START>
+ <EQUAL? .N ,CAR-START>>
+ <DEC N>)
+ (<ZMEMQ .L ,CAR-ROOMS-REST>
+ <COND (<OR <FSET? .OBJ ,PLURALBIT>
+ <OCCUPIED? .L .N>>
+ <SET L <GET-REXIT-ROOM <GETPT .L ,P?OUT>>>)
+ (<==? .N ,CAR-HERE>
+ <FSET <FIND-FLAG-LG .L ,DOORBIT> ,LOCKED>)
+ (T <FCLEAR <FIND-FLAG-LG .L ,DOORBIT>,LOCKED>)>)>
+ <COND (<OR <ZERO? .PEOPLE?>
+ <TAKE-YOUR-PLACE-TEST .OBJ .STA-ONLY?>>
+ <COND (<EQUAL? .N ,CAR-HERE ,DINER-CAR ,FANCY-CAR>
+ <MOVE .OBJ .L>)
+ (<SET X <GETP .L ,P?OTHER>>
+ <MOVE .OBJ .X>)>
+ <PUTP .OBJ ,P?CAR .N>)>
+ <COND (<AND .NEW? .PEOPLE?>
+ <COND (<SET X <ZMEMQ .OBJ ,EXTRA-TABLE>>
+ <PUT ,EXTRA-SEEN-TABLE
+ .X
+ <- 0 <GET ,EXTRA-SEEN-TABLE .X>>>)>
+ <COND (<NOT <EQUAL? .OBJ ,BAD-SPY>>
+ <FCLEAR .OBJ ,SEENBIT>
+ <FCLEAR .OBJ ,TOUCHBIT>
+ <PUTP .OBJ ,P?LDESC 0>)>)>
+ <COND (<DLESS? P 1> <RETURN>)>>>
+
+<ROUTINE TAKE-YOUR-PLACE-TEST (OBJ STA-ONLY? "AUX" X)
+ <COND (<EQUAL? .OBJ ,CONTACT> <RFALSE>)
+ (<IN-MOTION? .OBJ T> <RFALSE>)>
+ <SET X <ZMEMQ <META-LOC .OBJ> ,STATION-ROOMS>>
+ <COND (.STA-ONLY? .X)
+ (<NOT .X> <RTRUE>)>>
+
+<ROUTINE OCCUPIED? (L N)
+ <COND (<AND <==? .L ,GAS-CAR-RM>
+ <==? .N ,GAS-CAR>>
+ <RTRUE>)
+ (<NOT <EQUAL? .N ,CAR-HERE ,DINER-CAR ,FANCY-CAR>>
+ <SET L <GETP .L ,P?OTHER>>)>
+ <FIND-FLAG-CAR .L .N ,PERSONBIT>>
+
+<ROUTINE MOVE-CONTACT ("AUX" N)
+ <SET N <+ 1 <RANDOM <- ,PLATFORM-MAX 1>>>>
+ <PUTP ,CONTACT ,P?CAR .N>
+ <MOVE ,CONTACT <GET ,STATION-ROOMS .N>>
+ <FSET ,CONTACT ,NDESCBIT>
+ <FCLEAR ,CONTACT ,TOUCHBIT>
+ <PUTP ,CONTACT ,P?LDESC 10 ;"looking platform">>
+
+<CONSTANT H-NORMAL 0>
+<CONSTANT H-INVERSE 1>
+
+<CONSTANT D-NORMAL 0>
+<CONSTANT D-TABLE 1>
+
+<ROUTINE INIT-STATUS-LINE ("OPTIONAL" (FIRST <>))
+ <COND (<ZERO? <GETB 0 18>> ;"not ZIP"
+ <RTRUE>)>
+ <COND (.FIRST
+ <CLEAR -1>
+ <SPLIT 2>)>
+ <SCREEN 1>
+ <BUFOUT <>>
+ <INVERSE-LINE 1>
+ <HLIGHT ,H-INVERSE>
+ <COND (.FIRST
+ <CURSET 1 </ <- <GETB 0 33> 10> 2>>
+ <TELL D ,GAME>)
+ (T
+ <CURSET 1 1>
+ <TELL "You are ">
+ <CURSET 1 63>
+ <TELL "It is now ">)>
+ <SETG PLAYER-NOT-FACING-OLD 99> ;"to ensure USL"
+ <BUFOUT T>
+ <HLIGHT ,H-NORMAL>
+ <SCREEN 0>>
+
+<ROUTINE INVERSE-LINE (LIN "AUX" (CNT 79))
+ <CURSET .LIN 1>
+ <HLIGHT ,H-INVERSE>
+ <PRINT-SPACES .CNT>
+ <HLIGHT ,H-NORMAL>>
+
+<ROUTINE PRINT-SPACES (CNT)
+ <REPEAT ()
+ <COND (<DLESS? CNT 0> <RETURN>) (T <PRINTC 32>)>>>
+
+<GLOBAL SL-BUFFER <ITABLE NONE 80>>
+
+<ROUTINE STATUS-LINE ("AUX" LEN (X <>))
+ <COND (<ZERO? <GETB 0 18>> ;"not ZIP"
+ <RTRUE>)>
+ <COND (<OR <NOT <==? ,LAST-PLAYER-LOC ,HERE>>
+ <NOT <==? ,PLAYER-NOT-FACING-OLD ,PLAYER-NOT-FACING>>
+ <NOT <==? ,PLAYER-SEATED-OLD ,PLAYER-SEATED>>>
+ <SET X T>)>
+ <COND (<AND <ZERO? .X>
+ <OR ;<NOT ,P-WON> ,CLOCK-WAIT>>
+ <RTRUE>)>
+ <BUFOUT <>>
+ <SCREEN 1>
+ <HLIGHT ,H-INVERSE>
+ <COND (.X
+ <SETG LAST-PLAYER-LOC ,HERE>
+ <SETG PLAYER-NOT-FACING-OLD ,PLAYER-NOT-FACING>
+ <SETG PLAYER-SEATED-OLD ,PLAYER-SEATED>
+ <DIROUT -1>
+ <DIROUT 3 ;,D-TABLE ,SL-BUFFER>
+ <TELL-LOCATION>
+ <DIROUT -3>
+ <DIROUT 1 ;,D-NORMAL>
+ <SET LEN <GET ,SL-BUFFER 0>>
+ <CURSET 1 9>
+ <TELL-LOCATION>
+ <PRINT-SPACES <- %<- 64 10> .LEN>>)>
+ <CURSET 1 73>
+ <TIME-PRINT ,PRESENT-TIME>
+ <PRINTI ". ">
+ <SCREEN 0>
+ ;<CURSET <- <GETB 0 32> 1> 1> ;<CURSET 23 1>
+ <BUFOUT T>
+ <HLIGHT ,H-NORMAL>>
+
+<ROUTINE TELL-LOCATION ("AUX" DIR)
+ <COND (<EQUAL? ,HERE ,UNCONSCIOUS>
+ <TELL "unconscious.">
+ <RTRUE>)>
+ <COND (<ZERO? ,PLAYER-SEATED> T)
+ (<L? 0 ,PLAYER-SEATED> <TELL "sitting ">)
+ (T <TELL "lying ">)>
+ <COND (<FSET? ,HERE ,SURFACEBIT>
+ <TELL "on">)
+ (<NOT <EQUAL? ,HERE ,BESIDE-TRACKS>>
+ <TELL "in">)>
+ <TELL THE ,HERE>
+ <COND (<NOT <ZERO? ,PLAYER-NOT-FACING>>
+ <TELL ", facing ">
+ <SET DIR <OPP-DIR ,PLAYER-NOT-FACING>>
+ <COND (<AND <==? .DIR ,P?EAST> ,ON-TRAIN>
+ <TELL "the right side" ;" of the train">)
+ (<AND <==? .DIR ,P?WEST> ,ON-TRAIN>
+ <TELL "the left side" ;" of the train">)
+ (T <DIR-PRINT .DIR>)>)
+ ;(<NOT <ZERO? ,PLAYER-SEATED>>
+ <TELL ", ">
+ <COND (<L? 0 ,PLAYER-SEATED>
+ <TELL "sitting on" THE ,PLAYER-SEATED>)
+ (T <TELL "lying on" THE <- 0 ,PLAYER-SEATED>>)>)>
+ <TELL ".">>
diff --git a/p.cmp b/p.cmp
new file mode 100644
index 0000000..3225709
--- /dev/null
+++ b/p.cmp
@@ -0,0 +1,248 @@
+**** FILE PS:<S5>PARSER.ZIL.30, 1-1 (0)
+**** FILE PS:<SWG>PARSER.ZIL.85, 1-1 (0)
+<GLOBAL P-DIR 0>
+***************
+
+**** FILE PS:<S5>PARSER.ZIL.30, 1-89 (1651)
+**** FILE PS:<SWG>PARSER.ZIL.85, 2-56 (1976)
+<GLOBAL P-WON <>>
+<ROUTINE VERB-ALL-TEST (OBJ1 OBJ) ;"OBJ1=PRSO OBJ=PRSI"
+ <COND (<VERB? DROP GIVE>
+ <COND (<EQUAL? .OBJ1 ,POCKET>
+ <RFALSE>)
+ (<OR <IN? .OBJ1 ,WINNER> ;<IN? ,P-IT-OBJECT ,WINNER>>
+ <RTRUE>)
+ ;(T <RFALSE>)>)
+ (<VERB? PUT PUT-IN>
+ <COND (<EQUAL? .OBJ1 ,POCKET>
+ <RFALSE>)
+ (<NOT <HELD? .OBJ1 .OBJ>>
+ <RTRUE>)
+ ;(T <RFALSE>)>)
+ (<VERB? TAKE>
+ <COND (<AND <NOT <FSET? .OBJ1 ,TAKEBIT>>
+ <NOT <FSET? .OBJ1 ,TRYTAKEBIT>>>
+ <RFALSE>)
+ (<NOT <ZERO? .OBJ>>
+ <COND (<IN? .OBJ1 .OBJ>
+ <RTRUE>)
+ ;(T <RFALSE>)>)
+ (<EQUAL? <LOC .OBJ1> ,WINNER ,HERE>
+ <RTRUE>)
+ (<FSET? <LOC .OBJ1> ,SURFACEBIT>
+ <RTRUE>)
+ ;(T <RFALSE>)>)
+ (<NOT <ZERO? .OBJ>>
+ <COND (<NOT <==? .OBJ1 .OBJ>>
+ <RTRUE>)
+ ;(T <RFALSE>)>)
+ (T <RTRUE>)>>
+***************
+
+**** FILE PS:<S5>PARSER.ZIL.30, 2-7 (2236)
+**** FILE PS:<SWG>PARSER.ZIL.85, 4-122 (20094)
+ <SETG P-NUMBER -1>
+ <SETG P-NAM <>>
+ <SETG P-ADJ <>>
+***************
+
+**** FILE PS:<S5>PARSER.ZIL.30, 2-154 (6879)
+ <COND (,P-OFLAG
+ <ORPHAN-MERGE>)>
+ <SETG P-WALK-DIR <>>>
+**** FILE PS:<SWG>PARSER.ZIL.85, 4-317 (26593)
+ <SETG P-WALK-DIR <>>
+ <COND (<AND ,P-OFLAG
+ <ORPHAN-MERGE>>
+ <SETG WINNER .OWINNER>)>
+ <COND (<==? <GET ,P-ITBL ,P-VERB> 0>
+ <PUT ,P-ITBL ,P-VERB ,ACT?$CALL>)>>
+***************
+
+**** FILE PS:<S5>PARSER.ZIL.30, 2-220 (9379)
+ ;"This next clause was 2 clauses further down"
+ ;"This attempts to fix EDDIE, TURN ON COMPUTER"
+ (<AND .ANDFLG
+ <EQUAL? <GET ,P-ITBL ,P-VERB> 0>>
+**** FILE PS:<SWG>PARSER.ZIL.85, 5-63 (29606)
+ ;"3/16/83: This clause used to be later."
+ (<AND .ANDFLG
+ <OR ;"3/25/83: next statement added."
+ <EQUAL? <GET ,P-ITBL ,P-VERBN> 0>
+ ;"10/26/84: next stmt changed"
+ <VERB-DIR-ONLY? .WRD>>>
+***************
+
+**** FILE PS:<S5>PARSER.ZIL.30, 2-245 (10269)
+ ;(<AND <OR ,P-MERGED
+**** FILE PS:<SWG>PARSER.ZIL.85, 5-90 (30506)
+ (<AND <OR ,P-MERGED
+***************
+
+**** FILE PS:<S5>PARSER.ZIL.30, 2-252 (10536)
+ (<OR <WT? .WRD ,PS?ADJECTIVE>
+ <WT? .WRD ,PS?BUZZ-WORD>>)
+**** FILE PS:<SWG>PARSER.ZIL.85, 5-95 (30685)
+ (<AND .ANDFLG
+ <EQUAL? <GET ,P-ITBL ,P-VERB> 0>>
+ <SET PTR <- .PTR 4>>
+ <PUT ,P-LEXV <+ .PTR 2> ,W?THEN>
+ <SETG P-LEN <+ ,P-LEN 2>>)
+***************
+
+**** FILE PS:<S5>PARSER.ZIL.30, 2-270 (11096)
+**** FILE PS:<SWG>PARSER.ZIL.85, 5-123 (31557)
+<GLOBAL P-DIRECTION 0>
+***************
+
+**** FILE PS:<S5>PARSER.ZIL.30, 3-18 (12217)
+**** FILE PS:<SWG>PARSER.ZIL.85, 6-23 (33526)
+ (<AND ,P-CONT
+ <==? .VERB ,ACT?TELL>>
+ <RFALSE>)
+***************
+
+**** FILE PS:<S5>PARSER.ZIL.30, 3-23 (12370)
+ <PUT ,P-OTBL ,P-NC1 <REST ,P-LEXV 2>>
+ <COND (<0? <GET ,P-ITBL ,P-NC1L>>
+ <PUT ,P-ITBL ,P-NC1L <REST ,P-LEXV 6>>)>
+ <COND (<0? ,P-NCN> <SETG P-NCN 1>)>)
+ (T
+ <PUT ,P-OTBL ,P-NC1 <GET ,P-ITBL ,P-NC1>>)>
+**** FILE PS:<SWG>PARSER.ZIL.85, 6-31 (33742)
+ <PUT ,P-OTBL ,P-NC1 <REST ,P-LEXV 2>>)
+ (T
+ <PUT ,P-OTBL ,P-NC1 <GET ,P-ITBL ,P-NC1>>)>
+ <COND (<0? <GET ,P-ITBL ,P-NC1L>>
+ <PUT ,P-ITBL ,P-NC1L <REST ,P-LEXV 6>>)>
+***************
+
+**** FILE PS:<S5>PARSER.ZIL.30, 3-37 (12873)
+ <PUT ,P-ITBL ,P-NC1 <REST ,P-LEXV 2>>
+ <COND (<0? <GET ,P-ITBL ,P-NC1L>>
+ <PUT ,P-ITBL ,P-NC1L <REST ,P-LEXV 6>>)>)>
+ <PUT ,P-OTBL ,P-NC2 <GET ,P-ITBL ,P-NC1>>
+**** FILE PS:<SWG>PARSER.ZIL.85, 6-43 (34155)
+ <PUT ,P-ITBL ,P-NC1 <REST ,P-LEXV 2>>)>
+ <PUT ,P-OTBL ,P-NC2 <GET ,P-ITBL ,P-NC1>>
+ <COND (<0? <GET ,P-ITBL ,P-NC1L>>
+ <PUT ,P-ITBL ,P-NC1L <REST ,P-LEXV 6>>)>
+***************
+
+**** FILE PS:<S5>PARSER.ZIL.30, 3-82 (14311)
+ ;<AND <NOT <==? <GET ,P-OTBL ,P-NC2> 0>> <SETG P-NCN 2>>
+**** FILE PS:<SWG>PARSER.ZIL.85, 6-88 (35577)
+ <COND (<NOT <==? <GET ,P-OTBL ,P-NC2> 0>> <SETG P-NCN 2>)
+ (T <SETG P-NCN 1>)>
+***************
+
+**** FILE PS:<S5>PARSER.ZIL.30, 5-47 (17784)
+ (<NOT <==? ,WINNER ,PROTAGONIST>>
+ <CANT-ORPHAN>)
+ (T
+ <ORPHAN .DRIVE1 .DRIVE2>
+ <TELL "What do you want to ">
+ <SET TMP <GET ,P-OTBL ,P-VERBN>>
+ <COND (<EQUAL? .TMP 0>
+ <TELL "tell">)
+**** FILE PS:<SWG>PARSER.ZIL.85, 8-50 (40244)
+ (T
+ <COND (<EQUAL? ,WINNER ,PLAYER>
+ <ORPHAN .DRIVE1 .DRIVE2>
+ <TELL "(Wh"
+ <COND (<EQUAL? .VERB ,ACT?WALK ,ACT?FACE> "ere")
+ (T "at")>
+ " do you want to ">)
+ (T
+ <TELL
+"(Your command was not complete. Next time, type wh"
+<COND (<EQUAL? .VERB ,ACT?WALK ,ACT?FACE> "ere") (T "at")>
+" you want" THE ,WINNER " to ">)>
+ <VERB-PRINT>
+ <COND (.DRIVE2
+ <CLAUSE-PRINT ,P-NC1 ,P-NC1L>)>
+ <PREP-PRINT <COND (.DRIVE1 <GETB .DRIVE1 ,P-SPREP1>)
+ (T <GETB .DRIVE2 ,P-SPREP2>)>>
+ <COND (<EQUAL? ,WINNER ,PLAYER>
+ <SETG P-OFLAG T>
+ <TELL "?)" CR>)
+ (T
+ <SETG P-OFLAG <>>
+ <TELL ".)" CR>)>
+ <RFALSE>)>>
+<ROUTINE DONT-UNDERSTAND ()
+ <TELL
+"(Sorry, but I don't understand. Please reword that or try something else.)"
+CR>>
+<ROUTINE VERB-PRINT ("AUX" TMP)
+ <SET TMP <GET ,P-ITBL ,P-VERBN>> ;"? ,P-OTBL?"
+ <COND (<==? .TMP 0> <TELL "tell">)
+***************
+
+**** FILE PS:<S5>PARSER.ZIL.30, 5-62 (18271)
+ <PUTB ,P-VTBL 2 0>)>
+ <COND (.DRIVE2
+ <CLAUSE-PRINT ,P-NC1 ,P-NC1L>)>
+ <SETG P-OFLAG T>
+ <PREP-PRINT <COND (.DRIVE1 <GETB .DRIVE1 ,P-SPREP1>)
+ (T <GETB .DRIVE2 ,P-SPREP2>)>>
+ <TELL "?" CR>
+ <RFALSE>)>>
+**** FILE PS:<SWG>PARSER.ZIL.85, 8-90 (41487)
+ <PUTB ,P-VTBL 2 0>)>>
+***************
+
+**** FILE PS:<S5>PARSER.ZIL.30, 8-19 (23978)
+**** FILE PS:<SWG>PARSER.ZIL.85, 11-20 (48448)
+<GLOBAL P-ADJN <>>
+<GLOBAL P-XADJN <>>
+***************
+
+**** FILE PS:<S5>PARSER.ZIL.30, 9-3 (24357)
+<ROUTINE SNARFEM (...)
+**** FILE PS:<SWG>PARSER.ZIL.85, 12-2 (48905)
+<ROUTINE SNARFEM (... WV)
+***************
+
+**** FILE PS:<S5>PARSER.ZIL.30, 9-46 (25706)
+ (<AND <WT? .WRD ,PS?ADJECTIVE>
+ <NOT ,P-ADJ>>
+ <SETG P-ADJ .WRD>)>)>>>
+**** FILE PS:<SWG>PARSER.ZIL.85, 12-54 (50492)
+ (<AND <SET WV <WT? .WRD ,PS?ADJECTIVE ,P1?ADJECTIVE>>
+ <NOT ,P-ADJ>>
+ <SETG P-ADJ .WV>
+ <SETG P-ADJN .WRD>)>)>>>
+
+***************
+
+**** FILE PS:<S5>PARSER.ZIL.30, 9-79 (26371)
+<ROUTINE GET-OBJECT (TBL "OPTIONAL" (VRB T)
+ "AUX" GEN BITS LEN XBITS TLEN (GCHECK <>) (OLEN 0) OBJ)
+ ...
+ <COND (<AND <NOT ,P-NAM> ,P-ADJ <WT? ,P-ADJ ,PS?OBJECT>>
+ <SETG P-NAM ,P-ADJ>
+ <SETG P-ADJ <>>)>
+**** FILE PS:<SWG>PARSER.ZIL.85, 13-2 (50989)
+<ROUTINE GET-OBJECT (TBL
+ "OPTIONAL" (VRB T)
+ "AUX" BTS LEN XBITS TLEN (GCHECK <>) (OLEN 0) OBJ ADJ)
+ ...
+ <SET ADJ ,P-ADJN>
+ <COND (<AND <NOT ,P-NAM> ,P-ADJ>
+ <COND (<WT? ,P-ADJN ,PS?OBJECT>
+ <SETG P-NAM ,P-ADJN>
+ <SETG P-ADJ <>>)
+ (<SET BTS <WT? ,P-ADJN ,PS?DIRECTION ,P1?DIRECTION>>
+ <SETG P-ADJ <>>
+ <PUT .TBL ,P-MATCHLEN 1>
+ <PUT .TBL 1 ,INTDIR>
+ <SETG P-DIRECTION .BTS>
+ <RTRUE>)>)>
+***************
+
+**** FILE PS:<S5>PARSER.ZIL.30, 9-170 (29350)
+**** FILE PS:<SWG>PARSER.ZIL.85, 13-96 (53976)
+ <SETG P-XADJN ,P-ADJN>
+ <SETG P-ADJN <>>
+***************
diff --git a/parser.cmp b/parser.cmp
new file mode 100644
index 0000000..e06a37d
--- /dev/null
+++ b/parser.cmp
@@ -0,0 +1,910 @@
+
+;COMPARISON OF PS:<CHECKPOINT>PARSER.ZIL.151 AND PS:<CHECKPOINT>PARSER.ZIL.170
+;OPTIONS ARE /3
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 1-8 (222)
+<SETG SIBREAKS ".,\"!?">
+"<GLOBAL GWIM-DISABLE <>>"
+<GLOBAL PRSA 0>
+<GLOBAL PRSI 0>
+<GLOBAL PRSO 0>
+"<GLOBAL P-TABLE 0>
+<GLOBAL P-ONEOBJ 0>"
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 1-8 (222)
+<SETG SIBREAKS ".,\"!?">
+<GLOBAL PRSA 0>
+<GLOBAL PRSI 0>
+<GLOBAL PRSO 0>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 1-34 (564)
+"INBUF - Input buffer for READ"
+<GLOBAL P-INBUF <ITABLE BYTE 100>>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 1-26 (483)
+<GLOBAL AGAIN-LEXV <ITABLE BYTE 120>>
+<GLOBAL RESERVE-LEXV <ITABLE BYTE 120>>
+<GLOBAL RESERVE-PTR <>>
+"INBUF - Input buffer for READ"
+<GLOBAL P-INBUF <ITABLE BYTE 60>>
+<GLOBAL OOPS-INBUF <ITABLE BYTE 60>>
+<GLOBAL OOPS-TABLE <TABLE <> <> <> <>>>
+<CONSTANT O-PTR 0>
+<CONSTANT O-START 1>
+<CONSTANT O-LENGTH 2>
+<CONSTANT O-END 3>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 1-56 (926)
+"Parser variables and temporaries"
+"<CONSTANT P-PHRLEN 3>
+<CONSTANT P-ORPHLEN 7>
+<CONSTANT P-RTLEN 3>"
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 1-58 (1115)
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 2-14 (1292)
+<CONSTANT P-PSOFF 6 ;4>
+"Offset to first part of speech"
+<CONSTANT P-P1OFF 7 ;5>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 1-70 (1371)
+<CONSTANT P-PSOFF %<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE> 6) (T 4)>>
+"Offset to first part of speech"
+<CONSTANT P-P1OFF %<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE> 7) (T 5)>>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 2-58 (1980)
+"<GLOBAL P-WHAT-IGNORED <>>
+<GLOBAL P-WON <>>"
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 1-114 (2165)
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 2-77 (2349)
+<GLOBAL L-PRSA <>>
+<GLOBAL L-PRSO <>>
+<GLOBAL L-PRSI <>>
+<GLOBAL L-WINNER <>>
+<ROUTINE MAIN-LOOP ("AUX" ICNT OCNT NUM CNT OBJ TBL V PTBL OBJ1 TMP X)
+ ;#DECL((CNT OCNT ICNT NUM) FIX (V) <OR 'T FIX FALSE> (OBJ)<OR FALSE OBJECT>
+ (OBJ1) OBJECT (TBL) TABLE (PTBL) <OR FALSE ATOM>)
+ <REPEAT ()
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 1-130 (2483)
+<ROUTINE MAIN-LOOP ("AUX" X) <REPEAT () <SET X <MAIN-LOOP-1>>>>
+<ROUTINE MAIN-LOOP-1 ("AUX" ICNT OCNT NUM CNT OBJ TBL V PTBL OBJ1 TMP X)
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 2-98 (3028)
+ <COND (<G? <SET CNT <+ .CNT 1>> .ICNT>
+ <RETURN>)
+ (T
+ <COND (<EQUAL? <GET ,P-PRSI .CNT> ,IT>
+ <PUT ,P-PRSI .CNT ,P-IT-OBJECT>
+ <TELL ,I-ASSUME THE ,P-IT-OBJECT ".)" CR>
+ <SET TMP T>
+ <RETURN>)>)>>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 1-145 (2998)
+ <COND (<IGRTR? CNT .ICNT>
+ <RETURN>)>
+ <COND (<EQUAL? <GET ,P-PRSI .CNT> ,IT>
+ <PUT ,P-PRSI .CNT ,P-IT-OBJECT>
+ <TELL ,I-ASSUME THE ,P-IT-OBJECT ".)" CR>
+ <SET TMP T>
+ <RETURN>)>>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 2-109 (3333)
+ <COND (<G? <SET CNT <+ .CNT 1>> .OCNT>
+ <RETURN>)
+ (T
+ <COND (<EQUAL? <GET ,P-PRSO .CNT> ,IT>
+ <PUT ,P-PRSO .CNT ,P-IT-OBJECT>
+ <TELL ,I-ASSUME THE ,P-IT-OBJECT ".)" CR>
+ <RETURN>)>)>>)>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 1-155 (3280)
+ <COND (<IGRTR? CNT .OCNT>
+ <RETURN>)>
+ <COND (<EQUAL? <GET ,P-PRSO .CNT> ,IT>
+ <PUT ,P-PRSO .CNT ,P-IT-OBJECT>
+ <TELL ,I-ASSUME THE ,P-IT-OBJECT ".)" CR>
+ <RETURN>)>>)>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 2-163 (4830)
+ <COND (<G? <SET CNT <+ .CNT 1>> .NUM>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 1-208 (4754)
+ <COND (<IGRTR? CNT .NUM>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 2-207 (6192)
+ <COND (<GAME-VERB?> T)
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 1-252 (6103)
+ ;<COND (<GAME-VERB?> T)
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 2-219 (6493)
+ <COND (<AND <NOT <VERB? SAVE RESTORE>>
+ <GAME-VERB?>> T)
+ (<AND <VERB? AGAIN>
+ <NOT <EQUAL? ,L-PRSA ,V?SAVE ,V?RESTORE>>
+ <GAME-VERB? ,L-PRSA>>
+ T)
+ (T
+ <SET V <CLOCKER>>)>)>>>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 1-264 (6405)
+ <COND (<OR <VERB? SAVE RESTORE>
+ <NOT <GAME-VERB?>>>
+ <SET V <CLOCKER>>)>)>
+ <SETG PRSA <>>
+ <SETG PRSO <>>
+ <SETG PRSI <>>>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 2-268 (7797)
+ (<EQUAL? .V ,V?$AGAIN ,V?$QUEUE ,V?$STATION> <RTRUE>)
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 1-311 (7659)
+ (<EQUAL? .V ;,V?$AGAIN ,V?$QUEUE ,V?$STATION> <RTRUE>)
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 2-293 (8828)
+ <SETG L-WINNER ,WINNER>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 1-336 (8691)
+ ;<SETG L-WINNER ,WINNER>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 2-311 (9347)
+ <RTRUE>)>
+ <COND (<AND <VERB? WALK FACE> <==? .OBJ ,PRSO>>
+ <RTRUE>)>
+ <COND (<NOT <FSET? .OBJ ,PERSONBIT>>
+ <COND (<NOT <EQUAL? .OBJ ,GLOBAL-HERE ,INTDIR>>
+ <FSET ,IT ,TOUCHBIT> ;"to cause pronoun 'it' in output"
+ <SETG P-IT-OBJECT .OBJ>)>)
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 1-354 (9211)
+ <RTRUE>)
+ (<EQUAL? .OBJ ,INTDIR ,GLOBAL-HERE>
+ <RTRUE>)
+ (<AND <VERB? WALK WALK-TO FACE> <==? .OBJ ,PRSO>>
+ <RTRUE>)>
+ <COND (<NOT <FSET? .OBJ ,PERSONBIT>>
+ <FSET ,IT ,TOUCHBIT> ;"to cause pronoun 'it' in output"
+ <SETG P-IT-OBJECT .OBJ>)
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 3-17 (10550)
+<GLOBAL NOW-PRSI <>>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 2-17 (10410)
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 3-48 (11630)
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 2-46 (11466)
+<GLOBAL NOW-PRSI <>>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 3-65 (12130)
+ <COND (<NOT <EQUAL? .A ,V?WALK ,V?FACE>>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 2-65 (11990)
+ <COND ;(<AND <NOT ,LIT>
+ <SEE-VERB?>>
+ <TOO-DARK>
+ <RFATAL>)
+ (<NOT <EQUAL? .A ,V?WALK ,V?FACE>>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 3-121 (14238)
+ (<AND <SET O ,PRSO>
+ <SET V <THIS-IS-IT ,PRSO>>
+ <SET I ,PRSI>
+ <SET V <THIS-IS-IT ,PRSI>>
+ <SET V <THIS-IS-IT ,PRSO>>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 2-125 (14183)
+ (<AND <SET V <THIS-IS-IT ,PRSI>>
+ <SET V <THIS-IS-IT ,PRSO>>
+ <SET O ,PRSO>
+ <SET I ,PRSI>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 3-143 (14925)
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 2-146 (14836)
+ (<AND .I ;"This new clause applies CONTFCN to PRSI, BM 2/85"
+ <SETG NOW-PRSI T>
+ <NOT <EQUAL? .A ,V?WALK>>
+ <LOC .I>
+ <SET V <GETP <LOC .I> ,P?CONTFCN>>
+ <SET V <APPLY .V ,M-CONT>>>
+ .V)
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 3-152 (15181)
+ <SET V <APPLY .V ,M-CONT>>
+ ;<SET V <DD-APPLY "Container" <LOC .O>
+ <GETP <LOC .O> ,P?CONTFCN>>>>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 2-162 (15325)
+ <SET V <APPLY .V ,M-CONT>>>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 3-174 (15802)
+;"<ROUTINE DD-APPLY (STR OBJ FCN)
+ <COND (,DEBUG
+ <PRINTC %<ASCII !\[>>
+ <TELL D .OBJ '=]'>)>
+ <D-APPLY .STR .FCN>>"
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 2-182 (15862)
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 4-16 (17116)
+ <RFALSE>
+ ;<COND (<NOT <ZERO? ,P-PROMPT>>
+ <ENABLE <QUEUE I-PROMPT 9>>
+ <RFALSE>)
+ (T
+ <TELL "|
+(You won't see \"What next?\" any more.)" CR>
+ <COND (<VERB? ;WAIT WAIT-FOR WAIT-UNTIL> <CRLF>)>
+ <DISABLE <INT I-PROMPT>>
+ <RFALSE>)>>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 3-16 (17038)
+ <RFALSE>>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 4-67 (18978)
+ <COND (<G? ,QUESTION-WORD-COUNT 9>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 3-58 (18663)
+ <COND (<G? ,QUESTION-WORD-COUNT 4 ;9>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 4-76 (19282)
+Now you can try again.)" CR>)
+ (T <TELL ", not statements or questions.)" CR>)>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 3-67 (18970)
+Now you can try again">)
+ (T <TELL ", not statements or questions">)>
+ <TELL ".)" CR>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 4-101 (20351)
+ PISS SCREW SHIT CRAP SUCK>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 3-93 (20053)
+ PISS SCREW SHIT CRAP SUCK
+ FUCKED GODDAMN ASSHOLE CUNT SHITHEAD SUCKS DAMNED PEE COCKSUCKER BITCH>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 4-108 (20605)
+ <EQUAL? .WORD ,W?BASTARD ,W?SCREW ,W?CRAP>>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 3-101 (20380)
+ <EQUAL? .WORD ,W?BASTARD ,W?SCREW ,W?CRAP>
+ <EQUAL? .WORD ,W?FUCKED ,W?GODDAMN ,W?ASSHOLE>
+ <EQUAL? .WORD ,W?CUNT ,W?SHITHEAD ,W?SUCKS>
+ <EQUAL? .WORD ,W?DAMNED ,W?PEE ,W?COCKSUCKER>
+ <EQUAL? .WORD ,W?BITCH>>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 4-116 (20781)
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 3-113 (20741)
+ "What charming language!"
+ "Computers aren't impressed by naughty words!"
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 4-121 (20933)
+<ROUTINE PARSER ("AUX" (PTR ,P-LEXSTART) WRD (VAL 0) (VERB <>) (OF-FLAG <>)
+ LEN (DIR <>) (NW 0) (LW 0) NUM SCNT (CNT -1) OWINNER)
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> ,P-ITBLLEN> <RETURN>)
+ (T <PUT ,P-ITBL .CNT 0>)>>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 3-120 (20972)
+<BUZZ AGAIN G OOPS>
+<ROUTINE PARSER ("AUX" (PTR ,P-LEXSTART) WRD (VAL 0) (VERB <>) (OF-FLAG <>)
+ LEN (DIR <>) (NW 0) (LW 0) (CNT -1) OMERGED OWINNER
+ OLEN)
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> ,P-ITBLLEN> <RETURN>)
+ (T
+ <COND (<NOT ,P-OFLAG>
+ <PUT ,P-OTBL .CNT <GET ,P-ITBL .CNT>>)>
+ <PUT ,P-ITBL .CNT 0>)>>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 4-130 (21259)
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 3-135 (21427)
+ <SET OMERGED ,P-MERGED>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 4-138 (21504)
+ <SETG L-WINNER ,WINNER>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 3-144 (21698)
+ ;<SETG L-WINNER ,WINNER>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 4-144 (21734)
+ <COND (<NOT <ZERO? ,P-CONT>>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 3-150 (21929)
+ <COND (,RESERVE-PTR
+ <SET PTR ,RESERVE-PTR>
+ <STUFF ,P-LEXV ,RESERVE-LEXV>
+ <COND (<AND <EQUAL? ,VERBOSE 1 2>
+ <==? ,PLAYER ,WINNER>>
+ <CRLF>)>
+ <SETG RESERVE-PTR <>>
+ <SETG P-CONT <>>)
+ (<NOT <ZERO? ,P-CONT>>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 4-153 (21999)
+ <SETG L-WINNER ,WINNER>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 3-167 (22436)
+ ;<SETG L-WINNER ,WINNER>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 4-171 (22689)
+ ;<==? <SETG P-PROMPT <- ,P-PROMPT 1>> 0>
+ <TELL "(You won't see \"What next?\" any more.)|
+">
+ ;<COND (<VERB? ;WAIT WAIT-FOR WAIT-UNTIL>
+ <CRLF>)>)
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 3-185 (23127)
+ <TELL
+"(You won't see \"What next?\" any more.)|
+">)
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 4-179 (22951)
+ <STATUS-LINE>
+ <TELL ">">
+ <READ ,P-INBUF ,P-LEXV>)>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 3-191 (23271)
+ %<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>
+ '<PROG ()
+ <STATUS-LINE>
+ <TELL ">">>)
+ (T
+ '<TELL ">">)>
+ <READ ,P-INBUF ,P-LEXV>
+ <SET OLEN <GETB ,P-LEXV ,P-LEXWORDS>>)>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 4-196 (23742)
+ <COND (<0? ,P-LEN> <TELL "I beg your pardon?" CR> <RFALSE>)>
+ <SET LEN ,P-LEN>
+ <SETG P-DIR <>>
+ <SETG P-NCN 0>
+ <SETG P-GETFLAGS 0>
+ ;"3/25/83: Next statement added."
+ <PUT ,P-ITBL ,P-VERBN 0>
+ <REPEAT ()
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 3-213 (24226)
+ <COND (<0? ,P-LEN> <TELL "I beg your pardon?" CR> <RFALSE>)
+ (<EQUAL? <GET ,P-LEXV .PTR> ,W?OOPS>
+ <COND (<NOT <G? ,P-LEN 1>>
+ <TELL "I can't help your clumsiness." CR>
+ <RFALSE>)
+ (<GET ,OOPS-TABLE ,O-PTR>
+ <PUT ,AGAIN-LEXV <GET ,OOPS-TABLE ,O-PTR>
+ <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>>
+ <INBUF-ADD <GETB ,P-LEXV <+ <* .PTR ,P-LEXELEN> 6>>
+ <GETB ,P-LEXV <+ <* .PTR ,P-LEXELEN> 7>>
+ <+ <* <GET ,OOPS-TABLE ,O-PTR> ,P-LEXELEN> 3>>
+ <STUFF ,P-LEXV ,AGAIN-LEXV>
+ <SETG P-LEN <GETB ,P-LEXV ,P-LEXWORDS>>;"Will this help?"
+ <SET PTR <GET ,OOPS-TABLE ,O-START>>
+ <INBUF-STUFF ,P-INBUF ,OOPS-INBUF>)
+ (T
+ <PUT ,OOPS-TABLE ,O-END <>>
+ <TELL "There was no word to replace!" CR>
+ <RFALSE>)>)
+ (T <PUT ,OOPS-TABLE ,O-END <>>)>
+ <COND (<EQUAL? <GET ,P-LEXV .PTR> ,W?AGAIN ,W?G>
+ <COND (,P-OFLAG
+ <TELL "It's difficult to repeat fragments." CR>
+ <RFALSE>)
+ (<G? ,P-LEN 1>
+ <COND (<OR <EQUAL? <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>
+ ,W?PERIOD ,W?COMMA ,W?THEN>
+ <EQUAL? <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>
+ ,W?AND>>
+ <SET PTR <+ .PTR <* 2 ,P-LEXELEN>>>
+ <PUTB ,P-LEXV ,P-LEXWORDS
+ <- <GETB ,P-LEXV ,P-LEXWORDS> 2>>)
+ (T
+ <TELL "I couldn't understand that sentence." CR>
+ <RFALSE>)>)
+ (T
+ <SET PTR <+ .PTR ,P-LEXELEN>>
+ <PUTB ,P-LEXV ,P-LEXWORDS
+ <- <GETB ,P-LEXV ,P-LEXWORDS> 1>>)>
+ <COND (<G? <GETB ,P-LEXV ,P-LEXWORDS> 0>
+ <STUFF ,RESERVE-LEXV ,P-LEXV>
+ <SETG RESERVE-PTR .PTR>)
+ (T
+ <SETG RESERVE-PTR <>>)>
+ ;<SETG P-LEN <GETB ,AGAIN-LEXV ,P-LEXWORDS>>
+ <SETG WINNER .OWINNER>
+ <SETG P-MERGED .OMERGED>
+ <INBUF-STUFF ,P-INBUF ,OOPS-INBUF>
+ <STUFF ,P-LEXV ,AGAIN-LEXV>
+ <SET CNT -1>
+ <SET DIR ,P-WALK-DIR>
+ <REPEAT ()
+ <COND (<IGRTR? CNT ,P-ITBLLEN> <RETURN>)
+ (T <PUT ,P-ITBL .CNT <GET ,P-OTBL .CNT>>)>>)
+ (T
+ <STUFF ,AGAIN-LEXV ,P-LEXV>
+ <INBUF-STUFF ,OOPS-INBUF ,P-INBUF>
+ <PUT ,OOPS-TABLE ,O-START .PTR>
+ <PUT ,OOPS-TABLE ,O-LENGTH <* 4 .OLEN>>
+ <SETG RESERVE-PTR <>>
+ <SET LEN ,P-LEN>
+ <SETG P-DIR <>>
+ <SETG P-NCN 0>
+ <SETG P-GETFLAGS 0>
+ ;"3/25/83: Next statement added."
+ <PUT ,P-ITBL ,P-VERBN 0>
+ <REPEAT ()
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 4-226 (24687)
+ (<OR <EQUAL? .WRD ,W?THEN ,W?PERIOD>
+ <EQUAL? .WRD ,W?QUOTE>>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 3-302 (27443)
+ (<EQUAL? .WRD ,W?THEN ,W?PERIOD ,W?QUOTE>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 4-276 (26283)
+ <SET NUM
+ <+ <* .PTR 2> 2>>>>
+ <PUTB ,P-VTBL 3 <GETB ,P-LEXV <+ .NUM 1>>>)
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 3-351 (29013)
+ <SET ?TMP1
+ <+ <* .PTR 2> 2>>>>
+ <PUTB ,P-VTBL 3 <GETB ,P-LEXV <+ .?TMP1 1>>>)
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 4-343 (28348)
+ <SET PTR <+ .PTR ,P-LEXELEN>>>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 3-418 (31082)
+ <SET PTR <+ .PTR ,P-LEXELEN>>>)>
+ <PUT ,OOPS-TABLE ,O-PTR <>>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 5-2 (28917)
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 4-2 (31685)
+"For AGAIN purposes, put contents of one LEXV table into another:"
+<ROUTINE STUFF (DEST SRC "OPTIONAL" (MAX 29) "AUX" (PTR ,P-LEXSTART) (CTR 1)
+ BPTR)
+ <PUTB .DEST 0 <GETB .SRC 0>>
+ <PUTB .DEST 1 <GETB .SRC 1>>
+ <REPEAT ()
+ <PUT .DEST .PTR <GET .SRC .PTR>>
+ <SET BPTR <+ <* .PTR 2> 2>>
+ <PUTB .DEST .BPTR <GETB .SRC .BPTR>>
+ <SET BPTR <+ <* .PTR 2> 3>>
+ <PUTB .DEST .BPTR <GETB .SRC .BPTR>>
+ <SET PTR <+ .PTR ,P-LEXELEN>>
+ <COND (<IGRTR? CTR .MAX>
+ <RETURN>)>>>
+"Put contents of one INBUF into another:"
+<ROUTINE INBUF-STUFF (DEST SRC "AUX" (CNT -1))
+ <REPEAT ()
+ <COND (<IGRTR? CNT 59> <RETURN>)
+ (T <PUTB .DEST .CNT <GETB .SRC .CNT>>)>>>
+"Put the word in the positions specified from P-INBUF to the end of
+OOPS-INBUF, leaving the appropriate pointers in AGAIN-LEXV:"
+<ROUTINE INBUF-ADD (LEN BEG SLOT "AUX" DBEG (CTR 0) TMP)
+ <COND (<SET TMP <GET ,OOPS-TABLE ,O-END>>
+ <SET DBEG .TMP>)
+ (T
+ <SET DBEG <+ <GETB ,AGAIN-LEXV
+ <SET TMP <GET ,OOPS-TABLE ,O-LENGTH>>>
+ <GETB ,AGAIN-LEXV <+ .TMP 1>>>>)>
+ <PUT ,OOPS-TABLE ,O-END <+ .DBEG .LEN>>
+ <REPEAT ()
+ <PUTB ,OOPS-INBUF <+ .DBEG .CTR> <GETB ,P-INBUF <+ .BEG .CTR>>>
+ <SET CTR <+ .CTR 1>>
+ <COND (<EQUAL? .CTR .LEN> <RETURN>)>>
+ <PUTB ,AGAIN-LEXV .SLOT .DBEG>
+ <PUTB ,AGAIN-LEXV <- .SLOT 1> .LEN>>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 5-18 (29639)
+ ;#DECL ((PTR VAL OFF NUM) FIX (WRD NW) <OR FALSE FIX TABLE>
+ (ANDFLG FIRST??) <OR ATOM FALSE>)
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 4-59 (33766)
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 6-24 (36837)
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 5-24 (40859)
+ <COND (<ZERO? <GET ,P-ITBL ,P-NC1L>> ;"? DELETE?"
+ <PUT ,P-ITBL ,P-NC1L <REST ,P-LEXV 6>>)>
+ <COND (<ZERO? ,P-NCN> ;"? DELETE?"
+ <SETG P-NCN 1>)>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 6-36 (37254)
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 5-40 (41449)
+ <COND (<ZERO? <GET ,P-ITBL ,P-NC1L>> ;"? DELETE?"
+ <PUT ,P-ITBL ,P-NC1L <REST ,P-LEXV 6>>)>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 6-87 (38823)
+"New ACLAUSE-WIN for TRAP retrofix 6/21/84"
+<ROUTINE ACLAUSE-WIN (ADJ)
+ <PUT ,P-ITBL ,P-VERB <GET ,P-OTBL ,P-VERB>>
+ <CLAUSE-COPY ,P-OTBL ,P-OTBL ,P-ACLAUSE <+ ,P-ACLAUSE 1>
+ ,P-ACLAUSE <+ ,P-ACLAUSE 1> .ADJ>
+ ;"<PUT ,P-CCTBL ,CC-SBPTR ,P-ACLAUSE>
+ <PUT ,P-CCTBL ,CC-SEPTR <+ ,P-ACLAUSE 1>>
+ <PUT ,P-CCTBL ,CC-DBPTR ,P-ACLAUSE>
+ <PUT ,P-CCTBL ,CC-DEPTR <+ ,P-ACLAUSE 1>>
+ <CLAUSE-COPY ,P-OTBL ,P-OTBL .ADJ>"
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 5-93 (43124)
+<ROUTINE ACLAUSE-WIN (ADJ "AUX" X)
+ <PUT ,P-ITBL ,P-VERB <GET ,P-OTBL ,P-VERB>>
+ <SET X <+ ,P-ACLAUSE 1>>
+ %<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>
+ '<CLAUSE-COPY ,P-OTBL ,P-OTBL ,P-ACLAUSE .X ,P-ACLAUSE .X .ADJ>)
+ (T
+ '<PROG ()
+ <PUT ,P-CCTBL ,CC-SBPTR ,P-ACLAUSE>
+ <PUT ,P-CCTBL ,CC-SEPTR .X>
+ <PUT ,P-CCTBL ,CC-DBPTR ,P-ACLAUSE>
+ <PUT ,P-CCTBL ,CC-DEPTR .X>
+ <CLAUSE-COPY ,P-OTBL ,P-OTBL .ADJ>>)>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 6-103 (39369)
+ <CLAUSE-COPY ,P-ITBL ,P-OTBL ,P-NC1 ,P-NC1L
+ ,P-ACLAUSE <+ ,P-ACLAUSE 1>>
+ ;"<PUT ,P-CCTBL ,CC-SBPTR ,P-NC1>
+ <PUT ,P-CCTBL ,CC-SEPTR ,P-NC1L>
+ <PUT ,P-CCTBL ,CC-DBPTR ,P-ACLAUSE>
+ <PUT ,P-CCTBL ,CC-DEPTR <+ ,P-ACLAUSE 1>>
+ <CLAUSE-COPY ,P-ITBL ,P-OTBL>"
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 5-110 (43715)
+ %<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>
+ '<CLAUSE-COPY ,P-ITBL ,P-OTBL ,P-NC1 ,P-NC1L
+ ,P-ACLAUSE <+ ,P-ACLAUSE 1>>)
+ (T
+ '<PROG ()
+ <PUT ,P-CCTBL ,CC-SBPTR ,P-NC1>
+ <PUT ,P-CCTBL ,CC-SEPTR ,P-NC1L>
+ <PUT ,P-CCTBL ,CC-DBPTR ,P-ACLAUSE>
+ <PUT ,P-CCTBL ,CC-DEPTR <+ ,P-ACLAUSE 1>>
+ <CLAUSE-COPY ,P-ITBL ,P-OTBL>>)>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 7-2 (39741)
+"Print undefined word in input.
+ PTR points to the unknown word in P-LEXV"
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 6-2 (44207)
+"Print undefined word in input. PTR points to the unknown word in P-LEXV:"
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 7-25 (40401)
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 6-24 (44864)
+ <PUT ,OOPS-TABLE ,O-PTR .PTR>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 7-52 (41477)
+
+<GLOBAL P-SLOCBITS 0>
+
+<CONSTANT P-SYNLEN 8>
+
+<CONSTANT P-SBITS 0>
+
+<CONSTANT P-SPREP1 1>
+
+<CONSTANT P-SPREP2 2>
+
+<CONSTANT P-SFWIM1 3>
+
+<CONSTANT P-SFWIM2 4>
+
+<CONSTANT P-SLOC1 5>
+
+<CONSTANT P-SLOC2 6>
+
+<CONSTANT P-SACTION 7>
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 6-53 (45974)
+<GLOBAL P-SLOCBITS 0>
+<CONSTANT P-SYNLEN 8>
+<CONSTANT P-SBITS 0>
+<CONSTANT P-SPREP1 1>
+<CONSTANT P-SPREP2 2>
+<CONSTANT P-SFWIM1 3>
+<CONSTANT P-SFWIM2 4>
+<CONSTANT P-SLOC1 5>
+<CONSTANT P-SLOC2 6>
+<CONSTANT P-SACTION 7>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 9-13 (45365)
+ <CLAUSE-COPY ,P-ITBL ,P-OTBL ,P-NC2 ,P-NC2L ,P-NC2 ,P-NC2L>
+ ;"<PUT ,P-CCTBL ,CC-SBPTR ,P-NC2>
+ <PUT ,P-CCTBL ,CC-SEPTR ,P-NC2L>
+ <PUT ,P-CCTBL ,CC-DBPTR ,P-NC2>
+ <PUT ,P-CCTBL ,CC-DEPTR ,P-NC2L>
+ <CLAUSE-COPY ,P-ITBL ,P-OTBL>")>
+ <COND (<NOT <L? ,P-NCN 1>>
+ <CLAUSE-COPY ,P-ITBL ,P-OTBL ,P-NC1 ,P-NC1L ,P-NC1 ,P-NC1L>
+ ;"<PUT ,P-CCTBL ,CC-SBPTR ,P-NC1>
+ <PUT ,P-CCTBL ,CC-SEPTR ,P-NC1L>
+ <PUT ,P-CCTBL ,CC-DBPTR ,P-NC1>
+ <PUT ,P-CCTBL ,CC-DEPTR ,P-NC1L>
+ <CLAUSE-COPY ,P-ITBL ,P-OTBL>")>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 8-13 (49820)
+ %<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>
+ '<CLAUSE-COPY ,P-ITBL ,P-OTBL
+ ,P-NC2 ,P-NC2L ,P-NC2 ,P-NC2L>)
+ (T
+ '<PROG ()
+ <PUT ,P-CCTBL ,CC-SBPTR ,P-NC2>
+ <PUT ,P-CCTBL ,CC-SEPTR ,P-NC2L>
+ <PUT ,P-CCTBL ,CC-DBPTR ,P-NC2>
+ <PUT ,P-CCTBL ,CC-DEPTR ,P-NC2L>
+ <CLAUSE-COPY ,P-ITBL ,P-OTBL>>)>)>
+ <COND (<NOT <L? ,P-NCN 1>>
+ %<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>
+ '<CLAUSE-COPY ,P-ITBL ,P-OTBL
+ ,P-NC1 ,P-NC1L ,P-NC1 ,P-NC1L>)
+ (T
+ '<PROG ()
+ <PUT ,P-CCTBL ,CC-SBPTR ,P-NC1>
+ <PUT ,P-CCTBL ,CC-SEPTR ,P-NC1L>
+ <PUT ,P-CCTBL ,CC-DBPTR ,P-NC1>
+ <PUT ,P-CCTBL ,CC-DEPTR ,P-NC1L>
+ <CLAUSE-COPY ,P-ITBL ,P-OTBL>>)>)>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 9-116 (48910)
+"<GLOBAL P-CCTBL <TABLE 0 0 0 0>>"
+"pointers used by CLAUSE-COPY (source/destination beginning/end pointers)"
+"<CONSTANT CC-SBPTR 0>
+<CONSTANT CC-SEPTR 1>
+<CONSTANT CC-DBPTR 2>
+<CONSTANT CC-DEPTR 3>"
+;<ROUTINE CLAUSE-COPY (SRC DEST "OPTIONAL" (INSRT <>) "AUX" BEG END)
+ <SET BEG <GET .SRC <GET ,P-CCTBL ,CC-SBPTR>>>
+ <SET END <GET .SRC <GET ,P-CCTBL ,CC-SEPTR>>>
+ <PUT .DEST
+ <GET ,P-CCTBL ,CC-DBPTR>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 8-124 (53579)
+%<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>
+'<ROUTINE CLAUSE-COPY (SRC DEST SRCBEG SRCEND DESTBEG DESTEND
+ "OPTIONAL" (INSRT <>) "AUX" BEG END)
+ <SET BEG <GET .SRC .SRCBEG>>
+ <SET END <GET .SRC .SRCEND>>
+ <PUT .DEST .DESTBEG
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 9-131 (49424)
+ <COND (<==? .BEG .END>
+ <PUT .DEST
+ <GET ,P-CCTBL ,CC-DEPTR>
+ <REST ,P-OCLAUSE
+ <+ <* <GET ,P-OCLAUSE ,P-MATCHLEN> ,P-LEXELEN>
+ 2>>>
+ <RETURN>)
+ (T
+ <COND (<AND .INSRT <==? ,P-ANAM <GET .BEG 0>>>
+ <CLAUSE-ADD .INSRT>)>
+ <CLAUSE-ADD <GET .BEG 0>>)>
+ <SET BEG <REST .BEG ,P-WORDLEN>>>>
+<ROUTINE CLAUSE-COPY (SRC DEST SRCBEG SRCEND DESTBEG DESTEND
+ "OPTIONAL" (INSRT <>) "AUX" BEG END)
+ <SET BEG <GET .SRC .SRCBEG>>
+ <SET END <GET .SRC .SRCEND>>
+ <PUT .DEST .DESTBEG
+ <REST ,P-OCLAUSE
+ <+ <* <GET ,P-OCLAUSE ,P-MATCHLEN> ,P-LEXELEN> 2>>>
+ <REPEAT ()
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 8-133 (53916)
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 10-2 (50396)
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 8-143 (54225)
+)(T
+"pointers used by CLAUSE-COPY (source/destination beginning/end pointers)"
+'(
+<CONSTANT CC-SBPTR 0>
+<CONSTANT CC-SEPTR 1>
+<CONSTANT CC-DBPTR 2>
+<CONSTANT CC-DEPTR 3>
+<GLOBAL P-CCTBL <TABLE 0 0 0 0>>
+<ROUTINE CLAUSE-COPY (SRC DEST "OPTIONAL" (INSRT <>) "AUX" BEG END)
+ <SET BEG <GET .SRC <GET ,P-CCTBL ,CC-SBPTR>>>
+ <SET END <GET .SRC <GET ,P-CCTBL ,CC-SEPTR>>>
+ <PUT .DEST
+ <GET ,P-CCTBL ,CC-DBPTR>
+ <REST ,P-OCLAUSE
+ <+ <* <GET ,P-OCLAUSE ,P-MATCHLEN> ,P-LEXELEN> 2>>>
+ <REPEAT ()
+ <COND (<==? .BEG .END>
+ <PUT .DEST
+ <GET ,P-CCTBL ,CC-DEPTR>
+ <REST ,P-OCLAUSE
+ <+ <* <GET ,P-OCLAUSE ,P-MATCHLEN> ,P-LEXELEN>
+ 2>>>
+ <RETURN>)
+ (T
+ <COND (<AND .INSRT <==? ,P-ANAM <GET .BEG 0>>>
+ <CLAUSE-ADD .INSRT>)>
+ <CLAUSE-ADD <GET .BEG 0>>)>
+ <SET BEG <REST .BEG ,P-WORDLEN>>>>
+))>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 11-18 (52884)
+<GLOBAL P-NAM <>>
+
+<GLOBAL P-XNAM <>>
+<GLOBAL P-ADJ <>>
+
+<GLOBAL P-XADJ <>>
+"<GLOBAL P-ADJN <>>
+<GLOBAL P-XADJN <>>"
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 10-18 (57608)
+<GLOBAL P-NAM <>>
+<GLOBAL P-XNAM <>>
+<GLOBAL P-ADJ <>>
+<GLOBAL P-XADJ <>>
+%<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>)
+ (T
+'(<GLOBAL P-ADJN <>>
+ <GLOBAL P-XADJN <>>))>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 12-7 (53462)
+ "AUX" (BUT <>) LEN WV WRD NW (WAS-ALL <>) TMP ONEOBJ)
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 11-7 (58240)
+ "AUX" (BUT <>) LEN WV WRD NW (WAS-ALL <>) ONEOBJ)
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 12-20 (53855)
+ <SET TMP <GET-OBJECT <OR .BUT .TBL>>>
+ <COND (.WAS-ALL <SETG P-GETFLAGS ,P-ALL>)>
+ <RETURN .TMP>)
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 11-20 (58629)
+ <SET WV <GET-OBJECT <OR .BUT .TBL>>>
+ <COND (.WAS-ALL <SETG P-GETFLAGS ,P-ALL>)>
+ <RETURN .WV>)
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 12-55 (54967)
+ (<AND <WT? .WRD ,PS?ADJECTIVE>
+ <NOT ,P-ADJ>>
+ <SETG P-ADJ .WRD>)
+ ;(<AND <SET WV <WT? .WRD ,PS?ADJECTIVE ,P1?ADJECTIVE>>
+ <NOT ,P-ADJ>>
+ <SETG P-ADJ .WV>
+ <SETG P-ADJN .WRD>)
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 11-55 (59739)
+ %<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>
+ '(<AND <WT? .WRD ,PS?ADJECTIVE>
+ <NOT ,P-ADJ>>
+ <SETG P-ADJ .WRD>))
+ (T
+ '(<AND <SET WV <WT? .WRD ,PS?ADJECTIVE
+ ,P1?ADJECTIVE>>
+ <NOT ,P-ADJ>>
+ <SETG P-ADJ .WV>
+ <SETG P-ADJN .WRD>))>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 12-69 (55368)
+<CONSTANT SH 128>
+
+<CONSTANT SC 64>
+
+<CONSTANT SIR 32>
+
+<CONSTANT SOG 16>
+
+<CONSTANT STAKE 8>
+
+<CONSTANT SMANY 4>
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 11-72 (60231)
+<CONSTANT SH 128>
+<CONSTANT SC 64>
+<CONSTANT SIR 32>
+<CONSTANT SOG 16>
+<CONSTANT STAKE 8>
+<CONSTANT SMANY 4>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 13-11 (55934)
+ <SET ADJ ,P-ADJ ;N>
+ <COND (<AND <NOT ,P-NAM> ,P-ADJ>
+ <COND (<WT? ,P-ADJ ;N ,PS?OBJECT ;,P1?OBJECT>
+ <SETG P-NAM ,P-ADJ ;N>
+ <SETG P-ADJ <>>)
+ (<SET BTS <WT? ,P-ADJ ;N ,PS?DIRECTION ,P1?DIRECTION>>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 12-11 (60762)
+ <SET ADJ %<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>
+ ',P-ADJ)
+ (T
+ ',P-ADJN)>>
+ <COND (<AND <NOT ,P-NAM> ,P-ADJ>
+ <COND (<WT? %<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>
+ ',P-ADJ)
+ (T ',P-ADJN)>
+ ,PS?OBJECT>
+ <SETG P-NAM %<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>
+ ',P-ADJ)
+ (T ',P-ADJN)>>
+ <SETG P-ADJ <>>)
+ (<SET BTS <WT? %<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>
+ ',P-ADJ)
+ (T ',P-ADJN)>
+ ,PS?DIRECTION ,P1?DIRECTION>>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 13-69 (57809)
+ <SETG P-ADJ <>>
+ ;<SETG P-ADJN <>>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 12-80 (62948)
+ %<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>
+ '<SETG P-ADJ <>>)
+ (T
+ '<PROG ()
+ <SETG P-ADJ <>>
+ <SETG P-ADJN <>>>)>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 13-96 (58566)
+ <SETG P-XADJ ,P-ADJ>
+ ;<SETG P-XADJN ,P-ADJN>
+ <SETG P-NAM <>>
+ <SETG P-ADJ <>>
+ ;<SETG P-ADJN <>>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 12-111 (63830)
+ <SETG P-NAM <>>
+ %<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>
+ '<PROG ()
+ <SETG P-XADJ ,P-ADJ>
+ <SETG P-ADJ <>>>)
+ (T
+ '<PROG ()
+ <SETG P-XADJ ,P-ADJ>
+ <SETG P-XADJN ,P-ADJN>
+ <SETG P-ADJ <>>
+ <SETG P-ADJN <>>>)>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 13-122 (59358)
+ (<EQUAL? .V ,V?YES ,V?TALK-ABOUT> <RTRUE>)
+ (<EQUAL? .V ,V?ASK-CONTEXT-ABOUT ,V?ASK-CONTEXT-FOR> <RTRUE>)>>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 12-143 (64801)
+ (<EQUAL? .V ,V?YES ,V?TALK-ABOUT ,V?ANSWER> <RTRUE>)
+ (<EQUAL? .V ,V?ASK-CONTEXT-ABOUT ,V?ASK-CONTEXT-FOR ,V?REPLY>
+ <RTRUE>)>>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 13-179 (61065)
+"<GLOBAL P-MOBY-FLAG <>>"
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 12-202 (66536)
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 14-63 (64082)
+<CONSTANT P-SRCBOT 2>
+<CONSTANT P-SRCTOP 0>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 13-63 (69524)
+<CONSTANT P-SRCBOT 2>
+<CONSTANT P-SRCTOP 0>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 14-84 (64752)
+ <OR <FSET? .OBJ ,OPENBIT>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 13-82 (70182)
+ <OR .MOBY-FLAG <SEE-INSIDE? .OBJ>>
+ ;<OR <FSET? .OBJ ,OPENBIT>
+***************
+
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.151, 14-106 (65485)
+ <NOT <ZMEMQ ;B ,P-ADJ .SYNS <RMGL-SIZE .SYNS>>>>>
+**** FILE PS:<CHECKPOINT>PARSER.ZIL.170, 13-105 (70959)
+ <NOT %<COND (<AND <GASSIGNED? PLUS-MODE> ,PLUS-MODE>
+ '<ZMEMQ ,P-ADJ .SYNS <RMGL-SIZE .SYNS>>)
+ (T
+ '<ZMEMQB ,P-ADJ .SYNS <RMGL-SIZE .SYNS>>)>>>>
+***************
+
diff --git a/parser.true b/parser.true
new file mode 100644
index 0000000..bc5d6e5
--- /dev/null
+++ b/parser.true
@@ -0,0 +1,2148 @@
+"PARSER for CHECKPOINT
+Copyright (C) 1985 Infocom, Inc. All rights reserved."
+
+"Parser global variable convention: All parser globals will
+ begin with 'P-'. Local variables are not restricted in any
+ way."
+
+<SETG SIBREAKS ".,\"!?">
+
+"<GLOBAL ALWAYS-LIT <>>
+<GLOBAL GWIM-DISABLE <>>"
+
+<GLOBAL PRSA 0>
+
+<GLOBAL PRSI 0>
+
+<GLOBAL PRSO 0>
+
+<GLOBAL P-TABLE 0>
+
+<GLOBAL P-ONEOBJ 0>
+
+<GLOBAL P-SYNTAX 0>
+
+<GLOBAL P-LEN 0>
+
+<GLOBAL P-DIR 0>
+
+<GLOBAL HERE 0>
+<GLOBAL LAST-PLAYER-LOC 0>
+
+<GLOBAL WINNER 0>
+
+<GLOBAL P-LEXV <ITABLE BYTE 120>>
+
+"INBUF - Input buffer for READ"
+<GLOBAL P-INBUF <ITABLE BYTE 100>>
+
+"Parse-cont variable"
+<GLOBAL P-CONT <>>
+
+<GLOBAL P-IT-OBJECT <>>
+<GLOBAL P-HER-OBJECT <>>
+<GLOBAL P-HIM-OBJECT <>>
+<GLOBAL P-THEM-OBJECT <>>
+
+"Orphan flag"
+<GLOBAL P-OFLAG <>>
+
+<GLOBAL P-MERGED <>>
+
+<GLOBAL P-ACLAUSE <>>
+
+<GLOBAL P-ANAM <>>
+
+<GLOBAL P-AADJ <>>
+
+"Parser variables and temporaries"
+"<CONSTANT P-PHRLEN 3>
+<CONSTANT P-ORPHLEN 7>
+<CONSTANT P-RTLEN 3>"
+
+"Byte offset to # of entries in LEXV"
+<CONSTANT P-LEXWORDS 1>
+
+"Word offset to start of LEXV entries"
+<CONSTANT P-LEXSTART 1>
+
+"Number of words per LEXV entry"
+<CONSTANT P-LEXELEN 2>
+
+<CONSTANT P-WORDLEN 4>
+
+"Offset to parts of speech byte"
+<CONSTANT P-PSOFF 4>
+
+"Offset to first part of speech"
+<CONSTANT P-P1OFF 5>
+
+"First part of speech bit mask in PSOFF byte"
+<CONSTANT P-P1BITS 3>
+
+<CONSTANT P-ITBLLEN 9>
+
+<GLOBAL P-ITBL <TABLE 0 0 0 0 0 0 0 0 0 0>>
+
+<GLOBAL P-OTBL <TABLE 0 0 0 0 0 0 0 0 0 0>>
+
+<GLOBAL P-VTBL <TABLE 0 0 0 0>>
+
+<GLOBAL P-OVTBL <TABLE 0 0 0 0>>
+
+<GLOBAL P-NCN 0>
+
+<CONSTANT P-VERB 0>
+
+<CONSTANT P-VERBN 1>
+
+<CONSTANT P-PREP1 2>
+
+<CONSTANT P-PREP1N 3>
+
+<CONSTANT P-PREP2 4>
+
+"<CONSTANT P-PREP2N 5>"
+
+<CONSTANT P-NC1 6>
+
+<CONSTANT P-NC1L 7>
+
+<CONSTANT P-NC2 8>
+
+<CONSTANT P-NC2L 9>
+
+<GLOBAL QUOTE-FLAG <>>
+
+<GLOBAL P-ADVERB <>>
+
+"<GLOBAL P-WHAT-IGNORED <>>"
+
+<GLOBAL P-WON <>>
+
+<CONSTANT M-FATAL 2>
+"<CONSTANT M-HANDLED 1>
+<CONSTANT M-NOT-HANDLED <>>"
+
+<CONSTANT M-BEG 1>
+<CONSTANT M-ENTER 2>
+<CONSTANT M-LOOK 3>
+<CONSTANT M-FLASH 4>
+<CONSTANT M-OBJDESC 5>
+<CONSTANT M-END 6>
+<CONSTANT M-CONT 7>
+<CONSTANT M-WINNER 8>
+
+<GLOBAL L-PRSA <>>
+<GLOBAL L-PRSO <>>
+<GLOBAL L-PRSI <>>
+<GLOBAL L-WINNER <>>
+
+<ROUTINE MAIN-LOOP ("AUX" ICNT OCNT NUM CNT OBJ TBL V PTBL OBJ1 TMP X)
+ ;#DECL((CNT OCNT ICNT NUM) FIX (V) <OR 'T FIX FALSE> (OBJ)<OR FALSE OBJECT>
+ (OBJ1) OBJECT (TBL) TABLE (PTBL) <OR FALSE ATOM>)
+ <REPEAT ()
+ <SET CNT 0>
+ <SET OBJ <>>
+ <SET PTBL T>
+ <COND (<NOT <==? ,QCONTEXT-ROOM ,HERE>>
+ <SETG QCONTEXT <>>)>
+ <COND (<SETG P-WON <PARSER>>
+ <SET ICNT <GET ,P-PRSI ,P-MATCHLEN>>
+ <SET OCNT <GET ,P-PRSO ,P-MATCHLEN>>
+ <COND (<AND ,P-IT-OBJECT <ACCESSIBLE? ,P-IT-OBJECT>>
+ <SET TMP <>>
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> .ICNT>
+ <RETURN>)
+ (T
+ <COND (<EQUAL? <GET ,P-PRSI .CNT> ,IT>
+ <PUT ,P-PRSI .CNT ,P-IT-OBJECT>
+ <SET TMP T>
+ <RETURN>)>)>>
+ <COND (<NOT .TMP>
+ <SET CNT 0>
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> .OCNT>
+ <RETURN>)
+ (T
+ <COND (<EQUAL? <GET ,P-PRSO .CNT> ,IT>
+ <PUT ,P-PRSO .CNT ,P-IT-OBJECT>
+ <RETURN>)>)>>)>
+ <SET CNT 0>)>
+ <SET NUM
+ <COND (<0? .OCNT> .OCNT)
+ (<G? .OCNT 1>
+ <SET TBL ,P-PRSO>
+ <COND (<0? .ICNT> <SET OBJ <>>)
+ (T <SET OBJ <GET ,P-PRSI 1>>)>
+ .OCNT)
+ (<G? .ICNT 1>
+ <SET PTBL <>>
+ <SET TBL ,P-PRSI>
+ <SET OBJ <GET ,P-PRSO 1>>
+ .ICNT)
+ (T 1)>>
+ <COND (<AND <NOT .OBJ> <1? .ICNT>> <SET OBJ <GET ,P-PRSI 1>>)>
+ <COND (<EQUAL? ,PRSA ,V?WALK ,V?FACE>
+ <SET V <PERFORM ,PRSA ,PRSO>>)
+ (<0? .NUM>
+ <COND (<0? <BAND <GETB ,P-SYNTAX ,P-SBITS> ,P-SONUMS>>
+ <SET V <PERFORM ,PRSA>>
+ <SETG PRSO <>>)
+ (<NOT ,LIT>
+ <SETG QUOTE-FLAG <>>
+ <SETG P-CONT <>>
+ <TOO-DARK>)
+ (T
+ <SETG QUOTE-FLAG <>>
+ <SETG P-CONT <>>
+ <TELL "(There isn't anything to ">
+ <SET TMP <GET ,P-ITBL ,P-VERBN>>
+ <COND (<VERB? TELL>
+ <TELL "talk to">)
+ (<OR ,P-MERGED ,P-OFLAG>
+ <PRINTB <GET .TMP 0>>)
+ (T
+ <SET V <WORD-PRINT <GETB .TMP 2>
+ <GETB .TMP 3>>>)>
+ <TELL "!)" CR>
+ <SET V <>>)>)
+ ;(<AND .PTBL <G? .NUM 1> <VERB? COMPARE>>
+ <SET V <PERFORM ,PRSA ,OBJECT-PAIR>>)
+ (T
+ <SET X 0>
+ ;"<SETG P-MULT <>>
+ <COND (<G? .NUM 1> <SETG P-MULT T>)>"
+ <SET TMP 0>
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> .NUM>
+ <COND (<G? .X 0>
+ <TELL "The ">
+ <COND (<NOT <EQUAL? .X .NUM>>
+ <TELL "other ">)>
+ <TELL "object">
+ <COND (<NOT <EQUAL? .X 1>>
+ <TELL "s">)>
+ <TELL " that you mentioned ">
+ <COND (<NOT <EQUAL? .X 1>>
+ <TELL "are">)
+ (T <TELL "is">)>
+ <TELL "n't here." CR>)
+ (<NOT .TMP>
+ <MORE-SPECIFIC ;REFERRING>)>
+ <RETURN>)
+ (T
+ <COND (.PTBL <SET OBJ1 <GET ,P-PRSO .CNT>>)
+ (T <SET OBJ1 <GET ,P-PRSI .CNT>>)>
+ <COND (<OR <G? .NUM 1>
+ <EQUAL? <GET <GET ,P-ITBL ,P-NC1> 0>
+ ,W?ALL>>
+ <COND (<==? .OBJ1 ,NOT-HERE-OBJECT>
+ <SET X <+ .X 1>>
+ <AGAIN>)
+ (<AND <EQUAL? ,P-GETFLAGS ,P-ALL>
+ <VERB? TAKE>
+ <OR <AND <NOT <EQUAL?<LOC .OBJ1>
+ ,WINNER
+ ,HERE>>
+ <NOT <FSET? <LOC .OBJ1>
+ ,SURFACEBIT>>>
+ <NOT <OR <FSET? .OBJ1
+ ,TAKEBIT>
+ <FSET? .OBJ1
+ ,TRYTAKEBIT>>>>>
+ <AGAIN>)
+ (<AND <EQUAL? ,P-GETFLAGS ,P-ALL>
+ <VERB? DROP>
+ <NOT <IN? .OBJ1 ,WINNER>>
+ <NOT <IN? ,P-IT-OBJECT,WINNER>>>
+ <AGAIN>)
+ (<NOT <ACCESSIBLE? .OBJ1>>
+ <AGAIN>)
+ (<==? .OBJ1 ,PLAYER> <AGAIN>)
+ ;(<FSET? .OBJ1 ,DUPLICATE> <AGAIN>)
+ (T
+ <COND (<EQUAL? .OBJ1 ,IT>
+ <PRINTD ,P-IT-OBJECT>)
+ (T <PRINTD .OBJ1>)>
+ <TELL ": ">)>)>
+ <SET TMP T>
+ <SET V <QCONTEXT-CHECK <COND (.PTBL .OBJ1)
+ (T .OBJ)>>>
+ <SETG PRSO <COND (.PTBL .OBJ1) (T .OBJ)>>
+ <SETG PRSI <COND (.PTBL .OBJ) (T .OBJ1)>>
+ <SET V <PERFORM ,PRSA ,PRSO ,PRSI>>
+ <COND (<==? .V ,M-FATAL> <RETURN>)>)>>)>
+ <COND (<GAME-VERB?> T)
+ (<VERB? AGAIN> T)
+ (,P-OFLAG T)
+ (T
+ <SETG L-PRSA ,PRSA>
+ <SETG L-PRSO ,PRSO>
+ <SETG L-PRSI ,PRSI>)>
+ <COND (<==? .V ,M-FATAL> <SETG P-CONT <>>)>)
+ (T
+ <SETG P-CONT <>>)>
+ <COND (,P-WON
+ <COND (<AND <NOT <VERB? SAVE RESTORE>>
+ <GAME-VERB?>> T)
+ (<AND <VERB? AGAIN>
+ <NOT <EQUAL? ,L-PRSA ,V?SAVE ,V?RESTORE>>
+ <GAME-VERB? ,L-PRSA>>
+ T)
+ (T
+ <SET V <CLOCKER>>)>)>>>
+
+<ROUTINE GAME-VERB? ("OPTIONAL" (V <>))
+ <COND (<NOT .V> <SET V ,PRSA>)>
+ <COND (<EQUAL? .V ,V?$ANSWER ,V?$GOAL ,V?$VERIFY> <RTRUE>)
+ (<EQUAL? .V ,V?$AGAIN ,V?$CUSTOMS ,V?$STATION> <RTRUE>)
+ (<EQUAL? .V ,V?$FCLEAR ,V?$FSET ,V?$QFSET> <RTRUE>)
+ (<EQUAL? .V ,V?$WHERE ,V?BRIEF ,V?DEBUG> <RTRUE>)
+ (<EQUAL? .V ,V?QUIT ,V?RESTART ,V?RESTORE> <RTRUE>)
+ (<EQUAL? .V ,V?SAVE ,V?SCRIPT ,V?SUPER-BRIEF> <RTRUE>)
+ (<EQUAL? .V ,V?TELL ,V?TIME ,V?UNSCRIPT> <RTRUE>)
+ (<EQUAL? .V ,V?VERBOSE ,V?VERSION ,V?$FACE> <RTRUE>)>>
+
+<ROUTINE QCONTEXT-CHECK (PRSO "AUX" OTHER (WHO <>) (N 0))
+ <COND (<OR <VERB? ;FIND HELP WHAT>
+ <AND <VERB? SHOW TELL-ABOUT>
+ <==? .PRSO ,PLAYER>>> ;"? more?"
+ <SET OTHER <FIRST? ,HERE>>
+ <REPEAT ()
+ <COND (<NOT .OTHER> <RETURN>)
+ (<AND <FSET? .OTHER ,PERSONBIT>
+ <NOT <FSET? .OTHER ,INVISIBLE>>
+ <NOT <==? .OTHER ,PLAYER>>>
+ <SET N <+ 1 .N>>
+ <SET WHO .OTHER>)>
+ <SET OTHER <NEXT? .OTHER>>>
+ <COND (<AND <==? 1 .N> <NOT ,QCONTEXT>>
+ <SAID-TO .WHO>)>
+ <COND (<AND <QCONTEXT-GOOD?>
+ <==? ,WINNER ,PLAYER>> ;"? more?"
+ <SETG L-WINNER ,WINNER>
+ <SETG WINNER ,QCONTEXT>
+ <TELL "(said to " D ,QCONTEXT ")" CR>)>)>>
+
+<ROUTINE QCONTEXT-GOOD? ()
+ <COND (<AND <NOT <ZERO? ,QCONTEXT>>
+ <FSET? ,QCONTEXT ,PERSONBIT>
+ <NOT <FSET? ,QCONTEXT ,INVISIBLE>>
+ <==? ,HERE ,QCONTEXT-ROOM>
+ <==? ,HERE <META-LOC ,QCONTEXT>>>
+ <RTRUE>)>>
+
+<ROUTINE SAID-TO (WHO)
+ <SETG QCONTEXT .WHO>
+ <SETG QCONTEXT-ROOM <LOC .WHO>>>
+
+<ROUTINE THIS-IS-IT (OBJ)
+ <COND (<EQUAL? .OBJ <> ,NOT-HERE-OBJECT>
+ <RTRUE>)>
+ <COND (<AND <VERB? WALK FACE> <==? .OBJ ,PRSO>>
+ <RTRUE>)>
+ <COND (<NOT <FSET? .OBJ ,PERSONBIT>>
+ <COND (<NOT <EQUAL? .OBJ ,GLOBAL-HERE ,INTDIR>>
+ <SETG P-IT-OBJECT .OBJ>)>)
+ (<EQUAL? .OBJ ,PLAYER>
+ <RTRUE>)
+ (<FSET? .OBJ ,FEMALE>
+ <SETG P-HER-OBJECT .OBJ>)
+ (<ZMEMQ .OBJ ,COUPLE-TABLE>
+ <SETG P-THEM-OBJECT .OBJ>)
+ (T
+ <SETG P-HIM-OBJECT .OBJ>)>
+ <RTRUE>>
+
+<ROUTINE FAKE-ORPHAN ("AUX" TMP)
+ <ORPHAN ,P-SYNTAX <>>
+ <TELL "(Be specific: what thing do you want to ">
+ <SET TMP <GET ,P-OTBL ,P-VERBN>>
+ <COND (<==? .TMP 0> <TELL "tell">)
+ (<0? <GETB ,P-VTBL 2>>
+ <PRINTB <GET .TMP 0>>)
+ (T
+ <WORD-PRINT <GETB .TMP 2> <GETB .TMP 3>>
+ <PUTB ,P-VTBL 2 0>)>
+ <SETG P-OFLAG T>
+ <SETG P-WON <>>
+ <TELL "?)" CR>>
+
+<GLOBAL NOW-PRSI <>>
+
+<ROUTINE TELL-D-LOC (OBJ)
+ <TELL D .OBJ>
+ <COND (<IN? .OBJ ,GLOBAL-OBJECTS> <TELL "(gl)">)
+ (<IN? .OBJ ,LOCAL-GLOBALS> <TELL "(lg)">)
+ (<IN? .OBJ ,ROOMS> <TELL "(rm)">)>
+ <COND (<EQUAL? .OBJ ,TURN ,INTNUM>
+ <TELL "(">
+ <COND (,P-DOLLAR-FLAG
+ <PRINTC ,CURRENCY-SYMBOL>
+ <TELL N ,P-AMOUNT ")">)
+ (T <TELL N ,P-NUMBER ")">)>)>>
+
+<ROUTINE FIX-HIM-HER (HEM-OBJECT "AUX" C P)
+ <SET C <GETP .HEM-OBJECT ,P?CHARACTER>>
+ <COND (<NOT <ACCESSIBLE? .HEM-OBJECT>>
+ <COND (,DEBUG <TELL "[" D .HEM-OBJECT ":NA]" CR>)>
+ <SET P <GET ,GLOBAL-CHARACTER-TABLE .C>>
+ <RETURN <AND .C
+ <NOT <==? .P <GET ,CHARACTER-TABLE .C>>>
+ .P>>)>
+ <COND (<IN? .HEM-OBJECT ,GLOBAL-OBJECTS>
+ <SET P <GET ,CHARACTER-TABLE .C>>)
+ (T <SET P .HEM-OBJECT>)>
+ <COND (<EQUAL? ,HERE <LOC .P>>
+ <COND (,DEBUG <TELL "[" D .HEM-OBJECT ":LO]" CR>)>
+ <RETURN .P>)>>
+
+<ROUTINE PERFORM (A "OPTIONAL" (O <>) (I <>) "AUX" V OA OO OI)
+ ;#DECL((A) FIX (O) <OR FALSE OBJECT FIX> (I) <OR FALSE OBJECT> (V)ANY)
+ <COND (,DEBUG
+ <TELL "[Perform: ">
+ %<COND (<GASSIGNED? PREDGEN> '<TELL N .A>)
+ (T '<PRINC <NTH ,ACTIONS <+ <* .A 2> 1>>>)>
+ <COND (.O
+ <TELL "/">
+ <COND (<EQUAL? .A ,V?WALK ,V?FACE> <TELL N .O>)
+ (T <TELL-D-LOC .O>)>)>
+ <COND (.I
+ <TELL "/">
+ <TELL-D-LOC .I>)>
+ <TELL "]" CR>)>
+ <SET OA ,PRSA>
+ <SET OO ,PRSO>
+ <SET OI ,PRSI>
+ <SETG PRSA .A>
+ <COND (<NOT <EQUAL? .A ,V?WALK ,V?FACE>>
+ <COND (<AND <EQUAL? ,IT .I .O>
+ <NOT <ACCESSIBLE? ,P-IT-OBJECT>>>
+ <COND (<NOT .I> <FAKE-ORPHAN>)
+ (T <NOT-HERE ,P-IT-OBJECT>)>
+ <RFATAL>)>
+ <COND (<EQUAL? ,THEM .I .O>
+ <COND (<SET V <FIX-HIM-HER ,P-THEM-OBJECT>>
+ <COND (,DEBUG <TELL "[them=" D .V "]" CR>)>
+ <COND (<==? ,THEM .O> <SET O .V>)>
+ <COND (<==? ,THEM .I> <SET I .V>)>)
+ (T
+ <COND (<NOT .I> <FAKE-ORPHAN>)
+ (T <NOT-HERE ,P-THEM-OBJECT>)>
+ <RFATAL>)>)>
+ <COND (<EQUAL? ,HER .I .O>
+ <COND (<SET V <FIX-HIM-HER ,P-HER-OBJECT>>
+ <COND (,DEBUG <TELL "[her=" D .V "]" CR>)>
+ <COND (<==? ,HER .O> <SET O .V>)>
+ <COND (<==? ,HER .I> <SET I .V>)>)
+ (T
+ <COND (<NOT .I> <FAKE-ORPHAN>)
+ (T <NOT-HERE ,P-HER-OBJECT>)>
+ <RFATAL>)>)>
+ <COND (<EQUAL? ,HIM .I .O>
+ <COND (<SET V <FIX-HIM-HER ,P-HIM-OBJECT>>
+ <COND (,DEBUG <TELL "[him=" D .V "]" CR>)>
+ <COND (<==? ,HIM .O> <SET O .V>)>
+ <COND (<==? ,HIM .I> <SET I .V>)>)
+ (T
+ <COND (<NOT .I> <FAKE-ORPHAN>)
+ (T <NOT-HERE ,P-HIM-OBJECT>)>
+ <RFATAL>)>)>
+ <COND (<==? .O ,IT>
+ <SET O ,P-IT-OBJECT>
+ <COND (,DEBUG <TELL "[it=" D .O "]" CR>)>)
+ ;"(<==? .O ,THEM><SET O ,P-THEM-OBJECT>)
+ (<==? .O ,HER> <SET O ,P-HER-OBJECT>)
+ (<==? .O ,HIM> <SET O ,P-HIM-OBJECT>)">
+ <COND (<==? .I ,IT>
+ <SET I ,P-IT-OBJECT>
+ <COND (,DEBUG <TELL "[it=" D .O "]" CR>)>)
+ ;"(<==? .I ,THEM><SET I ,P-THEM-OBJECT>)
+ (<==? .I ,HER> <SET I ,P-HER-OBJECT>)
+ (<==? .I ,HIM> <SET I ,P-HIM-OBJECT>)">)>
+ <SETG PRSI .I>
+ <SETG PRSO .O>
+ <COND (<AND <NOT <EQUAL? .A ,V?WALK ,V?FACE>>
+ <EQUAL? ,NOT-HERE-OBJECT ,PRSO ,PRSI>
+ <SET V <D-APPLY "Not Here" ,NOT-HERE-OBJECT-F>>>
+ <SETG P-WON <>>
+ .V)
+ (<AND <SET V <THIS-IS-IT ,PRSI>>
+ <SET V <THIS-IS-IT ,PRSO>>
+ <SET O ,PRSO>
+ <SET I ,PRSI>
+ <SET V <NULL-F>>>
+ T) ;"[in case last clause changed PRSx]"
+ (<AND ,DEBUG
+ <PRINTC %<ASCII !\[>>
+ <PRINTD ,WINNER> ;"extra output for next (...)"
+ <PRINTI "=]">
+ <SET V <NULL-F>>>
+ T)
+ (<SET V <D-APPLY "Actor"
+ ;,WINNER
+ <GETP ,WINNER ,P?ACTION>
+ ,M-WINNER>> .V)
+ (<SET V <D-APPLY "Room (M-BEG)"
+ <GETP <LOC ,WINNER> ,P?ACTION>
+ ,M-BEG>> .V)
+ (<SET V <D-APPLY "Preaction"
+ <GET ,PREACTIONS .A>>> .V)
+ (<AND .I
+ <SETG NOW-PRSI T>
+ <SET V <D-APPLY "PRSI" <GETP .I ,P?ACTION>>>>
+ .V)
+ (<AND <NOT <SETG NOW-PRSI <>>>
+ .O
+ <NOT <EQUAL? .A ,V?WALK ,V?FACE>>
+ <LOC .O>
+ <SET V <GETP <LOC .O> ,P?CONTFCN>>
+ <SET V <APPLY .V ,M-CONT>>
+ ;<SET V <DD-APPLY "Container" <LOC .O>
+ <GETP <LOC .O> ,P?CONTFCN>>>>
+ .V)
+ (<AND .O
+ <NOT <EQUAL? .A ,V?WALK ,V?FACE>>
+ <SET V <D-APPLY "PRSO"
+ <GETP .O ,P?ACTION>>>>
+ .V)
+ (<SET V <D-APPLY <>
+ <GET ,ACTIONS .A>>> .V)>
+ <COND (<NOT <==? .V ,M-FATAL>>
+ <COND (<OR <VERB? SAVE RESTORE> <NOT <GAME-VERB?>>>
+ <SET V <D-APPLY "Room (M-END)"
+ <GETP <LOC ,WINNER> ,P?ACTION> ,M-END>>)>)>
+ <SETG PRSA .OA>
+ <SETG PRSO .OO>
+ <SETG PRSI .OI>
+ .V>
+
+;<ROUTINE DD-APPLY (STR OBJ FCN)
+ <COND (,DEBUG
+ <PRINTC %<ASCII !\[>>
+ <TELL D .OBJ "=]">)>
+ <D-APPLY .STR .FCN>>
+
+<ROUTINE D-APPLY (STR FCN "OPTIONAL" (FOO <>) "AUX" RES)
+ <COND (<NOT .FCN> <>)
+ (T
+ <COND (,DEBUG
+ <COND (<NOT .STR>
+ <TELL "[Action:]" CR>)
+ (T
+ <PRINTC %<ASCII !\[>>
+ <TELL .STR ": ">)>)>
+ <COND (<=? .STR "Container">
+ <SET FOO ,M-CONT>)>
+ <SET RES
+ <COND (.FOO <APPLY .FCN .FOO>)
+ (T <APPLY .FCN>)>>
+ <COND (<AND ,DEBUG .STR>
+ <COND (<==? .RES ,M-FATAL>
+ <TELL "Fatal]" CR>)
+ (<NOT .RES>
+ <TELL "Not handled]" CR>)
+ (T <TELL "Handled]" CR>)>)>
+ .RES)>>
+
+" Grovel down the input finding the verb, prepositions, and noun clauses.
+ If the input is <direction> or <walk> <direction>, fall out immediately
+ setting PRSA to ,V?WALK and PRSO to <direction>. Otherwise, perform
+ all required orphaning, syntax checking, and noun clause lookup."
+
+<GLOBAL P-PROMPT 2>
+
+<ROUTINE I-PROMPT-1 () <SETG P-PROMPT 1> <RFALSE>>
+
+<ROUTINE I-PROMPT-2 ()
+ <COND (,P-PROMPT
+ <SETG P-PROMPT <>>
+ <TELL CR
+"(Are you tired of seeing \"What next?\" Well, you won't see it
+any more.)" CR>
+ <COND (<VERB? ;WAIT WAIT-FOR WAIT-UNTIL> <CRLF>)>
+ <DISABLE <INT I-PROMPT-2>>
+ <RFALSE>)>>
+
+<ROUTINE BUZZER-WORD? (WORD)
+ <COND (<QUESTION-WORD? .WORD> <RTRUE>)
+ ( <NUMBER-WORD? .WORD> <RTRUE>)
+ ( <NAUGHTY-WORD? .WORD> <RTRUE>)
+ (<OR <EQUAL? .WORD ,W?NW ,W?NORTHW ,W?NE>
+ <EQUAL? .WORD ,W?SW ,W?SOUTHW ,W?NORTHE>
+ <EQUAL? .WORD ,W?SE ,W?SOUTHE>>
+ <TELL "(Sorry, but this story has no \"">
+ <PRINTB .WORD>
+ <TELL "\" directions.)" CR>)
+ ;(<EQUAL? .WORD ,W?ALL>
+ <TELL "(Sorry, but in this story you can't use the word \"">
+ <PRINTB .WORD>
+ <TELL "\".)" CR>)>>
+
+<BUZZ AM ANY ARE CAN COULD DID DO HAS HAVE HE\'S HOW
+ IS IT\'S I\'LL I\'M I\'VE LET\'S SHALL SHE\'S SHOULD
+ THAT\'S THEY\'RE WAS WERE WE\'RE
+ WHAT WHAT\'S WHEN WHEN\'S WHERE ;WHERE\'S WHICH WHO WHO\'S WHY
+ WILL WON\'T WOULD YOU\'RE>
+
+<GLOBAL QUESTION-WORD-COUNT 0>
+<ROUTINE QUESTION-WORD? (WORD)
+ <COND (<EQUAL? .WORD ,W?WHERE ;",W?THERE ,W?SEEN">
+ <TELL
+"(To locate something, use the command: FIND " D ,SOMETHING ".)" CR>)
+ (<OR <EQUAL? .WORD ,W?WHAT ,W?WHAT\'S>
+ <EQUAL? .WORD ,W?WHO ,W?WHO\'S>>
+ <TELL
+"(To ask about something, use the command: TELL ME ABOUT " D ,SOMETHING ".)"
+CR>)
+ (<OR <EQUAL? .WORD ,W?THAT\'S ,W?IT\'S>
+ <EQUAL? .WORD ,W?WHY ,W?HOW ,W?WHEN>
+ <EQUAL? .WORD ,W?IS ,W?DID ,W?ARE>
+ <EQUAL? .WORD ,W?DO ,W?HAVE ,W?ANY>
+ <EQUAL? .WORD ,W?AM ,W?I\'M ,W?WE\'RE>
+ <EQUAL? .WORD ,W?WILL ,W?WAS ,W?WERE>
+ <EQUAL? .WORD ,W?I\'LL ,W?CAN ,W?WHICH>
+ <EQUAL? .WORD ,W?I\'VE ,W?WON\'T ,W?HAS>
+ <EQUAL? .WORD ,W?YOU\'RE ,W?HE\'S ,W?SHE\'S>
+ <EQUAL? .WORD ,W?SHOULD ,W?WOULD ,W?WHEN\'S>
+ <EQUAL? .WORD ,W?THEY\'RE ,W?COULD ,W?SHALL>>
+ <TELL "(Please use commands">
+ <INC QUESTION-WORD-COUNT>
+ <COND (<G? ,QUESTION-WORD-COUNT 9>
+ <SETG QUESTION-WORD-COUNT 0>
+ <TELL
+"! Your commands tell the computer what you want to do in the story. You
+can give commands to other people in the story, too. Here are examples
+of commands:|
+ TURN ON THE LAMP|
+ LOOK UNDER THE RUG|
+ MADAME, GIVE THE BOOK TO HIM|
+ CONDUCTOR, HELP ME|
+Now you can try again.)" CR>)
+ (T <TELL ", not statements or questions.)" CR>)>
+ <RTRUE>)>>
+
+<BUZZ ZERO ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE TEN
+ ELEVEN TWELVE THIRTE FOURTE FIFTEE SIXTEE SEVENT EIGHTE NINETE TWENTY
+ THIRTY FORTY ;FORTY- FIFTY ;FIFTY- SIXTY ;SIXTY- EIGHTY NINETY HUNDRE
+ THOUSA MILLIO BILLIO>
+
+<ROUTINE NUMBER-WORD? (WRD)
+ <COND (<OR <EQUAL? .WRD ,W?ZERO>
+ <EQUAL? .WRD ,W?TWO ,W?THREE ,W?FOUR>
+ <EQUAL? .WRD ,W?FIVE ,W?SIX ,W?SEVEN>
+ <EQUAL? .WRD ,W?EIGHT ,W?NINE ,W?TEN>
+ <EQUAL? .WRD ,W?ELEVEN ,W?TWELVE ,W?THIRTE>
+ <EQUAL? .WRD ,W?FOURTE ,W?FIFTEE ,W?SIXTEE>
+ <EQUAL? .WRD ,W?SEVENT ,W?EIGHTE ,W?NINETE>
+ <EQUAL? .WRD ,W?TWENTY ,W?THIRTY ,W?FORTY>
+ <EQUAL? .WRD ,W?FIFTY ,W?SIXTY ,W?EIGHTY>
+ <EQUAL? .WRD ,W?NINETY ,W?HUNDRE ,W?THOUSA>
+ <EQUAL? .WRD ,W?MILLIO ,W?BILLIO ,W?ONE>>
+ <TELL "(Use numerals for numbers, for example \"10.\")" CR>
+ <RTRUE>)>>
+
+<BUZZ BASTARD CHOMP CURSE CURSES CUSS DAMN DARN FUCK FUDGE HELL
+ PISS SCREW SHIT SUCK>
+
+<ROUTINE NAUGHTY-WORD? (WORD)
+ <COND (<OR <EQUAL? .WORD ,W?CURSE ,W?CURSES ,W?CUSS>
+ <EQUAL? .WORD ,W?DAMN ,W?SHIT ,W?FUCK>
+ <EQUAL? .WORD ,W?CHOMP ,W?DARN ,W?HELL>
+ <EQUAL? .WORD ,W?FUDGE ,W?PISS ,W?SUCK>
+ <EQUAL? .WORD ,W?BASTARD ,W?SCREW>>
+ <PRINTC %<ASCII !\(>>
+ <TELL <PICK-ONE-NEW ,OFFENDED>>
+ <PRINTC %<ASCII !\)>>
+ <CRLF>)>>
+
+<GLOBAL OFFENDED
+ <LTABLE 0
+ "You ought to be ashamed of yourself!"
+ "Hey, save that talk for the locker room!"
+ "Step outside and say that!"
+ "And so's your old man!">>
+
+<ROUTINE PARSER ("AUX" (PTR ,P-LEXSTART) WRD (VAL 0) (VERB <>)
+ LEN (DIR <>) (NW 0) (LW 0) NUM SCNT (CNT -1) OWINNER)
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> ,P-ITBLLEN> <RETURN>)
+ (T <PUT ,P-ITBL .CNT 0>)>>
+ <SETG P-NUMBER -1>
+ <SETG P-NAM <>>
+ <SETG P-ADJ <>>
+ <SETG P-ADVERB <>>
+ <SETG P-MERGED <>>
+ ;<SETG P-WHAT-IGNORED <>>
+ <PUT ,P-PRSO ,P-MATCHLEN 0>
+ <PUT ,P-PRSI ,P-MATCHLEN 0>
+ <PUT ,P-BUTS ,P-MATCHLEN 0>
+ <SET OWINNER ,WINNER>
+ <COND (<AND <NOT ,QUOTE-FLAG> <N==? ,WINNER ,PLAYER>>
+ <SETG L-WINNER ,WINNER>
+ <SETG WINNER ,PLAYER>
+ <COND (T ;<NOT <FSET? <LOC ,WINNER> ,VEHBIT>>
+ <SETG LAST-PLAYER-LOC ,HERE>
+ <SETG HERE <LOC ,WINNER>>)>
+ <SETG LIT <LIT? ,HERE>>)>
+ <COND (<NOT <ZERO? ,P-CONT>>
+ <SET PTR ,P-CONT>
+ <SETG P-CONT <>>
+ <COND (<AND <NOT ,SUPER-BRIEF> <==? ,PLAYER ,WINNER>>
+ <CRLF>)>
+ ;<COND (<NOT <VERB? ASK TELL SAY>> <CRLF>)>)
+ (T
+ <SETG L-WINNER ,WINNER>
+ <SETG WINNER ,PLAYER>
+ <SETG QUOTE-FLAG <>>
+ <COND (T ;<NOT <FSET? <LOC ,WINNER> ,VEHBIT>>
+ <SETG LAST-PLAYER-LOC ,HERE>
+ <SETG HERE <LOC ,WINNER>>)>
+ <SETG LIT <LIT? ,HERE>>
+ <COND (<NOT ,SUPER-BRIEF> <CRLF>)>
+ ;<SET SCNT ,P-SPACE>
+ ;<REPEAT ()
+ <COND (<L? <SET SCNT <- .SCNT 1>> 0> <RETURN>)
+ (T <CRLF>)>>
+ <COND (<AND ,P-PROMPT <NOT ,P-OFLAG>>
+ <COND (<EQUAL? ,P-PROMPT 2>
+ <TELL "Okay, what do you want to do now?">)
+ (T <TELL "What next?">)>
+ <CRLF>)>
+ <PUTB ,P-LEXV 0 59>
+ <TELL ">">
+ <READ ,P-INBUF ,P-LEXV>)>
+ <SETG P-LEN <GETB ,P-LEXV ,P-LEXWORDS>>
+ <COND (<AND <==? ,W?QUOTE <GET ,P-LEXV .PTR>>
+ <QCONTEXT-GOOD?>> ;"Is quote first input token?"
+ <SET PTR <+ .PTR ,P-LEXELEN>> ;"If so, ignore it."
+ <SETG P-LEN <- ,P-LEN 1>>)>
+ <COND (<==? ,W?THEN <GET ,P-LEXV .PTR>> ;"Is THEN first input word?"
+ <SET PTR <+ .PTR ,P-LEXELEN>> ;"If so, ignore it."
+ <SETG P-LEN <- ,P-LEN 1>>)>
+ <COND (<AND <L? 1 ,P-LEN>
+ <==? ,W?GO <GET ,P-LEXV .PTR>> ;"Is GO first input word?"
+ <SET NW <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>>
+ <WT? .NW ,PS?VERB ,P1?VERB> ;" followed by verb?">
+ <SET PTR <+ .PTR ,P-LEXELEN>> ;"If so, ignore it."
+ <SETG P-LEN <- ,P-LEN 1>>)>
+ <COND (<0? ,P-LEN> <TELL "I beg your pardon?" CR> <RFALSE>)>
+ <SET LEN ,P-LEN>
+ <SETG P-DIR <>>
+ <SETG P-NCN 0>
+ <SETG P-GETFLAGS 0>
+ ;"3/25/83: Next statement added."
+ <PUT ,P-ITBL ,P-VERBN 0>
+ <REPEAT ()
+ <COND (<L? <SETG P-LEN <- ,P-LEN 1>> 0>
+ <SETG QUOTE-FLAG <>>
+ <RETURN>)
+ (<BUZZER-WORD? <SET WRD <GET ,P-LEXV .PTR>>>
+ <RFALSE>)
+ (<OR .WRD
+ <SET WRD <NUMBER? .PTR>>
+ ;<SET WRD <NAME? .PTR>>>
+ <COND (<AND <==? .WRD ,W?TO>
+ <EQUAL? .VERB ,ACT?TELL ,ACT?ASK>>
+ <SET VERB ,ACT?TELL>
+ <SET WRD ,W?QUOTE>)
+ (<AND <==? .WRD ,W?THEN>
+ <NOT .VERB>
+ <NOT ,QUOTE-FLAG> ;"Last NOT added 7/3">
+ <PUT ,P-ITBL ,P-VERB ,ACT?TELL>
+ <PUT ,P-ITBL ,P-VERBN 0>
+ <SET WRD ,W?QUOTE>)>
+ <COND ;(<AND <EQUAL? .WRD ,W?PERIOD>
+ <EQUAL? .LW ,W?MRS ,W?MR>>
+ <SET LW 0>)
+ (<OR <EQUAL? .WRD ,W?THEN ,W?PERIOD>
+ <EQUAL? .WRD ,W?QUOTE>>
+ <COND (<EQUAL? .WRD ,W?QUOTE>
+ <COND (,QUOTE-FLAG
+ <SETG QUOTE-FLAG <>>)
+ (T <SETG QUOTE-FLAG T>)>)>
+ <OR <0? ,P-LEN>
+ <SETG P-CONT <+ .PTR ,P-LEXELEN>>>
+ <PUTB ,P-LEXV ,P-LEXWORDS ,P-LEN>
+ <RETURN>)
+ (<AND <SET VAL
+ <WT? .WRD
+ ,PS?DIRECTION
+ ,P1?DIRECTION>>
+ <EQUAL? .VERB <> ,ACT?WALK ,ACT?FACE>
+ <OR <==? .LEN 1>
+ <AND <==? .LEN 2>
+ <EQUAL? .VERB ,ACT?WALK ,ACT?FACE>>
+ <AND <EQUAL? <SET NW
+ <GET ,P-LEXV
+ <+ .PTR ,P-LEXELEN>>>
+ ,W?THEN
+ ,W?PERIOD
+ ,W?QUOTE>
+ <G? .LEN 1 ;2>>
+ ;<AND <EQUAL? .NW ,W?PERIOD>
+ <G? .LEN 1>>
+ <AND ,QUOTE-FLAG
+ <==? .LEN 2>
+ <EQUAL? .NW ,W?QUOTE>>
+ <AND <G? .LEN 2>
+ <EQUAL? .NW ,W?COMMA ,W?AND>>>>
+ <SET DIR .VAL>
+ <COND (<EQUAL? .NW ,W?COMMA ,W?AND>
+ <PUT ,P-LEXV
+ <+ .PTR ,P-LEXELEN>
+ ,W?THEN>)>
+ <COND (<NOT <G? .LEN 2>>
+ <SETG QUOTE-FLAG <>>
+ <RETURN>)>)
+ (<AND <SET VAL <WT? .WRD ,PS?VERB ,P1?VERB>>
+ <OR <NOT .VERB>
+ ;<EQUAL? .VERB ,ACT?NAME>>>
+ ;<COND (<EQUAL? .VERB ,ACT?NAME>
+ <SETG P-WHAT-IGNORED T>)>
+ <SET VERB .VAL>
+ <PUT ,P-ITBL ,P-VERB .VAL>
+ <PUT ,P-ITBL ,P-VERBN ,P-VTBL>
+ <PUT ,P-VTBL 0 .WRD>
+ <PUTB ,P-VTBL 2 <GETB ,P-LEXV
+ <SET NUM
+ <+ <* .PTR 2> 2>>>>
+ <PUTB ,P-VTBL 3 <GETB ,P-LEXV <+ .NUM 1>>>)
+ (<OR <SET VAL <WT? .WRD ,PS?PREPOSITION 0>>
+ <AND <OR <EQUAL? .WRD ,W?ONE ,W?A>
+ <EQUAL? .WRD ,W?BOTH ,W?ALL>
+ <WT? .WRD ,PS?ADJECTIVE>
+ <WT? .WRD ,PS?OBJECT>>
+ <SET VAL 0>>>
+ <COND (<AND <G? ,P-LEN 0>
+ <==? <GET ,P-LEXV
+ <+ .PTR ,P-LEXELEN>>
+ ,W?OF>
+ <NOT <EQUAL? .VERB
+ ,ACT?MAKE ,ACT?TAKE>>
+ <0? .VAL>
+ <NOT <EQUAL? .WRD ,W?ONE ,W?A>>
+ <NOT <EQUAL? .WRD ,W?ALL ,W?BOTH>>>)
+ (<AND <NOT <0? .VAL>>
+ <OR <0? ,P-LEN>
+ <EQUAL? <GET ,P-LEXV <+ .PTR 2>>
+ ,W?THEN ,W?PERIOD>>>
+ <COND (<L? ,P-NCN 2>
+ <PUT ,P-ITBL ,P-PREP1 .VAL>
+ <PUT ,P-ITBL ,P-PREP1N .WRD>)>)
+ (<==? ,P-NCN 2>
+ <TELL
+"(I found too many nouns in that sentence!)" CR>
+ <RFALSE>)
+ (T
+ <SETG P-NCN <+ ,P-NCN 1>>
+ <OR <SET PTR <CLAUSE .PTR .VAL .WRD>>
+ <RFALSE>>
+ <COND (<L? .PTR 0>
+ <SETG QUOTE-FLAG <>>
+ <RETURN>)>)>)
+ (<==? .WRD ,W?CLOSELY>
+ <SETG P-ADVERB ,W?CAREFULLY>)
+ (<OR <EQUAL? .WRD
+ ,W?CAREFULLY ,W?QUIETLY ,W?PRIVATELY>
+ <EQUAL? .WRD
+ ,W?SLOWLY ,W?QUICKLY ,W?BRIEFLY>>
+ <SETG P-ADVERB .WRD>)
+ (<WT? .WRD ,PS?BUZZ-WORD>)
+ (<AND <EQUAL? .VERB ,ACT?TELL>
+ <WT? .WRD ,PS?VERB ,P1?VERB>>
+ <TELL
+"(Please consult your manual for the correct way to talk to characters.)" CR>
+ <RFALSE>)
+ (T
+ <CANT-USE .PTR>
+ <RFALSE>)>)
+ (T
+ <UNKNOWN-WORD .PTR>
+ <RFALSE>)>
+ <SET LW .WRD>
+ <SET PTR <+ .PTR ,P-LEXELEN>>>
+ <COND (.DIR
+ <COND (<EQUAL? .VERB ,ACT?FACE>
+ <SETG PRSA ,V?FACE>)
+ (T
+ <SETG PRSA ,V?WALK>)>
+ <SETG P-WALK-DIR .DIR>
+ <SETG PRSO .DIR>
+ <SETG P-OFLAG <>>
+ <RETURN T>)>
+ <SETG P-WALK-DIR <>>
+ <COND (<AND ,P-OFLAG
+ <ORPHAN-MERGE>>
+ <SETG WINNER .OWINNER>)>
+ <COND (<==? <GET ,P-ITBL ,P-VERB> 0>
+ <PUT ,P-ITBL ,P-VERB ,ACT?$CALL>)>
+ <COND (<AND <SYNTAX-CHECK> <SNARF-OBJECTS> <MANY-CHECK> <TAKE-CHECK>>
+ T)>>
+
+<GLOBAL P-WALK-DIR <>>
+
+"Check whether word pointed at by PTR is the correct part of speech.
+ The second argument is the part of speech (,PS?<part of speech>). The
+ 3rd argument (,P1?<part of speech>), if given, causes the value
+ for that part of speech to be returned."
+
+<ROUTINE WT? (PTR BIT "OPTIONAL" (B1 5) "AUX" (OFFS ,P-P1OFF) TYP)
+ <COND (<BTST <SET TYP <GETB .PTR ,P-PSOFF>> .BIT>
+ <COND (<G? .B1 4> <RTRUE>)
+ (T
+ <SET TYP <BAND .TYP ,P-P1BITS>>
+ <COND (<NOT <==? .TYP .B1>> <SET OFFS <+ .OFFS 1>>)>
+ <GETB .PTR .OFFS>)>)>>
+
+"Scan through a noun phrase, leaving a pointer to its starting location:"
+
+<ROUTINE CLAUSE (PTR VAL WRD "AUX" OFF NUM (ANDFLG <>) (FIRST?? T) NW (LW 0))
+ ;#DECL ((PTR VAL OFF NUM) FIX (WRD NW) <OR FALSE FIX TABLE>
+ (ANDFLG FIRST??) <OR ATOM FALSE>)
+ <SET OFF <* <- ,P-NCN 1> 2>>
+ <COND (<NOT <==? .VAL 0>>
+ <PUT ,P-ITBL <SET NUM <+ ,P-PREP1 .OFF>> .VAL>
+ <PUT ,P-ITBL <+ .NUM 1> .WRD>
+ <SET PTR <+ .PTR ,P-LEXELEN>>)
+ (T <SETG P-LEN <+ ,P-LEN 1>>)>
+ <COND (<0? ,P-LEN> <SETG P-NCN <- ,P-NCN 1>> <RETURN -1>)>
+ <PUT ,P-ITBL <SET NUM <+ ,P-NC1 .OFF>> <REST ,P-LEXV <* .PTR 2>>>
+ <COND (<EQUAL? <GET ,P-LEXV .PTR> ,W?THE ,W?A ,W?AN>
+ <PUT ,P-ITBL .NUM <REST <GET ,P-ITBL .NUM> 4>>)>
+ <REPEAT ()
+ <COND (<L? <SETG P-LEN <- ,P-LEN 1>> 0>
+ <PUT ,P-ITBL <+ .NUM 1> <REST ,P-LEXV <* .PTR 2>>>
+ <RETURN -1>)>
+ <COND (<BUZZER-WORD? <SET WRD <GET ,P-LEXV .PTR>>>
+ <RFALSE>)
+ (<OR .WRD
+ <SET WRD <NUMBER? .PTR>>
+ ;<SET WRD <NAME? .PTR>>>
+ <COND (<0? ,P-LEN> <SET NW 0>)
+ (T <SET NW <GET ,P-LEXV <+ .PTR ,P-LEXELEN>>>)>
+ <COND (<AND <==? .WRD ,W?OF>
+ <EQUAL? <GET ,P-ITBL ,P-VERB>
+ ,ACT?MAKE ,ACT?TAKE>>
+ <PUT ,P-LEXV .PTR ,W?WITH>
+ <SET WRD ,W?WITH>)>
+ <COND ;(<AND <EQUAL? .WRD ,W?PERIOD>
+ <EQUAL? .LW ,W?MRS ,W?MR>>
+ <SET LW 0>)
+ (<EQUAL? .WRD ,W?AND ,W?COMMA> <SET ANDFLG T>)
+ (<EQUAL? .WRD ,W?ALL ,W?BOTH ,W?ONE>
+ <COND (<==? .NW ,W?OF>
+ <SETG P-LEN <- ,P-LEN 1>>
+ <SET PTR <+ .PTR ,P-LEXELEN>>)>)
+ (<OR <EQUAL? .WRD ,W?THEN ,W?PERIOD>
+ <AND <WT? .WRD ,PS?PREPOSITION>
+ <GET ,P-ITBL ,P-VERB>
+ <NOT .FIRST??>>>
+ <SETG P-LEN <+ ,P-LEN 1>>
+ <PUT ,P-ITBL
+ <+ .NUM 1>
+ <REST ,P-LEXV <* .PTR 2>>>
+ <RETURN <- .PTR ,P-LEXELEN>>)
+ ;"3/16/83: This clause used to be later."
+ (<AND .ANDFLG
+ <OR ;"3/25/83: next statement added."
+ <EQUAL? <GET ,P-ITBL ,P-VERBN> 0>
+ ;"10/26/84: next stmt changed"
+ <VERB-DIR-ONLY? .WRD>>>
+ <SET PTR <- .PTR 4>>
+ <PUT ,P-LEXV <+ .PTR 2> ,W?THEN>
+ <SETG P-LEN <+ ,P-LEN 2>>)
+ (<WT? .WRD ,PS?OBJECT>
+ <COND (<AND <G? ,P-LEN 0>
+ <EQUAL? .NW ,W?OF>
+ <NOT <EQUAL? .WRD ,W?ALL ,W?ONE>>>
+ T)
+ (<AND <WT? .WRD
+ ,PS?ADJECTIVE
+ ,P1?ADJECTIVE>
+ <NOT <==? .NW 0>>
+ <WT? .NW ,PS?OBJECT>>)
+ (<AND <NOT .ANDFLG>
+ <NOT <EQUAL? .NW ,W?BUT ,W?EXCEPT>>
+ <NOT <EQUAL? .NW ,W?AND ,W?COMMA>>>
+ <PUT ,P-ITBL
+ <+ .NUM 1>
+ <REST ,P-LEXV <* <+ .PTR 2> 2>>>
+ <RETURN .PTR>)
+ (T <SET ANDFLG <>>)>)
+ (<AND <OR ,P-MERGED
+ ,P-OFLAG
+ <NOT <EQUAL? <GET ,P-ITBL ,P-VERB> 0>>>
+ <OR <WT? .WRD ,PS?ADJECTIVE>
+ <WT? .WRD ,PS?BUZZ-WORD>>>)
+ (<AND .ANDFLG
+ <EQUAL? <GET ,P-ITBL ,P-VERB> 0>>
+ <SET PTR <- .PTR 4>>
+ <PUT ,P-LEXV <+ .PTR 2> ,W?THEN>
+ <SETG P-LEN <+ ,P-LEN 2>>)
+ (<WT? .WRD ,PS?PREPOSITION> T)
+ (T
+ <CANT-USE .PTR>
+ <RFALSE>)>)
+ (T <UNKNOWN-WORD .PTR> <RFALSE>)>
+ <SET LW .WRD>
+ <SET FIRST?? <>>
+ <SET PTR <+ .PTR ,P-LEXELEN>>>>
+
+<ROUTINE VERB-DIR-ONLY? (WRD)
+ <AND <NOT <WT? .WRD ,PS?OBJECT>>
+ <NOT <WT? .WRD ,PS?ADJECTIVE>>
+ <OR <WT? .WRD ,PS?DIRECTION>
+ <WT? .WRD ,PS?VERB>>>>
+
+<ROUTINE NUMBER? (PTR "AUX" CNT BPTR CHR (SUM 0) (TIM <>) (DOLLAR <>))
+ <SET CNT <GETB <REST ,P-LEXV <* .PTR 2>> 2>>
+ <SET BPTR <GETB <REST ,P-LEXV <* .PTR 2>> 3>>
+ ;<SETG P-DOLLAR-FLAG <>>
+ <REPEAT ()
+ <COND (<L? <SET CNT <- .CNT 1>> 0> <RETURN>)
+ (T
+ <SET CHR <GETB ,P-INBUF .BPTR>>
+ <COND (<==? .CHR %<ASCII !\:>>
+ <SET TIM .SUM>
+ <SET SUM 0>)
+ (<G? .SUM 9999> <RFALSE>)
+ (<EQUAL? .CHR ,CURRENCY-SYMBOL>
+ <SET DOLLAR T>)
+ (<OR <G? .CHR %<ASCII !\9>>
+ <L? .CHR %<ASCII !\0>>>
+ <RFALSE>)
+ (T
+ <SET SUM <+ <* .SUM 10>
+ <- .CHR %<ASCII !\0>>>>)>
+ <SET BPTR <+ .BPTR 1>>)>>
+ <PUT ,P-LEXV .PTR ,W?NUMBER>
+ <COND (<G? .SUM 9999> <RFALSE>)
+ (.TIM
+ <COND ;"(<L? .TIM 8> <SET TIM <+ .TIM 12>>)"
+ (<G? .TIM 23> <RFALSE>)
+ ;"(<G? .TIM 19> T)
+ (<G? .TIM 12> <RFALSE>)
+ (<G? .TIM 7> T)
+ (T <SET TIM <+ 12 .TIM>>)">
+ <SET SUM <+ .SUM <* .TIM 60>>>)>
+ <SETG P-DOLLAR-FLAG .DOLLAR>
+ <COND (<AND .DOLLAR <G? .SUM 0>>
+ <SETG P-AMOUNT .SUM>
+ ,W?MONEY
+ ;<FSET ,INTNUM ,VOWELBIT>
+ ;<PUTP ,INTNUM ,P?SDESC "amount of money">)
+ (T
+ <SETG P-NUMBER .SUM>
+ <SETG P-DOLLAR-FLAG <>>
+ ,W?NUMBER
+ ;<FCLEAR ,INTNUM ,VOWELBIT>
+ ;<PUTP ,INTNUM ,P?SDESC "number">)>>
+
+<GLOBAL P-NUMBER -1>
+<GLOBAL P-AMOUNT 0>
+<GLOBAL P-DOLLAR-FLAG <>>
+<CONSTANT CURRENCY-SYMBOL %<ASCII !\*>>
+
+<GLOBAL P-DIRECTION 0>
+
+"New ORPHAN-MERGE for TRAP Retrofix 6/21/84"
+
+<ROUTINE ORPHAN-MERGE ("AUX" (CNT -1) TEMP VERB BEG END (ADJ <>) WRD)
+ <SETG P-OFLAG <>>
+ <COND (<WT? <SET WRD <GET <GET ,P-ITBL ,P-VERBN> 0>>
+ ,PS?ADJECTIVE ,P1?ADJECTIVE>
+ <SET ADJ T>)
+ ;"Following clause is retrofix #30, which handles case where one-word
+ response is both noun and verb. -JW 8/20/84"
+ (<AND <WT? .WRD ,PS?OBJECT ,P1?OBJECT>
+ <EQUAL? ,P-NCN 0>>
+ <PUT ,P-ITBL ,P-VERB 0>
+ <PUT ,P-ITBL ,P-VERBN 0>
+ <PUT ,P-ITBL ,P-NC1 <REST ,P-LEXV 2>>
+ <PUT ,P-ITBL ,P-NC1L <REST ,P-LEXV 6>>
+ <SETG P-NCN 1>)>
+ <COND (<AND <NOT <0? <SET VERB <GET ,P-ITBL ,P-VERB>>>>
+ <NOT .ADJ>
+ <NOT <==? .VERB <GET ,P-OTBL ,P-VERB>>>>
+ <RFALSE>)
+ (<==? ,P-NCN 2> <RFALSE>)
+ (<AND ,P-CONT
+ <==? .VERB ,ACT?TELL>>
+ <RFALSE>)
+ (<==? <GET ,P-OTBL ,P-NC1> 1>
+ <COND (<OR <==? <SET TEMP <GET ,P-ITBL ,P-PREP1>>
+ <GET ,P-OTBL ,P-PREP1>>
+ <0? .TEMP>>
+ <COND (.ADJ
+ <PUT ,P-OTBL ,P-NC1 <REST ,P-LEXV 2>>)
+ (T
+ <PUT ,P-OTBL ,P-NC1 <GET ,P-ITBL ,P-NC1>>)>
+ <COND (<EQUAL? <GET ,P-ITBL ,P-NC1L> 0>
+ <PUT ,P-ITBL ,P-NC1L <REST ,P-LEXV 6>>)>
+ <PUT ,P-OTBL ,P-NC1L <GET ,P-ITBL ,P-NC1L>>)
+ (T <RFALSE>)>)
+ (<==? <GET ,P-OTBL ,P-NC2> 1>
+ <COND (<OR <==? <SET TEMP <GET ,P-ITBL ,P-PREP1>>
+ <GET ,P-OTBL ,P-PREP2>>
+ <0? .TEMP>>
+ <COND (.ADJ
+ <PUT ,P-ITBL ,P-NC1 <REST ,P-LEXV 2>>)>
+ <PUT ,P-OTBL ,P-NC2 <GET ,P-ITBL ,P-NC1>>
+ <COND (<EQUAL? <GET ,P-ITBL ,P-NC1L> 0>
+ <PUT ,P-ITBL ,P-NC1L <REST ,P-LEXV 6>>)>
+ <PUT ,P-OTBL ,P-NC2L <GET ,P-ITBL ,P-NC1L>>
+ <SETG P-NCN 2>)
+ (T <RFALSE>)>)
+ (,P-ACLAUSE
+ <COND (<AND <NOT <==? ,P-NCN 1>> <NOT .ADJ>>
+ <SETG P-ACLAUSE <>>
+ <RFALSE>)
+ (T
+ <SET BEG <GET ,P-ITBL ,P-NC1>>
+ <COND (.ADJ <SET BEG <REST ,P-LEXV 2>> <SET ADJ <>>)>
+ <SET END <GET ,P-ITBL ,P-NC1L>>
+ <REPEAT ()
+ <SET WRD <GET .BEG 0>>
+ <COND (<==? .BEG .END>
+ <COND (.ADJ <ACLAUSE-WIN .ADJ> <RETURN>)
+ (T <SETG P-ACLAUSE <>> <RFALSE>)>)
+ (<AND <NOT .ADJ>
+ <OR <BTST <GETB .WRD ,P-PSOFF>
+ ,PS?ADJECTIVE>
+ <EQUAL? .WRD ,W?ALL ,W?ONE>>>
+ <SET ADJ .WRD>)
+ (<==? .WRD ,W?ONE>
+ <ACLAUSE-WIN .ADJ>
+ <RETURN>)
+ (<BTST <GETB .WRD ,P-PSOFF> ,PS?OBJECT>
+ <COND (<EQUAL? .WRD ,P-ANAM>
+ <ACLAUSE-WIN .ADJ>)
+ (T
+ <NCLAUSE-WIN>)>
+ <RETURN>)>
+ <SET BEG <REST .BEG ,P-WORDLEN>>
+ <COND (<EQUAL? .END 0>
+ <SET END .BEG>
+ <SETG P-NCN 1>
+ <PUT ,P-ITBL ,P-NC1 <BACK .BEG 4>>
+ <PUT ,P-ITBL ,P-NC1L .BEG>)>>)>)>
+ <PUT ,P-VTBL 0 <GET ,P-OVTBL 0>>
+ <PUTB ,P-VTBL 2 <GETB ,P-OVTBL 2>>
+ <PUTB ,P-VTBL 3 <GETB ,P-OVTBL 3>>
+ <PUT ,P-OTBL ,P-VERBN ,P-VTBL>
+ <PUTB ,P-VTBL 2 0>
+ <COND (<NOT <==? <GET ,P-OTBL ,P-NC2> 0>> <SETG P-NCN 2>)
+ (T <SETG P-NCN 1>)>
+ <REPEAT ()
+ <COND (<G? <SET CNT <+ .CNT 1>> ,P-ITBLLEN>
+ <SETG P-MERGED T>
+ <RTRUE>)
+ (T <PUT ,P-ITBL .CNT <GET ,P-OTBL .CNT>>)>>
+ T>
+
+"New ACLAUSE-WIN for TRAP retrofix 6/21/84"
+
+<ROUTINE ACLAUSE-WIN (ADJ)
+ <PUT ,P-ITBL ,P-VERB <GET ,P-OTBL ,P-VERB>>
+ <PUT ,P-CCTBL ,CC-SBPTR ,P-ACLAUSE>
+ <PUT ,P-CCTBL ,CC-SEPTR <+ ,P-ACLAUSE 1>>
+ <PUT ,P-CCTBL ,CC-DBPTR ,P-ACLAUSE>
+ <PUT ,P-CCTBL ,CC-DEPTR <+ ,P-ACLAUSE 1>>
+ <CLAUSE-COPY ,P-OTBL ,P-OTBL .ADJ>
+ <AND <NOT <==? <GET ,P-OTBL ,P-NC2> 0>> <SETG P-NCN 2>>
+ <SETG P-ACLAUSE <>>
+ <RTRUE>>
+
+<ROUTINE NCLAUSE-WIN ()
+ <PUT ,P-CCTBL ,CC-SBPTR ,P-NC1>
+ <PUT ,P-CCTBL ,CC-SEPTR ,P-NC1L>
+ <PUT ,P-CCTBL ,CC-DBPTR ,P-ACLAUSE>
+ <PUT ,P-CCTBL ,CC-DEPTR <+ ,P-ACLAUSE 1>>
+ <CLAUSE-COPY ,P-ITBL ,P-OTBL>
+ <AND <NOT <==? <GET ,P-OTBL ,P-NC2> 0>> <SETG P-NCN 2>>
+ <SETG P-ACLAUSE <>>
+ <RTRUE>>
+
+
+"Print undefined word in input.
+ PTR points to the unknown word in P-LEXV"
+
+<ROUTINE WORD-PRINT (CNT BUF)
+ ;<COND (<G? .CNT 6> <SET CNT 6>)>
+ <REPEAT ()
+ <COND (<DLESS? CNT 0> <RETURN>)
+ (ELSE
+ <PRINTC <GETB ,P-INBUF .BUF>>
+ <SET BUF <+ .BUF 1>>)>>>
+
+<GLOBAL UNKNOWN-MSGS
+ <PLTABLE
+ <PTABLE "(I don't know the word \""
+ "\".)">
+ <PTABLE "(Sorry, but the word \""
+ "\" is not in the vocabulary that you can use.)">
+ <PTABLE "(You don't need to use the word \""
+ "\" to finish this story.)">
+ <PTABLE "(Sorry, but the program doesn't recognize the word \""
+ "\".)">>>
+
+<ROUTINE UNKNOWN-WORD (PTR "AUX" BUF MSG)
+ <SET MSG <PICK-ONE ,UNKNOWN-MSGS>>
+ <COND (T ;<EQUAL? ,WINNER ,PLAYER>
+ <TELL <GET .MSG 0>>)
+ ;(T <TELL "\"Please, I not know English word '">)>
+ <WORD-PRINT <GETB <REST ,P-LEXV <SET BUF <* .PTR 2>>> 2>
+ <GETB <REST ,P-LEXV .BUF> 3>>
+ <SETG QUOTE-FLAG <>>
+ <SETG P-OFLAG <>>
+ <COND (T ;<EQUAL? ,WINNER ,PLAYER>
+ <TELL <GET .MSG 1> CR>)
+ ;(T <TELL "'.\"" CR>)>>
+
+<ROUTINE CANT-USE (PTR "AUX" BUF)
+ ;#DECL ((PTR BUF) FIX)
+ <SETG QUOTE-FLAG <>>
+ <SETG P-OFLAG <>>
+ <COND (T ;<EQUAL? ,WINNER ,PLAYER>
+ <TELL "(Sorry, but I don't understand the word \"">
+ <WORD-PRINT <GETB <REST ,P-LEXV <SET BUF <* .PTR 2>>> 2>
+ <GETB <REST ,P-LEXV .BUF> 3>>
+ <TELL "\" when you use it that way.)" CR>)
+ ;(T <TELL "\"Please, to me simple English speak.\"" CR>)>>
+
+" 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."
+
+<GLOBAL P-SLOCBITS 0>
+
+<CONSTANT P-SYNLEN 8>
+
+<CONSTANT P-SBITS 0>
+
+<CONSTANT P-SPREP1 1>
+
+<CONSTANT P-SPREP2 2>
+
+<CONSTANT P-SFWIM1 3>
+
+<CONSTANT P-SFWIM2 4>
+
+<CONSTANT P-SLOC1 5>
+
+<CONSTANT P-SLOC2 6>
+
+<CONSTANT P-SACTION 7>
+
+<CONSTANT P-SONUMS 3>
+
+<ROUTINE SYNTAX-CHECK ("AUX" SYN LEN NUM OBJ (DRIVE1 <>) (DRIVE2 <>)
+ PREP VERB)
+ ;#DECL ((DRIVE1 DRIVE2) <OR FALSE <PRIMTYPE VECTOR>>
+ (SYN) <PRIMTYPE VECTOR> (LEN NUM VERB PREP) FIX
+ (OBJ) <OR FALSE OBJECT>)
+ <COND (<0? <SET VERB <GET ,P-ITBL ,P-VERB>>>
+ <MISSING-VERB>
+ <RFALSE>)>
+ <SET SYN <GET ,VERBS <- 255 .VERB>>>
+ <SET LEN <GETB .SYN 0>>
+ <SET SYN <REST .SYN>>
+ <REPEAT ()
+ <SET NUM <BAND <GETB .SYN ,P-SBITS> ,P-SONUMS>>
+ <COND (<G? ,P-NCN .NUM> T) ;"Added 4/27/83"
+ (<AND <NOT <L? .NUM 1>>
+ <0? ,P-NCN>
+ <OR <0? <SET PREP <GET ,P-ITBL ,P-PREP1>>>
+ <==? .PREP <GETB .SYN ,P-SPREP1>>>>
+ <SET DRIVE1 .SYN>)
+ (<==? <GETB .SYN ,P-SPREP1> <GET ,P-ITBL ,P-PREP1>>
+ <COND (<AND <==? .NUM 2> <==? ,P-NCN 1>>
+ <SET DRIVE2 .SYN>)
+ (<==? <GETB .SYN ,P-SPREP2>
+ <GET ,P-ITBL ,P-PREP2>>
+ <SYNTAX-FOUND .SYN>
+ <RTRUE>)>)>
+ <COND (<DLESS? LEN 1>
+ <COND (<OR .DRIVE1 .DRIVE2> <RETURN>)
+ (T
+ <DONT-UNDERSTAND>
+ <RFALSE>)>)
+ (T <SET SYN <REST .SYN ,P-SYNLEN>>)>>
+ <COND (<AND .DRIVE1
+ <SET OBJ
+ <GWIM <GETB .DRIVE1 ,P-SFWIM1>
+ <GETB .DRIVE1 ,P-SLOC1>
+ <GETB .DRIVE1 ,P-SPREP1>>>>
+ <PUT ,P-PRSO ,P-MATCHLEN 1>
+ <PUT ,P-PRSO 1 .OBJ>
+ <SYNTAX-FOUND .DRIVE1>)
+ (<AND .DRIVE2
+ <SET OBJ
+ <GWIM <GETB .DRIVE2 ,P-SFWIM2>
+ <GETB .DRIVE2 ,P-SLOC2>
+ <GETB .DRIVE2 ,P-SPREP2>>>>
+ <PUT ,P-PRSI ,P-MATCHLEN 1>
+ <PUT ,P-PRSI 1 .OBJ>
+ <SYNTAX-FOUND .DRIVE2>)
+ (<EQUAL? .VERB ,ACT?FIND ,ACT?NAME>
+ <TELL "(Sorry, but I can't answer that question.)" CR>
+ <RFALSE>)
+ (T
+ <COND (<EQUAL? ,WINNER ,PLAYER>
+ <ORPHAN .DRIVE1 .DRIVE2>
+ <TELL "(Wh"
+ <COND (<EQUAL? .VERB ,ACT?WALK ,ACT?FACE> "ere")
+ (T "at")>
+ " do you want to ">)
+ (T
+ <TELL
+"(Your command was not complete. Next time, type wh"
+<COND (<EQUAL? .VERB ,ACT?WALK ,ACT?FACE> "ere") (T "at")>
+" you want" THE ,WINNER " to ">)>
+ <VERB-PRINT>
+ <COND (.DRIVE2
+ <CLAUSE-PRINT ,P-NC1 ,P-NC1L>)>
+ <PREP-PRINT <COND (.DRIVE1 <GETB .DRIVE1 ,P-SPREP1>)
+ (T <GETB .DRIVE2 ,P-SPREP2>)>>
+ <COND (<EQUAL? ,WINNER ,PLAYER>
+ <SETG P-OFLAG T>
+ <TELL "?)" CR>)
+ (T
+ <SETG P-OFLAG <>>
+ <TELL ".)" CR>)>
+ <RFALSE>)>>
+
+<ROUTINE DONT-UNDERSTAND ()
+ <TELL
+"(Sorry, but I don't understand. Please reword that or try something else.)"
+CR>>
+
+<ROUTINE VERB-PRINT ("AUX" TMP)
+ <SET TMP <GET ,P-ITBL ,P-VERBN>> ;"? ,P-OTBL?"
+ <COND (<==? .TMP 0> <TELL "tell">)
+ (<0? <GETB ,P-VTBL 2>>
+ <PRINTB <GET .TMP 0>>)
+ (T
+ <WORD-PRINT <GETB .TMP 2> <GETB .TMP 3>>
+ <PUTB ,P-VTBL 2 0>)>>
+
+<ROUTINE ORPHAN (D1 D2 "AUX" (CNT -1))
+ ;#DECL ((D1 D2) <OR FALSE <PRIMTYPE VECTOR>>)
+ <COND (<NOT ,P-MERGED>
+ <PUT ,P-OCLAUSE ,P-MATCHLEN 0>)>
+ <PUT ,P-OVTBL 0 <GET ,P-VTBL 0>>
+ <PUTB ,P-OVTBL 2 <GETB ,P-VTBL 2>>
+ <PUTB ,P-OVTBL 3 <GETB ,P-VTBL 3>>
+ <REPEAT ()
+ <COND (<IGRTR? CNT ,P-ITBLLEN> <RETURN>)
+ (T <PUT ,P-OTBL .CNT <GET ,P-ITBL .CNT>>)>>
+ <COND (<==? ,P-NCN 2>
+ <PUT ,P-CCTBL ,CC-SBPTR ,P-NC2>
+ <PUT ,P-CCTBL ,CC-SEPTR ,P-NC2L>
+ <PUT ,P-CCTBL ,CC-DBPTR ,P-NC2>
+ <PUT ,P-CCTBL ,CC-DEPTR ,P-NC2L>
+ <CLAUSE-COPY ,P-ITBL ,P-OTBL>)>
+ <COND (<NOT <L? ,P-NCN 1>>
+ <PUT ,P-CCTBL ,CC-SBPTR ,P-NC1>
+ <PUT ,P-CCTBL ,CC-SEPTR ,P-NC1L>
+ <PUT ,P-CCTBL ,CC-DBPTR ,P-NC1>
+ <PUT ,P-CCTBL ,CC-DEPTR ,P-NC1L>
+ <CLAUSE-COPY ,P-ITBL ,P-OTBL>)>
+ <COND (.D1
+ <PUT ,P-OTBL ,P-PREP1 <GETB .D1 ,P-SPREP1>>
+ <PUT ,P-OTBL ,P-NC1 1>)
+ (.D2
+ <PUT ,P-OTBL ,P-PREP2 <GETB .D2 ,P-SPREP2>>
+ <PUT ,P-OTBL ,P-NC2 1>)>>
+
+<ROUTINE CLAUSE-PRINT (BPTR EPTR "OPTIONAL" (THE? T))
+ <BUFFER-PRINT <GET ,P-ITBL .BPTR> <GET ,P-ITBL .EPTR> .THE?>>
+
+<ROUTINE BUFFER-PRINT (BEG END CP "AUX" (NOSP <>) WRD (FIRST?? T) (PN <>))
+ <REPEAT ()
+ <COND (<==? .BEG .END> <RETURN>)
+ (T
+ <COND (.NOSP <SET NOSP <>>)
+ (T <TELL " ">)>
+ <SET WRD <GET .BEG 0>>
+ <COND (<OR <AND <EQUAL? .WRD ,W?HIM>
+ <NOT <VISIBLE? ,P-HIM-OBJECT>>>
+ <AND <EQUAL? .WRD ,W?HER>
+ <NOT <VISIBLE? ,P-HER-OBJECT>>>
+ <AND <EQUAL? .WRD ,W?THEM>
+ <NOT <VISIBLE? ,P-THEM-OBJECT>>>>
+ <SET PN T>)>
+ <COND (<==? .WRD ,W?PERIOD>
+ <SET NOSP T>)
+ (<EQUAL? .WRD ,W?ME>
+ <PRINTD ,PLAYER>
+ <SET PN T>)
+ (<CAPITAL-NOUN? .WRD>
+ <CAPITALIZE .BEG>
+ <SET PN T>)
+ (T
+ <COND (<AND .FIRST?? <NOT .PN> .CP>
+ <TELL "the ">)>
+ <COND (<OR ,P-OFLAG ,P-MERGED> <PRINTB .WRD>)
+ (<AND <==? .WRD ,W?IT>
+ <VISIBLE? ,P-IT-OBJECT>>
+ <PRINTD ,P-IT-OBJECT>)
+ (<AND <EQUAL? .WRD ,W?HER>
+ <NOT .PN> ;"VISIBLE check above"
+ ;<VISIBLE? ,P-HER-OBJECT>>
+ <PRINTD ,P-HER-OBJECT>)
+ (<AND <EQUAL? .WRD ,W?THEM>
+ <NOT .PN>
+ ;<VISIBLE? ,P-THEM-OBJECT>>
+ <PRINTD ,P-THEM-OBJECT>)
+ (<AND <EQUAL? .WRD ,W?HIM>
+ <NOT .PN>
+ ;<VISIBLE? ,P-HIM-OBJECT>>
+ <PRINTD ,P-HIM-OBJECT>)
+ (T
+ <WORD-PRINT <GETB .BEG 2>
+ <GETB .BEG 3>>)>
+ <SET FIRST?? <>>)>)>
+ <SET BEG <REST .BEG ,P-WORDLEN>>>>
+
+<ROUTINE CAPITAL-NOUN? (WRD)
+ <OR <EQUAL? .WRD ,W?FRBZ ,W?GRNZ ,W?GOLA>
+ <EQUAL? .WRD ,W?KNUT ,W?HRNG ,W?WIEN>>>
+
+<ROUTINE CAPITALIZE (PTR)
+ <PRINTC <- <GETB ,P-INBUF <GETB .PTR 3>> 32>>
+ <WORD-PRINT <- <GETB .PTR 2> 1> <+ <GETB .PTR 3> 1>>>
+
+<ROUTINE PREP-PRINT (PREP "OPTIONAL" (SP? T) "AUX" WRD)
+ ;#DECL ((PREP) FIX)
+ <COND (<NOT <0? .PREP>>
+ <COND (.SP? <TELL " ">)>
+ <SET WRD <PREP-FIND .PREP>>
+ <COND (<==? .WRD ,W?AGAINST> <TELL "against">)
+ (<==? .WRD ,W?THROUGH> <TELL "through">)
+ (T <PRINTB .WRD>)>
+ <COND (<AND <==? ,W?SIT <GET <GET ,P-ITBL ,P-VERBN> 0>>
+ <==? ,W?DOWN .WRD>>
+ <TELL " on">)>
+ <COND (<AND <==? ,W?GET <GET <GET ,P-ITBL ,P-VERBN> 0>>
+ <==? ,W?OUT .WRD>> ;"Will it ever work? --SWG"
+ <TELL " of">)>
+ <RTRUE>)>>
+
+<GLOBAL P-CCTBL <TABLE 0 0 0 0>>
+
+"pointers used by CLAUSE-COPY (source/destination beginning/end pointers)"
+<CONSTANT CC-SBPTR 0>
+<CONSTANT CC-SEPTR 1>
+<CONSTANT CC-DBPTR 2>
+<CONSTANT CC-DEPTR 3>
+
+<ROUTINE CLAUSE-COPY (SRC DEST "OPTIONAL" (INSRT <>) "AUX" BEG END)
+ <SET BEG <GET .SRC <GET ,P-CCTBL ,CC-SBPTR>>>
+ <SET END <GET .SRC <GET ,P-CCTBL ,CC-SEPTR>>>
+ <PUT .DEST
+ <GET ,P-CCTBL ,CC-DBPTR>
+ <REST ,P-OCLAUSE
+ <+ <* <GET ,P-OCLAUSE ,P-MATCHLEN> ,P-LEXELEN> 2>>>
+ <REPEAT ()
+ <COND (<==? .BEG .END>
+ <PUT .DEST
+ <GET ,P-CCTBL ,CC-DEPTR>
+ <REST ,P-OCLAUSE
+ <+ <* <GET ,P-OCLAUSE ,P-MATCHLEN> ,P-LEXELEN>
+ 2>>>
+ <RETURN>)
+ (T
+ <COND (<AND .INSRT <==? ,P-ANAM <GET .BEG 0>>>
+ <CLAUSE-ADD .INSRT>)>
+ <CLAUSE-ADD <GET .BEG 0>>)>
+ <SET BEG <REST .BEG ,P-WORDLEN>>>>
+
+
+<ROUTINE CLAUSE-ADD (WRD "AUX" PTR)
+ ;#DECL ((WRD) TABLE (PTR) FIX)
+ <SET PTR <+ <GET ,P-OCLAUSE ,P-MATCHLEN> 2>>
+ <PUT ,P-OCLAUSE <- .PTR 1> .WRD>
+ <PUT ,P-OCLAUSE .PTR 0>
+ <PUT ,P-OCLAUSE ,P-MATCHLEN .PTR>>
+
+<ROUTINE PREP-FIND (PREP "AUX" (CNT 0) SIZE)
+ ;#DECL ((PREP CNT SIZE) FIX)
+ <SET SIZE <* <GET ,PREPOSITIONS 0> 2>>
+ <REPEAT ()
+ <COND (<IGRTR? CNT .SIZE> <RFALSE>)
+ (<==? <GET ,PREPOSITIONS .CNT> .PREP>
+ <RETURN <GET ,PREPOSITIONS <- .CNT 1>>>)>>>
+
+<ROUTINE SYNTAX-FOUND (SYN)
+ ;#DECL ((SYN) <PRIMTYPE VECTOR>)
+ <SETG P-SYNTAX .SYN>
+ <SETG PRSA <GETB .SYN ,P-SACTION>>>
+
+<GLOBAL P-GWIMBIT 0>
+
+<ROUTINE GWIM (GBIT LBIT PREP "AUX" OBJ WPREP)
+ ;#DECL ((GBIT LBIT) FIX (OBJ) OBJECT)
+ <COND (<==? .GBIT ,RMUNGBIT>
+ <RETURN ,ROOMS>)>
+ <SETG P-GWIMBIT .GBIT>
+ <SETG P-SLOCBITS .LBIT>
+ <PUT ,P-MERGE ,P-MATCHLEN 0>
+ <COND (<GET-OBJECT ,P-MERGE <>>
+ <SETG P-GWIMBIT 0>
+ <COND (<==? <GET ,P-MERGE ,P-MATCHLEN> 1>
+ <SET OBJ <GET ,P-MERGE 1>>
+ <TELL "(">
+ <COND (<PREP-PRINT .PREP <>>
+ <THE? .OBJ>
+ <TELL " ">)>
+ <TELL D .OBJ ")" CR>
+ .OBJ)>)
+ (T <SETG P-GWIMBIT 0> <RFALSE>)>>
+
+<ROUTINE SNARF-OBJECTS ("AUX" PTR)
+ ;#DECL ((PTR) <OR FIX <PRIMTYPE VECTOR>>)
+ <COND (<NOT <==? <SET PTR <GET ,P-ITBL ,P-NC1>> 0>>
+ <SETG P-SLOCBITS <GETB ,P-SYNTAX ,P-SLOC1>>
+ <OR <SNARFEM .PTR <GET ,P-ITBL ,P-NC1L> ,P-PRSO> <RFALSE>>
+ <OR <0? <GET ,P-BUTS ,P-MATCHLEN>>
+ <SETG P-PRSO <BUT-MERGE ,P-PRSO>>>)>
+ <COND (<NOT <==? <SET PTR <GET ,P-ITBL ,P-NC2>> 0>>
+ <SETG P-SLOCBITS <GETB ,P-SYNTAX ,P-SLOC2>>
+ <OR <SNARFEM .PTR <GET ,P-ITBL ,P-NC2L> ,P-PRSI> <RFALSE>>
+ <COND (<NOT <0? <GET ,P-BUTS ,P-MATCHLEN>>>
+ <COND (<==? <GET ,P-PRSI ,P-MATCHLEN> 1>
+ <SETG P-PRSO <BUT-MERGE ,P-PRSO>>)
+ (T <SETG P-PRSI <BUT-MERGE ,P-PRSI>>)>)>)>
+ <RTRUE>>
+
+<ROUTINE BUT-MERGE (TBL "AUX" LEN BUTLEN (CNT 1) (MATCHES 0) OBJ NTBL)
+ ;#DECL ((TBL NTBL) TABLE (LEN BUTLEN MATCHES) FIX (OBJ) OBJECT)
+ <SET LEN <GET .TBL ,P-MATCHLEN>>
+ <PUT ,P-MERGE ,P-MATCHLEN 0>
+ <REPEAT ()
+ <COND (<DLESS? LEN 0> <RETURN>)
+ (<ZMEMQ <SET OBJ <GET .TBL .CNT>> ,P-BUTS>)
+ (T
+ <PUT ,P-MERGE <+ .MATCHES 1> .OBJ>
+ <SET MATCHES <+ .MATCHES 1>>)>
+ <SET CNT <+ .CNT 1>>>
+ <PUT ,P-MERGE ,P-MATCHLEN .MATCHES>
+ <SET NTBL ,P-MERGE>
+ <SETG P-MERGE .TBL>
+ .NTBL>
+
+<GLOBAL P-NAM <>>
+
+<GLOBAL P-XNAM <>>
+
+<GLOBAL P-ADJ <>>
+
+<GLOBAL P-XADJ <>>
+
+<GLOBAL P-ADJN <>>
+
+<GLOBAL P-XADJN <>>
+
+<GLOBAL P-PRSO <ITABLE NONE 25>>
+
+<GLOBAL P-PRSI <ITABLE NONE 25>>
+
+<GLOBAL P-BUTS <ITABLE NONE 25>>
+
+<GLOBAL P-MERGE <ITABLE NONE 25>>
+
+<GLOBAL P-OCLAUSE <ITABLE NONE 25>>
+
+<GLOBAL P-MATCHLEN 0>
+
+<GLOBAL P-GETFLAGS 0>
+
+<CONSTANT P-ALL 1>
+
+<CONSTANT P-ONE 2>
+
+<CONSTANT P-INHIBIT 4>
+
+<GLOBAL P-CSPTR <>>
+<GLOBAL P-CEPTR <>>
+<GLOBAL P-AND <>>
+
+<ROUTINE SNARFEM (PTR EPTR TBL "AUX" (BUT <>) LEN WV WRD NW)
+ ;"Next SETG 6/21/84 for WHICH retrofix"
+ <SETG P-AND <>>
+ <SETG P-GETFLAGS 0>
+ <SETG P-CSPTR .PTR>
+ <SETG P-CEPTR .EPTR>
+ <PUT ,P-BUTS ,P-MATCHLEN 0>
+ <PUT .TBL ,P-MATCHLEN 0>
+ <SET WRD <GET .PTR 0>>
+ <REPEAT ()
+ <COND (<==? .PTR .EPTR> <RETURN <GET-OBJECT <OR .BUT .TBL>>>)
+ (T
+ <SET NW <GET .PTR ,P-LEXELEN>>
+ <COND (<EQUAL? .WRD ,W?ALL ,W?BOTH>
+ <SETG P-GETFLAGS ,P-ALL>
+ <COND (<==? .NW ,W?OF>
+ <SET PTR <REST .PTR ,P-WORDLEN>>)>)
+ (<EQUAL? .WRD ,W?BUT ,W?EXCEPT>
+ <OR <GET-OBJECT <OR .BUT .TBL>> <RFALSE>>
+ <SET BUT ,P-BUTS>
+ <PUT .BUT ,P-MATCHLEN 0>)
+ (<BUZZER-WORD? .WRD>
+ <RFALSE>)
+ (<EQUAL? .WRD ,W?A ,W?ONE>
+ <COND (<NOT ,P-ADJ>
+ <SETG P-GETFLAGS ,P-ONE>
+ <COND (<==? .NW ,W?OF>
+ <SET PTR <REST .PTR ,P-WORDLEN>>)>)
+ (T
+ <SETG P-NAM ,P-ONEOBJ>
+ <OR <GET-OBJECT <OR .BUT .TBL>> <RFALSE>>
+ <AND <0? .NW> <RTRUE>>)>)
+ (<AND <EQUAL? .WRD ,W?AND ,W?COMMA>
+ <NOT <EQUAL? .NW ,W?AND ,W?COMMA>>>
+ ;"Next SETG 6/21/84 for WHICH retrofix"
+ <SETG P-AND T>
+ <OR <GET-OBJECT <OR .BUT .TBL>> <RFALSE>>
+ T)
+ (<WT? .WRD ,PS?BUZZ-WORD>)
+ (<EQUAL? .WRD ,W?AND ,W?COMMA>)
+ (<==? .WRD ,W?OF>
+ <COND (<0? ,P-GETFLAGS>
+ <SETG P-GETFLAGS ,P-INHIBIT>)>)
+ (<AND <SET WV <WT? .WRD ,PS?ADJECTIVE ,P1?ADJECTIVE>>
+ <NOT ,P-ADJ>>
+ <SETG P-ADJ .WV>
+ <SETG P-ADJN .WRD>)
+ (<WT? .WRD ,PS?OBJECT ,P1?OBJECT>
+ <SETG P-NAM .WRD>
+ <SETG P-ONEOBJ .WRD>)>)>
+ <COND (<NOT <==? .PTR .EPTR>>
+ <SET PTR <REST .PTR ,P-WORDLEN>>
+ <SET WRD .NW>)>>>
+
+<CONSTANT SH 128>
+
+<CONSTANT SC 64>
+
+<CONSTANT SIR 32>
+
+<CONSTANT SOG 16>
+
+<CONSTANT STAKE 8>
+
+<CONSTANT SMANY 4>
+
+<CONSTANT SHAVE 2>
+
+<ROUTINE GET-OBJECT (TBL
+ "OPTIONAL" (VRB T)
+ "AUX" BTS LEN XBITS TLEN (GCHECK <>) (OLEN 0) OBJ ADJ)
+ ;#DECL ((TBL) TABLE (XBITS BTS TLEN LEN) FIX (GWIM) <OR FALSE FIX>
+ (VRB GCHECK) <OR ATOM FALSE>)
+ <SET XBITS ,P-SLOCBITS>
+ <SET TLEN <GET .TBL ,P-MATCHLEN>>
+ ;<COND (,DEBUG <TELL "[GETOBJ: TLEN=" N .TLEN "]" CR>)>
+ <COND (<BTST ,P-GETFLAGS ,P-INHIBIT> <RTRUE>)>
+ <SET ADJ ,P-ADJN>
+ <COND (<AND <NOT ,P-NAM> ,P-ADJ>
+ <COND (<WT? ,P-ADJN ,PS?OBJECT ,P1?OBJECT>
+ <SETG P-NAM ,P-ADJN>
+ <SETG P-ADJ <>>)
+ (<SET BTS <WT? ,P-ADJN ,PS?DIRECTION ,P1?DIRECTION>>
+ <SETG P-ADJ <>>
+ <PUT .TBL ,P-MATCHLEN 1>
+ <PUT .TBL 1 ,INTDIR>
+ <SETG P-DIRECTION .BTS>
+ <RTRUE>)>)>
+ <COND (<AND <NOT ,P-NAM>
+ <NOT ,P-ADJ>
+ <NOT <==? ,P-GETFLAGS ,P-ALL>>
+ <0? ,P-GWIMBIT>>
+ <COND (.VRB <MISSING-NOUN .ADJ>)>
+ <RFALSE>)>
+ <COND (<OR <NOT <==? ,P-GETFLAGS ,P-ALL>> <0? ,P-SLOCBITS>>
+ <SETG P-SLOCBITS -1>)>
+ <SETG P-TABLE .TBL>
+ <PROG ()
+ ;<COND (,DEBUG <TELL "[GETOBJ: GCHECK=" N .GCHECK "]" CR>)>
+ <COND (.GCHECK
+ ;<COND (,DEBUG <TELL "[GETOBJ: calling GLOBAL-CHECK]" CR>)>
+ <GLOBAL-CHECK .TBL>)
+ (T
+ <COND (,LIT
+ <FCLEAR ,PLAYER ,TRANSBIT>
+ <DO-SL ,HERE ,SOG ,SIR>
+ <FSET ,PLAYER ,TRANSBIT>)>
+ <DO-SL ,PLAYER ,SH ,SC>)>
+ <SET LEN <- <GET .TBL ,P-MATCHLEN> .TLEN>>
+ ;<COND (,DEBUG <TELL "[GETOBJ: LEN=" N .LEN "]" CR>)>
+ <COND (<BTST ,P-GETFLAGS ,P-ALL>)
+ (<AND <BTST ,P-GETFLAGS ,P-ONE>
+ <NOT <0? .LEN>>>
+ <COND (<NOT <==? .LEN 1>>
+ <PUT .TBL 1 <GET .TBL <RANDOM .LEN>>>
+ <TELL "(How about" THE <GET .TBL 1> "?)" CR>)>
+ <PUT .TBL ,P-MATCHLEN 1>)
+ (<OR <G? .LEN 1>
+ <AND <0? .LEN> <NOT <==? ,P-SLOCBITS -1>>>>
+ <COND (<==? ,P-SLOCBITS -1>
+ <SETG P-SLOCBITS .XBITS>
+ <SET OLEN .LEN>
+ <PUT .TBL ,P-MATCHLEN <- <GET .TBL ,P-MATCHLEN> .LEN>>
+ <AGAIN>)
+ (T
+ <COND (<0? .LEN> <SET LEN .OLEN>)>
+ <COND (<AND ,P-NAM
+ ;<REMOTE-VERB?>
+ <SET OBJ <GET .TBL <+ .TLEN 1>>>
+ <SET OBJ <APPLY <GETP .OBJ ,P?GENERIC> .TBL>>>
+ <COND (<==? .OBJ ,NOT-HERE-OBJECT>
+ <RFALSE>)>
+ <PUT .TBL 1 .OBJ>
+ <PUT .TBL ,P-MATCHLEN 1>
+ <SETG P-NAM <>>
+ <SETG P-ADJ <>>
+ ;<SETG P-ADJN <>>
+ <RTRUE>)
+ (<NOT <==? ,WINNER ,PLAYER>>
+ <CANT-ORPHAN>
+ <RFALSE>)
+ (<AND .VRB ,P-NAM>
+ <WHICH-PRINT .TLEN .LEN .TBL>
+ <SETG P-ACLAUSE
+ <COND (<==? .TBL ,P-PRSO> ,P-NC1)
+ (T ,P-NC2)>>
+ <SETG P-AADJ ,P-ADJ>
+ <SETG P-ANAM ,P-NAM>
+ <ORPHAN <> <>>
+ <SETG P-OFLAG T>)
+ (.VRB
+ <MISSING-NOUN .ADJ>)>
+ <SETG P-NAM <>>
+ <SETG P-ADJ <>>
+ <RFALSE>)>)
+ (<AND <0? .LEN> .GCHECK>
+ <COND (.VRB
+ <COND (<OR ,LIT <SPEAKING-VERB?>>
+ <OBJ-FOUND ,NOT-HERE-OBJECT .TBL>
+ <SETG P-XNAM ,P-NAM>
+ <SETG P-XADJ ,P-ADJ>
+ <SETG P-XADJN ,P-ADJN>
+ <SETG P-NAM <>>
+ <SETG P-ADJ <>>
+ <SETG P-ADJN <>>
+ <RTRUE>)
+ (T <TOO-DARK>)>)>
+ <SETG P-NAM <>>
+ <SETG P-ADJ <>>
+ <RFALSE>)
+ (<0? .LEN>
+ <SET GCHECK T>
+ ;<COND (,DEBUG <TELL "[GETOBJ: GCHECK set to " N .GCHECK "]" CR>)>
+ <AGAIN>)>
+ <COND (<AND ,P-ADJ <NOT ,P-NAM>>
+ <TELL ,I-ASSUME THE <GET .TBL <+ .TLEN ;0 1>> ".)" CR>)>
+ <SETG P-SLOCBITS .XBITS>
+ <SETG P-NAM <>>
+ <SETG P-ADJ <>>
+ <RTRUE>>>
+
+<ROUTINE SPEAKING-VERB? ("OPTIONAL" (V <>))
+ <COND (<NOT .V> <SET V ,PRSA>)>
+ <COND (<EQUAL? .V ,V?$CALL ,V?ASK ,V?ASK-ABOUT> <RTRUE>)
+ (<EQUAL? .V ,V?ASK-FOR ,V?GOODBYE ,V?HELLO> <RTRUE>)
+ (<EQUAL? .V ,V?NO ,V?TELL ,V?TELL-ABOUT> <RTRUE>)
+ (<EQUAL? .V ,V?YES ,V?TALK-ABOUT> <RTRUE>)
+ (<EQUAL? .V ,V?ASK-CONTEXT-ABOUT ,V?ASK-CONTEXT-FOR> <RTRUE>)>>
+
+<ROUTINE CANT-ORPHAN ()
+ <TELL "(Please try saying that another way.)" CR>
+ <RFALSE>>
+
+<ROUTINE MISSING-NOUN (ADJ)
+ <COND ;(<EQUAL? .ADJ ,W?NUMBER>
+ <TELL "(Please use units with numbers.)" CR>)
+ (T <TELL
+"(I couldn't find enough nouns in that sentence!)" CR>)>>
+
+<ROUTINE MISSING-VERB ()
+ <TELL "(I couldn't find a verb in that sentence!)" CR>>
+
+<ROUTINE MOBY-FIND (TBL "AUX" (OBJ 1) LEN FOO)
+ <SETG P-NAM ,P-XNAM>
+ <SETG P-ADJ ,P-XADJ>
+ <PUT .TBL ,P-MATCHLEN 0>
+ <COND (<NOT <ZERO? <GETB 0 18>>> ;"ZIP case"
+ <REPEAT ()
+ <COND (<AND <SET FOO <META-LOC .OBJ T>>
+ <SET FOO <THIS-IT? .OBJ>>>
+ <SET FOO <OBJ-FOUND .OBJ .TBL>>)>
+ <COND (<IGRTR? OBJ ,PSEUDO-OBJECT> ;"last object"
+ <RETURN>)>>
+ <SET LEN <GET .TBL ,P-MATCHLEN>>
+ <COND (<EQUAL? .LEN 1>
+ <SETG P-MOBY-FOUND <GET .TBL 1>>)>
+ .LEN)
+ (T ;"ZIL case"
+ <SETG P-MOBY-FLAG T>
+ <SETG P-TABLE .TBL>
+ <SETG P-SLOCBITS -1>
+ <SET FOO <FIRST? ,ROOMS>>
+ <REPEAT ()
+ <COND (<NOT .FOO> <RETURN>)
+ (T
+ <SEARCH-LIST .FOO .TBL ,P-SRCALL>
+ <SET FOO <NEXT? .FOO>>)>>
+ <COND (<EQUAL? <SET LEN <GET .TBL ,P-MATCHLEN>> 0>
+ <DO-SL ,LOCAL-GLOBALS 1 1>)>
+ <COND (<EQUAL? <SET LEN <GET .TBL ,P-MATCHLEN>> 0>
+ <DO-SL ,ROOMS 1 1>)>
+ <COND (<EQUAL? <SET LEN <GET .TBL ,P-MATCHLEN>> 1>
+ <SETG P-MOBY-FOUND <GET .TBL 1>>)>
+ <SETG P-MOBY-FLAG <>>
+ .LEN)>>
+
+<GLOBAL P-MOBY-FOUND <>>
+<GLOBAL P-MOBY-FLAG <>>
+
+<ROUTINE WHICH-PRINT (TLEN LEN TBL "AUX" OBJ RLEN)
+ <SET RLEN .LEN>
+ <TELL "(Which">
+ <COND (<OR ,P-OFLAG ,P-MERGED ,P-AND> <TELL " "> <PRINTB ,P-NAM>)
+ (<==? .TBL ,P-PRSO>
+ <CLAUSE-PRINT ,P-NC1 ,P-NC1L <>>)
+ (T <CLAUSE-PRINT ,P-NC2 ,P-NC2L <>>)>
+ <TELL " do you mean,">
+ <REPEAT ()
+ <SET TLEN <+ .TLEN 1>>
+ <SET OBJ <GET .TBL .TLEN>>
+ <TELL THE .OBJ>
+ <COND (<==? .LEN 2>
+ <COND (<NOT <==? .RLEN 2>> <TELL ",">)>
+ <TELL " or">)
+ (<G? .LEN 2> <TELL ",">)>
+ <COND (<L? <SET LEN <- .LEN 1>> 1>
+ <TELL "?)" CR>
+ <RETURN>)>>>
+
+
+<ROUTINE GLOBAL-CHECK (TBL "AUX" LEN RMG RMGL (CNT 0) OBJ OBITS FOO)
+ ;#DECL((TBL) TABLE (RMG) <OR FALSE TABLE> (RMGL CNT) FIX (OBJ) OBJECT)
+ <SET LEN <GET .TBL ,P-MATCHLEN>>
+ <SET OBITS ,P-SLOCBITS>
+ <COND (<SET RMG <GETPT ,HERE ,P?GLOBAL>>
+ <SET RMGL <- <PTSIZE .RMG> 1>>
+ ;<COND (,DEBUG <TELL "[GLBCHK: (LG) RMGL=" N .RMGL "]" CR>)>
+ <REPEAT ()
+ <SET OBJ <GETB .RMG .CNT>>
+ <COND (<FIRST? .OBJ>
+ <SEARCH-LIST .OBJ .TBL ,P-SRCALL>)>
+ <COND (<THIS-IT? .OBJ>
+ <OBJ-FOUND .OBJ .TBL>)>
+ <COND (<IGRTR? CNT .RMGL> <RETURN>)>>)>
+ <COND (<SET RMG <GETPT ,HERE ,P?PSEUDO>>
+ <SET RMGL <- </ <PTSIZE .RMG> 4> 1>>
+ <SET CNT 0>
+ ;<COND (,DEBUG <TELL "[GLBCHK: (PS) RMGL=" N .RMGL "]" CR>)>
+ <REPEAT ()
+ <COND (<==? ,P-NAM <GET .RMG <* .CNT 2>>>
+ <SETG LAST-PSEUDO-LOC ,HERE>
+ <PUTP ,PSEUDO-OBJECT
+ ,P?ACTION
+ <GET .RMG <+ <* .CNT 2> 1>>>
+ <SET FOO
+ <BACK <GETPT ,PSEUDO-OBJECT ,P?ACTION> 5>>
+ <PUT .FOO 0 <GET ,P-NAM 0>>
+ <PUT .FOO 1 <GET ,P-NAM 1>>
+ <OBJ-FOUND ,PSEUDO-OBJECT .TBL>
+ <RETURN>)
+ (<IGRTR? CNT .RMGL> <RETURN>)>>)>
+ <COND (<==? <GET .TBL ,P-MATCHLEN> .LEN>
+ <SETG P-SLOCBITS -1>
+ <SETG P-TABLE .TBL>
+ <DO-SL ,GLOBAL-OBJECTS 1 1>
+ <SETG P-SLOCBITS .OBITS>
+ <COND (<0? <GET .TBL ,P-MATCHLEN>>
+ <COND (<VERB? EXAMINE FIND FOLLOW LEAVE LOOK-INSIDE
+ SEARCH SEARCH-FOR SMELL THROUGH WALK-TO>
+ <DO-SL ,ROOMS 1 1>)>)>)>>
+
+<ROUTINE DO-SL (OBJ BIT1 BIT2 "AUX" BITS)
+ ;#DECL ((OBJ) OBJECT (BIT1 BIT2 BITS) FIX)
+ <COND (<BTST ,P-SLOCBITS <+ .BIT1 .BIT2>>
+ <SEARCH-LIST .OBJ ,P-TABLE ,P-SRCALL>)
+ (T
+ <COND (<BTST ,P-SLOCBITS .BIT1>
+ <SEARCH-LIST .OBJ ,P-TABLE ,P-SRCTOP>)
+ (<BTST ,P-SLOCBITS .BIT2>
+ <SEARCH-LIST .OBJ ,P-TABLE ,P-SRCBOT>)
+ (T <RTRUE>)>)>>
+
+<CONSTANT P-SRCBOT 2>
+
+<CONSTANT P-SRCTOP 0>
+
+<CONSTANT P-SRCALL 1>
+
+<ROUTINE SEARCH-LIST (OBJ TBL LVL)
+ ;#DECL ((OBJ NOBJ) <OR FALSE OBJECT> (TBL) TABLE (LVL) FIX)
+ ;<COND (<EQUAL? .OBJ ,GLOBAL-OBJECTS> <SET GLOB T>) (T <SET GLOB <>>)>
+ <COND (<SET OBJ <FIRST? .OBJ>>
+ <REPEAT ()
+ ;<COND (<AND .GLOB ,DEBUG>
+ <TELL "[SRCLST: OBJ=" D .OBJ "]" CR>)>
+ <COND (<AND <NOT <==? .LVL ,P-SRCBOT>>
+ <GETPT .OBJ ,P?SYNONYM>
+ <THIS-IT? .OBJ>>
+ <OBJ-FOUND .OBJ .TBL>)>
+ <COND (<AND <OR <NOT <==? .LVL ,P-SRCTOP>>
+ <FSET? .OBJ ,SEARCHBIT>
+ <FSET? .OBJ ,SURFACEBIT>>
+ <FIRST? .OBJ>
+ <OR <FSET? .OBJ ,OPENBIT>
+ <FSET? .OBJ ,TRANSBIT>
+ ,P-MOBY-FLAG
+ <AND <FSET? .OBJ ,PERSONBIT>
+ <NOT <==? .OBJ ,PLAYER>>>>
+ ;<NOT <EQUAL? .OBJ ,PLAYER ,LOCAL-GLOBALS>>>
+ <SEARCH-LIST .OBJ .TBL
+ <COND (<FSET? .OBJ ,SURFACEBIT> ,P-SRCALL)
+ (<FSET? .OBJ ,SEARCHBIT> ,P-SRCALL)
+ (T ,P-SRCTOP)>>)>
+ <COND (<SET OBJ <NEXT? .OBJ>>) (T <RETURN>)>>)>>
+
+<ROUTINE THIS-IT? (OBJ "AUX" SYNS)
+ <COND (<FSET? .OBJ ,INVISIBLE>
+ <RFALSE>)
+ (<AND ,P-NAM
+ <OR <NOT <SET SYNS <GETPT .OBJ ,P?SYNONYM>>>
+ <NOT <ZMEMQ ,P-NAM .SYNS <- </ <PTSIZE .SYNS> 2> 1>>>>>
+ <RFALSE>)
+ (<AND ,P-ADJ
+ <OR <NOT <SET SYNS <GETPT .OBJ ,P?ADJECTIVE>>>
+ <NOT <ZMEMQB ,P-ADJ .SYNS <- <PTSIZE .SYNS> 1>>>>>
+ <RFALSE>)
+ (<AND <NOT <0? ,P-GWIMBIT>> <NOT <FSET? .OBJ ,P-GWIMBIT>>>
+ <RFALSE>)>
+ <RTRUE>>
+
+<ROUTINE OBJ-FOUND (OBJ TBL "AUX" PTR)
+ ;#DECL ((OBJ) OBJECT (TBL) TABLE (PTR) FIX)
+ <SET PTR <GET .TBL ,P-MATCHLEN>>
+ <PUT .TBL <+ .PTR 1> .OBJ>
+ <PUT .TBL ,P-MATCHLEN <+ .PTR 1>>>
+
+<ROUTINE TAKE-CHECK ()
+ <AND <ITAKE-CHECK ,P-PRSO <GETB ,P-SYNTAX ,P-SLOC1>>
+ <ITAKE-CHECK ,P-PRSI <GETB ,P-SYNTAX ,P-SLOC2>>>>
+
+<ROUTINE ITAKE-CHECK (TBL BITS "AUX" PTR OBJ TAKEN)
+ ;"changed by MARC 11/17/83"
+ ;#DECL ((TBL) TABLE (BITS PTR) FIX (OBJ) OBJECT
+ (TAKEN) <OR FALSE FIX ATOM>)
+ <COND (<AND <SET PTR <GET .TBL ,P-MATCHLEN>>
+ <OR <BTST .BITS ,SHAVE>
+ <BTST .BITS ,STAKE>>>
+ <REPEAT ()
+ <COND (<L? <SET PTR <- .PTR 1>> 0> <RETURN>)>
+ <SET OBJ <GET .TBL <+ .PTR 1>>>
+ <COND (<==? .OBJ ,IT>
+ <COND (<NOT <ACCESSIBLE? ,P-IT-OBJECT>>
+ <MORE-SPECIFIC>
+ <RFALSE>)
+ (T
+ <SET OBJ ,P-IT-OBJECT>)>)
+ (<==? .OBJ ,HER>
+ <COND (<NOT <ACCESSIBLE? ,P-HER-OBJECT>>
+ <MORE-SPECIFIC>
+ <RFALSE>)
+ (T
+ <SET OBJ ,P-HER-OBJECT>)>)
+ (<==? .OBJ ,HIM>
+ <COND (<NOT <ACCESSIBLE? ,P-HIM-OBJECT>>
+ <MORE-SPECIFIC>
+ <RFALSE>)
+ (T
+ <SET OBJ ,P-HIM-OBJECT>)>)
+ (<==? .OBJ ,THEM>
+ <COND (<NOT <ACCESSIBLE? ,P-THEM-OBJECT>>
+ <MORE-SPECIFIC>
+ <RFALSE>)
+ (T
+ <SET OBJ ,P-THEM-OBJECT>)>)>
+ <COND (<AND <NOT <HELD? .OBJ>> ;<NOT <==? .OBJ ,HANDS>>>
+ <SETG PRSO .OBJ>
+ <COND (<FSET? .OBJ ,TRYTAKEBIT>
+ <SET TAKEN T>)
+ ;(<NOT <==? ,WINNER ,PLAYER>>
+ <SET TAKEN <>>)
+ (<AND <BTST .BITS ,STAKE>
+ <==? <ITAKE <>> T>>
+ <SET TAKEN <>>)
+ (T <SET TAKEN T>)>
+ <COND (<AND .TAKEN <BTST .BITS ,SHAVE>>
+ <TELL "(">
+ <HE-SHE-IT ,WINNER T "do" ;"is">
+ <TELL "n't seem to be holding">
+ <COND (<L? 1 <GET .TBL ,P-MATCHLEN>>
+ <TELL " all those things">)
+ (<EQUAL? .OBJ ,NOT-HERE-OBJECT>
+ <TELL " that">)
+ (T
+ <THIS-IS-IT .OBJ>
+ <TELL THE .OBJ>)>
+ <TELL "!)" CR>
+ <RFALSE>)
+ (<AND <NOT .TAKEN> ;<==? ,WINNER ,PLAYER>>
+ <TELL "(taking" THE ,PRSO>
+ <COND (,ITAKE-LOC
+ <TELL " from" THE ,ITAKE-LOC>)>
+ <TELL " first)" CR>)>)>>)
+ (T)>>
+
+<ROUTINE MANY-CHECK ("AUX" (LOSS <>) TMP)
+ ;#DECL ((LOSS) <OR FALSE FIX>)
+ <COND (<AND <G? <GET ,P-PRSO ,P-MATCHLEN> 1>
+ <NOT <BTST <GETB ,P-SYNTAX ,P-SLOC1> ,SMANY>>>
+ <SET LOSS 1>)
+ (<AND <G? <GET ,P-PRSI ,P-MATCHLEN> 1>
+ <NOT <BTST <GETB ,P-SYNTAX ,P-SLOC2> ,SMANY>>>
+ <SET LOSS 2>)>
+ <COND (.LOSS
+ <COND ;(<NOT <EQUAL? ,WINNER ,PLAYER>>
+ <TELL "\"Please, to me simple English speak.\"" CR>
+ <RFALSE>)
+ (T
+ <TELL "(You can't use more than one ">
+ <COND (<==? .LOSS 2> <TELL "in">)>
+ <TELL "direct object with \"">
+ <SET TMP <GET ,P-ITBL ,P-VERBN>>
+ <COND (<0? .TMP> <TELL "tell">)
+ (<OR ,P-OFLAG ,P-MERGED>
+ <PRINTB <GET .TMP 0>>)
+ (T
+ <WORD-PRINT <GETB .TMP 2> <GETB .TMP 3>>)>
+ <TELL "\"!)" CR>
+ <RFALSE>)>)
+ (T)>>
+
+<ROUTINE ZMEMQ (ITM TBL "OPTIONAL" (SIZE -1) "AUX" (CNT 1))
+ <COND (<NOT .TBL> <RFALSE>)>
+ <COND (<NOT <L? .SIZE 0>> <SET CNT 0>)
+ (ELSE <SET SIZE <GET .TBL 0>>)>
+ <REPEAT ()
+ <COND (<==? .ITM <GET .TBL .CNT>>
+ <COND (<0? .CNT> <RTRUE>)
+ (T <RETURN .CNT>)>)
+ (<IGRTR? CNT .SIZE> <RFALSE>)>>>
+
+<ROUTINE ZMEMZ (ITM TBL "AUX" (CNT 0))
+ <COND (<NOT .TBL> <RFALSE>)>
+ <REPEAT ()
+ <COND (<ZERO? <GET .TBL .CNT>>
+ <RFALSE>)
+ (<==? .ITM <GET .TBL .CNT>>
+ <COND (<0? .CNT> <RTRUE>)
+ (T <RETURN .CNT>)>)
+ (T <INC CNT>)>>>
+
+<ROUTINE ZMEMQB (ITM TBL SIZE "AUX" (CNT 0))
+ ;#DECL ((ITM) ANY (TBL) TABLE (SIZE CNT) FIX)
+ <REPEAT ()
+ <COND (<==? .ITM <GETB .TBL .CNT>>
+ <COND (<0? .CNT> <RTRUE>)
+ (T <RETURN .CNT>)>)
+ (<IGRTR? CNT .SIZE> <RFALSE>)>>>
+
+;<ROUTINE ZMEMQBIT (ITM TBL SIZE "AUX" (CNT 0) X)
+ ;#DECL ((ITM) ANY (TBL) TABLE (SIZE CNT) FIX)
+ <REPEAT ()
+ <COND (<FSET? <SET X <GETB .TBL .CNT>> .ITM> <RETURN .X>)
+ (<IGRTR? CNT .SIZE> <RFALSE>)>>>
+
+<GLOBAL ALWAYS-LIT <>>
+
+<ROUTINE LIT? (RM "OPTIONAL" (RMBIT T) "AUX" OHERE (LIT <>))
+ <COND (<AND ,ALWAYS-LIT <EQUAL? ,WINNER ,PLAYER>>
+ <RTRUE>)>
+ <SETG P-GWIMBIT ,ONBIT>
+ <SET OHERE ,HERE>
+ <SETG HERE .RM>
+ <COND (<AND .RMBIT <FSET? .RM ,ONBIT>>
+ <SET LIT T>)
+ (T
+ <PUT ,P-MERGE ,P-MATCHLEN 0>
+ <SETG P-TABLE ,P-MERGE>
+ <SETG P-SLOCBITS -1>
+ <COND (<==? .OHERE .RM>
+ <DO-SL ,WINNER 1 1>
+ <COND (<AND <NOT <EQUAL? ,WINNER ,PLAYER>>
+ <IN? ,PLAYER .RM>>
+ <DO-SL ,PLAYER 1 1>)>)>
+ <DO-SL .RM 1 1>
+ <COND (<G? <GET ,P-TABLE ,P-MATCHLEN> 0> <SET LIT T>)>)>
+ <SETG HERE .OHERE>
+ <SETG P-GWIMBIT 0>
+ .LIT>
+
+;<ROUTINE VPRINT ("AUX" TMP)
+ <SET TMP <GET ,P-OTBL ,P-VERBN>>
+ <COND (<==? .TMP 0> <TELL "tell">)
+ (<0? <GETB ,P-VTBL 2>>
+ <PRINTB <GET .TMP 0>>)
+ (T
+ <WORD-PRINT <GETB .TMP 2> <GETB .TMP 3>>)>>
+
+<ROUTINE NOT-HERE (OBJ)
+ <SETG CLOCK-WAIT T>
+ <TELL "(You can't see ">
+ <COND (<NOT <FSET? .OBJ ,NARTICLEBIT>> <TELL "any ">)>
+ <TELL D .OBJ " here.)" CR>>
+
+<OBJECT HER
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM SHE HER ;WOMAN ;GIRL)
+ (DESC "her")
+ (FLAGS NARTICLEBIT)>
+
+<OBJECT HIM
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM HE HIM ;MAN ;BOY)
+ (DESC "him")
+ (FLAGS NARTICLEBIT)>
+
+<OBJECT THEM
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM THEY THEM)
+ (DESC "them")
+ (FLAGS NARTICLEBIT)>
+
+<OBJECT GAME
+ (IN GLOBAL-OBJECTS)
+ (DESC ;"STEAM AND VARIATIONS" "CHECKPOINT" ;"SEVEN SHADOWS")
+ (ADJECTIVE SPY)
+ (SYNONYM THRILLER GAME CHECKPOINT)
+ (FLAGS NARTICLEBIT)
+ (ACTION GAME-F)>
+
+<ROUTINE GAME-F ()
+ <COND (<VERB? EXAMINE PLAY READ>
+ <SETG P-WON <>>
+ <TELL "(You're doing it now!)" CR>)>>
+
+<GLOBAL QCONTEXT <>>
+<GLOBAL QCONTEXT-ROOM <>>
+<GLOBAL LAST-PSEUDO-LOC <>>
+<GLOBAL I-ASSUME "(I assume you mean:">
+
+<OBJECT INTDIR
+ (IN GLOBAL-OBJECTS)
+ (SYNONYM DIRECT)
+ (ADJECTIVE NORTH EAST SOUTH WEST ;"NE NW SE SW")
+ (DESC ;"compass " "direction")>
diff --git a/parser.zap b/parser.zap
new file mode 100644
index 0000000..30ec3b0
--- /dev/null
+++ b/parser.zap
@@ -0,0 +1,2530 @@
+
+
+ .FUNCT MAIN-LOOP,X
+?PRG1: CALL1 MAIN-LOOP-1 >X
+ JUMP ?PRG1
+
+
+ .FUNCT MAIN-LOOP-1,ICNT,OCNT,NUM,CNT,OBJ,TBL,V,PTBL,OBJ1,TMP,X,?TMP1
+ SET 'CNT,0
+ SET 'OBJ,FALSE-VALUE
+ SET 'PTBL,TRUE-VALUE
+ EQUAL? QCONTEXT-ROOM,HERE /?CND1
+ SET 'QCONTEXT,FALSE-VALUE
+?CND1: CALL1 PARSER
+ ZERO? STACK /?ELS6
+ SET 'CLOCK-WAIT,FALSE-VALUE
+ GET P-PRSI,P-MATCHLEN >ICNT
+ GET P-PRSO,P-MATCHLEN >OCNT
+ ZERO? P-IT-OBJECT /?CND7
+ CALL2 ACCESSIBLE?,P-IT-OBJECT
+ ZERO? STACK /?CND7
+ SET 'TMP,FALSE-VALUE
+?PRG12: IGRTR? 'CNT,ICNT \?CND14
+ JUMP ?REP13
+?CND14: GET P-PRSI,CNT
+ EQUAL? STACK,IT \?PRG12
+ PUT P-PRSI,CNT,P-IT-OBJECT
+ PRINT I-ASSUME
+ CALL2 PRINTT,P-IT-OBJECT
+ PRINTI ".)"
+ CRLF
+ SET 'TMP,TRUE-VALUE
+?REP13: ZERO? TMP \?CND22
+ SET 'CNT,0
+?PRG25: IGRTR? 'CNT,OCNT \?CND27
+ JUMP ?CND22
+?CND27: GET P-PRSO,CNT
+ EQUAL? STACK,IT \?PRG25
+ PUT P-PRSO,CNT,P-IT-OBJECT
+ PRINT I-ASSUME
+ CALL2 PRINTT,P-IT-OBJECT
+ PRINTI ".)"
+ CRLF
+?CND22: SET 'CNT,0
+?CND7: ZERO? OCNT \?ELS39
+ PUSH OCNT
+ JUMP ?CND35
+?ELS39: GRTR? OCNT,1 \?ELS41
+ SET 'TBL,P-PRSO
+ ZERO? ICNT \?ELS44
+ SET 'OBJ,FALSE-VALUE
+ JUMP ?CND42
+?ELS44: GET P-PRSI,1 >OBJ
+?CND42: PUSH OCNT
+ JUMP ?CND35
+?ELS41: GRTR? ICNT,1 \?ELS48
+ SET 'PTBL,FALSE-VALUE
+ SET 'TBL,P-PRSI
+ GET P-PRSO,1 >OBJ
+ PUSH ICNT
+ JUMP ?CND35
+?ELS48: PUSH 1
+?CND35: SET 'NUM,STACK
+ ZERO? OBJ \?CND51
+ EQUAL? ICNT,1 \?CND51
+ GET P-PRSI,1 >OBJ
+?CND51: EQUAL? PRSA,V?WALK,V?FACE \?ELS58
+ CALL PERFORM,PRSA,PRSO >V
+ JUMP ?CND56
+?ELS58: ZERO? NUM \?ELS60
+ GETB P-SYNTAX,P-SBITS
+ BAND STACK,P-SONUMS
+ ZERO? STACK \?ELS63
+ CALL2 PERFORM,PRSA >V
+ SET 'PRSO,FALSE-VALUE
+ JUMP ?CND56
+?ELS63: ZERO? LIT \?ELS65
+ SET 'QUOTE-FLAG,FALSE-VALUE
+ SET 'P-CONT,FALSE-VALUE
+ CALL1 TOO-DARK
+ JUMP ?CND56
+?ELS65: SET 'QUOTE-FLAG,FALSE-VALUE
+ SET 'P-CONT,FALSE-VALUE
+ PRINTI "(There isn't anything to "
+ GET P-ITBL,P-VERBN >TMP
+ EQUAL? PRSA,V?TELL \?ELS72
+ PRINTI "talk to"
+ JUMP ?CND70
+?ELS72: ZERO? P-MERGED \?THN77
+ ZERO? P-OFLAG /?ELS76
+?THN77: GET TMP,0
+ PRINTB STACK
+ JUMP ?CND70
+?ELS76: GETB TMP,2 >?TMP1
+ GETB TMP,3
+ CALL WORD-PRINT,?TMP1,STACK >V
+?CND70: PRINTI "!)"
+ CRLF
+ SET 'V,FALSE-VALUE
+ JUMP ?CND56
+?ELS60: SET 'X,0
+ SET 'TMP,0
+?PRG85: IGRTR? 'CNT,NUM \?ELS89
+ GRTR? X,0 \?ELS92
+ PRINTI "The "
+ EQUAL? X,NUM /?CND95
+ PRINTI "other "
+?CND95: PRINTI "object"
+ EQUAL? X,1 /?CND102
+ PRINTI "s"
+?CND102: PRINTI " that you mentioned "
+ EQUAL? X,1 /?ELS111
+ PRINTI "are"
+ JUMP ?CND109
+?ELS111: PRINTI "is"
+?CND109: PRINTI "n't here."
+ CRLF
+ JUMP ?REP86
+?ELS92: ZERO? TMP \?REP86
+ CALL1 MORE-SPECIFIC
+ JUMP ?REP86
+?ELS89: ZERO? PTBL /?ELS126
+ GET P-PRSO,CNT >OBJ1
+ JUMP ?CND124
+?ELS126: GET P-PRSI,CNT >OBJ1
+?CND124: GRTR? NUM,1 /?THN133
+ GET P-ITBL,P-NC1
+ GET STACK,0
+ EQUAL? STACK,W?ALL \?CND130
+?THN133: EQUAL? OBJ1,NOT-HERE-OBJECT \?ELS137
+ INC 'X
+ JUMP ?PRG85
+?ELS137: EQUAL? P-GETFLAGS,P-ALL \?ELS139
+ CALL VERB-ALL-TEST,OBJ1,OBJ
+ ZERO? STACK \?ELS139
+ JUMP ?PRG85
+?ELS139: CALL2 ACCESSIBLE?,OBJ1
+ ZERO? STACK \?ELS143
+ JUMP ?PRG85
+?ELS143: EQUAL? OBJ1,PLAYER \?ELS145
+ JUMP ?PRG85
+?ELS145: EQUAL? OBJ1,IT \?ELS150
+ PRINTD P-IT-OBJECT
+ JUMP ?CND148
+?ELS150: PRINTD OBJ1
+?CND148: PRINTI ": "
+?CND130: SET 'TMP,TRUE-VALUE
+ ZERO? PTBL /?ELS159
+ PUSH OBJ1
+ JUMP ?CND155
+?ELS159: PUSH OBJ
+?CND155: CALL2 QCONTEXT-CHECK,STACK >V
+ ZERO? PTBL /?ELS167
+ PUSH OBJ1
+ JUMP ?CND163
+?ELS167: PUSH OBJ
+?CND163: SET 'PRSO,STACK
+ ZERO? PTBL /?ELS175
+ PUSH OBJ
+ JUMP ?CND171
+?ELS175: PUSH OBJ1
+?CND171: SET 'PRSI,STACK
+ CALL PERFORM,PRSA,PRSO,PRSI >V
+ EQUAL? V,M-FATAL \?PRG85
+ JUMP ?CND56
+?REP86:
+?CND56: EQUAL? V,M-FATAL \?CND4
+ SET 'P-CONT,FALSE-VALUE
+ JUMP ?CND4
+?ELS6: SET 'CLOCK-WAIT,TRUE-VALUE
+ SET 'P-CONT,FALSE-VALUE
+?CND4: ZERO? CLOCK-WAIT \?CND187
+ EQUAL? PRSA,V?RESTORE,V?SAVE /?THN193
+ CALL1 GAME-VERB?
+ ZERO? STACK \?CND187
+?THN193: CALL1 CLOCKER >V
+?CND187: SET 'PRSA,FALSE-VALUE
+ SET 'PRSO,FALSE-VALUE
+ SET 'PRSI,FALSE-VALUE
+ RETURN PRSI
+
+
+ .FUNCT VERB-ALL-TEST,O,I,L
+ LOC O >L
+ EQUAL? PRSA,V?GIVE,V?DROP \?ELS5
+ EQUAL? O,POCKET /FALSE
+ EQUAL? L,WINNER \FALSE
+ RTRUE
+?ELS5: EQUAL? PRSA,V?PUT-IN,V?PUT \?ELS18
+ EQUAL? O,I,POCKET /FALSE
+ CALL HELD?,O,I
+ ZERO? STACK \FALSE
+ RTRUE
+?ELS18: EQUAL? PRSA,V?TAKE \?ELS29
+ FSET? O,TAKEBIT /?CND30
+ FSET? O,TRYTAKEBIT \FALSE
+?CND30: ZERO? I /?ELS37
+ EQUAL? L,I \FALSE
+ SET 'L,I
+ JUMP ?CND35
+?ELS37: EQUAL? L,HERE /TRUE
+?CND35: FSET? L,SURFACEBIT /TRUE
+ FSET? L,CONTBIT \FALSE
+ FSET? L,OPENBIT \FALSE
+ RTRUE
+?ELS29: ZERO? I /TRUE
+ EQUAL? O,I /FALSE
+ RTRUE
+
+
+ .FUNCT GAME-VERB?,V=0
+ ZERO? V \?CND1
+ SET 'V,PRSA
+?CND1: EQUAL? V,V?$ANSWER,V?$GOAL,V?$VERIFY /TRUE
+ EQUAL? V,V?$QUEUE,V?$STATION /TRUE
+ EQUAL? V,V?$FCLEAR,V?$FSET,V?$QFSET /TRUE
+ EQUAL? V,V?$WHERE,V?BRIEF,V?DEBUG /TRUE
+ EQUAL? V,V?QUIT,V?RESTART,V?RESTORE /TRUE
+ EQUAL? V,V?SAVE,V?SCRIPT,V?SUPER-BRIEF /TRUE
+ EQUAL? V,V?TELL,V?TIME,V?UNSCRIPT /TRUE
+ EQUAL? V,V?VERBOSE,V?VERSION,V?$FACE /TRUE
+ RFALSE
+
+
+ .FUNCT QCONTEXT-CHECK,PRSO,OTHER,WHO=0,N=0
+ EQUAL? PRSA,V?WHAT,V?HELP /?THN6
+ EQUAL? PRSA,V?TELL-ABOUT,V?SHOW \FALSE
+ EQUAL? PRSO,PLAYER \FALSE
+?THN6: FIRST? HERE >OTHER /?KLU33
+?KLU33:
+?PRG10: ZERO? OTHER \?ELS14
+ JUMP ?REP11
+?ELS14: FSET? OTHER,PERSONBIT \?CND12
+ FSET? OTHER,INVISIBLE /?CND12
+ EQUAL? OTHER,PLAYER /?CND12
+ INC 'N
+ SET 'WHO,OTHER
+?CND12: NEXT? OTHER >OTHER /?KLU34
+?KLU34: JUMP ?PRG10
+?REP11: EQUAL? 1,N \?CND19
+ ZERO? QCONTEXT \?CND19
+ CALL2 SAID-TO,WHO
+?CND19: CALL1 QCONTEXT-GOOD?
+ ZERO? STACK /FALSE
+ EQUAL? WINNER,PLAYER \FALSE
+ SET 'WINNER,QCONTEXT
+ PRINTI "(said to "
+ PRINTD QCONTEXT
+ PRINTR ")"
+
+
+ .FUNCT QCONTEXT-GOOD?
+ ZERO? QCONTEXT /FALSE
+ FSET? QCONTEXT,PERSONBIT \FALSE
+ FSET? QCONTEXT,INVISIBLE /FALSE
+ EQUAL? HERE,QCONTEXT-ROOM \FALSE
+ CALL2 META-LOC,QCONTEXT
+ EQUAL? HERE,STACK /TRUE
+ RFALSE
+
+
+ .FUNCT SAID-TO,WHO
+ SET 'QCONTEXT,WHO
+ LOC WHO >QCONTEXT-ROOM
+ RETURN QCONTEXT-ROOM
+
+
+ .FUNCT THIS-IS-IT,OBJ
+ EQUAL? OBJ,FALSE-VALUE,NOT-HERE-OBJECT,PLAYER /TRUE
+ EQUAL? OBJ,INTDIR,GLOBAL-HERE /TRUE
+ EQUAL? PRSA,V?FACE,V?WALK-TO,V?WALK \?CND1
+ EQUAL? OBJ,PRSO /TRUE
+?CND1: FSET? OBJ,PERSONBIT /?ELS12
+ FSET IT,TOUCHBIT
+ SET 'P-IT-OBJECT,OBJ
+ RTRUE
+?ELS12: FSET? OBJ,FEMALE \?ELS14
+ FSET HER,TOUCHBIT
+ SET 'P-HER-OBJECT,OBJ
+ RTRUE
+?ELS14: FSET? OBJ,PLURALBIT \?ELS16
+ FSET THEM,TOUCHBIT
+ SET 'P-THEM-OBJECT,OBJ
+ RTRUE
+?ELS16: FSET HIM,TOUCHBIT
+ SET 'P-HIM-OBJECT,OBJ
+ RTRUE
+
+
+ .FUNCT NOT-IT,WHO
+ EQUAL? WHO,P-HER-OBJECT \?ELS5
+ FCLEAR HER,TOUCHBIT
+ RTRUE
+?ELS5: EQUAL? WHO,P-HIM-OBJECT \?ELS7
+ FCLEAR HIM,TOUCHBIT
+ RTRUE
+?ELS7: EQUAL? WHO,P-THEM-OBJECT \?ELS9
+ FCLEAR THEM,TOUCHBIT
+ RTRUE
+?ELS9: EQUAL? WHO,P-IT-OBJECT \FALSE
+ FCLEAR IT,TOUCHBIT
+ RTRUE
+
+
+ .FUNCT FAKE-ORPHAN,TMP,?TMP1
+ CALL ORPHAN,P-SYNTAX,FALSE-VALUE
+ PRINTI "(Be specific: what thing do you want to "
+ GET P-OTBL,P-VERBN >TMP
+ ZERO? TMP \?ELS5
+ PRINTI "tell"
+ JUMP ?CND3
+?ELS5: GETB P-VTBL,2
+ ZERO? STACK \?ELS9
+ GET TMP,0
+ PRINTB STACK
+ JUMP ?CND3
+?ELS9: GETB TMP,2 >?TMP1
+ GETB TMP,3
+ CALL WORD-PRINT,?TMP1,STACK
+ PUTB P-VTBL,2,0
+?CND3: SET 'P-OFLAG,TRUE-VALUE
+ SET 'CLOCK-WAIT,TRUE-VALUE
+ PRINTR "?)"
+
+
+ .FUNCT TELL-D-LOC,OBJ
+ PRINTD OBJ
+ IN? OBJ,GLOBAL-OBJECTS \?ELS5
+ PRINTI "(gl)"
+ JUMP ?CND3
+?ELS5: IN? OBJ,LOCAL-GLOBALS \?ELS9
+ PRINTI "(lg)"
+ JUMP ?CND3
+?ELS9: IN? OBJ,ROOMS \?CND3
+ PRINTI "(rm)"
+?CND3: EQUAL? OBJ,TURN,INTNUM \FALSE
+ PRINTI "("
+ ZERO? P-DOLLAR-FLAG /?ELS27
+ PRINTC CURRENCY-SYMBOL
+ PRINTN P-AMOUNT
+ PRINTI ")"
+ RTRUE
+?ELS27: PRINTN P-NUMBER
+ PRINTI ")"
+ RTRUE
+
+
+ .FUNCT FIX-HIM-HER,HEM-OBJECT,C,P
+ GETP HEM-OBJECT,P?CHARACTER >C
+ CALL2 ACCESSIBLE?,HEM-OBJECT
+ ZERO? STACK \?CND1
+ ZERO? DEBUG /?CND4
+ PRINTI "["
+ PRINTD HEM-OBJECT
+ PRINTI ":NA]"
+ CRLF
+?CND4: GET GLOBAL-CHARACTER-TABLE,C >P
+ ZERO? C /FALSE
+ GET CHARACTER-TABLE,C
+ EQUAL? P,STACK /FALSE
+ PRINT I-ASSUME
+ CALL2 PRINTT,P
+ PRINTI ".)"
+ CRLF
+ RETURN P
+?CND1: IN? HEM-OBJECT,GLOBAL-OBJECTS \?ELS21
+ GET CHARACTER-TABLE,C >P
+ JUMP ?CND19
+?ELS21: SET 'P,HEM-OBJECT
+?CND19: LOC P
+ EQUAL? HERE,STACK \FALSE
+ ZERO? DEBUG /?CND29
+ PRINTI "["
+ PRINTD HEM-OBJECT
+ PRINTI ":LO]"
+ CRLF
+?CND29: PRINT I-ASSUME
+ CALL2 PRINTT,P
+ PRINTI ".)"
+ CRLF
+ RETURN P
+
+
+ .FUNCT PERFORM,A,O=0,I=0,V,OA,OO,OI
+ ZERO? DEBUG /?CND1
+ PRINTI "[Perform: "
+ PRINTN A
+ ZERO? O /?CND9
+ PRINTI "/"
+ EQUAL? A,V?WALK,V?FACE \?ELS17
+ PRINTN O
+ JUMP ?CND9
+?ELS17: CALL2 TELL-D-LOC,O
+?CND9: ZERO? I /?CND22
+ PRINTI "/"
+ CALL2 TELL-D-LOC,I
+?CND22: PRINTI "]"
+ CRLF
+?CND1: SET 'OA,PRSA
+ SET 'OO,PRSO
+ SET 'OI,PRSI
+ SET 'PRSA,A
+ EQUAL? A,V?WALK,V?FACE /?CND30
+ EQUAL? IT,I,O \?CND33
+ CALL2 ACCESSIBLE?,P-IT-OBJECT
+ ZERO? STACK \?CND33
+ ZERO? I \?ELS40
+ CALL1 FAKE-ORPHAN
+ RETURN 2
+?ELS40: CALL2 NOT-HERE,P-IT-OBJECT
+ RETURN 2
+?CND33: EQUAL? THEM,I,O \?CND45
+ CALL2 FIX-HIM-HER,P-THEM-OBJECT >V
+ ZERO? V /?ELS50
+ ZERO? DEBUG /?CND51
+ PRINTI "[them="
+ PRINTD V
+ PRINTI "]"
+ CRLF
+?CND51: EQUAL? THEM,O \?CND57
+ SET 'O,V
+?CND57: EQUAL? THEM,I \?CND48
+ SET 'I,V
+ JUMP ?CND48
+?ELS50: ZERO? I \?ELS67
+ CALL1 FAKE-ORPHAN
+ RETURN 2
+?ELS67: CALL2 NOT-HERE,P-THEM-OBJECT
+ RETURN 2
+?CND48:
+?CND45: EQUAL? HER,I,O \?CND72
+ CALL2 FIX-HIM-HER,P-HER-OBJECT >V
+ ZERO? V /?ELS77
+ ZERO? DEBUG /?CND78
+ PRINTI "[her="
+ PRINTD V
+ PRINTI "]"
+ CRLF
+?CND78: EQUAL? HER,O \?CND84
+ SET 'O,V
+?CND84: EQUAL? HER,I \?CND75
+ SET 'I,V
+ JUMP ?CND75
+?ELS77: ZERO? I \?ELS94
+ CALL1 FAKE-ORPHAN
+ RETURN 2
+?ELS94: CALL2 NOT-HERE,P-HER-OBJECT
+ RETURN 2
+?CND75:
+?CND72: EQUAL? HIM,I,O \?CND99
+ CALL2 FIX-HIM-HER,P-HIM-OBJECT >V
+ ZERO? V /?ELS104
+ ZERO? DEBUG /?CND105
+ PRINTI "[him="
+ PRINTD V
+ PRINTI "]"
+ CRLF
+?CND105: EQUAL? HIM,O \?CND111
+ SET 'O,V
+?CND111: EQUAL? HIM,I \?CND102
+ SET 'I,V
+ JUMP ?CND102
+?ELS104: ZERO? I \?ELS121
+ CALL1 FAKE-ORPHAN
+ RETURN 2
+?ELS121: CALL2 NOT-HERE,P-HIM-OBJECT
+ RETURN 2
+?CND102:
+?CND99: EQUAL? O,IT \?CND126
+ SET 'O,P-IT-OBJECT
+ PRINT I-ASSUME
+ CALL2 PRINTT,O
+ PRINTI ".)"
+ CRLF
+?CND126: EQUAL? I,IT \?CND30
+ SET 'I,P-IT-OBJECT
+ PRINT I-ASSUME
+ CALL2 PRINTT,I
+ PRINTI ".)"
+ CRLF
+?CND30: SET 'PRSI,I
+ SET 'PRSO,O
+ SET 'V,FALSE-VALUE
+ ZERO? NOW-LURCHING /?CND136
+ EQUAL? TOLD-LURCHING,PRESENT-TIME /?CND136
+ ZERO? TRAIN-MOVING /?CND136
+ CALL1 GAME-VERB?
+ ZERO? STACK \?CND136
+ EQUAL? PRSA,V?MOVE \?THN143
+ EQUAL? PRSO,STOP-CORD /?CND136
+?THN143: SET 'TOLD-LURCHING,PRESENT-TIME
+ PRINTI "The train lurches a bit."
+ CRLF
+?CND136: EQUAL? A,V?WALK,V?FACE /?CND147
+ EQUAL? NOT-HERE-OBJECT,PRSO,PRSI \?CND147
+ CALL D-APPLY,STR?155,NOT-HERE-OBJECT-F >V
+ ZERO? V /?CND147
+ SET 'CLOCK-WAIT,TRUE-VALUE
+?CND147: CALL2 THIS-IS-IT,PRSI
+ CALL2 THIS-IS-IT,PRSO
+ SET 'O,PRSO
+ SET 'I,PRSI
+ ZERO? DEBUG /?CND156
+ PRINTC 91
+ PRINTD WINNER
+ PRINTI "=]"
+?CND156: ZERO? V \?CND160
+ GETP WINNER,P?ACTION
+ CALL D-APPLY,STR?156,STACK,M-WINNER >V
+?CND160: ZERO? V \?CND163
+ LOC WINNER
+ GETP STACK,P?ACTION
+ CALL D-APPLY,STR?157,STACK,M-BEG >V
+?CND163: ZERO? V \?CND166
+ GET PREACTIONS,A
+ CALL D-APPLY,STR?158,STACK >V
+?CND166: SET 'NOW-PRSI,TRUE-VALUE
+ ZERO? V \?CND169
+ ZERO? I /?CND169
+ EQUAL? A,V?WALK /?CND169
+ LOC I
+ ZERO? STACK /?CND169
+ LOC I
+ GETP STACK,P?CONTFCN >V
+ ZERO? V /?CND169
+ CALL V,M-CONT >V
+?CND169: ZERO? V \?CND178
+ ZERO? I /?CND178
+ GETP I,P?ACTION
+ CALL D-APPLY,STR?159,STACK >V
+?CND178: SET 'NOW-PRSI,FALSE-VALUE
+ ZERO? V \?CND183
+ ZERO? O /?CND183
+ EQUAL? A,V?WALK,V?FACE /?CND183
+ LOC O
+ ZERO? STACK /?CND183
+ LOC O
+ GETP STACK,P?CONTFCN >V
+ ZERO? V /?CND183
+ CALL V,M-CONT >V
+?CND183: ZERO? V \?CND192
+ ZERO? O /?CND192
+ EQUAL? A,V?WALK,V?FACE /?CND192
+ GETP O,P?ACTION
+ CALL D-APPLY,STR?160,STACK >V
+?CND192: ZERO? V \?CND197
+ GET ACTIONS,A
+ CALL D-APPLY,FALSE-VALUE,STACK >V
+?CND197: EQUAL? V,M-FATAL /?CND200
+ EQUAL? PRSA,V?RESTORE,V?SAVE /?THN206
+ CALL1 GAME-VERB?
+ ZERO? STACK \?CND200
+?THN206: LOC WINNER
+ GETP STACK,P?ACTION
+ CALL D-APPLY,STR?161,STACK,M-END >V
+?CND200: SET 'PRSA,OA
+ SET 'PRSO,OO
+ SET 'PRSI,OI
+ RETURN V
+
+
+ .FUNCT D-APPLY,STR,FCN,FOO=0,RES
+ ZERO? FCN /FALSE
+ ZERO? DEBUG /?CND8
+ ZERO? STR \?ELS14
+ PRINTI "[Action:]"
+ CRLF
+ JUMP ?CND8
+?ELS14: PRINTC 91
+ PRINT STR
+ PRINTI ": "
+?CND8: EQUAL? STR,STR?162 \?CND21
+ SET 'FOO,M-CONT
+?CND21: ZERO? FOO /?ELS28
+ CALL FCN,FOO
+ JUMP ?CND24
+?ELS28: CALL FCN
+?CND24: SET 'RES,STACK
+ ZERO? DEBUG /?CND32
+ ZERO? STR /?CND32
+ EQUAL? RES,M-FATAL \?ELS39
+ PRINTI "Fatal]"
+ CRLF
+ RETURN RES
+?ELS39: ZERO? RES \?ELS43
+ PRINTI "Not handled]"
+ CRLF
+ RETURN RES
+?ELS43: PRINTI "Handled]"
+ CRLF
+?CND32: RETURN RES
+
+
+ .FUNCT I-PROMPT,GARG=0
+ ZERO? IDEBUG \?THN4
+ EQUAL? GARG,G-DEBUG \?CND1
+?THN4: PRINTI "[I-PROMPT:"
+ EQUAL? GARG,G-DEBUG /FALSE
+?CND1: DEC 'P-PROMPT
+ ZERO? IDEBUG /FALSE
+ PRINTI "(0)]"
+ CRLF
+ RFALSE
+
+
+ .FUNCT BUZZER-WORD?,WORD
+ CALL2 QUESTION-WORD?,WORD
+ ZERO? STACK \TRUE
+ CALL2 NUMBER-WORD?,WORD
+ ZERO? STACK \TRUE
+ CALL2 NAUGHTY-WORD?,WORD
+ ZERO? STACK \TRUE
+ EQUAL? WORD,W?NW,W?NORTHWEST,W?NE /?THN12
+ EQUAL? WORD,W?SW,W?SOUTHWEST,W?NORTHEAST /?THN12
+ EQUAL? WORD,W?SE,W?SOUTHEAST \FALSE
+?THN12: PRINTI "(Sorry, but this story has no """
+ PRINTB WORD
+ PRINTR """ directions.)"
+
+
+ .FUNCT QUESTION-WORD?,WORD
+ EQUAL? WORD,W?WHERE \?ELS5
+ PRINTI "(To locate something, use the command: FIND "
+ PRINTD SOMETHING
+ PRINTR ".)"
+?ELS5: EQUAL? WORD,W?WHAT,W?WHAT'S /?THN10
+ EQUAL? WORD,W?WHO,W?WHO'S \?ELS9
+?THN10: PRINTI "(To ask about something, use the command: TELL ME ABOUT "
+ PRINTD SOMETHING
+ PRINTR ".)"
+?ELS9: EQUAL? WORD,W?THAT'S,W?IT'S /?THN16
+ EQUAL? WORD,W?WHY,W?HOW,W?WHEN /?THN16
+ EQUAL? WORD,W?IS,W?DID,W?ARE /?THN16
+ EQUAL? WORD,W?DO,W?HAVE /?THN16
+ EQUAL? WORD,W?AM,W?I'M,W?WE'RE /?THN16
+ EQUAL? WORD,W?WILL,W?WAS,W?WERE /?THN16
+ EQUAL? WORD,W?I'LL,W?CAN,W?WHICH /?THN16
+ EQUAL? WORD,W?I'VE,W?WON'T,W?HAS /?THN16
+ EQUAL? WORD,W?YOU'RE,W?HE'S,W?SHE'S /?THN16
+ EQUAL? WORD,W?SHOULD,W?WOULD,W?WHEN'S /?THN16
+ EQUAL? WORD,W?THEY'RE,W?COULD,W?SHALL \FALSE
+?THN16: PRINTI "(Please use commands"
+ INC 'QUESTION-WORD-COUNT
+ GRTR? QUESTION-WORD-COUNT,4 \?ELS22
+ SET 'QUESTION-WORD-COUNT,0
+ PRINTI "! Your commands tell the computer what you want to do in the story. Here are examples of commands:
+ TURN ON THE LAMP
+ LOOK UNDER THE RUG
+ MADAME, GIVE THE BOOK TO HIM
+ CONDUCTOR, HELP ME
+Now you can try again"
+ JUMP ?CND20
+?ELS22: PRINTI ", not statements or questions"
+?CND20: PRINTR ".)"
+
+
+ .FUNCT NUMBER-WORD?,WRD
+ EQUAL? WRD,W?ZERO,W?SEVENTY /?THN6
+ EQUAL? WRD,W?TWO,W?THREE,W?FOUR /?THN6
+ EQUAL? WRD,W?FIVE,W?SIX,W?SEVEN /?THN6
+ EQUAL? WRD,W?EIGHT,W?NINE,W?TEN /?THN6
+ EQUAL? WRD,W?ELEVEN,W?TWELVE,W?THIRTEEN /?THN6
+ EQUAL? WRD,W?FOURTEEN,W?FIFTEEN,W?SIXTEEN /?THN6
+ EQUAL? WRD,W?SEVENTEEN,W?EIGHTEEN,W?NINETEEN /?THN6
+ EQUAL? WRD,W?TWENTY,W?THIRTY,W?FORTY /?THN6
+ EQUAL? WRD,W?FIFTY,W?SIXTY,W?EIGHTY /?THN6
+ EQUAL? WRD,W?NINETY,W?HUNDRED,W?THOUSAND /?THN6
+ EQUAL? WRD,W?MILLION,W?BILLION,W?ONE \FALSE
+?THN6: PRINTR "(Use numerals for numbers, for example ""10."")"
+
+
+ .FUNCT NAUGHTY-WORD?,WORD
+ EQUAL? WORD,W?CURSE,W?CURSES,W?CUSS /?THN6
+ EQUAL? WORD,W?DAMN,W?SHIT,W?FUCK /?THN6
+ EQUAL? WORD,W?CHOMP,W?DARN,W?HELL /?THN6
+ EQUAL? WORD,W?FUDGE,W?PISS,W?SUCK /?THN6
+ EQUAL? WORD,W?BASTARD,W?SCREW,W?CRAP /?THN6
+ EQUAL? WORD,W?FUCKED,W?GODDAMN,W?ASSHOLE /?THN6
+ EQUAL? WORD,W?CUNT,W?SHITHEAD,W?SUCKS /?THN6
+ EQUAL? WORD,W?DAMNED,W?PEE,W?COCKSUCKER /?THN6
+ EQUAL? WORD,W?BITCH \FALSE
+?THN6: PRINTC 40
+ CALL2 PICK-ONE-NEW,OFFENDED
+ PRINT STACK
+ PRINTC 41
+ CRLF
+ RTRUE
+
+
+ .FUNCT PARSER,PTR=P-LEXSTART,WRD,VAL=0,VERB=0,OF-FLAG=0,LEN,DIR=0,NW=0,LW=0,CNT=-1,OMERGED,OWINNER,TMP,?TMP2,?TMP1
+?PRG1: IGRTR? 'CNT,P-ITBLLEN \?ELS5
+ JUMP ?REP2
+?ELS5: ZERO? P-OFLAG \?CND8
+ GET P-ITBL,CNT
+ PUT P-OTBL,CNT,STACK
+?CND8: PUT P-ITBL,CNT,0
+ JUMP ?PRG1
+?REP2: SET 'P-NUMBER,-1
+ SET 'P-NAM,FALSE-VALUE
+ SET 'P-ADJ,FALSE-VALUE
+ SET 'P-ADVERB,FALSE-VALUE
+ SET 'OMERGED,P-MERGED
+ SET 'P-MERGED,FALSE-VALUE
+ SET 'P-END-ON-PREP,FALSE-VALUE
+ PUT P-PRSO,P-MATCHLEN,0
+ PUT P-PRSI,P-MATCHLEN,0
+ PUT P-BUTS,P-MATCHLEN,0
+ SET 'OWINNER,WINNER
+ ZERO? QUOTE-FLAG \?CND11
+ EQUAL? WINNER,PLAYER /?CND11
+ SET 'WINNER,PLAYER
+ LOC WINNER >HERE
+ CALL2 LIT?,HERE >LIT
+?CND11: ZERO? RESERVE-PTR /?ELS21
+ SET 'PTR,RESERVE-PTR
+ CALL STUFF,P-LEXV,RESERVE-LEXV
+ EQUAL? VERBOSE,1,2 \?CND23
+ EQUAL? PLAYER,WINNER \?CND23
+ CRLF
+?CND23: SET 'RESERVE-PTR,FALSE-VALUE
+ SET 'P-CONT,FALSE-VALUE
+ JUMP ?CND19
+?ELS21: ZERO? P-CONT /?ELS29
+ SET 'PTR,P-CONT
+ SET 'P-CONT,FALSE-VALUE
+ ZERO? VERBOSE /?CND19
+ EQUAL? PLAYER,WINNER \?CND19
+ CRLF
+ JUMP ?CND19
+?ELS29: SET 'WINNER,PLAYER
+ SET 'QUOTE-FLAG,FALSE-VALUE
+ LOC WINNER >HERE
+ CALL2 LIT?,HERE >LIT
+ FCLEAR IT,TOUCHBIT
+ FCLEAR HER,TOUCHBIT
+ FCLEAR HIM,TOUCHBIT
+ FCLEAR THEM,TOUCHBIT
+ ZERO? VERBOSE /?CND40
+ CRLF
+?CND40: ZERO? P-PROMPT /?CND43
+ ZERO? P-OFLAG \?CND43
+ EQUAL? P-PROMPT,P-PROMPT-START \?ELS50
+ PRINTI "Okay, what do you want to do now?"
+ JUMP ?CND48
+?ELS50: DLESS? 'P-PROMPT,1 \?ELS54
+ PRINTI "(You won't see ""What next?"" any more.)
+"
+ JUMP ?CND48
+?ELS54: PRINTI "What next?"
+?CND48: CRLF
+?CND43: PUTB P-LEXV,0,59
+ CALL1 STATUS-LINE
+ PRINTI ">"
+ READ P-INBUF,P-LEXV
+?CND19: GETB P-LEXV,P-LEXWORDS >P-LEN
+ GET P-LEXV,PTR
+ EQUAL? W?QUOTE,STACK \?CND65
+ CALL1 QCONTEXT-GOOD?
+ ZERO? STACK /?CND65
+ ADD PTR,P-LEXELEN >PTR
+ DEC 'P-LEN
+?CND65: GET P-LEXV,PTR
+ EQUAL? W?THEN,STACK \?CND70
+ ADD PTR,P-LEXELEN >PTR
+ DEC 'P-LEN
+?CND70: LESS? 1,P-LEN \?CND73
+ GET P-LEXV,PTR
+ EQUAL? W?GO,STACK \?CND73
+ ADD PTR,P-LEXELEN
+ GET P-LEXV,STACK >NW
+ ZERO? NW /?CND73
+ CALL WT?,NW,PS?VERB
+ ZERO? STACK /?CND73
+ ADD PTR,P-LEXELEN >PTR
+ DEC 'P-LEN
+?CND73: ZERO? P-LEN \?ELS80
+ PRINTI "I beg your pardon?"
+ CRLF
+ RFALSE
+?ELS80: GET P-LEXV,PTR
+ EQUAL? STACK,W?OOPS \?ELS84
+ GRTR? P-LEN,1 /?ELS87
+ PRINTI "I can't help your clumsiness."
+ CRLF
+ RFALSE
+?ELS87: GET OOPS-TABLE,O-PTR
+ ZERO? STACK /?ELS91
+ GET OOPS-TABLE,O-PTR >?TMP1
+ ADD PTR,P-LEXELEN
+ GET P-LEXV,STACK
+ PUT AGAIN-LEXV,?TMP1,STACK
+ SET 'WINNER,OWINNER
+ MUL PTR,P-LEXELEN
+ ADD STACK,6
+ GETB P-LEXV,STACK >?TMP2
+ MUL PTR,P-LEXELEN
+ ADD STACK,7
+ GETB P-LEXV,STACK >?TMP1
+ GET OOPS-TABLE,O-PTR
+ MUL STACK,P-LEXELEN
+ ADD STACK,3
+ CALL INBUF-ADD,?TMP2,?TMP1,STACK
+ CALL STUFF,P-LEXV,AGAIN-LEXV
+ GETB P-LEXV,P-LEXWORDS >P-LEN
+ GET OOPS-TABLE,O-START >PTR
+ CALL INBUF-STUFF,P-INBUF,OOPS-INBUF
+ JUMP ?CND78
+?ELS91: PUT OOPS-TABLE,O-END,FALSE-VALUE
+ PRINTI "There was no word to replace!"
+ CRLF
+ RFALSE
+?ELS84: PUT OOPS-TABLE,O-END,FALSE-VALUE
+?CND78: GET P-LEXV,PTR
+ EQUAL? STACK,W?AGAIN,W?G \?ELS100
+ ZERO? P-OFLAG /?ELS103
+ PRINTI "It's difficult to repeat fragments."
+ CRLF
+ RFALSE
+?ELS103: GRTR? P-LEN,1 \?ELS108
+ ADD PTR,P-LEXELEN
+ GET P-LEXV,STACK
+ EQUAL? STACK,W?PERIOD,W?COMMA,W?THEN /?THN112
+ ADD PTR,P-LEXELEN
+ GET P-LEXV,STACK
+ EQUAL? STACK,W?AND \?ELS111
+?THN112: MUL 2,P-LEXELEN
+ ADD PTR,STACK >PTR
+ GETB P-LEXV,P-LEXWORDS
+ SUB STACK,2
+ PUTB P-LEXV,P-LEXWORDS,STACK
+ JUMP ?CND101
+?ELS111: PRINTI "I couldn't understand that sentence."
+ CRLF
+ RFALSE
+?ELS108: ADD PTR,P-LEXELEN >PTR
+ GETB P-LEXV,P-LEXWORDS
+ SUB STACK,1
+ PUTB P-LEXV,P-LEXWORDS,STACK
+?CND101: GETB P-LEXV,P-LEXWORDS
+ GRTR? STACK,0 \?ELS122
+ CALL STUFF,RESERVE-LEXV,P-LEXV
+ SET 'RESERVE-PTR,PTR
+ JUMP ?CND120
+?ELS122: SET 'RESERVE-PTR,FALSE-VALUE
+?CND120: SET 'WINNER,OWINNER
+ SET 'P-MERGED,OMERGED
+ CALL INBUF-STUFF,P-INBUF,OOPS-INBUF
+ CALL STUFF,P-LEXV,AGAIN-LEXV
+ SET 'CNT,-1
+ SET 'DIR,P-WALK-DIR
+?PRG125: IGRTR? 'CNT,P-ITBLLEN \?ELS129
+ JUMP ?CND98
+?ELS129: GET P-OTBL,CNT
+ PUT P-ITBL,CNT,STACK
+ JUMP ?PRG125
+?ELS100: CALL STUFF,AGAIN-LEXV,P-LEXV
+ CALL INBUF-STUFF,OOPS-INBUF,P-INBUF
+ PUT OOPS-TABLE,O-START,PTR
+ MUL 4,P-LEN
+ PUT OOPS-TABLE,O-LENGTH,STACK
+ SET 'RESERVE-PTR,FALSE-VALUE
+ SET 'LEN,P-LEN
+ SET 'P-DIR,FALSE-VALUE
+ SET 'P-NCN,0
+ SET 'P-GETFLAGS,0
+ PUT P-ITBL,P-VERBN,0
+?PRG134: DLESS? 'P-LEN,0 \?ELS138
+ SET 'QUOTE-FLAG,FALSE-VALUE
+ JUMP ?CND98
+?ELS138: GET P-LEXV,PTR >WRD
+ CALL2 BUZZER-WORD?,WRD
+ ZERO? STACK \FALSE
+ ZERO? WRD \?THN143
+ CALL2 NUMBER?,PTR >WRD
+ ZERO? WRD /?ELS142
+?THN143: EQUAL? WRD,W?TO \?ELS147
+ EQUAL? VERB,ACT?TELL,ACT?ASK \?ELS147
+ PUT P-ITBL,P-VERB,ACT?TELL
+ SET 'WRD,W?QUOTE
+ JUMP ?CND145
+?ELS147: EQUAL? WRD,W?THEN \?CND145
+ ZERO? VERB \?CND145
+ ZERO? QUOTE-FLAG \?CND145
+ PUT P-ITBL,P-VERB,ACT?TELL
+ PUT P-ITBL,P-VERBN,0
+ SET 'WRD,W?QUOTE
+?CND145: EQUAL? WRD,W?THEN,W?PERIOD,W?QUOTE \?ELS156
+ EQUAL? WRD,W?QUOTE \?CND157
+ ZERO? QUOTE-FLAG /?ELS162
+ SET 'QUOTE-FLAG,FALSE-VALUE
+ JUMP ?CND157
+?ELS162: SET 'QUOTE-FLAG,TRUE-VALUE
+?CND157: ZERO? P-LEN /?THN166
+ ADD PTR,P-LEXELEN >P-CONT
+?THN166: PUTB P-LEXV,P-LEXWORDS,P-LEN
+ JUMP ?CND98
+?ELS156: CALL WT?,WRD,PS?DIRECTION,P1?DIRECTION >VAL
+ ZERO? VAL /?ELS169
+ EQUAL? VERB,FALSE-VALUE,ACT?WALK,ACT?HEAD \?ELS169
+ EQUAL? LEN,1 /?THN172
+ EQUAL? LEN,2 \?ELS175
+ EQUAL? VERB,ACT?WALK,ACT?HEAD /?THN172
+?ELS175: ADD PTR,P-LEXELEN
+ GET P-LEXV,STACK >NW
+ EQUAL? NW,W?THEN,W?PERIOD,W?QUOTE \?ELS177
+ GRTR? LEN,1 /?THN172
+?ELS177: ZERO? QUOTE-FLAG /?ELS179
+ EQUAL? LEN,2 \?ELS179
+ EQUAL? NW,W?QUOTE /?THN172
+?ELS179: GRTR? LEN,2 \?ELS169
+ EQUAL? NW,W?COMMA,W?AND \?ELS169
+?THN172: SET 'DIR,VAL
+ EQUAL? NW,W?COMMA,W?AND \?CND182
+ ADD PTR,P-LEXELEN
+ CALL CHANGE-LEXV,STACK,W?THEN
+?CND182: GRTR? LEN,2 /?CND136
+ SET 'QUOTE-FLAG,FALSE-VALUE
+ JUMP ?CND98
+?ELS169: CALL WT?,WRD,PS?VERB,P1?VERB >VAL
+ ZERO? VAL /?ELS189
+ ZERO? VERB \?ELS189
+ SET 'VERB,VAL
+ PUT P-ITBL,P-VERB,VAL
+ PUT P-ITBL,P-VERBN,P-VTBL
+ PUT P-VTBL,0,WRD
+ MUL PTR,2
+ ADD STACK,2 >TMP
+ GETB P-LEXV,TMP
+ PUTB P-VTBL,2,STACK
+ ADD TMP,1
+ GETB P-LEXV,STACK
+ PUTB P-VTBL,3,STACK
+ JUMP ?CND136
+?ELS189: CALL WT?,WRD,PS?PREPOSITION,0 >VAL
+ ZERO? VAL \?THN196
+ EQUAL? WRD,W?ONE,W?A /?THN200
+ EQUAL? WRD,W?BOTH,W?ALL /?THN200
+ CALL WT?,WRD,PS?ADJECTIVE
+ ZERO? STACK \?THN200
+ CALL WT?,WRD,PS?OBJECT
+ ZERO? STACK /?ELS195
+?THN200: SET 'VAL,0 \?ELS195
+?THN196: GRTR? P-LEN,1 \?ELS204
+ ADD PTR,P-LEXELEN
+ GET P-LEXV,STACK
+ EQUAL? STACK,W?OF \?ELS204
+ ZERO? VAL \?ELS204
+ EQUAL? WRD,W?ONE,W?A /?ELS204
+ EQUAL? WRD,W?ALL,W?BOTH /?ELS204
+ SET 'OF-FLAG,TRUE-VALUE
+ JUMP ?CND136
+?ELS204: ZERO? VAL /?ELS208
+ ZERO? P-LEN /?THN211
+ ADD PTR,2
+ GET P-LEXV,STACK
+ EQUAL? STACK,W?THEN,W?PERIOD \?ELS208
+?THN211: SET 'P-END-ON-PREP,TRUE-VALUE
+ LESS? P-NCN,2 \?CND136
+ PUT P-ITBL,P-PREP1,VAL
+ PUT P-ITBL,P-PREP1N,WRD
+ JUMP ?CND136
+?ELS208: EQUAL? P-NCN,2 \?ELS217
+ PRINTI "(I found too many nouns in that sentence!)"
+ CRLF
+ RFALSE
+?ELS217: INC 'P-NCN
+ CALL CLAUSE,PTR,VAL,WRD >PTR
+ ZERO? PTR /FALSE
+ LESS? PTR,0 \?CND136
+ SET 'QUOTE-FLAG,FALSE-VALUE
+ JUMP ?CND98
+?ELS195: EQUAL? WRD,W?CLOSELY \?ELS228
+ SET 'P-ADVERB,W?CAREFULLY
+ JUMP ?CND136
+?ELS228: EQUAL? WRD,W?CAREFULLY,W?QUIETLY /?THN231
+ EQUAL? WRD,W?SLOWLY,W?QUICKLY,W?BRIEFLY \?ELS230
+?THN231: SET 'P-ADVERB,WRD
+ JUMP ?CND136
+?ELS230: EQUAL? WRD,W?OF \?ELS234
+ ZERO? OF-FLAG /?THN238
+ ADD PTR,P-LEXELEN
+ GET P-LEXV,STACK
+ EQUAL? STACK,W?PERIOD,W?THEN \?ELS237
+?THN238: CALL2 CANT-USE,PTR
+ RFALSE
+?ELS237: SET 'OF-FLAG,FALSE-VALUE
+ JUMP ?CND136
+?ELS234: CALL WT?,WRD,PS?BUZZ-WORD
+ ZERO? STACK /?ELS243
+ JUMP ?CND136
+?ELS243: EQUAL? VERB,ACT?TELL \?ELS245
+ CALL WT?,WRD,PS?VERB
+ ZERO? STACK /?ELS245
+ PRINTI "(Please consult your manual for the correct way to talk to characters.)"
+ CRLF
+ RFALSE
+?ELS245: CALL2 CANT-USE,PTR
+ RFALSE
+?ELS142: CALL2 UNKNOWN-WORD,PTR
+ RFALSE
+?CND136: SET 'LW,WRD
+ ADD PTR,P-LEXELEN >PTR
+ JUMP ?PRG134
+?CND98: PUT OOPS-TABLE,O-PTR,FALSE-VALUE
+ ZERO? DIR /?CND254
+ EQUAL? VERB,ACT?HEAD \?ELS260
+ SET 'PRSA,V?FACE
+ JUMP ?CND258
+?ELS260: SET 'PRSA,V?WALK
+?CND258: SET 'P-WALK-DIR,DIR
+ SET 'PRSO,DIR
+ SET 'P-OFLAG,FALSE-VALUE
+ RETURN TRUE-VALUE
+?CND254: SET 'P-WALK-DIR,FALSE-VALUE
+ ZERO? P-OFLAG /?CND263
+ CALL1 ORPHAN-MERGE
+ ZERO? STACK /?CND263
+ SET 'WINNER,OWINNER
+?CND263: GET P-ITBL,P-VERB
+ ZERO? STACK \?CND268
+ PUT P-ITBL,P-VERB,ACT?$CALL
+?CND268: CALL1 SYNTAX-CHECK
+ ZERO? STACK /FALSE
+ CALL1 SNARF-OBJECTS
+ ZERO? STACK /FALSE
+ CALL1 MANY-CHECK
+ ZERO? STACK /FALSE
+ CALL1 TAKE-CHECK
+ ZERO? STACK /FALSE
+ RTRUE
+
+
+ .FUNCT STUFF,DEST,SRC,MAX=29,PTR=P-LEXSTART,CTR=1,BPTR
+ GETB SRC,0
+ PUTB DEST,0,STACK
+ GETB SRC,1
+ PUTB DEST,1,STACK
+?PRG1: GET SRC,PTR
+ PUT DEST,PTR,STACK
+ MUL PTR,2
+ ADD STACK,2 >BPTR
+ GETB SRC,BPTR
+ PUTB DEST,BPTR,STACK
+ MUL PTR,2
+ ADD STACK,3 >BPTR
+ GETB SRC,BPTR
+ PUTB DEST,BPTR,STACK
+ ADD PTR,P-LEXELEN >PTR
+ IGRTR? 'CTR,MAX \?PRG1
+ RTRUE
+
+
+ .FUNCT INBUF-STUFF,DEST,SRC,CNT=-1
+?PRG1: IGRTR? 'CNT,59 /TRUE
+ GETB SRC,CNT
+ PUTB DEST,CNT,STACK
+ JUMP ?PRG1
+
+
+ .FUNCT INBUF-ADD,LEN,BEG,SLOT,DBEG,CTR=0,TMP,?TMP1
+ GET OOPS-TABLE,O-END >TMP
+ ZERO? TMP /?ELS3
+ SET 'DBEG,TMP
+ JUMP ?CND1
+?ELS3: GET OOPS-TABLE,O-LENGTH >TMP
+ GETB AGAIN-LEXV,TMP >?TMP1
+ ADD TMP,1
+ GETB AGAIN-LEXV,STACK
+ ADD ?TMP1,STACK >DBEG
+?CND1: ADD DBEG,LEN
+ PUT OOPS-TABLE,O-END,STACK
+?PRG6: ADD DBEG,CTR >?TMP1
+ ADD BEG,CTR
+ GETB P-INBUF,STACK
+ PUTB OOPS-INBUF,?TMP1,STACK
+ INC 'CTR
+ EQUAL? CTR,LEN \?PRG6
+ PUTB AGAIN-LEXV,SLOT,DBEG
+ SUB SLOT,1
+ PUTB AGAIN-LEXV,STACK,LEN
+ RTRUE
+
+
+ .FUNCT WT?,PTR,BIT,B1=5,OFFS=P-P1OFF,TYP
+ GETB PTR,P-PSOFF >TYP
+ BTST TYP,BIT \FALSE
+ GRTR? B1,4 /TRUE
+ BAND TYP,P-P1BITS >TYP
+ EQUAL? TYP,B1 /?CND13
+ INC 'OFFS
+?CND13: GETB PTR,OFFS
+ RSTACK
+
+
+ .FUNCT CHANGE-LEXV,PTR,WRD
+ PUT P-LEXV,PTR,WRD
+ PUT AGAIN-LEXV,PTR,WRD
+ RTRUE
+
+
+ .FUNCT CLAUSE,PTR,VAL,WRD,OFF,NUM,ANDFLG=0,FIRST??=1,NW,LW=0,?TMP1
+ SUB P-NCN,1
+ MUL STACK,2 >OFF
+ ZERO? VAL /?ELS3
+ ADD P-PREP1,OFF >NUM
+ PUT P-ITBL,NUM,VAL
+ ADD NUM,1
+ PUT P-ITBL,STACK,WRD
+ ADD PTR,P-LEXELEN >PTR
+ JUMP ?CND1
+?ELS3: INC 'P-LEN
+?CND1: ZERO? P-LEN \?CND6
+ DEC 'P-NCN
+ RETURN -1
+?CND6: ADD P-NC1,OFF >NUM
+ MUL PTR,2
+ ADD P-LEXV,STACK
+ PUT P-ITBL,NUM,STACK
+ GET P-LEXV,PTR
+ EQUAL? STACK,W?THE,W?A,W?AN \?CND9
+ GET P-ITBL,NUM
+ ADD STACK,4
+ PUT P-ITBL,NUM,STACK
+?CND9:
+?PRG12: DLESS? 'P-LEN,0 \?CND14
+ ADD NUM,1 >?TMP1
+ MUL PTR,2
+ ADD P-LEXV,STACK
+ PUT P-ITBL,?TMP1,STACK
+ RETURN -1
+?CND14: GET P-LEXV,PTR >WRD
+ CALL2 BUZZER-WORD?,WRD
+ ZERO? STACK \FALSE
+ ZERO? WRD \?THN22
+ CALL2 NUMBER?,PTR >WRD
+ ZERO? WRD /?ELS21
+?THN22: ZERO? P-LEN \?ELS26
+ SET 'NW,0
+ JUMP ?CND24
+?ELS26: ADD PTR,P-LEXELEN
+ GET P-LEXV,STACK >NW
+?CND24: EQUAL? WRD,W?AND,W?COMMA \?ELS31
+ SET 'ANDFLG,TRUE-VALUE
+ JUMP ?CND17
+?ELS31: EQUAL? WRD,W?ALL,W?BOTH,W?ONE \?ELS33
+ EQUAL? NW,W?OF \?CND17
+ DEC 'P-LEN
+ ADD PTR,P-LEXELEN >PTR
+ JUMP ?CND17
+?ELS33: EQUAL? WRD,W?THEN,W?PERIOD /?THN39
+ CALL WT?,WRD,PS?PREPOSITION
+ ZERO? STACK /?ELS38
+ GET P-ITBL,P-VERB
+ ZERO? STACK /?ELS38
+ ZERO? FIRST?? \?ELS38
+?THN39: INC 'P-LEN
+ ADD NUM,1 >?TMP1
+ MUL PTR,2
+ ADD P-LEXV,STACK
+ PUT P-ITBL,?TMP1,STACK
+ SUB PTR,P-LEXELEN
+ RETURN STACK
+?ELS38: ZERO? ANDFLG /?ELS44
+ GET P-ITBL,P-VERBN
+ ZERO? STACK /?THN47
+ CALL2 VERB-DIR-ONLY?,WRD
+ ZERO? STACK /?ELS44
+?THN47: SUB PTR,4 >PTR
+ ADD PTR,2
+ CALL CHANGE-LEXV,STACK,W?THEN
+ ADD P-LEN,2 >P-LEN
+ JUMP ?CND17
+?ELS44: CALL WT?,WRD,PS?OBJECT
+ ZERO? STACK /?ELS50
+ GRTR? P-LEN,0 \?ELS53
+ EQUAL? NW,W?OF \?ELS53
+ EQUAL? WRD,W?ALL,W?ONE /?ELS53
+ JUMP ?CND17
+?ELS53: CALL WT?,WRD,PS?ADJECTIVE
+ ZERO? STACK /?ELS57
+ ZERO? NW /?ELS57
+ CALL WT?,NW,PS?OBJECT
+ ZERO? STACK /?ELS57
+ JUMP ?CND17
+?ELS57: ZERO? ANDFLG \?ELS61
+ EQUAL? NW,W?BUT,W?EXCEPT /?ELS61
+ EQUAL? NW,W?AND,W?COMMA /?ELS61
+ ADD NUM,1 >?TMP1
+ ADD PTR,2
+ MUL STACK,2
+ ADD P-LEXV,STACK
+ PUT P-ITBL,?TMP1,STACK
+ RETURN PTR
+?ELS61: SET 'ANDFLG,FALSE-VALUE
+ JUMP ?CND17
+?ELS50: CALL WT?,WRD,PS?ADJECTIVE
+ ZERO? STACK \?CND17
+ CALL WT?,WRD,PS?BUZZ-WORD
+ ZERO? STACK /?ELS67
+ JUMP ?CND17
+?ELS67: ZERO? ANDFLG /?ELS71
+ GET P-ITBL,P-VERB
+ ZERO? STACK \?ELS71
+ SUB PTR,4 >PTR
+ ADD PTR,2
+ CALL CHANGE-LEXV,STACK,W?THEN
+ ADD P-LEN,2 >P-LEN
+ JUMP ?CND17
+?ELS71: CALL WT?,WRD,PS?PREPOSITION
+ ZERO? STACK /?ELS75
+ JUMP ?CND17
+?ELS75: CALL2 CANT-USE,PTR
+ RFALSE
+?ELS21: CALL2 UNKNOWN-WORD,PTR
+ RFALSE
+?CND17: SET 'LW,WRD
+ SET 'FIRST??,FALSE-VALUE
+ ADD PTR,P-LEXELEN >PTR
+ JUMP ?PRG12
+
+
+ .FUNCT VERB-DIR-ONLY?,WRD,?ORTMP
+ CALL WT?,WRD,PS?OBJECT
+ ZERO? STACK \FALSE
+ CALL WT?,WRD,PS?ADJECTIVE
+ ZERO? STACK \FALSE
+ CALL WT?,WRD,PS?DIRECTION
+ POP '?ORTMP
+ ZERO? ?ORTMP /?ORP6
+ RETURN ?ORTMP
+?ORP6: CALL WT?,WRD,PS?VERB
+ RSTACK
+
+
+ .FUNCT NUMBER?,PTR,CNT,BPTR,CHR,SUM=0,TIM=0,DOLLAR=0,CCTR,TMP,NW,PTT,?TMP1
+ MUL PTR,2
+ ADD P-LEXV,STACK >TMP
+ GETB TMP,2 >CNT
+ GETB TMP,3 >BPTR
+?PRG1: DLESS? 'CNT,0 \?ELS5
+ JUMP ?REP2
+?ELS5: GETB P-INBUF,BPTR >CHR
+ EQUAL? CHR,58 \?ELS10
+ SET 'TIM,SUM
+ SET 'SUM,0
+ JUMP ?CND8
+?ELS10: GRTR? SUM,9999 /FALSE
+ EQUAL? CHR,CURRENCY-SYMBOL \?ELS14
+ SET 'DOLLAR,TRUE-VALUE
+ JUMP ?CND8
+?ELS14: GRTR? CHR,57 /FALSE
+ LESS? CHR,48 /FALSE
+ MUL SUM,10 >?TMP1
+ SUB CHR,48
+ ADD ?TMP1,STACK >SUM
+?CND8: INC 'BPTR
+ JUMP ?PRG1
+?REP2: CALL CHANGE-LEXV,PTR,W?NUMBER
+ ADD PTR,P-LEXELEN
+ GET P-LEXV,STACK >NW
+ ZERO? DOLLAR \?CND21
+ EQUAL? NW,W?PERIOD \?CND21
+ GRTR? P-LEN,1 \?CND21
+ MUL P-LEXELEN,2
+ ADD PTR,STACK
+ CALL2 CENTS-CHECK,STACK >TMP
+ ZERO? TMP /?ELS28
+ SET 'P-CENT-FLAG,TRUE-VALUE
+ EQUAL? TMP,100 \?CND29
+ SET 'TMP,0
+?CND29: SET 'TIM,SUM
+ SET 'SUM,TMP
+ SUB P-LEN,2 >CCTR
+ MUL 2,P-LEXELEN >TMP
+ ADD PTR,TMP >PTT
+?PRG32: DLESS? 'CCTR,0 \?ELS36
+ JUMP ?REP33
+?ELS36: ADD PTR,P-LEXELEN >PTR
+ GET P-LEXV,PTT
+ CALL CHANGE-LEXV,PTR,STACK
+ MUL PTR,2
+ ADD STACK,2 >?TMP1
+ MUL PTT,2
+ ADD STACK,2
+ GETB P-LEXV,STACK
+ PUTB P-LEXV,?TMP1,STACK
+ MUL PTR,2
+ ADD STACK,3 >?TMP1
+ MUL PTT,2
+ ADD STACK,3
+ GETB P-LEXV,STACK
+ PUTB P-LEXV,?TMP1,STACK
+ JUMP ?PRG32
+?REP33: SUB P-LEN,2 >P-LEN
+ GETB P-LEXV,P-LEXWORDS
+ SUB STACK,2
+ PUTB P-LEXV,P-LEXWORDS,STACK
+ JUMP ?CND21
+?ELS28: SET 'P-CENT-FLAG,FALSE-VALUE
+?CND21: GRTR? SUM,9999 /FALSE
+ ZERO? TIM /?CND41
+ GRTR? TIM,23 /FALSE
+ MUL TIM,60
+ ADD SUM,STACK >SUM
+?CND41: ZERO? DOLLAR /?ELS54
+ GRTR? SUM,0 \?ELS54
+ SET 'P-AMOUNT,SUM
+ SET 'P-DOLLAR-FLAG,TRUE-VALUE
+ RETURN W?MONEY
+?ELS54: SET 'P-NUMBER,SUM
+ SET 'P-DOLLAR-FLAG,FALSE-VALUE
+ RETURN W?NUMBER
+
+
+ .FUNCT CENTS-CHECK,PTR,CNT,BPTR,CCTR=0,CHR,SUM=0,TMP,?TMP1
+ MUL PTR,2
+ ADD P-LEXV,STACK >TMP
+ GETB TMP,2 >CNT
+ GETB TMP,3 >BPTR
+?PRG1: DLESS? 'CNT,0 \?ELS5
+ JUMP ?REP2
+?ELS5: GETB P-INBUF,BPTR >CHR
+ IGRTR? 'CCTR,2 /FALSE
+ GRTR? CHR,53 /FALSE
+ LESS? CHR,48 /FALSE
+ MUL SUM,10 >?TMP1
+ SUB CHR,48
+ ADD ?TMP1,STACK >SUM
+ INC 'BPTR
+ JUMP ?PRG1
+?REP2: ZERO? SUM \?ELS21
+ RETURN 100
+?ELS21: EQUAL? CCTR,1 \?ELS23
+ MUL 10,SUM
+ RSTACK
+?ELS23: RETURN SUM
+
+
+ .FUNCT ORPHAN-MERGE,CNT=-1,TEMP,VERB,BEG,END,ADJ=0,WRD,?TMP1
+ SET 'P-OFLAG,FALSE-VALUE
+ GET P-ITBL,P-VERBN
+ GET STACK,0 >WRD
+ CALL WT?,WRD,PS?ADJECTIVE
+ ZERO? STACK /?ELS3
+ SET 'ADJ,TRUE-VALUE
+ JUMP ?CND1
+?ELS3: CALL WT?,WRD,PS?OBJECT
+ ZERO? STACK /?CND1
+ ZERO? P-NCN \?CND1
+ PUT P-ITBL,P-VERB,0
+ PUT P-ITBL,P-VERBN,0
+ ADD P-LEXV,2
+ PUT P-ITBL,P-NC1,STACK
+ ADD P-LEXV,6
+ PUT P-ITBL,P-NC1L,STACK
+ SET 'P-NCN,1
+?CND1: GET P-ITBL,P-VERB >VERB
+ ZERO? VERB /?ELS10
+ ZERO? ADJ \?ELS10
+ GET P-OTBL,P-VERB
+ EQUAL? VERB,STACK \FALSE
+?ELS10: EQUAL? P-NCN,2 /FALSE
+ GET P-OTBL,P-NC1
+ EQUAL? STACK,1 \?ELS16
+ GET P-ITBL,P-PREP1 >TEMP
+ GET P-OTBL,P-PREP1
+ EQUAL? TEMP,STACK /?THN20
+ ZERO? TEMP \FALSE
+?THN20: ZERO? ADJ /?ELS24
+ ADD P-LEXV,2
+ PUT P-OTBL,P-NC1,STACK
+ GET P-ITBL,P-NC1L
+ ZERO? STACK \?CND26
+ ADD P-LEXV,6
+ PUT P-ITBL,P-NC1L,STACK
+?CND26: ZERO? P-NCN \?CND22
+ SET 'P-NCN,1
+ JUMP ?CND22
+?ELS24: GET P-ITBL,P-NC1
+ PUT P-OTBL,P-NC1,STACK
+?CND22: GET P-ITBL,P-NC1L
+ PUT P-OTBL,P-NC1L,STACK
+ JUMP ?CND8
+?ELS16: GET P-OTBL,P-NC2
+ EQUAL? STACK,1 \?ELS37
+ GET P-ITBL,P-PREP1 >TEMP
+ GET P-OTBL,P-PREP2
+ EQUAL? TEMP,STACK /?THN41
+ ZERO? TEMP \FALSE
+?THN41: ZERO? ADJ /?CND43
+ ADD P-LEXV,2
+ PUT P-ITBL,P-NC1,STACK
+ GET P-ITBL,P-NC1L
+ ZERO? STACK \?CND43
+ ADD P-LEXV,6
+ PUT P-ITBL,P-NC1L,STACK
+?CND43: GET P-ITBL,P-NC1
+ PUT P-OTBL,P-NC2,STACK
+ GET P-ITBL,P-NC1L
+ PUT P-OTBL,P-NC2L,STACK
+ SET 'P-NCN,2
+ JUMP ?CND8
+?ELS37: ZERO? P-ACLAUSE /?CND8
+ EQUAL? P-NCN,1 /?ELS57
+ ZERO? ADJ \?ELS57
+ SET 'P-ACLAUSE,FALSE-VALUE
+ RFALSE
+?ELS57: GET P-ITBL,P-NC1 >BEG
+ ZERO? ADJ /?CND62
+ ADD P-LEXV,2 >BEG
+ SET 'ADJ,FALSE-VALUE
+?CND62: GET P-ITBL,P-NC1L >END
+?PRG66: GET BEG,0 >WRD
+ EQUAL? BEG,END \?ELS70
+ ZERO? ADJ /?ELS73
+ CALL2 ACLAUSE-WIN,ADJ
+ JUMP ?CND55
+?ELS73: SET 'P-ACLAUSE,FALSE-VALUE
+ RFALSE
+?ELS70: ZERO? ADJ \?ELS78
+ GETB WRD,P-PSOFF
+ BTST STACK,PS?ADJECTIVE /?THN81
+ EQUAL? WRD,W?ALL,W?ONE \?ELS78
+?THN81: SET 'ADJ,WRD
+ JUMP ?CND68
+?ELS78: EQUAL? WRD,W?ONE \?ELS84
+ CALL2 ACLAUSE-WIN,ADJ
+ JUMP ?CND55
+?ELS84: GETB WRD,P-PSOFF
+ BTST STACK,PS?OBJECT \?CND68
+ EQUAL? WRD,P-ANAM \?ELS89
+ CALL2 ACLAUSE-WIN,ADJ
+ JUMP ?CND8
+?ELS89: CALL1 NCLAUSE-WIN
+ JUMP ?CND8
+?CND68: ADD BEG,P-WORDLEN >BEG
+ ZERO? END \?PRG66
+ SET 'END,BEG
+ SET 'P-NCN,1
+ SUB BEG,4
+ PUT P-ITBL,P-NC1,STACK
+ PUT P-ITBL,P-NC1L,BEG
+ JUMP ?PRG66
+?CND55:
+?CND8: GET P-OVTBL,0
+ PUT P-VTBL,0,STACK
+ GETB P-OVTBL,2
+ PUTB P-VTBL,2,STACK
+ GETB P-OVTBL,3
+ PUTB P-VTBL,3,STACK
+ PUT P-OTBL,P-VERBN,P-VTBL
+ PUTB P-VTBL,2,0
+?PRG95: IGRTR? 'CNT,P-ITBLLEN \?ELS99
+ SET 'P-MERGED,TRUE-VALUE
+ RTRUE
+?ELS99: GET P-OTBL,CNT
+ PUT P-ITBL,CNT,STACK
+ JUMP ?PRG95
+
+
+ .FUNCT ACLAUSE-WIN,ADJ,X
+ GET P-OTBL,P-VERB
+ PUT P-ITBL,P-VERB,STACK
+ ADD P-ACLAUSE,1 >X
+ CALL CLAUSE-COPY,P-OTBL,P-OTBL,P-ACLAUSE,X,P-ACLAUSE,X,ADJ
+ GET P-OTBL,P-NC2
+ ZERO? STACK /?ELS2
+ SET 'P-NCN,2
+?ELS2: SET 'P-ACLAUSE,FALSE-VALUE
+ RTRUE
+
+
+ .FUNCT NCLAUSE-WIN
+ ADD P-ACLAUSE,1
+ CALL CLAUSE-COPY,P-ITBL,P-OTBL,P-NC1,P-NC1L,P-ACLAUSE,STACK
+ GET P-OTBL,P-NC2
+ ZERO? STACK /?ELS2
+ SET 'P-NCN,2
+?ELS2: SET 'P-ACLAUSE,FALSE-VALUE
+ RTRUE
+
+
+ .FUNCT WORD-PRINT,CNT,BUF
+?PRG1: DLESS? 'CNT,0 /TRUE
+ GETB P-INBUF,BUF
+ PRINTC STACK
+ INC 'BUF
+ JUMP ?PRG1
+
+
+ .FUNCT UNKNOWN-WORD,PTR,BUF,MSG,?TMP1
+ PUT OOPS-TABLE,O-PTR,PTR
+ CALL2 PICK-ONE,UNKNOWN-MSGS >MSG
+ GET MSG,0
+ PRINT STACK
+ MUL PTR,2 >BUF
+ ADD P-LEXV,BUF
+ GETB STACK,2 >?TMP1
+ ADD P-LEXV,BUF
+ GETB STACK,3
+ CALL WORD-PRINT,?TMP1,STACK
+ SET 'QUOTE-FLAG,FALSE-VALUE
+ SET 'P-OFLAG,FALSE-VALUE
+ GET MSG,1
+ PRINT STACK
+ CRLF
+ RTRUE
+
+
+ .FUNCT CANT-USE,PTR,BUF,?TMP1
+ SET 'QUOTE-FLAG,FALSE-VALUE
+ SET 'P-OFLAG,FALSE-VALUE
+ PRINTI "(Sorry, but I don't understand the word """
+ MUL PTR,2 >BUF
+ ADD P-LEXV,BUF
+ GETB STACK,2 >?TMP1
+ ADD P-LEXV,BUF
+ GETB STACK,3
+ CALL WORD-PRINT,?TMP1,STACK
+ PRINTR """ when you use it that way.)"
+
+
+ .FUNCT SYNTAX-CHECK,SYN,LEN,NUM,OBJ,DRIVE1=0,DRIVE2=0,PREP,VERB,?TMP2,?TMP1
+ GET P-ITBL,P-VERB >VERB
+ ZERO? VERB \?CND1
+ CALL1 MISSING-VERB
+ RFALSE
+?CND1: SUB 255,VERB
+ GET VERBS,STACK >SYN
+ GETB SYN,0 >LEN
+ ADD 1,SYN >SYN
+?PRG4: GETB SYN,P-SBITS
+ BAND STACK,P-SONUMS >NUM
+ GRTR? P-NCN,NUM \?ELS8
+ JUMP ?CND6
+?ELS8: LESS? NUM,1 /?ELS10
+ ZERO? P-NCN \?ELS10
+ GET P-ITBL,P-PREP1 >PREP
+ ZERO? PREP /?THN13
+ GETB SYN,P-SPREP1
+ EQUAL? PREP,STACK \?ELS10
+?THN13: SET 'DRIVE1,SYN
+ JUMP ?CND6
+?ELS10: GETB SYN,P-SPREP1 >?TMP1
+ GET P-ITBL,P-PREP1
+ EQUAL? ?TMP1,STACK \?CND6
+ EQUAL? NUM,2 \?ELS19
+ EQUAL? P-NCN,1 \?ELS19
+ SET 'DRIVE2,SYN
+ JUMP ?CND6
+?ELS19: GETB SYN,P-SPREP2 >?TMP1
+ GET P-ITBL,P-PREP2
+ EQUAL? ?TMP1,STACK \?CND6
+ CALL2 SYNTAX-FOUND,SYN
+ RTRUE
+?CND6: DLESS? 'LEN,1 \?ELS26
+ ZERO? DRIVE1 \?REP5
+ ZERO? DRIVE2 /?ELS29
+ JUMP ?REP5
+?ELS29: CALL1 DONT-UNDERSTAND
+ RFALSE
+?ELS26: ADD SYN,P-SYNLEN >SYN
+ JUMP ?PRG4
+?REP5: ZERO? DRIVE1 /?ELS40
+ GETB DRIVE1,P-SFWIM1 >?TMP2
+ GETB DRIVE1,P-SLOC1 >?TMP1
+ GETB DRIVE1,P-SPREP1
+ CALL GWIM,?TMP2,?TMP1,STACK >OBJ
+ ZERO? OBJ /?ELS40
+ PUT P-PRSO,P-MATCHLEN,1
+ PUT P-PRSO,1,OBJ
+ CALL2 SYNTAX-FOUND,DRIVE1
+ RSTACK
+?ELS40: ZERO? DRIVE2 /?ELS44
+ GETB DRIVE2,P-SFWIM2 >?TMP2
+ GETB DRIVE2,P-SLOC2 >?TMP1
+ GETB DRIVE2,P-SPREP2
+ CALL GWIM,?TMP2,?TMP1,STACK >OBJ
+ ZERO? OBJ /?ELS44
+ PUT P-PRSI,P-MATCHLEN,1
+ PUT P-PRSI,1,OBJ
+ CALL2 SYNTAX-FOUND,DRIVE2
+ RSTACK
+?ELS44: EQUAL? VERB,ACT?FIND,ACT?NAME \?ELS48
+ PRINTI "(Sorry, but I can't answer that question.)"
+ CRLF
+ RFALSE
+?ELS48: EQUAL? WINNER,PLAYER \?ELS55
+ CALL ORPHAN,DRIVE1,DRIVE2
+ PRINTI "(Wh"
+ JUMP ?CND53
+?ELS55: PRINTI "(Your command was not complete. Next time, type wh"
+?CND53: EQUAL? VERB,ACT?WALK,ACT?HEAD \?ELS64
+ PRINTI "ere"
+ JUMP ?CND62
+?ELS64: ZERO? DRIVE1 /?ELS72
+ GETB DRIVE1,P-SFWIM1
+ EQUAL? STACK,PERSONBIT /?THN69
+?ELS72: ZERO? DRIVE2 /?ELS68
+ GETB DRIVE2,P-SFWIM2
+ EQUAL? STACK,PERSONBIT \?ELS68
+?THN69: PRINTI "om"
+ JUMP ?CND62
+?ELS68: PRINTI "at"
+?CND62: EQUAL? WINNER,PLAYER \?ELS83
+ PRINTI " do you want to "
+ JUMP ?CND81
+?ELS83: PRINTI " you want"
+ CALL2 HIM-HER-IT,WINNER
+ PRINTI " to "
+?CND81: CALL1 VERB-PRINT
+ ZERO? DRIVE2 /?CND90
+ CALL CLAUSE-PRINT,P-NC1,P-NC1L
+?CND90: SET 'P-END-ON-PREP,FALSE-VALUE
+ ZERO? DRIVE1 /?ELS98
+ GETB DRIVE1,P-SPREP1
+ JUMP ?CND94
+?ELS98: GETB DRIVE2,P-SPREP2
+?CND94: CALL2 PREP-PRINT,STACK
+ EQUAL? WINNER,PLAYER \?ELS104
+ SET 'P-OFLAG,TRUE-VALUE
+ PRINTI "?)"
+ CRLF
+ RFALSE
+?ELS104: SET 'P-OFLAG,FALSE-VALUE
+ PRINTI ".)"
+ CRLF
+ RFALSE
+
+
+ .FUNCT DONT-UNDERSTAND
+ PRINTR "(Sorry, but I don't understand. Please reword that or try something else.)"
+
+
+ .FUNCT VERB-PRINT,TMP,?TMP1
+ GET P-ITBL,P-VERBN >TMP
+ ZERO? TMP \?ELS5
+ PRINTI "tell"
+ RTRUE
+?ELS5: GETB P-VTBL,2
+ ZERO? STACK \?ELS9
+ GET TMP,0
+ PRINTB STACK
+ RTRUE
+?ELS9: GETB TMP,2 >?TMP1
+ GETB TMP,3
+ CALL WORD-PRINT,?TMP1,STACK
+ PUTB P-VTBL,2,0
+ RTRUE
+
+
+ .FUNCT ORPHAN,D1,D2,CNT=-1
+ ZERO? P-MERGED \?CND1
+ PUT P-OCLAUSE,P-MATCHLEN,0
+?CND1: GET P-VTBL,0
+ PUT P-OVTBL,0,STACK
+ GETB P-VTBL,2
+ PUTB P-OVTBL,2,STACK
+ GETB P-VTBL,3
+ PUTB P-OVTBL,3,STACK
+?PRG4: IGRTR? 'CNT,P-ITBLLEN \?ELS8
+ JUMP ?REP5
+?ELS8: GET P-ITBL,CNT
+ PUT P-OTBL,CNT,STACK
+ JUMP ?PRG4
+?REP5: EQUAL? P-NCN,2 \?CND11
+ CALL CLAUSE-COPY,P-ITBL,P-OTBL,P-NC2,P-NC2L,P-NC2,P-NC2L
+?CND11: LESS? P-NCN,1 /?CND14
+ CALL CLAUSE-COPY,P-ITBL,P-OTBL,P-NC1,P-NC1L,P-NC1,P-NC1L
+?CND14: ZERO? D1 /?ELS21
+ GETB D1,P-SPREP1
+ PUT P-OTBL,P-PREP1,STACK
+ PUT P-OTBL,P-NC1,1
+ RTRUE
+?ELS21: ZERO? D2 /FALSE
+ GETB D2,P-SPREP2
+ PUT P-OTBL,P-PREP2,STACK
+ PUT P-OTBL,P-NC2,1
+ RTRUE
+
+
+ .FUNCT CLAUSE-PRINT,BPTR,EPTR,THE?=1,?TMP1
+ GET P-ITBL,BPTR >?TMP1
+ GET P-ITBL,EPTR
+ CALL BUFFER-PRINT,?TMP1,STACK,THE?
+ RSTACK
+
+
+ .FUNCT BUFFER-PRINT,BEG,END,CP,NOSP=0,WRD,FIRST??=1,PN=0,?TMP1
+?PRG1: EQUAL? BEG,END /TRUE
+ ZERO? NOSP /?ELS10
+ SET 'NOSP,FALSE-VALUE
+ JUMP ?CND8
+?ELS10: PRINTI " "
+?CND8: GET BEG,0 >WRD
+ EQUAL? WRD,W?HIM \?ELS22
+ CALL2 VISIBLE?,P-HIM-OBJECT
+ ZERO? STACK /?THN19
+?ELS22: EQUAL? WRD,W?HER \?ELS24
+ CALL2 VISIBLE?,P-HER-OBJECT
+ ZERO? STACK /?THN19
+?ELS24: EQUAL? WRD,W?THEM \?CND16
+ CALL2 VISIBLE?,P-THEM-OBJECT
+ ZERO? STACK \?CND16
+?THN19: SET 'PN,TRUE-VALUE
+?CND16: EQUAL? WRD,W?PERIOD \?ELS29
+ SET 'NOSP,TRUE-VALUE
+ JUMP ?CND3
+?ELS29: CALL WT?,WRD,PS?BUZZ-WORD
+ ZERO? STACK \?THN34
+ CALL WT?,WRD,PS?PREPOSITION
+ ZERO? STACK /?ELS31
+?THN34: CALL WT?,WRD,PS?ADJECTIVE
+ ZERO? STACK \?ELS31
+ CALL WT?,WRD,PS?OBJECT
+ ZERO? STACK \?ELS31
+ SET 'NOSP,TRUE-VALUE
+ JUMP ?CND3
+?ELS31: EQUAL? WRD,W?ME \?ELS37
+ PRINTD PLAYER
+ SET 'PN,TRUE-VALUE
+ JUMP ?CND3
+?ELS37: CALL2 CAPITAL-NOUN?,WRD
+ ZERO? STACK /?ELS39
+ CALL2 CAPITALIZE,BEG
+ SET 'PN,TRUE-VALUE
+ JUMP ?CND3
+?ELS39: ZERO? FIRST?? /?CND42
+ ZERO? PN \?CND42
+ ZERO? CP /?CND42
+ PRINTI "the "
+?CND42: ZERO? P-OFLAG \?THN52
+ ZERO? P-MERGED /?ELS51
+?THN52: PRINTB WRD
+ JUMP ?CND49
+?ELS51: EQUAL? WRD,W?IT \?ELS55
+ CALL2 VISIBLE?,P-IT-OBJECT
+ ZERO? STACK /?ELS55
+ PRINTD P-IT-OBJECT
+ JUMP ?CND49
+?ELS55: EQUAL? WRD,W?HER \?ELS59
+ ZERO? PN \?ELS59
+ PRINTD P-HER-OBJECT
+ JUMP ?CND49
+?ELS59: EQUAL? WRD,W?THEM \?ELS63
+ ZERO? PN \?ELS63
+ PRINTD P-THEM-OBJECT
+ JUMP ?CND49
+?ELS63: EQUAL? WRD,W?HIM \?ELS67
+ ZERO? PN \?ELS67
+ PRINTD P-HIM-OBJECT
+ JUMP ?CND49
+?ELS67: GETB BEG,2 >?TMP1
+ GETB BEG,3
+ CALL WORD-PRINT,?TMP1,STACK
+?CND49: SET 'FIRST??,FALSE-VALUE
+?CND3: ADD BEG,P-WORDLEN >BEG
+ JUMP ?PRG1
+
+
+ .FUNCT CAPITAL-NOUN?,WRD
+ EQUAL? WRD,W?FRBZ,W?GRNZ,W?GOLA /TRUE
+ EQUAL? WRD,W?KNUT,W?HRNG,W?WIEN /TRUE
+ RFALSE
+
+
+ .FUNCT CAPITALIZE,PTR,?TMP1
+ ZERO? P-OFLAG \?THN6
+ ZERO? P-MERGED /?ELS5
+?THN6: GET PTR,0
+ PRINTB STACK
+ RTRUE
+?ELS5: GETB PTR,3
+ GETB P-INBUF,STACK
+ SUB STACK,32
+ PRINTC STACK
+ GETB PTR,2
+ SUB STACK,1 >?TMP1
+ GETB PTR,3
+ ADD STACK,1
+ CALL WORD-PRINT,?TMP1,STACK
+ RSTACK
+
+
+ .FUNCT PREP-PRINT,PREP,SP?=1,WRD
+ ZERO? PREP /FALSE
+ ZERO? P-END-ON-PREP \FALSE
+ ZERO? SP? /?CND8
+ PRINTI " "
+?CND8: CALL2 PREP-FIND,PREP >WRD
+ PRINTB WRD
+ GET P-ITBL,P-VERBN
+ GET STACK,0
+ EQUAL? STACK,W?SIT,W?LIE \?CND17
+ EQUAL? W?DOWN,WRD \?CND17
+ PRINTI " on"
+?CND17: GET P-ITBL,P-VERBN
+ GET STACK,0
+ EQUAL? W?GET,STACK \TRUE
+ EQUAL? W?OUT,WRD \TRUE
+ PRINTI " of"
+ RTRUE
+
+
+ .FUNCT CLAUSE-COPY,SRC,DEST,SRCBEG,SRCEND,DESTBEG,DESTEND,INSRT=0,BEG,END
+ GET SRC,SRCBEG >BEG
+ GET SRC,SRCEND >END
+ GET P-OCLAUSE,P-MATCHLEN
+ MUL STACK,P-LEXELEN
+ ADD STACK,2
+ ADD P-OCLAUSE,STACK
+ PUT DEST,DESTBEG,STACK
+?PRG1: EQUAL? BEG,END \?ELS5
+ GET P-OCLAUSE,P-MATCHLEN
+ MUL STACK,P-LEXELEN
+ ADD 2,STACK
+ ADD P-OCLAUSE,STACK
+ PUT DEST,DESTEND,STACK
+ RTRUE
+?ELS5: ZERO? INSRT /?CND8
+ GET BEG,0
+ EQUAL? P-ANAM,STACK \?CND8
+ CALL2 CLAUSE-ADD,INSRT
+?CND8: GET BEG,0
+ CALL2 CLAUSE-ADD,STACK
+?CND3: ADD BEG,P-WORDLEN >BEG
+ JUMP ?PRG1
+
+
+ .FUNCT CLAUSE-ADD,WRD,PTR
+ GET P-OCLAUSE,P-MATCHLEN
+ ADD STACK,2 >PTR
+ SUB PTR,1
+ PUT P-OCLAUSE,STACK,WRD
+ PUT P-OCLAUSE,PTR,0
+ PUT P-OCLAUSE,P-MATCHLEN,PTR
+ RTRUE
+
+
+ .FUNCT PREP-FIND,PREP,CNT=0,SIZE
+ GET PREPOSITIONS,0
+ MUL STACK,2 >SIZE
+?PRG1: IGRTR? 'CNT,SIZE /FALSE
+ GET PREPOSITIONS,CNT
+ EQUAL? STACK,PREP \?PRG1
+ SUB CNT,1
+ GET PREPOSITIONS,STACK
+ RETURN STACK
+
+
+ .FUNCT SYNTAX-FOUND,SYN
+ SET 'P-SYNTAX,SYN
+ GETB SYN,P-SACTION >PRSA
+ RETURN PRSA
+
+
+ .FUNCT GWIM,GBIT,LBIT,PREP,OBJ
+ EQUAL? GBIT,RMUNGBIT \?CND1
+ RETURN ROOMS
+?CND1: SET 'P-GWIMBIT,GBIT
+ SET 'P-SLOCBITS,LBIT
+ PUT P-MERGE,P-MATCHLEN,0
+ CALL GET-OBJECT,P-MERGE,FALSE-VALUE
+ ZERO? STACK /?ELS8
+ SET 'P-GWIMBIT,0
+ GET P-MERGE,P-MATCHLEN
+ EQUAL? STACK,1 \FALSE
+ GET P-MERGE,1 >OBJ
+ PRINTI "("
+ CALL PREP-PRINT,PREP,FALSE-VALUE
+ ZERO? STACK /?CND16
+ CALL2 THE?,OBJ
+ PRINTI " "
+?CND16: PRINTD OBJ
+ PRINTI ")"
+ CRLF
+ RETURN OBJ
+?ELS8: SET 'P-GWIMBIT,0
+ RFALSE
+
+
+ .FUNCT SNARF-OBJECTS,PTR
+ GET P-ITBL,P-NC1 >PTR
+ ZERO? PTR /?CND1
+ GETB P-SYNTAX,P-SLOC1 >P-SLOCBITS
+ GET P-ITBL,P-NC1L
+ CALL SNARFEM,PTR,STACK,P-PRSO
+ ZERO? STACK /FALSE
+ GET P-BUTS,P-MATCHLEN
+ ZERO? STACK /?CND1
+ CALL2 BUT-MERGE,P-PRSO >P-PRSO
+?CND1: GET P-ITBL,P-NC2 >PTR
+ ZERO? PTR /TRUE
+ GETB P-SYNTAX,P-SLOC2 >P-SLOCBITS
+ GET P-ITBL,P-NC2L
+ CALL SNARFEM,PTR,STACK,P-PRSI
+ ZERO? STACK /FALSE
+ GET P-BUTS,P-MATCHLEN
+ ZERO? STACK /TRUE
+ GET P-PRSI,P-MATCHLEN
+ EQUAL? STACK,1 \?ELS18
+ CALL2 BUT-MERGE,P-PRSO >P-PRSO
+ RTRUE
+?ELS18: CALL2 BUT-MERGE,P-PRSI >P-PRSI
+ RTRUE
+
+
+ .FUNCT BUT-MERGE,TBL,LEN,BUTLEN,CNT=1,MATCHES=0,OBJ,NTBL
+ GET TBL,P-MATCHLEN >LEN
+ PUT P-MERGE,P-MATCHLEN,0
+?PRG1: DLESS? 'LEN,0 \?ELS5
+ JUMP ?REP2
+?ELS5: GET TBL,CNT >OBJ
+ CALL ZMEMQ,OBJ,P-BUTS
+ ZERO? STACK /?ELS7
+ JUMP ?CND3
+?ELS7: ADD MATCHES,1
+ PUT P-MERGE,STACK,OBJ
+ INC 'MATCHES
+?CND3: INC 'CNT
+ JUMP ?PRG1
+?REP2: PUT P-MERGE,P-MATCHLEN,MATCHES
+ SET 'NTBL,P-MERGE
+ SET 'P-MERGE,TBL
+ RETURN NTBL
+
+
+ .FUNCT SNARFEM,PTR,EPTR,TBL,BUT=0,LEN,WV,WRD,NW,WAS-ALL=0,ONEOBJ
+ SET 'P-AND,FALSE-VALUE
+ EQUAL? P-GETFLAGS,P-ALL \?CND1
+ SET 'WAS-ALL,TRUE-VALUE
+?CND1: SET 'P-GETFLAGS,0
+ PUT P-BUTS,P-MATCHLEN,0
+ PUT TBL,P-MATCHLEN,0
+ GET PTR,0 >WRD
+?PRG4: EQUAL? PTR,EPTR \?ELS8
+ ZERO? BUT /?ORP12
+ PUSH BUT
+ JUMP ?THN9
+?ORP12: PUSH TBL
+?THN9: CALL2 GET-OBJECT,STACK >WV
+ ZERO? WAS-ALL /?CND13
+ SET 'P-GETFLAGS,P-ALL
+?CND13: RETURN WV
+?ELS8: GET PTR,P-LEXELEN >NW
+ EQUAL? WRD,W?ALL,W?BOTH \?ELS21
+ SET 'P-GETFLAGS,P-ALL
+ EQUAL? NW,W?OF \?CND19
+ ADD PTR,P-WORDLEN >PTR
+ JUMP ?CND19
+?ELS21: EQUAL? WRD,W?BUT,W?EXCEPT \?ELS26
+ ZERO? BUT /?ORP32
+ PUSH BUT
+ JUMP ?THN29
+?ORP32: PUSH TBL
+?THN29: CALL2 GET-OBJECT,STACK
+ ZERO? STACK /FALSE
+ SET 'BUT,P-BUTS
+ PUT BUT,P-MATCHLEN,0
+ JUMP ?CND6
+?ELS26: CALL2 BUZZER-WORD?,WRD
+ ZERO? STACK \FALSE
+ EQUAL? WRD,W?A,W?ONE \?ELS36
+ ZERO? P-ADJ \?ELS39
+ SET 'P-GETFLAGS,P-ONE
+ EQUAL? NW,W?OF \?CND6
+ ADD PTR,P-WORDLEN >PTR
+ JUMP ?CND6
+?ELS39: SET 'P-NAM,ONEOBJ
+ ZERO? BUT /?ORP50
+ PUSH BUT
+ JUMP ?THN47
+?ORP50: PUSH TBL
+?THN47: CALL2 GET-OBJECT,STACK
+ ZERO? STACK /FALSE
+ ZERO? NW /TRUE
+ JUMP ?CND6
+?ELS36: EQUAL? WRD,W?AND,W?COMMA \?ELS54
+ EQUAL? NW,W?AND,W?COMMA /?ELS54
+ SET 'P-AND,TRUE-VALUE
+ ZERO? BUT /?ORP62
+ PUSH BUT
+ JUMP ?THN59
+?ORP62: PUSH TBL
+?THN59: CALL2 GET-OBJECT,STACK
+ ZERO? STACK \?CND19
+ RFALSE
+?ELS54: CALL WT?,WRD,PS?BUZZ-WORD
+ ZERO? STACK /?ELS64
+ JUMP ?CND6
+?ELS64: EQUAL? WRD,W?AND,W?COMMA \?ELS66
+ JUMP ?CND6
+?ELS66: EQUAL? WRD,W?OF \?ELS68
+ ZERO? P-GETFLAGS \?CND19
+ SET 'P-GETFLAGS,P-INHIBIT
+ JUMP ?CND19
+?ELS68: CALL WT?,WRD,PS?ADJECTIVE
+ ZERO? STACK /?ELS73
+ ZERO? P-ADJ \?ELS73
+ SET 'P-ADJ,WRD
+ JUMP ?CND6
+?ELS73: CALL WT?,WRD,PS?OBJECT
+ ZERO? STACK /?CND6
+ SET 'P-NAM,WRD
+ SET 'ONEOBJ,WRD
+?CND19:
+?CND6: EQUAL? PTR,EPTR /?PRG4
+ ADD PTR,P-WORDLEN >PTR
+ SET 'WRD,NW
+ JUMP ?PRG4
+
+
+ .FUNCT GET-OBJECT,TBL,VRB=1,BTS,LEN,XBITS,TLEN,GCHECK=0,OLEN=0,OBJ,ADJ
+ SET 'XBITS,P-SLOCBITS
+ GET TBL,P-MATCHLEN >TLEN
+ BTST P-GETFLAGS,P-INHIBIT /TRUE
+ SET 'ADJ,P-ADJ
+ ZERO? P-NAM \?CND4
+ ZERO? P-ADJ /?CND4
+ CALL WT?,P-ADJ,PS?OBJECT
+ ZERO? STACK /?ELS11
+ SET 'P-NAM,P-ADJ
+ SET 'P-ADJ,FALSE-VALUE
+ JUMP ?CND4
+?ELS11: CALL WT?,P-ADJ,PS?DIRECTION,P1?DIRECTION >BTS
+ ZERO? BTS /?CND4
+ SET 'P-ADJ,FALSE-VALUE
+ PUT TBL,P-MATCHLEN,1
+ PUT TBL,1,INTDIR
+ SET 'P-DIRECTION,BTS
+ RTRUE
+?CND4: ZERO? P-NAM \?CND14
+ ZERO? P-ADJ \?CND14
+ EQUAL? P-GETFLAGS,P-ALL /?CND14
+ ZERO? P-GWIMBIT \?CND14
+ ZERO? VRB /FALSE
+ CALL2 MISSING-NOUN,ADJ
+ RFALSE
+?CND14: EQUAL? P-GETFLAGS,P-ALL \?THN26
+ ZERO? P-SLOCBITS \?CND23
+?THN26: SET 'P-SLOCBITS,-1
+?CND23:
+?PRG28: ZERO? GCHECK /?ELS32
+ CALL2 GLOBAL-CHECK,TBL
+ JUMP ?CND30
+?ELS32: ZERO? LIT /?CND36
+ FCLEAR PLAYER,TRANSBIT
+ CALL DO-SL,HERE,SOG,SIR,TBL
+ FSET PLAYER,TRANSBIT
+?CND36: CALL DO-SL,PLAYER,SH,SC,TBL
+?CND30: GET TBL,P-MATCHLEN
+ SUB STACK,TLEN >LEN
+ BTST P-GETFLAGS,P-ALL \?ELS42
+ JUMP ?CND40
+?ELS42: BTST P-GETFLAGS,P-ONE \?ELS44
+ ZERO? LEN /?ELS44
+ EQUAL? LEN,1 /?CND47
+ RANDOM LEN
+ GET TBL,STACK
+ PUT TBL,1,STACK
+ PRINTI "(How about"
+ GET TBL,1
+ CALL2 PRINTT,STACK
+ PRINTI "?)"
+ CRLF
+?CND47: PUT TBL,P-MATCHLEN,1
+ JUMP ?CND40
+?ELS44: GRTR? LEN,1 /?THN54
+ ZERO? LEN \?ELS53
+ EQUAL? P-SLOCBITS,-1 /?ELS53
+?THN54: EQUAL? P-SLOCBITS,-1 \?ELS60
+ SET 'P-SLOCBITS,XBITS
+ SET 'OLEN,LEN
+ GET TBL,P-MATCHLEN
+ SUB STACK,LEN
+ PUT TBL,P-MATCHLEN,STACK
+ JUMP ?PRG28
+?ELS60: ZERO? LEN \?CND63
+ SET 'LEN,OLEN
+?CND63: ZERO? P-NAM /?ELS68
+ ADD TLEN,1
+ GET TBL,STACK >OBJ
+ ZERO? OBJ /?ELS68
+ GETP OBJ,P?GENERIC
+ CALL STACK,TBL >OBJ
+ ZERO? OBJ /?ELS68
+ EQUAL? OBJ,NOT-HERE-OBJECT /FALSE
+ PUT TBL,1,OBJ
+ PUT TBL,P-MATCHLEN,1
+ SET 'P-NAM,FALSE-VALUE
+ SET 'P-ADJ,FALSE-VALUE
+ RTRUE
+?ELS68: ZERO? VRB /?ELS75
+ EQUAL? WINNER,PLAYER /?ELS75
+ CALL1 CANT-ORPHAN
+ RFALSE
+?ELS75: ZERO? VRB /?ELS79
+ ZERO? P-NAM /?ELS79
+ CALL WHICH-PRINT,TLEN,LEN,TBL
+ EQUAL? TBL,P-PRSO \?ELS86
+ PUSH P-NC1
+ JUMP ?CND82
+?ELS86: PUSH P-NC2
+?CND82: SET 'P-ACLAUSE,STACK
+ SET 'P-AADJ,P-ADJ
+ SET 'P-ANAM,P-NAM
+ CALL ORPHAN,FALSE-VALUE,FALSE-VALUE
+ SET 'P-OFLAG,TRUE-VALUE
+ JUMP ?CND66
+?ELS79: ZERO? VRB /?CND66
+ CALL2 MISSING-NOUN,ADJ
+?CND66: SET 'P-NAM,FALSE-VALUE
+ SET 'P-ADJ,FALSE-VALUE
+ RFALSE
+?ELS53: ZERO? LEN \?ELS93
+ ZERO? GCHECK /?ELS93
+ ZERO? VRB /?CND96
+ SET 'P-SLOCBITS,XBITS
+ ZERO? LIT \?THN103
+ CALL1 SPEAKING-VERB?
+ ZERO? STACK /?ELS102
+?THN103: CALL OBJ-FOUND,NOT-HERE-OBJECT,TBL
+ SET 'P-XNAM,P-NAM
+ SET 'P-NAM,FALSE-VALUE
+ SET 'P-XADJ,P-ADJ
+ SET 'P-ADJ,FALSE-VALUE
+ RTRUE
+?ELS102: CALL1 TOO-DARK
+?CND96: SET 'P-NAM,FALSE-VALUE
+ SET 'P-ADJ,FALSE-VALUE
+ RFALSE
+?ELS93: ZERO? LEN \?CND40
+ SET 'GCHECK,TRUE-VALUE
+ JUMP ?PRG28
+?CND40: ZERO? P-ADJ /?CND111
+ ZERO? P-NAM \?CND111
+ PRINT I-ASSUME
+ ADD TLEN,1
+ GET TBL,STACK
+ CALL2 PRINTT,STACK
+ PRINTI ".)"
+ CRLF
+?CND111: SET 'P-SLOCBITS,XBITS
+ SET 'P-NAM,FALSE-VALUE
+ SET 'P-ADJ,FALSE-VALUE
+ RTRUE
+
+
+ .FUNCT SPEAKING-VERB?,V=0
+ ZERO? V \?CND1
+ SET 'V,PRSA
+?CND1: EQUAL? V,V?$CALL,V?ASK,V?ASK-ABOUT /TRUE
+ EQUAL? V,V?ASK-FOR,V?GOODBYE,V?HELLO /TRUE
+ EQUAL? V,V?NO,V?TELL,V?TELL-ABOUT /TRUE
+ EQUAL? V,V?YES,V?TALK-ABOUT,V?ANSWER /TRUE
+ EQUAL? V,V?ASK-CONTEXT-ABOUT,V?ASK-CONTEXT-FOR,V?REPLY /TRUE
+ RFALSE
+
+
+ .FUNCT CANT-ORPHAN
+ PRINTI "(Please try saying that another way.)"
+ CRLF
+ RFALSE
+
+
+ .FUNCT MISSING-NOUN,ADJ
+ PRINTR "(I couldn't find enough nouns in that sentence!)"
+
+
+ .FUNCT MISSING-VERB
+ PRINTR "(I couldn't find a verb in that sentence!)"
+
+
+ .FUNCT MOBY-FIND,TBL,OBJ=1,LEN,FOO
+ SET 'P-NAM,P-XNAM
+ SET 'P-ADJ,P-XADJ
+ PUT TBL,P-MATCHLEN,0
+ GETB 0,18
+ ZERO? STACK /?ELS5
+?PRG6: CALL META-LOC,OBJ,TRUE-VALUE >FOO
+ ZERO? FOO /?CND8
+ CALL2 THIS-IT?,OBJ >FOO
+ ZERO? FOO /?CND8
+ CALL OBJ-FOUND,OBJ,TBL >FOO
+?CND8: IGRTR? 'OBJ,LAST-OBJECT \?PRG6
+ GET TBL,P-MATCHLEN >LEN
+ EQUAL? LEN,1 \?CND16
+ GET TBL,1 >P-MOBY-FOUND
+?CND16: RETURN LEN
+?ELS5: SET 'P-SLOCBITS,-1
+ SET 'P-NAM,P-XNAM
+ SET 'P-ADJ,P-XADJ
+ PUT TBL,P-MATCHLEN,0
+ FIRST? ROOMS >FOO /?KLU37
+?KLU37:
+?PRG21: ZERO? FOO \?ELS25
+ JUMP ?REP22
+?ELS25: CALL SEARCH-LIST,FOO,TBL,P-SRCALL,TRUE-VALUE
+ NEXT? FOO >FOO /?KLU38
+?KLU38: JUMP ?PRG21
+?REP22: CALL DO-SL,LOCAL-GLOBALS,1,1,TBL,TRUE-VALUE
+ CALL SEARCH-LIST,ROOMS,TBL,P-SRCTOP,TRUE-VALUE
+ GET TBL,P-MATCHLEN >LEN
+ EQUAL? LEN,1 \?CND34
+ GET TBL,1 >P-MOBY-FOUND
+?CND34: SET 'P-NAM,FALSE-VALUE
+ SET 'P-ADJ,FALSE-VALUE
+ RETURN LEN
+
+
+ .FUNCT WHICH-PRINT,TLEN,LEN,TBL,OBJ,RLEN
+ SET 'RLEN,LEN
+ PRINTI "(Which"
+ ZERO? P-OFLAG \?THN6
+ ZERO? P-MERGED \?THN6
+ ZERO? P-AND /?ELS5
+?THN6: PRINTI " "
+ PRINTB P-NAM
+ JUMP ?CND3
+?ELS5: EQUAL? TBL,P-PRSO \?ELS11
+ CALL CLAUSE-PRINT,P-NC1,P-NC1L,FALSE-VALUE
+ JUMP ?CND3
+?ELS11: CALL CLAUSE-PRINT,P-NC2,P-NC2L,FALSE-VALUE
+?CND3: PRINTI " do you mean,"
+?PRG16: INC 'TLEN
+ GET TBL,TLEN >OBJ
+ CALL2 PRINTT,OBJ
+ EQUAL? LEN,2 \?ELS22
+ EQUAL? RLEN,2 /?CND23
+ PRINTI ","
+?CND23: PRINTI " or"
+ JUMP ?CND20
+?ELS22: GRTR? LEN,2 \?CND20
+ PRINTI ","
+?CND20: DLESS? 'LEN,1 \?PRG16
+ PRINTR "?)"
+
+
+ .FUNCT GLOBAL-CHECK,TBL,LEN,RMG,RMGL,CNT=0,OBJ,OBITS,FOO
+ GET TBL,P-MATCHLEN >LEN
+ SET 'OBITS,P-SLOCBITS
+ GETPT HERE,P?GLOBAL >RMG
+ ZERO? RMG /?CND1
+ PTSIZE RMG
+ DIV STACK,2
+ SUB STACK,1 >RMGL
+?PRG4: GET RMG,CNT >OBJ
+ FIRST? OBJ \?CND6
+ CALL SEARCH-LIST,OBJ,TBL,P-SRCALL
+?CND6: CALL2 THIS-IT?,OBJ
+ ZERO? STACK /?CND9
+ CALL OBJ-FOUND,OBJ,TBL
+?CND9: IGRTR? 'CNT,RMGL \?PRG4
+?CND1: GET TBL,P-MATCHLEN
+ EQUAL? STACK,LEN \FALSE
+ SET 'P-SLOCBITS,-1
+ CALL DO-SL,GLOBAL-OBJECTS,1,1,TBL
+ SET 'P-SLOCBITS,OBITS
+ GET TBL,P-MATCHLEN
+ ZERO? STACK \FALSE
+ EQUAL? PRSA,V?WALK-TO /?THN30
+ EQUAL? PRSA,V?THROUGH,V?SMELL,V?SEARCH-FOR /?THN30
+ EQUAL? PRSA,V?SEARCH,V?LOOK-INSIDE,V?LEAVE /?THN30
+ EQUAL? PRSA,V?FOLLOW,V?FIND,V?EXAMINE \FALSE
+?THN30: CALL DO-SL,ROOMS,1,1,TBL
+ RSTACK
+
+
+ .FUNCT DO-SL,OBJ,BIT1,BIT2,TBL,MOBY-FLAG=0,BTS
+ ADD BIT1,BIT2
+ BTST P-SLOCBITS,STACK \?ELS5
+ CALL SEARCH-LIST,OBJ,TBL,P-SRCALL,MOBY-FLAG
+ RSTACK
+?ELS5: BTST P-SLOCBITS,BIT1 \?ELS12
+ CALL SEARCH-LIST,OBJ,TBL,P-SRCTOP,MOBY-FLAG
+ RSTACK
+?ELS12: BTST P-SLOCBITS,BIT2 \TRUE
+ CALL SEARCH-LIST,OBJ,TBL,P-SRCBOT,MOBY-FLAG
+ RSTACK
+
+
+ .FUNCT SEARCH-LIST,OBJ,TBL,LVL,MOBY-FLAG=0
+ FIRST? OBJ >OBJ \FALSE
+?PRG6: EQUAL? LVL,P-SRCBOT /?CND8
+ GETPT OBJ,P?SYNONYM
+ ZERO? STACK /?CND8
+ CALL2 THIS-IT?,OBJ
+ ZERO? STACK /?CND8
+ CALL OBJ-FOUND,OBJ,TBL
+?CND8: EQUAL? LVL,P-SRCTOP \?THN18
+ FSET? OBJ,SEARCHBIT /?THN18
+ FSET? OBJ,SURFACEBIT \?CND13
+?THN18: FIRST? OBJ \?CND13
+ ZERO? MOBY-FLAG \?THN20
+ CALL2 SEE-INSIDE?,OBJ
+ ZERO? STACK /?CND13
+?THN20: FSET? OBJ,SURFACEBIT \?ELS26
+ PUSH P-SRCALL
+ JUMP ?CND22
+?ELS26: FSET? OBJ,SEARCHBIT \?ELS28
+ PUSH P-SRCALL
+ JUMP ?CND22
+?ELS28: PUSH P-SRCTOP
+?CND22: CALL SEARCH-LIST,OBJ,TBL,STACK,MOBY-FLAG
+?CND13: NEXT? OBJ >OBJ /?PRG6
+ RTRUE
+
+
+ .FUNCT THIS-IT?,OBJ,SYNS
+ FSET? OBJ,INVISIBLE /FALSE
+ ZERO? P-NAM /?ELS5
+ GETPT OBJ,P?SYNONYM >SYNS
+ ZERO? SYNS /FALSE
+ PTSIZE SYNS
+ DIV STACK,2
+ SUB STACK,1
+ CALL ZMEMQ,P-NAM,SYNS,STACK
+ ZERO? STACK /FALSE
+?ELS5: ZERO? P-ADJ /?ELS11
+ GETPT OBJ,P?ADJECTIVE >SYNS
+ ZERO? SYNS /FALSE
+ PTSIZE SYNS
+ DIV STACK,2
+ SUB STACK,1
+ CALL ZMEMQ,P-ADJ,SYNS,STACK
+ ZERO? STACK /FALSE
+?ELS11: ZERO? P-GWIMBIT /TRUE
+ FSET? OBJ,P-GWIMBIT /TRUE
+ RFALSE
+
+
+ .FUNCT OBJ-FOUND,OBJ,TBL,PTR
+ GET TBL,P-MATCHLEN >PTR
+ ADD PTR,1
+ PUT TBL,STACK,OBJ
+ ADD PTR,1
+ PUT TBL,P-MATCHLEN,STACK
+ RTRUE
+
+
+ .FUNCT TAKE-CHECK
+ GETB P-SYNTAX,P-SLOC1
+ CALL ITAKE-CHECK,P-PRSO,STACK
+ ZERO? STACK /FALSE
+ GETB P-SYNTAX,P-SLOC2
+ CALL ITAKE-CHECK,P-PRSI,STACK
+ RSTACK
+
+
+ .FUNCT ITAKE-CHECK,TBL,BITS,PTR,OBJ,TAKEN
+ GET TBL,P-MATCHLEN >PTR
+ ZERO? PTR /TRUE
+ BTST BITS,SHAVE /?THN8
+ BTST BITS,STAKE \TRUE
+?THN8:
+?PRG10: DLESS? 'PTR,0 /TRUE
+ ADD PTR,1
+ GET TBL,STACK >OBJ
+ EQUAL? OBJ,IT \?ELS17
+ CALL2 ACCESSIBLE?,P-IT-OBJECT
+ ZERO? STACK \?ELS20
+ CALL1 MORE-SPECIFIC
+ RFALSE
+?ELS20: SET 'OBJ,P-IT-OBJECT
+ JUMP ?CND15
+?ELS17: EQUAL? OBJ,HER \?ELS24
+ CALL2 ACCESSIBLE?,P-HER-OBJECT
+ ZERO? STACK \?ELS27
+ CALL1 MORE-SPECIFIC
+ RFALSE
+?ELS27: SET 'OBJ,P-HER-OBJECT
+ JUMP ?CND15
+?ELS24: EQUAL? OBJ,HIM \?ELS31
+ CALL2 ACCESSIBLE?,P-HIM-OBJECT
+ ZERO? STACK \?ELS34
+ CALL1 MORE-SPECIFIC
+ RFALSE
+?ELS34: SET 'OBJ,P-HIM-OBJECT
+ JUMP ?CND15
+?ELS31: EQUAL? OBJ,THEM \?CND15
+ CALL2 ACCESSIBLE?,P-THEM-OBJECT
+ ZERO? STACK \?ELS41
+ CALL1 MORE-SPECIFIC
+ RFALSE
+?ELS41: SET 'OBJ,P-THEM-OBJECT
+?CND15: CALL HELD?,OBJ,WINNER
+ ZERO? STACK \?PRG10
+ SET 'PRSO,OBJ
+ FSET? OBJ,TRYTAKEBIT \?ELS51
+ SET 'TAKEN,TRUE-VALUE
+ JUMP ?CND49
+?ELS51: EQUAL? WINNER,PLAYER /?ELS53
+ SET 'TAKEN,FALSE-VALUE
+ JUMP ?CND49
+?ELS53: BTST BITS,STAKE \?ELS55
+ CALL2 ITAKE,FALSE-VALUE
+ EQUAL? STACK,TRUE-VALUE \?ELS55
+ SET 'TAKEN,FALSE-VALUE
+ JUMP ?CND49
+?ELS55: SET 'TAKEN,TRUE-VALUE
+?CND49: ZERO? TAKEN /?ELS62
+ BTST BITS,SHAVE \?ELS62
+ PRINTI "("
+ CALL HE-SHE-IT,WINNER,TRUE-VALUE,STR?3
+ PRINTI "n't seem to be holding"
+ GET TBL,P-MATCHLEN
+ LESS? 1,STACK \?ELS71
+ PRINTI " those things"
+ JUMP ?CND69