forked from historicalsource/seastalker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
places.zap
865 lines (767 loc) · 19.8 KB
/
places.zap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
.FUNCT DIR-PRINT,DIR,THE?=1,CNT=0
?PRG1: GET DIR-STRINGS,CNT
EQUAL? STACK,DIR \?CND3
ZERO? THE? /?CND6
PRINTI "the "
?CND6: ADD CNT,1
GET DIR-STRINGS,STACK
PRINT STACK
RTRUE
?CND3: INC 'CNT
JUMP ?PRG1
.FUNCT NULL-F,A1,A2
RFALSE
.FUNCT DOOR-ROOM,RM,DR,P=0,TBL
?PRG1: NEXTP RM,P >P
ZERO? P /FALSE
LESS? P,LOW-DIRECTION /FALSE
GETPT RM,P >TBL
PTSIZE TBL
EQUAL? DEXIT,STACK \?PRG1
GETB TBL,DEXITOBJ
EQUAL? DR,STACK \?PRG1
GETB TBL,REXIT
RETURN STACK
.FUNCT FIND-FLAG,RM,FLAG,EXCLUDED=0,O
FIRST? RM >O /?KLU12
?KLU12:
?PRG1: ZERO? O /FALSE
FSET? O,FLAG \?ELS7
EQUAL? O,EXCLUDED /?ELS7
RETURN O
?ELS7: NEXT? O >O /?KLU13
?KLU13: JUMP ?PRG1
.FUNCT META-LOC,OBJ,L
LOC OBJ >L
?PRG1: ZERO? L /FALSE
EQUAL? L,LOCAL-GLOBALS,GLOBAL-OBJECTS \?ELS7
RETURN L
?ELS7: IN? OBJ,ROOMS \?ELS9
RETURN OBJ
?ELS9: SET 'OBJ,L
LOC OBJ >L
JUMP ?PRG1
.FUNCT IN-LAB-AREA?,RM
ZERO? SUB-IN-TANK /?ELS5
EQUAL? RM,SUB,CRAWL-SPACE /TRUE
?ELS5: EQUAL? RM,HALLWAY,LAB-STORAGE,OFFICE /TRUE
CALL IN-LAB?,RM
ZERO? STACK \TRUE
CALL IN-TANK-AREA?,RM
ZERO? STACK \TRUE
RFALSE
.FUNCT IN-LAB?,RM
EQUAL? RM,NORTH-WALL,EAST-WALL,SOUTH-WALL /TRUE
EQUAL? RM,WEST-WALL,CENTER-OF-LAB /TRUE
RFALSE
.FUNCT IN-TANK-AREA?,RM
EQUAL? RM,SOUTH-TANK-AREA,WEST-TANK-AREA,NORTH-TANK-AREA /TRUE
RFALSE
.FUNCT SHARON-PASSES-YOU?,L,?ORTMP
EQUAL? HERE,OFFICE /TRUE
EQUAL? HERE,HALLWAY /?THN8
EQUAL? HERE,LAB-STORAGE \?ELS7
FSET? STORAGE-DOOR,OPENBIT \?ELS7
?THN8: EQUAL? L,OFFICE /FALSE
RTRUE
?ELS7: EQUAL? HERE,LAB-STORAGE \?ELS15
EQUAL? L,LAB-STORAGE /TRUE
RFALSE
?ELS15: CALL IN-LAB?,HERE
ZERO? STACK /?ELS19
EQUAL? L,OFFICE,HALLWAY,LAB-STORAGE /FALSE
RTRUE
?ELS19: CALL IN-TANK-AREA?,HERE
ZERO? STACK /?ELS23
CALL IN-TANK-AREA?,L
POP '?ORTMP
ZERO? ?ORTMP /?ORP27
RETURN ?ORTMP
?ORP27: EQUAL? L,SUB,CRAWL-SPACE /TRUE
RFALSE
?ELS23: EQUAL? HERE,SUB \?ELS29
EQUAL? L,SUB,CRAWL-SPACE /TRUE
RFALSE
?ELS29: EQUAL? L,CRAWL-SPACE /TRUE
RFALSE
.FUNCT RESEARCH-LAB
PRINTI " the "
CALL PRINT-NAME,LAST-NAME
PRINTI " Research Lab"
RTRUE
.FUNCT NORTH-WALL-F,RARG=0
EQUAL? RARG,M-LOOK \?ELS5
PRINTI "You're in the "
PRINTD NORTH-WALL
PRINTI " of "
PRINTD YOUR-LABORATORY
PRINTI ". A "
PRINTD COMPUTESTOR
PRINTR " stands here to help test your inventions."
?ELS5: EQUAL? RARG,M-ENTER \FALSE
CALL VIDEOPHONE-WORKING
ZERO? STACK \TRUE
RFALSE
.FUNCT COMPUTESTOR-F
EQUAL? PRSA,V?LOOK-UNDER,V?LOOK-ON,V?LOOK-INSIDE /FALSE
EQUAL? PRSA,V?LOOK-BEHIND,V?WALK-TO,V?TAKE /FALSE
EQUAL? PRSA,V?EXAMINE \?ELS9
PRINTI "The "
PRINTD COMPUTESTOR
PRINTI " is o"
FSET? COMPUTESTOR,ONBIT \?ELS16
PUSH STR?40
JUMP ?CND12
?ELS16: PUSH STR?41
?CND12: PRINT STACK
PRINTR "."
?ELS9: EQUAL? PRSA,V?LAMP-ON \?ELS20
FSET? COMPUTESTOR,ONBIT /FALSE
FSET COMPUTESTOR,ONBIT
PRINTI "The "
PRINTD COMPUTESTOR
PRINTR " is ready for questions."
?ELS20: CALL REMOTE-VERB?
ZERO? STACK /?ELS29
EQUAL? PRSA,V?ASK-ABOUT \FALSE
EQUAL? PRSO,COMPUTESTOR \FALSE
?ELS29: FSET? COMPUTESTOR,ONBIT /?ELS35
PRINTI "The "
PRINTD COMPUTESTOR
PRINTR " is off!"
?ELS35: EQUAL? PRSA,V?USE,V?ASK \?ELS39
FSET? VIDEOPHONE,MUNGBIT \?ELS44
CALL PERFORM,V?ASK-ABOUT,COMPUTESTOR,VIDEOPHONE
RTRUE
?ELS44: IN? CATALYST-CAPSULE,REACTOR /FALSE
CALL PERFORM,V?ASK-ABOUT,COMPUTESTOR,GLOBAL-SUB
RTRUE
?ELS39: EQUAL? PRSA,V?ASK-ABOUT \FALSE
EQUAL? PRSO,COMPUTESTOR \FALSE
EQUAL? PRSI,CIRCUIT-BREAKER \?ELS57
FSET? CIRCUIT-BREAKER,OPENBIT \?ELS57
PRINTI """A "
PRINTD CIRCUIT-BREAKER
PRINTR " is open."""
?ELS57: EQUAL? PRSI,VIDEOPHONE \?ELS63
FSET? VIDEOPHONE,MUNGBIT \?ELS63
SET 'TIP-SAYS-1,32
SET 'TIP-SAYS-2,VIDEOPHONE
CALL QUEUE,I-TIP-SAYS,3
PUT STACK,0,1
PRINTI """Symptoms: no picture, no sound.
Possible causes:
1) Failure of the "
PRINTD VIDEOPHONE-TRANSMITTER
PRINTI " at source.
2) A short in the "
PRINTD VIDEOPHONE-CABLE
PRINTI " linking "
PRINTD VIDEOPHONE-TRANSMITTER
PRINTI " to"
CALL RESEARCH-LAB
PRINTI ", if signal is coming from "
PRINTD AQUADOME
PRINTI ".
3) Sunspot interference or "
PRINTD VIDEOPHONE-SATELLITE
PRINTI " malfunction if "
PRINTD VIDEOPHONE-TRANSMITTER
PRINTI " is at earth's surface.
4) Failure of the video receiver.
5) Overload in the "
PRINTD ELECTRICAL-CONTROL-PANEL
PRINTI " ("
PRINTD CIRCUIT-BREAKER
PRINTI " popped).
6) Sabotage ("
PRINTD CIRCUIT-BREAKER
PRINTR " open)."""
?ELS63: EQUAL? PRSI,VIDEOPHONE-TRANSMITTER \?ELS71
FSET? VIDEOPHONE,MUNGBIT \?ELS71
PRINTI "Impossible. It's located "
PRINTD UNDERWATER
PRINTI " at the "
PRINTD AQUADOME
PRINTI ", beyond your control. Right now you have no communication with the "
PRINTD AQUADOME
PRINTR "."
?ELS71: EQUAL? PRSI,VIDEOPHONE-CABLE \?ELS77
PRINTR "This can be done only by submarine."
?ELS77: EQUAL? PRSI,VIDEOPHONE-SATELLITE \?ELS81
PRINTI "You're goofing off, "
CALL PRINT-NAME,FIRST-NAME
PRINTI ". Video signals from the "
PRINTD AQUADOME
PRINTI " to"
CALL RESEARCH-LAB
PRINTI " are NOT relayed by a space "
PRINTD VIDEOPHONE-SATELLITE
PRINTR "."
?ELS81: EQUAL? PRSI,VIDEOPHONE-RECEIVER \?ELS87
PRINTI "You can do this by pushing the "
PRINTD TEST-BUTTON
PRINTI " on the "
PRINTD VIDEOPHONE
PRINTR "."
?ELS87: EQUAL? PRSI,REACTOR,GLOBAL-SUB \?ELS91
IN? CATALYST-CAPSULE,REACTOR /?ELS91
PRINTI """Symptom: "
PRINTD ENGINE
PRINTI " won't start.
Possible causes:
1) The "
PRINTD CATALYST-CAPSULE
PRINTI " is not inserted in the "
PRINTD REACTOR
PRINTI ".
2) The "
PRINTD REACTOR
PRINTI " is not turned on.
3) The "
PRINTD TEST-TANK
PRINTR " is not filled."""
?ELS91: PRINTI """This device is designed only to troubleshoot operating problems.""
(Maybe you can find information about"
CALL THE-PRSI-PRINT
PRINTR " in your SEASTALKER package.)"
.FUNCT VIDEOPHONE-TEST-F
EQUAL? PRSA,V?ANALYZE \FALSE
CALL PERFORM,V?ASK-ABOUT,COMPUTESTOR,PRSO
RTRUE
.FUNCT EAST-WALL-F,RARG=0
EQUAL? RARG,M-LOOK \?ELS5
PRINTI "You're in the "
PRINTD EAST-WALL
PRINTI " of "
PRINTD YOUR-LABORATORY
PRINTI ". A doorway leads out through a "
PRINTD HALLWAY
PRINTI " to the office of your "
PRINTD LAB-ASSISTANT
PRINTI ", "
PRINTD GLOBAL-SHARON
PRINTI ". A "
PRINTD MICROWAVE-SECURITY-SCANNER
PRINTI " stands against the wall. An "
PRINTD INTERCOM
PRINTI " sits on the "
PRINTD DESK
PRINTR "."
?ELS5: EQUAL? RARG,M-ENTER \FALSE
CALL VIDEOPHONE-WORKING
ZERO? STACK \TRUE
RFALSE
.FUNCT VIDEOPHONE-WORKING
ZERO? BREAKER-JUST-FIXED /FALSE
FSET? CIRCUIT-BREAKER,OPENBIT /FALSE
SET 'BREAKER-JUST-FIXED,FALSE-VALUE
PRINTI "As you re-enter the lab, "
CALL TIP-SAYS
PRINTI "Look, "
CALL PRINT-NAME,FIRST-NAME
PRINTI "! The "
PRINTD VIDEOPHONE
PRINTR "'s working again! There's a normal test pattern on the screen!"""
.FUNCT MICROWAVE-SECURITY-SCANNER-F
EQUAL? PRSA,V?LAMP-ON \FALSE
PRINTR "No beep occurs. Scanner displays: ""NO INTRUDER PRESENT ON GROUNDS."""
.FUNCT DESK-F
CALL COMMON-DESK-F,DESK
RSTACK
.FUNCT COMMON-DESK-F,OBJ
EQUAL? PRSA,V?OPEN \?ELS5
PRINTR "It has no drawers."
?ELS5: EQUAL? PRSA,V?LOOK-ON,V?LOOK-INSIDE,V?EXAMINE \FALSE
EQUAL? PRSO,OBJ \FALSE
PRINTI "An "
PRINTD INTERCOM
PRINTI " is on the desk"
FIRST? OBJ \?CND14
PRINTI ", as well as "
CALL PRINT-CONTENTS,OBJ
?CND14: PRINTR "."
.FUNCT GENERIC-DESK-F,OBJ
CALL IN-LAB?,HERE
ZERO? STACK /?ELS5
RETURN DESK
?ELS5: EQUAL? HERE,OFFICE \?ELS7
RETURN KEMP-DESK
?ELS7: ZERO? SUB-IN-DOME /FALSE
RETURN BLY-DESK
.FUNCT HALLWAY-F,RARG=0
EQUAL? RARG,M-LOOK \?ELS5
PRINTI "You're in a "
PRINTD HALLWAY
PRINTI ", with "
PRINTD YOUR-LABORATORY
PRINTI " to the west, a "
PRINTD LAB-STORAGE
PRINTI " to the south, and "
PRINTD OFFICE
PRINTI " to the east. An "
PRINTD ELECTRICAL-CONTROL-PANEL
PRINTR " fills most of the north wall."
?ELS5: EQUAL? RARG,M-ENTER \FALSE
FSET? CIRCUIT-BREAKER,MUNGBIT \FALSE
CALL TELL-HINT,31,ELECTRICAL-CONTROL-PANEL,FALSE-VALUE
RSTACK
.FUNCT ELECTRICAL-CONTROL-PANEL-F
EQUAL? PRSA,V?EXAMINE,V?ANALYZE \?ELS5
FSET? CIRCUIT-BREAKER,OPENBIT \?ELS5
CALL THIS-IS-IT,CIRCUIT-BREAKER
PRINTI "A "
PRINTD CIRCUIT-BREAKER
PRINTI " on the "
PRINTD ELECTRICAL-CONTROL-PANEL
PRINTI " is open. This "
PRINTD CIRCUIT-BREAKER
PRINTI " controls the "
PRINTD POWER-SUPPLY
PRINTI " to the "
PRINTD VIDEOPHONE
PRINTI " and other equipment in the private "
PRINTD VIDEOPHONE
PRINTI " network."
CRLF
IN? TIP,HERE \TRUE
CALL TIP-SAYS
PRINTR "How did that happen? You didn't overload the circuit."""
?ELS5: EQUAL? PRSA,V?OPEN \FALSE
PRINTI "You don't need to open the "
PRINTD ELECTRICAL-CONTROL-PANEL
PRINTR "."
.FUNCT CIRCUIT-BREAKER-F,V
EQUAL? PRSA,V?EXAMINE,V?ANALYZE \?ELS5
FSET? PRSO,OPENBIT \?ELS5
CALL TELL-HINT,31,ELECTRICAL-CONTROL-PANEL,FALSE-VALUE
RSTACK
?ELS5: EQUAL? PRSA,V?LAMP-ON,V?TURN,V?MOVE /?THN10
EQUAL? PRSA,V?FIX,V?PUSH,V?CLOSE \?ELS9
?THN10: FSET? PRSO,OPENBIT \?ELS16
FSET PRSO,NDESCBIT
CALL OKAY,CIRCUIT-BREAKER,STR?17
FSET? PRSO,MUNGBIT \TRUE
SET 'BREAKER-JUST-FIXED,TRUE-VALUE
FCLEAR PRSO,MUNGBIT
FCLEAR VIDEOPHONE,MUNGBIT
FSET VIDEOPHONE,ONBIT
CALL SCORE-OBJ,CIRCUIT-BREAKER
RTRUE
?ELS16: CALL ALREADY,CIRCUIT-BREAKER,STR?17
RSTACK
?ELS9: EQUAL? PRSA,V?LAMP-OFF,V?OPEN \FALSE
FSET? PRSO,OPENBIT \?ELS28
CALL ALREADY,CIRCUIT-BREAKER,STR?21
RSTACK
?ELS28: PRINTR "You shouldn't do that."
.FUNCT GENERIC-STORAGE-ROOM-F,OBJ
ZERO? SUB-IN-DOME /?ELS5
RETURN DOME-STORAGE
?ELS5: ZERO? SUB-IN-TANK /FALSE
RETURN LAB-STORAGE
.FUNCT GENERIC-OFFICE-F,OBJ
ZERO? SUB-IN-DOME /?ELS5
RETURN BLY-OFFICE
?ELS5: ZERO? SUB-IN-TANK /FALSE
RETURN OFFICE
.FUNCT OFFICE-F,ARG=0
EQUAL? ARG,M-LOOK \?ELS5
PRINTI "You're in the office of your "
PRINTD LAB-ASSISTANT
PRINTI ", "
PRINTD GLOBAL-SHARON
PRINTI ". There is a desk and chair here, and the "
PRINTD OFFICE-DOOR
PRINTI " leading out to the parking lot. To the west, a "
PRINTD HALLWAY
PRINTI " leads back to "
PRINTD YOUR-LABORATORY
PRINTR "."
?ELS5: IN? SHARON,OFFICE \?ELS9
EQUAL? ARG,M-BEG \?ELS9
CALL EXIT-VERB?
ZERO? STACK /?ELS9
FSET SHARON,NDESCBIT
FSET FILE-DRAWER,NDESCBIT
FSET PAPERS,NDESCBIT
RFALSE
?ELS9: EQUAL? ARG,M-ENTER \FALSE
FCLEAR SHARON,NDESCBIT
FCLEAR FILE-DRAWER,NDESCBIT
FCLEAR PAPERS,NDESCBIT
IN? SHARON,OFFICE \FALSE
CALL THIS-IS-IT,SHARON
CALL THIS-IS-IT,FILE-DRAWER
PRINTI "As you enter, Sharon is hastily going through the contents of an open "
PRINTD FILE-DRAWER
PRINTR ". She turns with a startled expression as you appear in the doorway. Her face is flushed and her manner seems slightly emotional."
.FUNCT OFFICE-DOOR-F
EQUAL? PRSA,V?OPEN \FALSE
PRINTR "There's nothing outside to help your mission!"
.FUNCT PAPERS-F,X
EQUAL? PRSA,V?LOOK-UP \?ELS5
EQUAL? PRSI,PAPERS,FILE-DRAWER \?ELS5
FSET? PRSO,PERSON \?ELS10
GETP LOCAL-SUB,P?TEXT
PRINT STACK
CRLF
JUMP ?CND8
?ELS10: PRINTI "There's no information in the drawer about that."
?CND8: CRLF
RTRUE
?ELS5: EQUAL? PRSA,V?CLOSE \?ELS18
IN? SHARON,OFFICE \?ELS18
PRINTI "Sharon stops you from closing it. ""Hey, "
CALL PRINT-NAME,FIRST-NAME
PRINTR "! I can't do my job here if you interfere!"""
?ELS18: EQUAL? PRSA,V?SEARCH-FOR,V?SEARCH,V?TAKE /?THN25
EQUAL? PRSA,V?READ,V?LOOK-INSIDE,V?EXAMINE \FALSE
?THN25: FSET? FILE-DRAWER,OPENBIT /?CND27
CALL TOO-BAD-BUT,FILE-DRAWER,STR?17
RTRUE
?CND27: FSET PAPERS,TOUCHBIT
PRINTI "You look "
EQUAL? P-ADVERB,W?CAREFULLY \?ELS34
PRINTI "more thoroughly through the drawer and still"
JUMP ?CND32
?ELS34: PRINTI "quickly through the drawer but"
?CND32: PRINTR " find nothing suspicious, so you decide to leave the papers alone."
.FUNCT KEMP-DESK-F
CALL COMMON-DESK-F,KEMP-DESK
RSTACK
.FUNCT SOUTH-WALL-F,RARG=0
EQUAL? RARG,M-LOOK \?ELS5
PRINTI "You're in the "
PRINTD SOUTH-WALL
PRINTI " of "
PRINTD YOUR-LABORATORY
PRINTI ", next to shelves full of chemical and electronic supplies. A door leads south to the "
PRINTD TEST-TANK
PRINTR "."
?ELS5: EQUAL? RARG,M-ENTER \FALSE
CALL VIDEOPHONE-WORKING
ZERO? STACK \TRUE
RFALSE
.FUNCT CHEMICAL-SUPPLY-SHELVES-F
EQUAL? PRSA,V?PUT /?THN6
EQUAL? PRSA,V?LOOK-ON,V?LOOK-INSIDE,V?EXAMINE \FALSE
?THN6: FCLEAR CHEMICALS,NDESCBIT
RFALSE
.FUNCT ELECTRONIC-SUPPLY-SHELVES-F
EQUAL? PRSA,V?PUT /?THN6
EQUAL? PRSA,V?LOOK-ON,V?LOOK-INSIDE,V?EXAMINE \FALSE
?THN6: FCLEAR ELECTRONICS,NDESCBIT
RFALSE
.FUNCT WEST-WALL-F,RARG=0
EQUAL? RARG,M-LOOK \?ELS5
PRINTI "You're in the "
PRINTD WEST-WALL
PRINTI " of "
PRINTD YOUR-LABORATORY
PRINTR ", next to a shelf full of mechanical supplies."
?ELS5: EQUAL? RARG,M-ENTER \FALSE
CALL VIDEOPHONE-WORKING
ZERO? STACK \TRUE
RFALSE
.FUNCT MECHANICAL-SUPPLY-SHELVES-F
EQUAL? PRSA,V?PUT /?THN6
EQUAL? PRSA,V?LOOK-ON,V?LOOK-INSIDE,V?EXAMINE \FALSE
?THN6: FCLEAR MECHANICALS,NDESCBIT
RFALSE
.FUNCT GENERIC-CENTER-F,OBJ
ZERO? SUB-IN-TANK /?ELS5
RETURN CENTER-OF-LAB
?ELS5: ZERO? SUB-IN-DOME /FALSE
RETURN CENTER-OF-DOME
.FUNCT CENTER-OF-LAB-F,RARG=0
EQUAL? RARG,M-BEG \?ELS5
LOC MICROPHONE
EQUAL? STACK,WINNER \?ELS5
CALL EXIT-VERB?
ZERO? STACK /?ELS5
CALL THIS-IS-IT,MICROPHONE
CALL HE-SHE-IT,WINNER,TRUE-VALUE
PRINTI " can't walk away while "
CALL HE-SHE-IT,WINNER,FALSE-VALUE,STR?113
PRINTI " holding the "
PRINTD MICROPHONE
PRINTR "!"
?ELS5: EQUAL? RARG,M-LOOK \?ELS13
PRINTI "You're at your workbench in the center of "
PRINTD YOUR-LABORATORY
PRINTI ", a small part of"
CALL RESEARCH-LAB
PRINTI " in the town of Frobton. The "
PRINTD VIDEOPHONE
PRINTI " screen looms overhead"
ZERO? ALARM-RINGING /?CND18
PRINTI ", with its "
PRINTD ALARM
PRINTI " ringing"
?CND18: PRINTR "."
?ELS13: EQUAL? RARG,M-ENTER \FALSE
CALL VIDEOPHONE-WORKING
ZERO? STACK \TRUE
RFALSE
.FUNCT WORKBENCH-F
EQUAL? PRSA,V?PUT,V?LOOK-ON,V?LOOK-INSIDE /?THN6
EQUAL? PRSA,V?READ,V?EXAMINE,V?ANALYZE \FALSE
?THN6: FCLEAR SUB-PLANS,NDESCBIT
RFALSE
.FUNCT SCREENPLAY
PRINTR "Screenplay by Jim Lawrence"
.FUNCT SUB-PLANS-F,X
EQUAL? PRSA,V?READ,V?EXAMINE,V?ANALYZE \FALSE
PRINTI "Written in one corner is the legend:
"
RANDOM 2 >X
EQUAL? X,1 \?CND8
CALL SCREENPLAY
?CND8: PRINTI " Directed by Stu Galley
"
EQUAL? X,1 /?CND13
CALL SCREENPLAY
?CND13: CRLF
CALL V-VERSION
RSTACK
.FUNCT GENERIC-MICROPHONE-F,OBJ
ZERO? SUB-IN-TANK /?ELS5
RETURN MICROPHONE
?ELS5: ZERO? SUB-IN-DOME /FALSE
RETURN MICROPHONE-DOME
.FUNCT MICROPHONE-F,DOME?=0
EQUAL? PRSA,V?EXAMINE \?ELS5
PRINTI "The "
PRINTD MICROPHONE
PRINTI " is connected to the "
PRINTD VIDEOPHONE
PRINTI " by a coiled cord. At the moment, it is turned o"
ZERO? DOME? /?ELS16
FSET? MICROPHONE-DOME,ONBIT /?THN13
?ELS16: ZERO? DOME? \?ELS12
FSET? MICROPHONE,ONBIT \?ELS12
?THN13: PRINTR "n."
?ELS12: PRINTR "ff."
?ELS5: EQUAL? PRSA,V?LAMP-OFF /?THN29
CALL DIVESTMENT?,MICROPHONE
ZERO? STACK \?THN29
CALL DIVESTMENT?,MICROPHONE-DOME
ZERO? STACK /?ELS26
?THN29: EQUAL? PRSO,MICROPHONE-DOME,MICROPHONE \?ELS26
EQUAL? VIDEOPHONE,REMOTE-PERSON-ON \?ELS26
PRINTI "You'd better say ""Good-bye"" to "
PRINTD REMOTE-PERSON
PRINTR " first."
?ELS26: EQUAL? PRSA,V?SAY-INTO,V?REPLY \?ELS34
FSET? VIDEOPHONE,ONBIT /?ELS34
PRINTI "That won't do any good while the "
PRINTD VIDEOPHONE
PRINTR " is off."
?ELS34: EQUAL? PRSA,V?SAY-INTO \?ELS40
EQUAL? REMOTE-PERSON-ON,VIDEOPHONE \?ELS45
PRINTD REMOTE-PERSON
PRINTR " nods at you."
?ELS45: ZERO? WOMAN-ON-SCREEN /?ELS49
PRINTR "That won't do any good while the sound is fuzzy."
?ELS49: PRINTR "It's not clear whom you're talking to."
?ELS40: EQUAL? PRSA,V?LAMP-ON \FALSE
IN? MICROPHONE,PLAYER /?THN61
IN? MICROPHONE-DOME,PLAYER \FALSE
?THN61: ZERO? DOME? /?ELS69
FSET? MICROPHONE-DOME,ONBIT /?THN66
?ELS69: ZERO? DOME? \?CND63
FSET? MICROPHONE,ONBIT \?CND63
?THN66: CALL ALREADY,MICROPHONE,STR?42
RTRUE
?CND63: ZERO? DOME? /?ELS76
CALL OKAY,MICROPHONE-DOME,STR?42
RSTACK
?ELS76: CALL OKAY,MICROPHONE,STR?42
RSTACK
.FUNCT TECHNICIAN-F
EQUAL? PRSA,V?$CALL /?THN6
EQUAL? PRSA,V?TAKE,V?PHONE,V?FIND \FALSE
?THN6: PRINTI "How can you do that? By telepathy or carrier pigeon? "
IN? SHARON,OFFICE \?CND10
PRINTI "Seriously, your "
PRINTD LAB-ASSISTANT
PRINTI ", "
PRINTD SHARON
PRINTI ", is in her office, which is through a doorway to the east. Or, you could summon her by the "
PRINTD INTERCOM
PRINTI " on your desk."
?CND10: CRLF
RTRUE
.FUNCT GANGPLANK-F
EQUAL? PRSA,V?CLIMB-ON,V?CLIMB-DOWN,V?BOARD \FALSE
CALL DO-WALK,P?SOUTH
RTRUE
.FUNCT GENERIC-TANK-CONTROL-GEAR-F,OBJ
RETURN TANK-CONTROL-GEAR-1
.FUNCT GENERIC-TANK-AREA-F,OBJ
RETURN NORTH-TANK-AREA
.FUNCT TANK-AREA-F,RARG=0
EQUAL? RARG,M-LOOK \FALSE
USL
FSET NORTH-TANK-AREA,TOUCHBIT
FSET WEST-TANK-AREA,TOUCHBIT
FSET SOUTH-TANK-AREA,TOUCHBIT
EQUAL? HERE,NORTH-TANK-AREA \?ELS8
PRINTI "You're at a temporary runway or gangplank that leads from the walkway to the "
PRINTD SUB-DOOR
PRINTI " of the "
PRINTD GLOBAL-SUB
PRINTI ". "
CALL CHECK-DOOR,SUB-DOOR
JUMP ?CND6
?ELS8: EQUAL? HERE,WEST-TANK-AREA \?CND6
PRINTI "You're at a "
PRINTD WORK-COUNTER
PRINTI ", next to the "
PRINTD TANK-CONTROL-GEAR-1
PRINTI " used to operate the "
PRINTD TEST-TANK
PRINTI ".
"
?CND6: PRINTI "The test tank (which is now "
ZERO? TEST-TANK-FULL /?ELS19
PRINTI "filled with "
JUMP ?CND17
?ELS19: PRINTI "empty of "
?CND17: PRINTD GLOBAL-WATER
PRINTI ") is located in a large work room, just south of "
PRINTD YOUR-LABORATORY
PRINTI ", with concrete-block walls on three sides and a high metal roof. Most of its floor is dug out and lined with steel, to form the huge tank used for developing and testing "
PRINTD UNDERWATER
PRINTR " gear and the pilot models of your submarine craft.
There's a walkway around the tank on three sides -- north, west and south. On the east side, a steel gate forms the wall of the room."
.FUNCT FRESH-AIR?,RM,P,L,TBL,O
ZERO? DOME-AIR-BAD? /?CND1
ZERO? SUB-IN-DOME /?CND1
PRINTR "It's impossible to tell that way whether the air is good."
?CND1: SET 'P,0
?PRG8: NEXTP HERE,P >P
ZERO? P /FALSE
LESS? P,LOW-DIRECTION /?PRG8
GETPT HERE,P >TBL
PTSIZE TBL >L
EQUAL? L,DEXIT \?PRG8
GETB TBL,DEXITOBJ >O
FSET? O,OPENBIT \?PRG8
PRINTI "There's a pleasant breeze coming through the "
PRINTD O
PRINTR "."
.FUNCT CORRIDOR-LOOK,ITM=0,C,Z,COR,VAL,FOUND=0
GETP HERE,P?CORRIDOR >C
ZERO? C /FALSE
?PRG6: SUB C,8192 >Z
LESS? Z,0 /?ELS10
SET 'COR,COR-20000
JUMP ?CND8
?ELS10: SUB C,4096 >Z
LESS? Z,0 /?ELS12
SET 'COR,COR-10000
JUMP ?CND8
?ELS12: SUB C,2048 >Z
LESS? Z,0 /?ELS14
SET 'COR,COR-4000
JUMP ?CND8
?ELS14: SUB C,1024 >Z
LESS? Z,0 /?ELS16
SET 'COR,COR-2000
JUMP ?CND8
?ELS16: SUB C,512 >Z
LESS? Z,0 /?ELS18
SET 'COR,COR-1000
JUMP ?CND8
?ELS18: SUB C,256 >Z
LESS? Z,0 /?ELS20
SET 'COR,COR-400
JUMP ?CND8
?ELS20: SUB C,128 >Z
LESS? Z,0 /?ELS22
SET 'COR,COR-200
JUMP ?CND8
?ELS22: SUB C,64 >Z
LESS? Z,0 /?ELS24
SET 'COR,COR-64
JUMP ?CND8
?ELS24: SUB C,32 >Z
LESS? Z,0 /?ELS26
SET 'COR,COR-32
JUMP ?CND8
?ELS26: SUB C,16 >Z
LESS? Z,0 /?ELS28
SET 'COR,COR-16
JUMP ?CND8
?ELS28: SUB C,8 >Z
LESS? Z,0 /?ELS30
SET 'COR,COR-8
JUMP ?CND8
?ELS30: SUB C,4 >Z
LESS? Z,0 /?ELS32
SET 'COR,COR-4
JUMP ?CND8
?ELS32: SUB C,2 >Z
LESS? Z,0 /?ELS34
SET 'COR,COR-2
JUMP ?CND8
?ELS34: SUB C,1 >Z
LESS? Z,0 /?REP7
SET 'COR,COR-1
?CND8: CALL CORRIDOR-CHECK,COR,ITM >VAL
ZERO? FOUND \?CND39
SET 'FOUND,VAL
?CND39: SET 'C,Z
JUMP ?PRG6
?REP7: RETURN FOUND
.FUNCT CORRIDOR-CHECK,COR,ITM,CNT=2,PAST=0,FOUND=0,RM,OBJ
?PRG1: GET COR,CNT >RM
ZERO? RM /FALSE
EQUAL? RM,HERE \?ELS7
SET 'PAST,1
JUMP ?CND3
?ELS7: FIRST? RM >OBJ \?CND3
?PRG10: ZERO? ITM /?ELS14
EQUAL? OBJ,ITM \?CND12
GET COR,PAST >FOUND
JUMP ?REP11
?ELS14: FSET? OBJ,PERSON \?CND12
FSET? OBJ,INVISIBLE /?CND12
FSET? OBJ,NDESCBIT /?CND12
CALL IS-CREW?,OBJ
ZERO? STACK /?ELS25
CALL CREW-5-TOGETHER?
ZERO? STACK /?ELS25
FSET? BLY,MUNGBIT /?ELS25
EQUAL? OBJ,LOWELL \?CND23
PRINTI "The five "
PRINTD CREW
PRINTI " members are off to "
GET COR,PAST
CALL DIR-PRINT,STACK
PRINTI "."
CRLF
JUMP ?CND23
?ELS25: FSET? OBJ,TOUCHBIT /?ELS36
PRINTI "Someone is off to "
GET COR,PAST
CALL DIR-PRINT,STACK
PRINTI "."
CRLF
JUMP ?CND12
?ELS36: PRINTD OBJ
PRINTI " is off to "
GET COR,PAST
CALL DIR-PRINT,STACK
PRINTI "."
CRLF
?CND23:
?CND12: NEXT? OBJ >OBJ /?KLU54
?KLU54: ZERO? OBJ \?PRG10
?REP11: ZERO? FOUND /?CND3
RETURN FOUND
?CND3: INC 'CNT
JUMP ?PRG1
.ENDI