forked from historicalsource/seastalker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
global.zap
1169 lines (1060 loc) · 27.9 KB
/
global.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
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.FUNCT DO-INSTEAD-OF,OBJ1,OBJ2
EQUAL? PRSI,OBJ2 \?ELS5
CALL PERFORM,PRSA,PRSO,OBJ1
RSTACK
?ELS5: EQUAL? PRSO,OBJ2 \?ELS7
CALL PERFORM,PRSA,OBJ1,PRSI
RSTACK
?ELS7: CALL 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: PRINTR """I'm not sure what you're talking about."""
.FUNCT FLOOR-F
EQUAL? PRSA,V?PUT \?ELS5
EQUAL? PRSI,FLOOR \?ELS5
CALL PERFORM,V?DROP,PRSO
RTRUE
?ELS5: EQUAL? PRSA,V?WALK-TO,V?THROUGH \?ELS9
ZERO? SUB-IN-TANK /FALSE
CALL PERFORM,PRSA,TEST-TANK
RTRUE
?ELS9: EQUAL? PRSA,V?LOOK-ON,V?SEARCH,V?EXAMINE \FALSE
PRINTR "You don't find anything new there."
.FUNCT GLOBAL-SNARK-F
EQUAL? PRSA,V?FIND,V?EXAMINE \?ELS5
ZERO? SNARK-ATTACK-COUNT \TRUE
?ELS5: EQUAL? PRSA,V?FIND \FALSE
ZERO? MONSTER-GONE \FALSE
PRINTI "It's attacking the "
PRINTD AQUADOME
PRINTR "!"
.FUNCT MIKE-3-F,OBJ
PRINTI "The "
PRINTD OBJ
PRINTI " is mounted on "
CALL PRINTA,CLAW
PRINTR "."
.FUNCT CANT-SEND
PRINTR "You can't send it. Only you can pilot it there."
.FUNCT LOCAL-SUB-F
EQUAL? PRSA,V?TURN,V?PUT \?ELS5
CALL MORE-SPECIFIC
RSTACK
?ELS5: EQUAL? PRSA,V?SEARCH-FOR,V?SEARCH \?ELS7
CALL DO-INSTEAD-OF,SUB,LOCAL-SUB
RTRUE
?ELS7: EQUAL? PRSA,V?EXAMINE \?ELS9
GET ON-SUB,0
ZERO? STACK \?CND10
GET ON-SUB,1
ZERO? STACK \?CND10
GETP LOCAL-SUB,P?TEXT
PRINT STACK
CRLF
RTRUE
?CND10: GET ON-SUB,0
ZERO? STACK /?CND17
GET ON-SUB,0
CALL MIKE-3-F,STACK
?CND17: GET ON-SUB,1
ZERO? STACK /TRUE
GET ON-SUB,1
CALL MIKE-3-F,STACK
RTRUE
?ELS9: EQUAL? PRSA,V?FIND \?ELS24
CALL INT,I-SEND-SUB
PUT STACK,0,0
PRINTR "It's right here!"
?ELS24: EQUAL? PRSA,V?LOOK-BEHIND /?THN29
EQUAL? PRSA,V?LOOK-OUTSIDE \?ELS28
EQUAL? HERE,SUB \?ELS28
?THN29: CALL PERFORM,V?LOOK-OUTSIDE,SUB-WINDOW
RTRUE
?ELS28: EQUAL? PRSA,V?LOOK-INSIDE \?ELS34
EQUAL? HERE,SUB,CRAWL-SPACE \?ELS39
CALL PERFORM,V?LOOK
RTRUE
?ELS39: PRINTR "You can't see much from here."
?ELS34: EQUAL? PRSA,V?SEND-TO,V?SEND-OUT,V?SEND \?ELS45
EQUAL? PRSO,LOCAL-SUB \?ELS45
CALL CANT-SEND
RSTACK
?ELS45: EQUAL? PRSA,V?BOARD,V?THROUGH \?ELS49
EQUAL? HERE,SUB,CRAWL-SPACE \?ELS54
CALL ALREADY,WINNER,STR?117
RSTACK
?ELS54: EQUAL? HERE,AIRLOCK-WALL \?ELS56
CALL GOTO,AIRLOCK
ZERO? STACK /FALSE
CALL GOTO,SUB
ZERO? STACK /TRUE
EQUAL? WINNER,PLAYER /TRUE
CALL OKAY
RTRUE
?ELS56: EQUAL? HERE,WEST-TANK-AREA,SOUTH-TANK-AREA \?ELS68
GETP WEST-TANK-AREA,P?EAST
PRINT STACK
CRLF
RTRUE
?ELS68: CALL DO-WALK,P?IN
RTRUE
?ELS49: EQUAL? PRSA,V?RAISE,V?DROP,V?DISEMBARK \?ELS74
EQUAL? HERE,SUB,CRAWL-SPACE /?ELS79
PRINTR "You're not in it!"
?ELS79: EQUAL? PRSA,V?DROP \?ELS83
CALL DO-WALK,P?DOWN
RTRUE
?ELS83: EQUAL? PRSA,V?RAISE \?ELS85
CALL DO-WALK,P?UP
RTRUE
?ELS85: CALL DO-WALK,P?OUT
RTRUE
?ELS74: EQUAL? PRSA,V?CLOSE,V?OPEN \?ELS89
EQUAL? HERE,CRAWL-SPACE,AIRLOCK-WALL /?ELS89
CALL PERFORM,PRSA,SUB-DOOR
RTRUE
?ELS89: EQUAL? PRSA,V?ANALYZE \?ELS93
EQUAL? PRSI,DAMAGE,GLOBAL-SABOTAGE,FALSE-VALUE \?ELS93
PRINTI "You can do this by pushing the "
PRINTD TEST-BUTTON
EQUAL? HERE,SUB,CRAWL-SPACE /?CND98
PRINTI " on the "
PRINTD CONTROLS
PRINTI " inside"
?CND98: PRINTR "."
?ELS93: EQUAL? PRSA,V?LAMP-ON \?ELS106
EQUAL? HERE,SUB /?ELS111
CALL THIS-IS-IT,SUB
PRINTI "You have to be in the "
PRINTD SUB
PRINTR " to start it."
?ELS111: FSET? REACTOR,ONBIT /?ELS115
CALL THIS-IS-IT,REACTOR
PRINTR "The reactor is off!"
?ELS115: ZERO? SUB-IN-TANK /?ELS123
ZERO? TEST-TANK-FULL \?ELS123
CALL THIS-IS-IT,TEST-TANK
ZERO? STACK \?THN120
?ELS123: ZERO? SUB-IN-DOME /?ELS119
ZERO? AIRLOCK-FULL \?ELS119
CALL THIS-IS-IT,AIRLOCK
ZERO? STACK /?ELS119
?THN120: PRINTR "The tank is empty!"
?ELS119: ZERO? SUB-IN-TANK /?ELS133
FSET? TANK-GATE,OPENBIT /?ELS133
CALL THIS-IS-IT,TANK-GATE
ZERO? STACK \?THN130
?ELS133: ZERO? SUB-IN-DOME /?ELS129
FSET? AIRLOCK-HATCH,OPENBIT /?ELS129
CALL THIS-IS-IT,AIRLOCK-HATCH
ZERO? STACK /?ELS129
?THN130: PRINTR "The gate is closed!"
?ELS129: FSET? ENGINE,ONBIT /?ELS139
CALL THIS-IS-IT,ENGINE
PRINTR "The engine is off!"
?ELS139: PRINTI "You can do this by setting the throttle to the speed you want (slow, medium, or fast) and by moving the "
PRINTD JOYSTICK
PRINTI " in the "
PRINTD INTDIR
PRINTR " you wish to go."
?ELS106: EQUAL? PRSA,V?STOP \FALSE
EQUAL? HERE,SUB /?ELS152
CALL THIS-IS-IT,SUB
PRINTI "You have to be in the "
PRINTD SUB
PRINTR " to stop it."
?ELS152: FSET? ENGINE,ONBIT /?ELS156
PRINTR "The engine is off!"
?ELS156: SET 'TARGET-DEPTH,SUB-DEPTH
PRINT I-ASSUME
PRINTI " close the "
PRINTD THROTTLE
PRINTI ".)"
CRLF
CALL PERFORM,V?CLOSE,THROTTLE
RTRUE
.FUNCT GLOBAL-SUB-2-F
CALL DO-INSTEAD-OF,GLOBAL-SUB,GLOBAL-SUB-2
RTRUE
.FUNCT GLOBAL-SUB-F
ZERO? SUB-IN-TANK /?ELS5
ZERO? BLY-TOLD-PROBLEM \?THN8
EQUAL? PRSO,GLOBAL-BLY /?ELS5
?THN8: EQUAL? PRSA,V?FIND /?THN10
EQUAL? PRSA,V?ASK-ABOUT \?ELS5
FSET? PRSO,PERSON \?ELS5
?THN10: CALL INT,I-SEND-SUB
PUT STACK,0,0
PRINTI "The only sub at"
CALL RESEARCH-LAB
PRINTI " is your new "
PRINTD GLOBAL-SUB
PRINTI ". It's located in the test tank just south of "
PRINTD YOUR-LABORATORY
PRINTR "."
?ELS5: EQUAL? PRSA,V?WALK-TO,V?THROUGH,V?BOARD \?ELS19
CALL CHEERS?
CALL GOTO,SUB
ZERO? STACK /TRUE
EQUAL? WINNER,PLAYER /TRUE
CALL OKAY
RTRUE
?ELS19: EQUAL? PRSA,V?PUT \?ELS26
FSET? PRSO,WEAPONBIT /FALSE
CALL MORE-SPECIFIC
RSTACK
?ELS26: EQUAL? PRSA,V?SEND-TO,V?SEND-OUT,V?SEND \FALSE
EQUAL? PRSO,GLOBAL-SUB \FALSE
CALL CANT-SEND
RSTACK
.FUNCT CONTROLS-F
EQUAL? HERE,CENTER-OF-LAB \?ELS5
EQUAL? PRSA,V?LAMP-OFF,V?LAMP-ON,V?EXAMINE /?ELS5
CALL DO-INSTEAD-OF,VIDEOPHONE,CONTROLS
RTRUE
?ELS5: EQUAL? HERE,WEST-TANK-AREA \FALSE
EQUAL? PRSA,V?EXAMINE \FALSE
PRINTI "These are valves, gauges and control gear needed to make full use of the tank. Two important controls are the "
PRINTD OPEN-GATE-BUTTON
PRINTI " and the "
PRINTD FILL-TANK-BUTTON
PRINTI ". This gear can be operated by remote control from all "
CALL PRINT-NAME,LAST-NAME
PRINTR " subs."
.FUNCT PHONE-ON,PER,PWHERE,ON
SET 'REMOTE-PERSON,PER
SET 'QCONTEXT,PER
CALL THIS-IS-IT,PER
SET 'REMOTE-PERSON-REMLOC,PWHERE
SET 'REMOTE-PERSON-ON,ON
SET 'REMOTE-PERSON-LOC,HERE
SET 'QCONTEXT-ROOM,HERE
MOVE REMOTE-PERSON,REMOTE-PERSON-LOC
RTRUE
.FUNCT PHONE-OFF
ZERO? REMOTE-PERSON /FALSE
MOVE REMOTE-PERSON,GLOBAL-OBJECTS
SET 'REMOTE-PERSON,FALSE-VALUE
SET 'REMOTE-PERSON-LOC,FALSE-VALUE
SET 'REMOTE-PERSON-ON,FALSE-VALUE
RETURN REMOTE-PERSON-ON
.FUNCT INTERCOM-F,P,L
EQUAL? PRSA,V?SAY-INTO,V?LAMP-ON \?ELS5
PRINTR "Try the command: CALL (someone) ON THE INTERCOM."
?ELS5: EQUAL? PRSA,V?PHONE \FALSE
FSET? PRSO,PERSON \?ELS12
GETP PRSO,P?CHARACTER
GET CHARACTER-TABLE,STACK >P
LOC P >L
JUMP ?CND10
?ELS12: CALL HAR-HAR
RTRUE
?CND10: EQUAL? L,EAST-WALL \?ELS21
EQUAL? HERE,OFFICE /?THN18
?ELS21: EQUAL? HERE,EAST-WALL \?ELS17
EQUAL? L,OFFICE \?ELS17
?THN18: EQUAL? P,SHARON \?CND24
IN? SHARON,OFFICE \?CND24
FCLEAR SHARON,NDESCBIT
FCLEAR FILE-DRAWER,NDESCBIT
FCLEAR PAPERS,NDESCBIT
?CND24: MOVE P,HERE
PRINTI "Here "
JUMP ?CND15
?ELS17: PRINTI "There's no "
PRINTD INTERCOM
PRINTI " line to where "
?CND15: CALL HE-SHE-IT,P
PRINTR " is."
.FUNCT A-O-K
PRINTR "All systems A-O-K."
.FUNCT TEST-BUTTON-F
EQUAL? PRSA,V?LAMP-ON /?THN6
EQUAL? PRSA,V?LAMP-OFF,V?TURN,V?PUSH \FALSE
?THN6: EQUAL? HERE,CENTER-OF-LAB \?ELS12
FSET? VIDEOPHONE,MUNGBIT \?ELS15
CALL TELL-HINT,83,POWER-SUPPLY,FALSE-VALUE
RTRUE
?ELS15: EQUAL? P-XADJN,W?TEST \?ELS17
CALL A-O-K
RTRUE
?ELS17: IN? MICROPHONE,PLAYER \?ELS19
EQUAL? PRSA,V?LAMP-ON,V?LAMP-OFF \?ELS22
CALL PERFORM,PRSA,MICROPHONE
RTRUE
?ELS22: FSET? MICROPHONE,ONBIT \?ELS24
CALL PERFORM,V?LAMP-OFF,MICROPHONE
RTRUE
?ELS24: CALL PERFORM,V?LAMP-ON,MICROPHONE
RTRUE
?ELS19: EQUAL? PRSA,V?LAMP-OFF \?ELS28
CALL PERFORM,V?LAMP-OFF,VIDEOPHONE
RTRUE
?ELS28: CALL PERFORM,V?LAMP-ON,VIDEOPHONE
RTRUE
?ELS12: EQUAL? HERE,SUB,CRAWL-SPACE \?ELS32
ZERO? TEST-BUTTON-READOUT /FALSE
PRINTI "Readout display says:
"
EQUAL? TEST-BUTTON-READOUT,TEST-BUTTON-NORMAL \?ELS43
CALL A-O-K
RTRUE
?ELS43: EQUAL? TEST-BUTTON-READOUT,GATE-CRASHED-MSG \?ELS45
PRINTI "No damage. Hull still watertight."
JUMP ?CND41
?ELS45: EQUAL? TEST-BUTTON-READOUT,REGULATOR-MSG \?ELS49
SET 'REGULATOR-MSG-SEEN,TRUE-VALUE
PRINTI "Lasers in operational computers are over-charging.
To correct, adjust "
PRINTD VOLTAGE-REGULATOR
PRINTI ".
WARNING: "
PRINTD VOLTAGE-REGULATOR
PRINTI " is reachable only from "
PRINTD CRAWL-SPACE
PRINTI ", behind the "
PRINTD ENGINE-ACCESS-HATCH
PRINTI ". This is a hazardous operation at sea!"
JUMP ?CND41
?ELS49: EQUAL? TEST-BUTTON-READOUT,TEST-BUTTON-POD \?ELS53
PRINTD ESCAPE-POD-UNIT
PRINTI " is not properly connected."
JUMP ?CND41
?ELS53: EQUAL? TEST-BUTTON-READOUT,CLAW-MUNGED-MSG \?CND41
PRINTI "The "
PRINTD CLAW
PRINTI " is damaged."
?CND41: CRLF
RTRUE
?ELS32: EQUAL? P-XADJN,W?TEST \?ELS61
CALL A-O-K
RSTACK
?ELS61: EQUAL? HERE,EAST-WALL \?ELS63
EQUAL? PRSA,V?LAMP-OFF \?ELS66
CALL PERFORM,V?LAMP-OFF,MICROWAVE-SECURITY-SCANNER
RTRUE
?ELS66: CALL PERFORM,V?LAMP-ON,MICROWAVE-SECURITY-SCANNER
RTRUE
?ELS63: EQUAL? HERE,NORTH-WALL \FALSE
EQUAL? PRSA,V?LAMP-OFF \?ELS73
CALL PERFORM,V?LAMP-OFF,COMPUTESTOR
RTRUE
?ELS73: CALL PERFORM,V?LAMP-ON,COMPUTESTOR
RTRUE
.FUNCT GLOBAL-SONAR-F
EQUAL? HERE,SUB,CRAWL-SPACE \?ELS5
CALL DO-INSTEAD-OF,SONARSCOPE,GLOBAL-SONAR
RTRUE
?ELS5: ZERO? SUB-IN-DOME /?ELS7
CALL DO-INSTEAD-OF,SONAR-EQUIPMENT,GLOBAL-SONAR
RTRUE
?ELS7: CALL REMOTE-VERB?
ZERO? STACK \FALSE
CALL NOT-HERE,GLOBAL-SONAR
RSTACK
.FUNCT ALARM-F
EQUAL? PRSA,V?STOP /?THN6
EQUAL? PRSA,V?REPLY,V?LISTEN,V?LAMP-OFF \FALSE
?THN6: ZERO? ALARM-RINGING /?ELS12
CALL WHY-NOT-VP
RSTACK
?ELS12: PRINTR "It's not ringing!"
.FUNCT WHY-NOT-VP
PRINTI "Why not turn on the "
PRINTD VIDEOPHONE
PRINTR "?"
.FUNCT VIDEOPHONE-2-F
PRINT I-ASSUME
PRINTI " the "
PRINTD VIDEOPHONE
PRINTI ".)"
CRLF
CALL DO-INSTEAD-OF,VIDEOPHONE,VIDEOPHONE-2
RTRUE
.FUNCT VIDEOPHONE-F,ARG,V
EQUAL? PRSA,V?READ,V?EXAMINE \?ELS5
EQUAL? REMOTE-PERSON-ON,VIDEOPHONE \?ELS10
PRINTI "You can see "
PRINTD REMOTE-PERSON
PRINTI " on"
CALL THE-PRSO-PRINT
PRINTR "."
?ELS10: ZERO? WOMAN-ON-SCREEN /?ELS14
PRINTI "You can see a fuzzy picture of a woman on"
CALL THE-PRSO-PRINT
PRINTR ". Maybe you should turn the knob."
?ELS14: FSET? VIDEOPHONE,ONBIT \?ELS19
PRINTI "The "
PRINTD VIDEOPHONE
PRINTR " is on, but no one's on the screen."
?ELS19: PRINTR "The screen is dark."
?ELS5: EQUAL? PRSA,V?LISTEN \?ELS27
EQUAL? REMOTE-PERSON-ON,VIDEOPHONE \?ELS32
CALL PERFORM,PRSA,REMOTE-PERSON
RTRUE
?ELS32: ZERO? WOMAN-ON-SCREEN /?ELS34
PRINTI "You can hear fuzzy sound from"
CALL THE-PRSO-PRINT
PRINTR ". Maybe you should turn the knob."
?ELS34: ZERO? ALARM-RINGING /FALSE
PRINTI "An "
PRINTD ALARM
PRINTI " on the "
PRINTD VIDEOPHONE
PRINTR " is ringing."
?ELS27: EQUAL? PRSA,V?ANALYZE \?ELS44
EQUAL? PRSI,GLOBAL-SABOTAGE \?ELS44
ZERO? SUB-IN-TANK /?ELS44
PRINTI "If you wish to determine at once whether any saboteur or other intruder may have penetrated"
CALL RESEARCH-LAB
PRINTI ", activate the "
PRINTD MICROWAVE-SECURITY-SCANNER
PRINTR "."
?ELS44: EQUAL? PRSA,V?WALK-TO \?ELS52
ZERO? SUB-IN-TANK \?THN55
ZERO? SUB-IN-DOME /?ELS52
?THN55: EQUAL? HERE,CENTER-OF-LAB,COMM-BLDG /?ELS52
ZERO? SUB-IN-TANK /?ELS59
CALL PERFORM,V?WALK-TO,CENTER-OF-LAB
RTRUE
?ELS59: CALL PERFORM,V?WALK-TO,COMM-BLDG
RTRUE
?ELS52: CALL REMOTE-VERB?
ZERO? STACK \FALSE
EQUAL? HERE,CENTER-OF-LAB,COMM-BLDG /?ELS66
PRINTI "You must be in the "
ZERO? SUB-IN-TANK /?ELS71
PRINTD CENTER-OF-LAB
JUMP ?CND69
?ELS71: PRINTD COMM-BLDG
?CND69: PRINTR " to do that."
?ELS66: EQUAL? PRSA,V?TURN,V?FIX,V?ADJUST \?ELS82
FSET? VIDEOPHONE,MUNGBIT \?ELS85
PRINTI "You can't fix the "
PRINTD VIDEOPHONE
PRINTI " until you know what is wrong. The simplest way to find out is to consult your "
CALL PRINT-NAME,LAST-NAME
PRINTI " "
PRINTD COMPUTESTOR
PRINTI ", which is programmed to troubleshoot many of your inventions. Or, alternately, you may have the "
PRINTD VIDEOPHONE
PRINTI " repaired by a "
PRINTD GLOBAL-TECHNICIAN
PRINTR "."
?ELS85: FSET? VIDEOPHONE,ONBIT /?ELS89
CALL WHY-NOT-VP
RTRUE
?ELS89: ZERO? WOMAN-ON-SCREEN \?CND83
PRINTR "Nothing changes."
?CND83: SET 'WOMAN-ON-SCREEN,FALSE-VALUE
CALL PHONE-ON,GLOBAL-BLY,AQUADOME,VIDEOPHONE
CALL THIS-IS-IT,PROBLEM
PRINTI "Ah, that's better! You recognize the woman as "
PRINTD BLY
PRINTI ", who's in charge of the "
PRINT URS
PRINTI " of "
PRINTD IU-GLOBAL
PRINTI ", called the "
PRINTD AQUADOME
PRINTI ", just off the Atlantic coast. """
CALL PRINT-NAME,FIRST-NAME
PRINTI "! "
CALL PRINT-NAME,FIRST-NAME
PRINTI "!"" she's saying. ""This is the "
PRINTD AQUADOME
PRINTI " calling"
CALL RESEARCH-LAB
PRINTI "! We have an urgent problem!"""
CRLF
CALL SCORE-OBJ,VIDEOPHONE-2
RTRUE
?ELS82: EQUAL? PRSA,V?LAMP-OFF \?ELS99
FSET? VIDEOPHONE,ONBIT \FALSE
SET 'WOMAN-ON-SCREEN,FALSE-VALUE
FCLEAR VIDEOPHONE,ONBIT
EQUAL? REMOTE-PERSON-ON,VIDEOPHONE \?ELS107
FSET? MICROPHONE,ONBIT \?ELS107
CALL PERFORM,V?GOODBYE,REMOTE-PERSON
RTRUE
?ELS107: CALL PHONE-OFF
PRINTR "The screen goes dark."
?ELS99: EQUAL? PRSA,V?REPLY,V?LAMP-ON \?ELS115
ZERO? SUB-IN-TANK /?ELS115
FSET? VIDEOPHONE,ONBIT \?ELS120
CALL ALREADY,VIDEOPHONE,STR?42
RTRUE
?ELS120: FSET? CIRCUIT-BREAKER,OPENBIT /?THN123
FSET? VIDEOPHONE,MUNGBIT \?CND118
?THN123: PRINTR "You can't. It's conked out."
?CND118: CALL INT,I-LAMP-ON-SCOPE
PUT STACK,0,0
FSET VIDEOPHONE,ONBIT
ZERO? ALARM-RINGING /?ELS131
SET 'ALARM-RINGING,FALSE-VALUE
CALL QUEUE,I-ALARM-RINGING,0
SET 'WOMAN-ON-SCREEN,TRUE-VALUE
CALL THIS-IS-IT,GLOBAL-BLY
PRINTI "As the "
PRINTD ALARM
PRINTI " stops ringing, a picture of a woman holding a "
PRINTD MICROPHONE
PRINTI " appears, and you can hear her voice from the speaker. But both sound and picture are fuzzy."
CRLF
CALL SCORE-OBJ,VIDEOPHONE
RTRUE
?ELS131: PRINTR "A test pattern appears."
?ELS115: EQUAL? PRSA,V?PHONE \FALSE
ZERO? WOMAN-ON-SCREEN \?THN144
EQUAL? REMOTE-PERSON-ON,VIDEOPHONE \?CND141
?THN144: PRINTI "You should finish talking with "
ZERO? WOMAN-ON-SCREEN /?ELS150
PRINTI "the woman"
JUMP ?CND148
?ELS150: PRINTD REMOTE-PERSON
?CND148: PRINTR " first."
?CND141: EQUAL? PRSO,YOUR-LABORATORY \?ELS164
ZERO? SUB-IN-DOME /?ELS164
PRINTR "There's no answer."
?ELS164: EQUAL? PRSO,GLOBAL-BLY,AQUADOME \FALSE
ZERO? SUB-IN-TANK /FALSE
ZERO? BLY-TOLD-PROBLEM /?ELS177
PRINTI "There's no answer. The crew must be busy with the "
PRINTD SNARK
PRINTR "."
?ELS177: ZERO? ALARM-RINGING /FALSE
CALL PERFORM,V?LAMP-ON,VIDEOPHONE
RTRUE
.FUNCT GLOBAL-SABOTAGE-F
EQUAL? PRSA,V?ANALYZE \FALSE
EQUAL? PRSO,VIDEOPHONE \FALSE
CALL INT,I-TIP-SAYS
PUT STACK,0,0
RFALSE
.FUNCT WATER-F
CALL REMOTE-VERB?
ZERO? STACK \FALSE
ZERO? SUB-IN-TANK /?ELS7
CALL IN-TANK-AREA?,HERE
ZERO? STACK /FALSE
ZERO? TEST-TANK-FULL /FALSE
CALL DO-INSTEAD-OF,TEST-TANK,GLOBAL-WATER
RTRUE
?ELS7: EQUAL? PRSA,V?EXAMINE,V?ANALYZE \?ELS17
CALL GLOBAL-IN?,WINDOW,HERE
ZERO? STACK /?ELS22
CALL PERFORM,V?LOOK-OUTSIDE,WINDOW
RTRUE
?ELS22: EQUAL? HERE,SUB \FALSE
CALL PERFORM,V?LOOK-OUTSIDE,SUB-WINDOW
RTRUE
?ELS17: EQUAL? PRSA,V?THROUGH,V?SWIM \FALSE
PRINTI "This is no time for a swim, "
CALL PRINT-NAME,FIRST-NAME
PRINTR "!"
.FUNCT SEA-F
EQUAL? PRSA,V?ANALYZE,V?EXAMINE \?ELS5
ZERO? SUB-IN-DOME \?THN11
ZERO? SUB-IN-OPEN-SEA \?THN11
EQUAL? NOW-TERRAIN,SEA-TERRAIN \FALSE
?THN11: CALL PLENTY-WATER
RSTACK
?ELS5: EQUAL? PRSA,V?WALK-TO,V?THROUGH,V?FIND \FALSE
ZERO? SUB-IN-DOME \?THN20
ZERO? SUB-IN-OPEN-SEA \?THN20
EQUAL? NOW-TERRAIN,SEA-TERRAIN \?ELS19
?THN20: PRINTR "You're in it!"
?ELS19: EQUAL? HERE,SUB,CRAWL-SPACE \?ELS25
PRINTR "The nautical chart in your SEASTALKER package should help."
?ELS25: PRINTI "First you must get in the "
PRINTD SUB
PRINTR "."
.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 HINT-F
EQUAL? PRSA,V?FIND \?ELS5
PRINT HELP-TEXT
CRLF
RTRUE
?ELS5: EQUAL? PRSA,V?TAKE,V?ASK-CONTEXT-FOR,V?ASK-FOR \FALSE
EQUAL? TIP,PRSO,PRSI,WINNER \?ELS14
PRINT HELP-TEXT
CRLF
RTRUE
?ELS14: CALL MORE-SPECIFIC
RSTACK
.FUNCT DIRNS-F
EQUAL? PRSA,V?ASK-FOR \FALSE
EQUAL? PRSO,GLOBAL-BLY \FALSE
SET 'WINNER,GLOBAL-BLY
CALL PERFORM,V?FIND,AQUADOME
RTRUE
.FUNCT GLOBAL-HERE-F,FLG=0,F,HR,TIM,VAL
EQUAL? PRSA,V?KNOCK \?ELS5
PRINTR "Knocking on the walls reveals nothing unusual."
?ELS5: EQUAL? PRSA,V?TIE-TO,V?PUT \?ELS9
CALL MORE-SPECIFIC
RSTACK
?ELS9: EQUAL? PRSA,V?EXAMINE,V?SEARCH \?ELS11
GETP HERE,P?CORRIDOR
ZERO? STACK /?ELS14
SET 'TIM,3
JUMP ?CND12
?ELS14: GETP HERE,P?SIZE
ADD 2,STACK >TIM
?CND12: EQUAL? P-ADVERB,W?CAREFULLY \?CND17
MUL 2,TIM >TIM
?CND17: 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 \?ELS24
PRINTI "careful"
JUMP ?CND22
?ELS24: PRINTI "brief"
?CND22: PRINTI " search would take "
PRINTN TIM
PRINTI " turns, and it might not reveal much. Would you like to do it anyway?)"
CALL YES?
ZERO? STACK /?ELS37
CALL INT-WAIT,TIM >VAL
EQUAL? M-FATAL,VAL /TRUE
ZERO? VAL /?ELS44
PRINTI "Your "
EQUAL? P-ADVERB,W?CAREFULLY \?ELS52
PUSH STR?118
JUMP ?CND48
?ELS52: PUSH STR?119
?CND48: PRINT STACK
PRINTR " search reveals nothing exciting."
?ELS44: PRINTR "You didn't finish looking over the place."
?ELS37: PRINTR "Okay."
?ELS11: EQUAL? PRSA,V?ANALYZE,V?WHAT \FALSE
FIRST? HERE >F /?KLU83
?KLU83:
?PRG65: ZERO? F \?ELS69
JUMP ?REP66
?ELS69: FSET? F,CONTBIT \?ELS71
CALL INHABITED?,F
ZERO? STACK /?ELS71
SET 'FLG,TRUE-VALUE
SET 'HR,HERE
SET 'HERE,F
CALL GLOBAL-HERE-F
SET 'HERE,HR
JUMP ?CND67
?ELS71: FSET? F,PERSON \?CND67
EQUAL? F,PLAYER /?CND67
SET 'FLG,TRUE-VALUE
CALL DESCRIBE-OBJECT,F,TRUE-VALUE,0
?CND67: NEXT? F >F /?KLU84
?KLU84: JUMP ?PRG65
?REP66: ZERO? FLG \TRUE
PRINTR "There's nobody else here."
.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
CALL FRESH-AIR?,HERE
ZERO? STACK \TRUE
PRINTR "The air is rather musty."
.FUNCT GENERIC-TANK-F,OBJ
ZERO? SUB-IN-TANK /?ELS5
RETURN TEST-TANK
?ELS5: ZERO? SUB-IN-DOME \?THN9
CALL SUB-OUTSIDE-AIRLOCK?
ZERO? STACK /FALSE
?THN9: RETURN DOCKING-TANK
.FUNCT TOO-FAR-AWAY,OBJ
CALL TOO-BAD-BUT,OBJ,STR?16
RSTACK
.FUNCT TEST-TANK-F
EQUAL? PRSA,V?WALK-TO \?ELS5
CALL IN-TANK-AREA?,HERE
ZERO? STACK /?ELS10
CALL ALREADY,PLAYER,STR?117
RSTACK
?ELS10: ZERO? SUB-IN-TANK /FALSE
CALL PERFORM,PRSA,NORTH-TANK-AREA
RTRUE
?ELS5: CALL REMOTE-VERB?
ZERO? STACK \FALSE
EQUAL? NOW-TERRAIN,BAY-TERRAIN \?ELS17
CALL TOO-FAR-AWAY,TEST-TANK
RSTACK
?ELS17: ZERO? SUB-IN-TANK \?ELS19
PRINTI "You're nowhere near"
CALL RESEARCH-LAB
PRINTR "!"
?ELS19: EQUAL? HERE,SUB \?THN28
ZERO? SUB-IN-TANK \?ELS25
?THN28: EQUAL? HERE,NORTH-TANK-AREA,WEST-TANK-AREA,SOUTH-TANK-AREA /?ELS25
CALL NOT-HERE,TEST-TANK
RSTACK
?ELS25: EQUAL? PRSA,V?BOARD \?ELS31
PRINTR "That won't do any good."
?ELS31: EQUAL? PRSA,V?LEAVE \?ELS35
PRINTI "You can either walk north, or get in the "
PRINTD SUB
PRINTR " and go east."
?ELS35: EQUAL? PRSA,V?LOOK-INSIDE,V?EXAMINE,V?ANALYZE \?ELS39
CALL FILL-TANK-BUTTON-F
RSTACK
?ELS39: EQUAL? PRSA,V?FILL,V?EMPTY \?ELS41
EQUAL? HERE,WEST-TANK-AREA,SUB /?ELS41
PRINTR "You'll have to go west to do that."
?ELS41: EQUAL? PRSA,V?EMPTY \?ELS47
FSET? TANK-GATE,OPENBIT \?ELS52
CALL YOU-CANT,STR?65,TANK-GATE,STR?21
RSTACK
?ELS52: FSET? ENGINE,ONBIT \?ELS54
CALL YOU-CANT,STR?65,ENGINE,STR?42
RSTACK
?ELS54: ZERO? TEST-TANK-FULL /?ELS56
SET 'TEST-TANK-FULL,FALSE-VALUE
PRINTI "The "
PRINTD GLOBAL-WATER
PRINTR " quickly drains from the tank."
?ELS56: CALL ALREADY,TEST-TANK,STR?65
RSTACK
?ELS47: EQUAL? PRSA,V?FILL \?ELS63
ZERO? TEST-TANK-FULL /?ELS68
CALL ALREADY,TEST-TANK,STR?66
RSTACK
?ELS68: SET 'TEST-TANK-FULL,TRUE-VALUE
PRINTI "The "
PRINTD GLOBAL-WATER
PRINTR " quickly fills the tank, up to the level of the walkway."
?ELS63: EQUAL? PRSA,V?CLOSE,V?OPEN \?ELS75
CALL PERFORM,PRSA,TANK-GATE
RTRUE
?ELS75: EQUAL? PRSA,V?THROUGH,V?SWIM \FALSE
PRINTI "This is no time for a swim, "
CALL PRINT-NAME,FIRST-NAME
PRINTR "!"
.FUNCT FILL-TANK-BUTTON-F,OBJ,FLAG
ZERO? SUB-IN-TANK /?ELS3
SET 'FLAG,TEST-TANK-FULL
SET 'OBJ,TEST-TANK
JUMP ?CND1
?ELS3: ZERO? SUB-IN-DOME \?THN7
CALL SUB-OUTSIDE-AIRLOCK?
ZERO? STACK /FALSE
?THN7: SET 'FLAG,AIRLOCK-FULL
SET 'OBJ,AIRLOCK
?CND1: EQUAL? PRSA,V?EMPTY /?THN16
EQUAL? PRSA,V?FILL,V?CLOSE,V?OPEN \?ELS15
?THN16: CALL PERFORM,PRSA,OBJ
RTRUE
?ELS15: EQUAL? PRSA,V?LOOK-INSIDE,V?EXAMINE,V?ANALYZE \?ELS19
PRINTI "The "
PRINTD OBJ
PRINTI " is "
CALL TANK-STATUS
PRINT STACK
PRINTR "."
?ELS19: EQUAL? PRSA,V?USE,V?PUSH,V?MOVE \FALSE
ZERO? FLAG /?ELS28
PRINT I-ASSUME
PRINTI " empty"
CALL PRINTT,OBJ
PRINTI ".)"
CRLF
CALL PERFORM,V?EMPTY,OBJ
RTRUE
?ELS28: PRINT I-ASSUME
PRINTI " fill"
CALL PRINTT,OBJ
PRINTI ".)"
CRLF
CALL PERFORM,V?FILL,OBJ
RTRUE
.FUNCT TANK-GATE-F
EQUAL? PRSA,V?FIND \?ELS5
PRINTR "It's on the east wall of the test tank."
?ELS5: CALL REMOTE-VERB?
ZERO? STACK \FALSE
EQUAL? HERE,SUB /?ELS11
CALL IN-TANK-AREA?,HERE
ZERO? STACK \?ELS11
CALL NOT-HERE,TANK-GATE
RSTACK
?ELS11: EQUAL? PRSA,V?EXAMINE,V?ANALYZE \?ELS15
PRINTI "This gate "
FSET? TANK-GATE,OPENBIT \?ELS22
PUSH STR?113
JUMP ?CND18
?ELS22: PUSH STR?120
?CND18: PRINT STACK
PRINTI " raised to permit submarines to go in or out of the tank. The gate can be raised or lowered by wall controls or by remote control from all "
CALL PRINT-NAME,LAST-NAME
PRINTR " subs."
?ELS15: EQUAL? PRSA,V?DROP /?THN27
EQUAL? PRSA,V?RAISE,V?CLOSE,V?OPEN \FALSE
?THN27: EQUAL? HERE,WEST-TANK-AREA,SUB /?CND29
PRINTR "You'll have to go west to do that."
?CND29: CALL OPEN-CLOSE-GATE,TANK-GATE,TEST-TANK-FULL,TEST-TANK
RSTACK
.FUNCT OPEN-GATE-BUTTON-F,OBJ
ZERO? SUB-IN-TANK /?ELS3
SET 'OBJ,TANK-GATE
JUMP ?CND1
?ELS3: ZERO? SUB-IN-DOME \?THN7
CALL SUB-OUTSIDE-AIRLOCK?
ZERO? STACK /FALSE
?THN7: SET 'OBJ,AIRLOCK-HATCH
?CND1: EQUAL? PRSA,V?DROP /?THN16
EQUAL? PRSA,V?RAISE,V?CLOSE,V?OPEN \?ELS15
?THN16: CALL PERFORM,PRSA,OBJ
RTRUE
?ELS15: EQUAL? PRSA,V?EXAMINE,V?ANALYZE \?ELS19
PRINTI "The "
PRINTD OBJ
PRINTI " is "
CALL GATE-STATUS
PRINT STACK
PRINTR "."
?ELS19: EQUAL? PRSA,V?USE,V?PUSH,V?MOVE \FALSE
FSET? OBJ,OPENBIT \?ELS28
PRINT I-ASSUME
PRINTI " close"
CALL PRINTT,OBJ
PRINTI ".)"
CRLF
CALL PERFORM,V?CLOSE,OBJ
RTRUE
?ELS28: PRINT I-ASSUME
PRINTI " open"
CALL PRINTT,OBJ
PRINTI ".)"
CRLF
CALL PERFORM,V?OPEN,OBJ
RTRUE
.FUNCT GATE-STATUS
ZERO? SUB-IN-TANK /?ELS5
FSET? TANK-GATE,OPENBIT \?ELS11
RETURN STR?21
?ELS11: RETURN STR?17
?ELS5: ZERO? SUB-IN-DOME \?THN16
CALL SUB-OUTSIDE-AIRLOCK?
ZERO? STACK /?ELS15
?THN16: FSET? AIRLOCK-HATCH,OPENBIT \?ELS22
RETURN STR?21
?ELS22: RETURN STR?17
?ELS15: RETURN STR?121
.FUNCT TANK-STATUS
ZERO? SUB-IN-TANK /?ELS5
ZERO? TEST-TANK-FULL /?ELS11
RETURN STR?66
?ELS11: RETURN STR?65
?ELS5: ZERO? SUB-IN-DOME \?THN17
CALL SUB-OUTSIDE-AIRLOCK?
ZERO? STACK /?ELS16
?THN17: ZERO? AIRLOCK-FULL /?ELS23
RETURN STR?66
?ELS23: RETURN STR?65
?ELS16: RETURN STR?121
.FUNCT AIRLOCK-HATCH-F
EQUAL? PRSA,V?FIND \?ELS5
PRINTI "It's on the south wall of the "
PRINTD AQUADOME
PRINTI " "
PRINTD AIRLOCK
PRINTR "."
?ELS5: CALL REMOTE-VERB?
ZERO? STACK \FALSE
ZERO? SUB-IN-DOME /?THN14
EQUAL? HERE,SUB,AIRLOCK,BLY-OFFICE /?ELS11
?THN14: CALL SUB-OUTSIDE-AIRLOCK?
ZERO? STACK \?ELS11
CALL TOO-FAR-AWAY,AIRLOCK-HATCH
RSTACK
?ELS11: ZERO? SNARK-ATTACK-COUNT /?ELS17
PRINTR "It's too late now! The machinery is jammed!"
?ELS17: EQUAL? PRSA,V?DROP /?THN22
EQUAL? PRSA,V?RAISE,V?CLOSE,V?OPEN \FALSE
?THN22: CALL OPEN-CLOSE-GATE,AIRLOCK-HATCH,AIRLOCK-FULL,AIRLOCK
RSTACK
.FUNCT OPEN-CLOSE-GATE,GATE,FULL,TANK
EQUAL? PRSA,V?RAISE,V?OPEN \?ELS3
FSET? GATE,OPENBIT \?ELS6
CALL ALREADY,GATE,STR?21
RTRUE
?ELS6: ZERO? FULL \?ELS8
PRINTI "You'd better fill the "
PRINTD TANK
PRINTR " first, unless you want to go surfing!"
?ELS8: EQUAL? GATE,TANK-GATE \?CND13
EQUAL? HERE,SUB \?CND13
SET 'OPENED-GATE-FROM-SUB,TRUE-VALUE
?CND13: FSET GATE,OPENBIT
JUMP ?CND1
?ELS3: FSET? GATE,OPENBIT \?ELS22
FCLEAR GATE,OPENBIT
JUMP ?CND1
?ELS22: CALL ALREADY,GATE,STR?17
RTRUE
?CND1: FSET? GATE,OPENBIT \?ELS27
PRINTI "Opened"
JUMP ?CND25
?ELS27: PRINTI "Closed"
?CND25: EQUAL? HERE,SUB \?CND34
PRINTI " (by remote control)"
?CND34: PRINTR "."
.FUNCT AIRLOCK-POP?