forked from historicalsource/seastalker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
verbs.zap
3741 lines (3214 loc) · 71.3 KB
/
verbs.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 TRANSCRIPT,STR
PRINTI "Here "
PRINT STR
PRINTR "s a transcript of interaction with"
.FUNCT V-SCRIPT
ZERO? SCREEN-NOW-SPLIT /?CND1
SPLIT 0
?CND1: GET 0,8
BOR STACK,1
PUT 0,8,STACK
CALL TRANSCRIPT,STR?124
CALL V-VERSION
CALL START-SONAR?
RTRUE
.FUNCT V-UNSCRIPT
CALL TRANSCRIPT,STR?125
CALL V-VERSION
GET 0,8
BAND STACK,-2
PUT 0,8,STACK
RTRUE
.FUNCT V-$VERIFY
PRINTI "Verifying disk..."
CRLF
VERIFY \?ELS7
PRINTR "The disk is correct."
?ELS7: PRINTR "Oh, oh! The disk seems to have a defect. Try verifying again. (If you've already done that, the disk surely has a defect.)"
.FUNCT V-DEBUG
ZERO? DEBUG \?PRD6
PUSH 1
JUMP ?PRD7
?PRD6: PUSH 0
?PRD7: SET 'DEBUG,STACK
ZERO? DEBUG /?ELS5
PRINTR "Find them bugs, boss!"
?ELS5: PRINTR "No bugs left, eh?"
.FUNCT YOU-WILL-GET,STR
PRINTI "(Okay, you will get "
PRINT STR
PRINTR " descriptions.)"
.FUNCT V-BRIEF
SET 'VERBOSE,FALSE-VALUE
SET 'SUPER-BRIEF,FALSE-VALUE
SET 'P-SPACE,1
CALL YOU-WILL-GET,STR?119
RSTACK
.FUNCT V-SUPER-BRIEF
SET 'SUPER-BRIEF,TRUE-VALUE
SET 'P-SPACE,0
CALL YOU-WILL-GET,STR?126
RSTACK
.FUNCT V-VERBOSE
SET 'VERBOSE,TRUE-VALUE
SET 'SUPER-BRIEF,FALSE-VALUE
SET 'P-SPACE,1
CALL YOU-WILL-GET,STR?127
CALL V-LOOK
RSTACK
.FUNCT V-INVENTORY
ZERO? P-WHAT-IGNORED /?ELS5
EQUAL? WINNER,PLAYER /?CND7
PRINTI """"
?CND7: PRINTI "You're the inventor!"
EQUAL? WINNER,PLAYER /?CND14
PRINTI """"
?CND14: CRLF
RTRUE
?ELS5: CALL PRINT-CONT,WINNER
ZERO? STACK \FALSE
EQUAL? WINNER,PLAYER \?ELS23
PRINTI "You're"
JUMP ?CND21
?ELS23: CALL HE-SHE-IT,WINNER,TRUE-VALUE
PRINTI "'s"
?CND21: PRINTR " not holding anything."
.FUNCT V-QUIT,ASK?=1
CALL V-SCORE
ZERO? ASK? /?ELS9
PRINTI "(If you want to continue from this point at another time, you must ""SAVE"" first.)
Do you want to stop playing now?"
CALL YES?
ZERO? STACK \?THN6
?ELS9: ZERO? ASK? \?ELS5
?THN6: QUIT
RTRUE
?ELS5: PRINTR "Okay."
.FUNCT V-RESTART
CALL V-SCORE
PRINTI "Do you want to start over from the beginning?"
CALL YES?
ZERO? STACK /FALSE
RESTART
PRINT FAILED
CRLF
RTRUE
.FUNCT V-SAVE
ZERO? SCREEN-NOW-SPLIT /?CND1
SPLIT 0
?CND1: SAVE \?ELS7
PRINTI "Okay."
CRLF
CALL V-FIRST-LOOK
JUMP ?CND5
?ELS7: PRINT FAILED
CRLF
?CND5: CALL START-SONAR?
RTRUE
.FUNCT V-RESTORE
ZERO? SCREEN-NOW-SPLIT /?CND1
SPLIT 0
?CND1: RESTORE /FALSE
PRINT FAILED
CRLF
CALL START-SONAR?
RFALSE
.FUNCT V-FIRST-LOOK
CALL DESCRIBE-ROOM
ZERO? STACK /FALSE
ZERO? SUPER-BRIEF \FALSE
CALL DESCRIBE-OBJECTS
RSTACK
.FUNCT V-VERSION,CNT=17,V
GET 0,1
BAND STACK,2047 >V
PRINTI "SEASTALKER: "
CALL PRINT-NAME,FIRST-NAME,TRUE-VALUE
PRINTC 32
CALL PRINT-NAME,LAST-NAME,TRUE-VALUE
PRINTI " AND THE ULTRAMARINE BIOCEPTOR
Infocom interactive fiction - an adventure story
Copyright (c) 1984, 1985 by Infocom, Inc. All rights reserved.
"
PRINTI "SEASTALKER is a trademark of Infocom, Inc.
Release number "
PRINTN V
PRINTI " / Serial number "
?PRG7: IGRTR? 'CNT,23 \?ELS11
JUMP ?REP8
?ELS11: GETB 0,CNT
PRINTC STACK
JUMP ?PRG7
?REP8: CRLF
RTRUE
.FUNCT YES?,WORD,VAL
?PRG1: PRINTI " >"
READ YES-INBUF,YES-LEXV
GET YES-LEXV,P-LEXSTART >WORD
GETB YES-LEXV,P-LEXWORDS
ZERO? STACK \?ELS5
JUMP ?CND3
?ELS5: ZERO? WORD /?CND3
CALL WT?,WORD,PS?VERB,P1?VERB >VAL
EQUAL? VAL,ACT?YES \?ELS10
SET 'VAL,TRUE-VALUE
RETURN VAL
?ELS10: EQUAL? VAL,ACT?NO /?THN13
EQUAL? WORD,W?N \?CND3
?THN13: SET 'VAL,FALSE-VALUE
RETURN VAL
?CND3: PRINTI "(Please type YES or NO.)"
JUMP ?PRG1
.FUNCT YOU-CANT,STR=0,WHILE=0,STR1=0
EQUAL? WINNER,PLAYER \?ELS3
PRINTI "You"
JUMP ?CND1
?ELS3: CALL HE-SHE-IT,WINNER,TRUE-VALUE
?CND1: PRINTI " can't "
ZERO? STR /?ELS12
PRINT STR
JUMP ?CND10
?ELS12: CALL VERB-PRINT
?CND10: EQUAL? STR,STR?129 \?ELS22
PRINTR " in that direction."
?ELS22: ZERO? STR1 /?ELS26
PRINTI " it while"
ZERO? WHILE /?ELS32
CALL THIS-IS-IT,WHILE
CALL PRINTT,WHILE
JUMP ?CND30
?ELS32: PRINTI " it"
?CND30: PRINTI " is "
PRINT STR1
PRINTR "."
?ELS26: CALL THE-PRSO-PRINT
PRINTR " now."
.FUNCT DESCRIBE-OBJECT,OBJ,V?,LEVEL,STR=0,AV,NO-CR=0
CALL THIS-IS-IT,OBJ
ZERO? LEVEL \?CND1
GETP OBJ,P?DESCFCN
CALL STACK,M-OBJDESC
ZERO? STACK \TRUE
?CND1: ZERO? LEVEL \?ELS8
FSET? OBJ,TOUCHBIT /?ELS14
GETP OBJ,P?FDESC >STR
ZERO? STR \?THN11
?ELS14: GETP OBJ,P?LDESC >STR
ZERO? STR /?ELS8
?THN11: PRINT STR
JUMP ?CND6
?ELS8: ZERO? LEVEL \?ELS18
FSET? OBJ,PERSON \?ELS21
CALL IS-CREW?,OBJ
ZERO? STACK /?ELS24
CALL CREW-5-TOGETHER?
ZERO? STACK /?ELS24
FSET? BLY,MUNGBIT /?ELS24
EQUAL? OBJ,LOWELL \?ELS29
PRINTI "The five "
PRINTD CREW
PRINTI " members are here."
JUMP ?CND6
?ELS29: SET 'NO-CR,TRUE-VALUE
JUMP ?CND6
?ELS24: PRINTD OBJ
PRINTI " is here."
JUMP ?CND6
?ELS21: PRINTI "There's "
CALL PRINTA,OBJ
PRINTI " here."
JUMP ?CND6
?ELS18: GET INDENTS,LEVEL
PRINT STACK
FSET? OBJ,PERSON \?ELS48
CALL IS-CREW?,OBJ
ZERO? STACK /?ELS51
CALL CREW-5-TOGETHER?
ZERO? STACK /?ELS51
FSET? BLY,MUNGBIT /?ELS51
EQUAL? OBJ,LOWELL \?ELS56
PRINTI "the five "
PRINTD CREW
PRINTI " members"
JUMP ?CND46
?ELS56: SET 'NO-CR,TRUE-VALUE
JUMP ?CND46
?ELS51: PRINTD OBJ
JUMP ?CND46
?ELS48: CALL PRINTA,OBJ
?CND46: EQUAL? OBJ,OXYGEN-GEAR \?CND6
IN? OXYGEN-GEAR,PLAYER \?CND6
PRINTI " (being worn)"
?CND6: ZERO? LEVEL \?CND76
LOC WINNER >AV
ZERO? AV /?CND76
FSET? AV,VEHBIT \?CND76
PRINTI " (outside"
CALL PRINTT,AV
PRINTI ")"
?CND76: ZERO? NO-CR \?CND83
CRLF
?CND83: CALL SEE-INSIDE?,OBJ
ZERO? STACK /FALSE
FIRST? OBJ \FALSE
CALL PRINT-CONT,OBJ,V?,LEVEL
RSTACK
.FUNCT DESCRIBE-OBJECTS,V?=0
FIRST? HERE \FALSE
ZERO? V? /?ORP14
PUSH V?
JUMP ?THN11
?ORP14: PUSH VERBOSE
?THN11: POP 'V?
CALL PRINT-CONT,HERE,V?,-1
RSTACK
.FUNCT DESCRIBE-ROOM,LOOK?=0,V?,STR,L
ZERO? LOOK? /?ORP4
PUSH LOOK?
JUMP ?THN1
?ORP4: PUSH VERBOSE
?THN1: POP 'V?
FSET? HERE,TOUCHBIT /?CND5
SET 'V?,TRUE-VALUE
?CND5: IN? HERE,ROOMS \?CND8
PRINTI "("
PRINTD HERE
PRINTI ")"
CRLF
?CND8: ZERO? LOOK? \?THN16
ZERO? SUPER-BRIEF \?CND13
?THN16: LOC WINNER >L
FSET? L,VEHBIT \?CND18
PRINTI "(You're "
FSET? L,SURFACEBIT \?ELS25
PRINTI "sitting o"
JUMP ?CND23
?ELS25: PRINTI "standing i"
?CND23: PRINTI "n"
CALL PRINTT,L
PRINTI ".)"
CRLF
?CND18: ZERO? V? /?ELS36
GETP HERE,P?ACTION
CALL STACK,M-LOOK
ZERO? STACK /?ELS36
FSET HERE,TOUCHBIT
RTRUE
?ELS36: ZERO? V? /?ELS40
GETP HERE,P?FDESC >STR
ZERO? STR /?ELS40
PRINT STR
CRLF
JUMP ?CND34
?ELS40: ZERO? V? /?ELS46
GETP HERE,P?LDESC >STR
ZERO? STR /?ELS46
PRINT STR
CRLF
JUMP ?CND34
?ELS46: GETP HERE,P?ACTION
CALL STACK,M-FLASH
?CND34: EQUAL? HERE,L /?CND13
GETP L,P?ACTION
CALL STACK,M-LOOK
?CND13: GETP HERE,P?CORRIDOR
ZERO? STACK /?CND56
CALL CORRIDOR-LOOK
?CND56: FSET HERE,TOUCHBIT
RTRUE
.FUNCT FAR-AWAY?,L
EQUAL? L,GLOBAL-OBJECTS /TRUE
CALL IN-LAB-AREA?,HERE
ZERO? STACK /?ELS7
CALL IN-LAB-AREA?,L
ZERO? STACK \FALSE
RTRUE
?ELS7: CALL IN-DOME?,HERE
ZERO? STACK /?ELS11
CALL IN-DOME?,L
ZERO? STACK \FALSE
RTRUE
?ELS11: EQUAL? HERE,SUB,CRAWL-SPACE \?ELS15
EQUAL? L,SUB,CRAWL-SPACE /FALSE
RTRUE
?ELS15: PRINTR "[Foo! Where is HERE?]"
.FUNCT FIRSTER,OBJ,LEVEL
EQUAL? OBJ,PLAYER \?ELS5
PRINTR "You're holding:"
?ELS5: FSET? OBJ,PERSON \?ELS9
PRINTD OBJ
PRINTR " is holding:"
?ELS9: IN? OBJ,ROOMS /FALSE
GRTR? LEVEL,0 \?CND14
GET INDENTS,LEVEL
PRINT STACK
?CND14: FSET? OBJ,SURFACEBIT \?ELS23
PRINTI "Sitting on"
CALL PRINTT,OBJ
PRINTR " is:"
?ELS23: FSET? OBJ,NARTICLEBIT /?CND28
PRINTI "The "
?CND28: PRINTD OBJ
PRINTR " contains:"
.FUNCT GO-NEXT,TBL,VAL
CALL LKP,HERE,TBL >VAL
ZERO? VAL /FALSE
CALL GOTO,VAL
RSTACK
.FUNCT HAR-HAR
CALL PICK-ONE,YUKS
PRINT STACK
CRLF
RTRUE
.FUNCT HE-SHE-IT,OBJ,CAP=0,VERB=0
FSET? OBJ,PERSON \?ELS3
EQUAL? OBJ,PLAYER \?ELS6
ZERO? CAP /?ELS9
PRINTI "You"
JUMP ?CND1
?ELS9: PRINTI "you"
JUMP ?CND1
?ELS6: FSET? OBJ,FEMALE \?ELS18
ZERO? CAP /?ELS21
PRINTI "She"
JUMP ?CND1
?ELS21: PRINTI "she"
JUMP ?CND1
?ELS18: ZERO? CAP /?ELS33
PRINTI "He"
JUMP ?CND1
?ELS33: PRINTI "he"
JUMP ?CND1
?ELS3: ZERO? CAP /?ELS45
PRINTI "It"
JUMP ?CND1
?ELS45: PRINTI "it"
?CND1: ZERO? VERB /FALSE
PRINTC 32
EQUAL? VERB,STR?113 \?ELS63
EQUAL? OBJ,PLAYER /?ELS68
PRINTI "is"
RTRUE
?ELS68: PRINTI "are"
RTRUE
?ELS63: PRINT VERB
EQUAL? OBJ,PLAYER /FALSE
PRINTI "s"
RTRUE
.FUNCT HIM-HER-IT,OBJ,CAP=0,POSSESS?=0
FSET? OBJ,PERSON \?ELS3
EQUAL? OBJ,PLAYER \?ELS6
ZERO? CAP /?ELS9
PRINTI "You"
JUMP ?CND7
?ELS9: PRINTI "you"
?CND7: ZERO? POSSESS? /TRUE
PRINTI "r"
RTRUE
?ELS6: FSET? OBJ,FEMALE \?ELS24
ZERO? CAP /?ELS27
PRINTI "Her"
RTRUE
?ELS27: PRINTI "her"
RTRUE
?ELS24: ZERO? POSSESS? /?ELS39
ZERO? CAP /?ELS43
PRINTI "His"
RTRUE
?ELS43: PRINTI "his"
RTRUE
?ELS39: ZERO? CAP /?ELS55
PRINTI "Him"
RTRUE
?ELS55: PRINTI "him"
RTRUE
?ELS3: ZERO? CAP /?ELS67
PRINTI "It"
JUMP ?CND65
?ELS67: PRINTI "it"
?CND65: ZERO? POSSESS? /TRUE
PRINTI "s"
RTRUE
.FUNCT NOT-HOLDING?,OBJ
IN? OBJ,WINNER /FALSE
LOC OBJ
IN? STACK,WINNER /FALSE
CALL HE-SHE-IT,WINNER,TRUE-VALUE
EQUAL? WINNER,PLAYER \?ELS10
PRINTI "'re"
JUMP ?CND8
?ELS10: PRINTI "'s"
?CND8: PRINTI " not holding"
CALL PRINTT,OBJ
PRINTR "."
.FUNCT LKP,ITM,TBL,CNT=0,LEN
GET TBL,0 >LEN
?PRG1: IGRTR? 'CNT,LEN /FALSE
GET TBL,CNT
EQUAL? STACK,ITM \?PRG1
EQUAL? CNT,LEN /FALSE
ADD CNT,1
GET TBL,STACK
RETURN STACK
.FUNCT GOTO,RM,V?=1,L,ITARM,ILRM
IN? WINNER,RM \?CND1
CALL HAR-HAR
RFALSE
?CND1: CALL AIR-ROOM?,HERE
ZERO? STACK /?CND4
CALL AIR-ROOM?,RM
ZERO? STACK \?CND4
CALL BAD-AIR?
ZERO? STACK \FALSE
?CND4: FSET? AIR-SUPPLY-SYSTEM,MUNGBIT \?CND9
EQUAL? RM,DOME-LAB,BLY-OFFICE \?CND9
PRINTI "You should wait for someone to invite you."
CRLF
RFALSE
?CND9: LOC WINNER >L
ZERO? SUB-IN-DOME /?CND16
FSET? AIRLOCK-ROOF,OPENBIT /?CND16
CALL THROUGH-ROOF?,RM,L
ZERO? STACK /?CND16
CALL THIS-IS-IT,AIRLOCK-ROOF
CALL TOO-BAD-BUT,AIRLOCK-ROOF,STR?17
RFALSE
?CND16: EQUAL? WINNER,PLAYER \?ELS23
CALL TIP-FOLLOWS-YOU,RM
JUMP ?CND21
?ELS23: FSET? WINNER,MUNGBIT \?ELS25
PRINTI """I wish I could!"""
CRLF
RFALSE
?ELS25: EQUAL? RM,CRAWL-SPACE /?THN30
EQUAL? RM,SUB \?CND21
EQUAL? WINNER,TIP,SHARON /?CND21
?THN30: PRINTI """You belong in there, not I!"""
CRLF
RFALSE
?CND21: ZERO? SUB-IN-TANK \?ELS38
CALL OPEN-DOOR,L
CALL OPEN-DOOR,RM
JUMP ?CND36
?ELS38: CALL IN-TANK-AREA?,RM >ITARM
CALL IN-LAB?,RM >ILRM
CALL IN-TANK-AREA?,L
ZERO? STACK /?ELS43
ZERO? ITARM \?CND44
FSET SOUTH-DOORWAY,OPENBIT
?CND44: ZERO? ILRM \?CND47
FSET EAST-DOORWAY,OPENBIT
?CND47: EQUAL? RM,LAB-STORAGE \?CND41
FSET STORAGE-DOOR,OPENBIT
JUMP ?CND41
?ELS43: CALL IN-LAB?,L
ZERO? STACK /?ELS54
ZERO? ITARM /?ELS57
FSET SOUTH-DOORWAY,OPENBIT
JUMP ?CND41
?ELS57: ZERO? ILRM \?CND61
FSET EAST-DOORWAY,OPENBIT
?CND61: EQUAL? RM,LAB-STORAGE \?CND36
FSET STORAGE-DOOR,OPENBIT
JUMP ?CND36
?ELS54: EQUAL? L,HALLWAY,OFFICE \?ELS68
ZERO? ITARM /?CND69
FSET EAST-DOORWAY,OPENBIT
FSET SOUTH-DOORWAY,OPENBIT
?CND69: ZERO? ILRM /?CND73
FSET EAST-DOORWAY,OPENBIT
?CND73: EQUAL? RM,LAB-STORAGE \?CND41
FSET STORAGE-DOOR,OPENBIT
JUMP ?CND41
?ELS68: EQUAL? L,LAB-STORAGE \?CND36
ZERO? ITARM /?CND82
FSET EAST-DOORWAY,OPENBIT
FSET SOUTH-DOORWAY,OPENBIT
?CND82: ZERO? ILRM /?CND86
FSET EAST-DOORWAY,OPENBIT
?CND86: FSET STORAGE-DOOR,OPENBIT
?CND41:
?CND36: MOVE WINNER,RM
EQUAL? WINNER,SHARON \?CND93
EQUAL? RM,OFFICE \?ELS98
FSET SHARON,NDESCBIT
FSET FILE-DRAWER,NDESCBIT
FSET PAPERS,NDESCBIT
JUMP ?CND93
?ELS98: FCLEAR SHARON,NDESCBIT
FCLEAR FILE-DRAWER,NDESCBIT
FCLEAR PAPERS,NDESCBIT
?CND93: SET 'LIT,TRUE-VALUE
EQUAL? WINNER,PLAYER \TRUE
SET 'HERE,RM
ZERO? V? /?CND104
CALL V-FIRST-LOOK
?CND104: GETP HERE,P?ACTION
CALL STACK,M-ENTER
GETP HERE,P?ACTION
CALL STACK,M-FLASH
RTRUE
.FUNCT OPEN-DOOR,RM,TBL,DR
EQUAL? RM,OFFICE,SUB /TRUE
EQUAL? RM,AIRLOCK \?ELS7
FSET AIRLOCK-ROOF,OPENBIT
RTRUE
?ELS7: GETPT RM,P?GLOBAL >TBL
ZERO? TBL /FALSE
PTSIZE TBL
SUB STACK,1
CALL ZMEMQBIT,DOORBIT,TBL,STACK >DR
ZERO? DR /FALSE
FSET DR,OPENBIT
RTRUE
.FUNCT HACK-HACK,STR
PRINT STR
CALL THE-PRSO-PRINT
CALL PICK-ONE,HO-HUM
PRINT STACK
CRLF
RTRUE
.FUNCT HELD?,OBJ
?PRG1: LOC OBJ
ZERO? STACK /FALSE
LOC OBJ
EQUAL? STACK,ROOMS,GLOBAL-OBJECTS /FALSE
IN? OBJ,WINNER /TRUE
LOC OBJ >OBJ
JUMP ?PRG1
.FUNCT IDROP
FSET? PRSO,PERSON \?ELS5
EQUAL? PRSO,PLAYER \?ELS8
PRINTI "You"
JUMP ?CND6
?ELS8: PRINTD PRSO
?CND6: PRINTI " wouldn't enjoy that."
CRLF
RFALSE
?ELS5: CALL NOT-HOLDING?,PRSO
ZERO? STACK \FALSE
IN? PRSO,WINNER /?ELS20
LOC PRSO
FSET? STACK,OPENBIT /?ELS20
LOC PRSO
CALL TOO-BAD-BUT,STACK,STR?17
RFALSE
?ELS20: MOVE PRSO,HERE
FCLEAR PRSO,NDESCBIT
FCLEAR PRSO,INVISIBLE
RTRUE
.FUNCT ITAKE,VB=1,CNT,OBJ,TEMP,?TMP1
FSET? PRSO,TAKEBIT /?ELS5
ZERO? VB /FALSE
CALL YOU-CANT,STR?19
RFALSE
?ELS5: CALL CCOUNT,WINNER >CNT
GRTR? CNT,FUMBLE-NUMBER \?ELS11
MUL CNT,FUMBLE-PROB >?TMP1
RANDOM 100
GRTR? ?TMP1,STACK \?ELS11
FIRST? WINNER >OBJ /?KLU40
?KLU40: CALL TOO-BAD-BUT,OBJ
PRINTI " slips from "
CALL HIM-HER-IT,WINNER,FALSE-VALUE,TRUE-VALUE
PRINTI " arms while "
CALL HE-SHE-IT,WINNER,FALSE-VALUE,STR?113
PRINTI " taking"
CALL THE-PRSO-PRINT
PRINTI ", and both tumble "
CALL GROUND-DESC
PRINT STACK
PRINTI "."
CRLF
MOVE OBJ,HERE
MOVE PRSO,HERE
RETURN 2
?ELS11: SET 'ITAKE-LOC,FALSE-VALUE
LOC PRSO >OBJ
FSET? OBJ,PERSON \?CND24
ZERO? VB /?ELS29
PRINTD OBJ
PRINTI " gives it to "
CALL HIM-HER-IT,WINNER
PRINTI ". "
JUMP ?CND24
?ELS29: SET 'ITAKE-LOC,OBJ
?CND24: MOVE PRSO,WINNER
FSET PRSO,TOUCHBIT
FCLEAR PRSO,NDESCBIT
FCLEAR PRSO,INVISIBLE
EQUAL? WINNER,PLAYER \TRUE
CALL SCORE-OBJ,PRSO
RTRUE
.FUNCT CCOUNT,OBJ,CNT=0,X
FIRST? OBJ >X \?CND1
?PRG4: INC 'CNT
NEXT? X >X /?PRG4
?CND1: RETURN CNT
.FUNCT CHECK-DOOR,DR
FSET? DR,NARTICLEBIT /?CND1
PRINTI "The "
?CND1: PRINTD DR
PRINTI " is "
FSET? DR,OPENBIT \?ELS12
PUSH STR?21
JUMP ?CND8
?ELS12: PUSH STR?17
?CND8: PRINT STACK
PRINTR "."
.FUNCT CHECK-ON-OFF
FSET? PRSO,NARTICLEBIT /?CND1
PRINTI "The "
?CND1: PRINTD PRSO
PRINTI " is o"
FSET? PRSO,ONBIT \?ELS12
PUSH STR?40
JUMP ?CND8
?ELS12: PUSH STR?41
?CND8: PRINT STACK
PRINTR "."
.FUNCT NOT-HERE,OBJ
PRINTI "You can't see"
CALL PRINTT,OBJ
PRINTR " here."
.FUNCT PRINT-CONT,OBJ,V?=0,LEVEL=0,Y,1ST?,AV,STR=0,PV?=0,INV?=0,VAL=0
FIRST? OBJ >Y \FALSE
LOC WINNER >AV
ZERO? AV /?ELS6
FSET? AV,VEHBIT \?ELS6
JUMP ?CND4
?ELS6: SET 'AV,FALSE-VALUE
?CND4: SET '1ST?,TRUE-VALUE
LOC OBJ
EQUAL? WINNER,OBJ,STACK \?ELS13
SET 'INV?,TRUE-VALUE
JUMP ?CND11
?ELS13:
?PRG16: ZERO? Y \?ELS20
JUMP ?CND11
?ELS20: EQUAL? Y,AV \?ELS22
SET 'PV?,TRUE-VALUE
JUMP ?CND18
?ELS22: EQUAL? Y,WINNER \?ELS24
JUMP ?CND18
?ELS24: FSET? Y,INVISIBLE /?CND18
FSET? Y,TOUCHBIT /?CND18
GETP Y,P?FDESC >STR
ZERO? STR /?CND18
FSET? Y,NDESCBIT \?THN34
ZERO? DEBUG /?CND31
PRINTI "[ndescbit] "
?THN34: SET '1ST?,FALSE-VALUE
SET 'LEVEL,0
ZERO? STR /?CND31
PRINT STR
CRLF
SET 'STR,FALSE-VALUE
SET 'VAL,TRUE-VALUE
CALL THIS-IS-IT,Y
?CND31: CALL SEE-INSIDE?,Y
ZERO? STACK /?CND18
LOC Y
GETP STACK,P?DESCFCN
ZERO? STACK \?CND18
FIRST? Y \?CND18
CALL PRINT-CONT,Y,V?,0
ZERO? STACK /?CND46
SET 'VAL,TRUE-VALUE
?CND46:
?CND18: NEXT? Y >Y /?KLU101
?KLU101: JUMP ?PRG16
?CND11: FIRST? OBJ >Y /?KLU102
?KLU102:
?PRG54: ZERO? Y \?ELS58
ZERO? PV? /?CND59
ZERO? AV /?CND59
FIRST? AV \?CND59
CALL PRINT-CONT,AV,V?,LEVEL
ZERO? STACK /?CND59
SET 'VAL,TRUE-VALUE
?CND59: RETURN VAL
?ELS58: EQUAL? Y,AV,PLAYER \?ELS68
JUMP ?CND56
?ELS68: FSET? Y,INVISIBLE /?CND56
ZERO? INV? \?THN73
FSET? Y,TOUCHBIT /?THN73
GETP Y,P?FDESC
ZERO? STACK \?CND56
?THN73: FSET? Y,NDESCBIT \?THN78
ZERO? DEBUG /?ELS77
PRINTI "[ndescbit] "
?THN78: ZERO? 1ST? /?CND84
CALL FIRSTER,OBJ,LEVEL
ZERO? STACK /?CND88
LESS? LEVEL,0 \?CND88
SET 'LEVEL,0
?CND88: INC 'LEVEL
SET '1ST?,FALSE-VALUE
?CND84: SET 'VAL,TRUE-VALUE
CALL DESCRIBE-OBJECT,Y,V?,LEVEL
JUMP ?CND56
?ELS77: FIRST? Y \?CND56
CALL SEE-INSIDE?,Y
ZERO? STACK /?CND56
CALL PRINT-CONT,Y,V?,LEVEL
ZERO? STACK /?CND75
SET 'VAL,TRUE-VALUE
?CND75:
?CND56: NEXT? Y >Y /?KLU103
?KLU103: JUMP ?PRG54
.FUNCT PRINT-CONTENTS,OBJ,F,N,1ST?=1
FIRST? OBJ >F \FALSE
?PRG6: NEXT? F >N /?KLU33
?KLU33: ZERO? 1ST? /?ELS10
SET '1ST?,FALSE-VALUE
JUMP ?CND8
?ELS10: PRINTI ", "
ZERO? N \?CND8
PRINTI "and "
?CND8: FSET? F,PERSON \?ELS23
PRINTD F
JUMP ?CND21
?ELS23: CALL PRINTA,F
?CND21: CALL THIS-IS-IT,F
SET 'F,N
ZERO? F \?PRG6
RTRUE
.FUNCT ROOM-CHECK,P
SET 'P,PRSO
EQUAL? P,DOCKING-TANK \?CND1
EQUAL? HERE,AIRLOCK \?CND1
SET 'P,HERE
?CND1: IN? P,ROOMS \?ELS10
EQUAL? P,HERE \?ELS15
CALL PERFORM,PRSA,GLOBAL-HERE,PRSI
RTRUE
?ELS15: EQUAL? P,AIRLOCK \?ELS17
CALL GLOBAL-IN?,FILL-TANK-BUTTON,HERE
ZERO? STACK \FALSE
?ELS17: PRINTR "You aren't in that place!"
?ELS10: EQUAL? P,PSEUDO-OBJECT /FALSE
CALL META-LOC,P
EQUAL? STACK,HERE,GLOBAL-OBJECTS,LOCAL-GLOBALS /FALSE
CALL CORRIDOR-LOOK,P
ZERO? STACK \FALSE
FSET? P,PERSON \?ELS34
IN? P,GLOBAL-OBJECTS \?ELS34
GETP P,P?CHARACTER
GET CHARACTER-TABLE,STACK >P
CALL CORRIDOR-LOOK,P
ZERO? STACK \FALSE
CALL NOT-HERE,P
RSTACK
?ELS34: CALL NOT-HERE,P
RSTACK
.FUNCT SEE-INSIDE?,OBJ
FSET? OBJ,INVISIBLE /FALSE
FSET? OBJ,TRANSBIT /TRUE
FSET? OBJ,OPENBIT /TRUE
FSET? OBJ,SURFACEBIT /TRUE
RFALSE
.FUNCT ARENT-TALKING
PRINTR "You aren't talking to anyone!"
.FUNCT ALREADY,OBJ,STR=0
CALL HE-SHE-IT,OBJ,TRUE-VALUE,STR?113
PRINTI " already "
ZERO? STR /TRUE
PRINT STR
PRINTR "!"
.FUNCT NOT-CLEAR-WHOM
PRINTR "It's not clear whom you're talking to."
.FUNCT OKAY,OBJ=0,STR=0
EQUAL? WINNER,PLAYER \?ELS3
EQUAL? PRSA,V?WALK-TO,V?WALK,V?THROUGH \?CND1
RTRUE
?ELS3: PRINTI """"
?CND1: PRINTI "Okay"
ZERO? OBJ /?CND13
PRINTI ","
CALL PRINTT,OBJ
ZERO? STR /?CND19
PRINTI " is now "
PRINT STR
?CND19: EQUAL? STR,STR?42 \?ELS27
FSET OBJ,ONBIT
JUMP ?CND13
?ELS27: EQUAL? STR,STR?39 \?ELS29
FCLEAR OBJ,ONBIT
JUMP ?CND13
?ELS29: EQUAL? STR,STR?21 \?ELS31
FSET OBJ,OPENBIT
JUMP ?CND13
?ELS31: EQUAL? STR,STR?17 \?CND13
FCLEAR OBJ,OPENBIT
?CND13: ZERO? STR \?THN37
ZERO? OBJ \TRUE
?THN37: PRINTI "."
EQUAL? WINNER,PLAYER /?CND41
PRINTI """"
?CND41: CRLF
RTRUE
.FUNCT WONT-HELP-TO-TALK-TO,OBJ
PRINTI "It won't help to talk to "
CALL PRINTA,OBJ
PRINTR "!"
.FUNCT TOO-BAD-BUT,OBJ,STR=0
PRINTI "Too bad, but"
CALL PRINTT,OBJ
ZERO? STR /TRUE
PRINTI " is "
PRINT STR
PRINTR "."
.FUNCT VISIBLE?,OBJ,L
LOC OBJ >L
CALL ACCESSIBLE?,OBJ
ZERO? STACK \TRUE
CALL CORRIDOR-LOOK,OBJ
ZERO? STACK \TRUE
ZERO? L /FALSE
CALL VISIBLE?,L
ZERO? STACK /FALSE
CALL SEE-INSIDE?,L
RSTACK
.FUNCT ACCESSIBLE?,OBJ,L
LOC OBJ >L
FSET? OBJ,INVISIBLE /FALSE
EQUAL? OBJ,PSEUDO-OBJECT \?ELS7
EQUAL? LAST-PSEUDO-LOC,HERE \FALSE
RTRUE
?ELS7: ZERO? L /FALSE
EQUAL? L,GLOBAL-OBJECTS /TRUE
EQUAL? L,LOCAL-GLOBALS \?ELS20
CALL GLOBAL-IN?,OBJ,HERE
ZERO? STACK \TRUE
?ELS20: CALL META-LOC,OBJ
EQUAL? STACK,HERE \FALSE
EQUAL? L,WINNER,HERE /TRUE
CALL ACCESSIBLE?,L
ZERO? STACK /FALSE
FSET? L,PERSON /TRUE
FSET? L,OPENBIT /TRUE
RFALSE
.FUNCT WEIGHT,OBJ,CONT,WT=0
FIRST? OBJ >CONT \?CND1
?PRG4: CALL WEIGHT,CONT
ADD WT,STACK >WT
NEXT? CONT >CONT /?PRG4