-
Notifications
You must be signed in to change notification settings - Fork 11
/
verbs.xzap
3772 lines (3239 loc) · 71.1 KB
/
verbs.xzap
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?133
CALL V-VERSION
CALL START-SONAR?
RTRUE
.FUNCT V-UNSCRIPT
CALL TRANSCRIPT,STR?134
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,0
SET 'SUPER-BRIEF,0
SET 'P-SPACE,1
CALL YOU-WILL-GET,STR?125
RSTACK
.FUNCT V-SUPER-BRIEF
SET 'SUPER-BRIEF,1
SET 'P-SPACE,0
CALL YOU-WILL-GET,STR?135
RSTACK
.FUNCT V-VERBOSE
SET 'VERBOSE,1
SET 'SUPER-BRIEF,0
SET 'P-SPACE,1
CALL YOU-WILL-GET,STR?136
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,1
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
JUMP ?CND5
?ELS7: PRINT FAILED
CRLF
?CND5: CALL START-SONAR?
RSTACK
.FUNCT V-RESTORE,OSNS
ZERO? SCREEN-NOW-SPLIT /?CND1
SPLIT 0
?CND1: RESTORE \?ELS9
PRINTI "Okay."
CRLF
CALL START-SONAR?
CALL V-FIRST-LOOK
RTRUE
?ELS9: 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
PRINTI "SEASTALKER: "
CALL PRINT-NAME,FIRST-NAME,1
PRINTC 32
CALL PRINT-NAME,LAST-NAME,1
PRINTI " AND THE ULTRAMARINE BIOCEPTOR
Junior-level interactive fiction from Infocom
Copyright (c) 1984 Infocom, Inc. All rights reserved.
"
GETB 0,1
BAND STACK,8
ZERO? STACK /?CND5
PRINTI "Licensed to Tandy Corporation. Version 00.00.15
"
?CND5: PRINTI "SEASTALKER is a trademark of Infocom, Inc.
Revision number "
GET 0,1
BAND STACK,2047
PRINTN STACK
PRINTI " / Serial number "
?PRG14: IGRTR? 'CNT,23 \?ELS18
JUMP ?REP15
?ELS18: GETB 0,CNT
PRINTC STACK
JUMP ?PRG14
?REP15: CRLF
RTRUE
.FUNCT YES?,WORD,VAL
?PRG1: PRINTI " >"
READ YES-INBUF,YES-LEXV
GET YES-LEXV,P-LEXSTART >WORD
ZERO? WORD /?CND3
CALL WT?,WORD,PS?VERB,P1?VERB >VAL
EQUAL? VAL,ACT?YES \?ELS8
SET 'VAL,1
RETURN VAL
?ELS8: EQUAL? VAL,ACT?NO /?THN11
EQUAL? WORD,W?N \?CND3
?THN11: SET 'VAL,0
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,1
?CND1: PRINTI " can't "
ZERO? STR /?ELS12
PRINT STR
JUMP ?CND10
?ELS12: CALL VERB-PRINT
?CND10: EQUAL? STR,STR?138 \?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,1
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,1
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?,1
?CND5: IN? HERE,ROOMS \?CND8
PRINTI "("
PRINTD HERE
PRINTI ")"
CRLF
?CND8: ZERO? V? /?CND13
LOC WINNER >L
FSET? L,VEHBIT \?CND17
PRINTI "(You're "
FSET? L,SURFACEBIT \?ELS24
PRINTI "sitting o"
JUMP ?CND22
?ELS24: PRINTI "standing i"
?CND22: PRINTI "n"
CALL PRINTT,L
PRINTI ".)"
CRLF
?CND17: ZERO? V? /?ELS35
GETP HERE,P?ACTION
CALL STACK,M-LOOK
ZERO? STACK /?ELS35
FSET HERE,TOUCHBIT
RTRUE
?ELS35: ZERO? V? /?ELS39
GETP HERE,P?FDESC >STR
ZERO? STR /?ELS39
PRINT STR
CRLF
JUMP ?CND33
?ELS39: ZERO? V? /?ELS45
GETP HERE,P?LDESC >STR
ZERO? STR /?ELS45
PRINT STR
CRLF
JUMP ?CND33
?ELS45: GETP HERE,P?ACTION
CALL STACK,M-FLASH
?CND33: EQUAL? HERE,L /?CND13
GETP L,P?ACTION
CALL STACK,M-LOOK
?CND13: GETP HERE,P?CORRIDOR
ZERO? STACK /?CND55
CALL CORRIDOR-LOOK
?CND55: 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,PERSON \?ELS27
PRINTD OBJ
PRINTR " is holding:"
?ELS27: PRINTI "The "
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
PRINT VERB
EQUAL? OBJ,PLAYER /FALSE
PRINTI "s"
RTRUE
.FUNCT HIM-HER-IT,OBJ,CAP=0
FSET? OBJ,PERSON \?ELS5
EQUAL? OBJ,PLAYER \?ELS10
ZERO? CAP /?ELS15
PRINTI "You"
RTRUE
?ELS15: PRINTI "you"
RTRUE
?ELS10: FSET? OBJ,FEMALE \?ELS24
ZERO? CAP /?ELS29
PRINTI "Her"
RTRUE
?ELS29: PRINTI "her"
RTRUE
?ELS24: ZERO? CAP /?ELS43
PRINTI "Him"
RTRUE
?ELS43: PRINTI "him"
RTRUE
?ELS5: ZERO? CAP /?ELS57
PRINTI "It"
RTRUE
?ELS57: PRINTI "it"
RTRUE
.FUNCT NOT-HOLDING?,OBJ
IN? OBJ,WINNER /FALSE
LOC OBJ
IN? STACK,WINNER /FALSE
CALL HE-SHE-IT,WINNER,1
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,1
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,T,DR
EQUAL? RM,OFFICE,SUB /TRUE
EQUAL? RM,AIRLOCK \?ELS7
FSET AIRLOCK-ROOF,OPENBIT
RTRUE
?ELS7: GETPT RM,P?GLOBAL >T
ZERO? T /FALSE
PTSIZE T
SUB STACK,1
CALL ZMEMQBIT,DOORBIT,T,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 /?KLU36
?KLU36: CALL TOO-BAD-BUT,OBJ
PRINTI " slips from your arms while you are 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,0
LOC PRSO >OBJ
FSET? OBJ,PERSON \?CND20
ZERO? VB /?ELS25
PRINTD OBJ
PRINTI " gives it to "
CALL HIM-HER-IT,WINNER
PRINTI ". "
JUMP ?CND20
?ELS25: SET 'ITAKE-LOC,OBJ
?CND20: 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
PRINTI "You can see that"
CALL THE-PRSO-PRINT
PRINTI " is "
FSET? PRSO,OPENBIT \?ELS7
PUSH STR?23
JUMP ?CND3
?ELS7: PUSH STR?17
?CND3: PRINT STACK
PRINTR "."
.FUNCT CHECK-ON-OFF
PRINTI "You can see that"
CALL THE-PRSO-PRINT
PRINTI " is o"
FSET? PRSO,ONBIT \?ELS7
PUSH STR?45
JUMP ?CND3
?ELS7: PUSH STR?46
?CND3: 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,0
?CND4: SET '1ST?,1
LOC OBJ
EQUAL? WINNER,OBJ,STACK \?ELS13
SET 'INV?,1
JUMP ?CND11
?ELS13:
?PRG16: ZERO? Y \?ELS20
JUMP ?CND11
?ELS20: EQUAL? Y,AV \?ELS22
SET 'PV?,1
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?,0
SET 'LEVEL,0
ZERO? STR /?CND31
PRINT STR
CRLF
SET 'STR,0
SET 'VAL,1
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,1
?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,1
?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?,0
?CND84: SET 'VAL,1
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,1
?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?,0
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 NOT-ACCESSIBLE?,OBJ
CALL META-LOC,OBJ
EQUAL? STACK,WINNER,HERE,GLOBAL-OBJECTS /FALSE
CALL VISIBLE?,OBJ
ZERO? STACK /TRUE
RFALSE
.FUNCT ARENT-TALKING
PRINTR "You aren't talking to anyone!"
.FUNCT ALREADY,OBJ,STR=0
EQUAL? OBJ,PLAYER \?ELS3
PRINTI "You're"
JUMP ?CND1
?ELS3: FSET? OBJ,PERSON \?ELS7
PRINTD OBJ
PRINTI " is"
JUMP ?CND1
?ELS7: PRINTI "It's"
?CND1: 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?47 \?ELS27
FSET OBJ,ONBIT
JUMP ?CND13
?ELS27: EQUAL? STR,STR?44 \?ELS29
FCLEAR OBJ,ONBIT
JUMP ?CND13
?ELS29: EQUAL? STR,STR?23 \?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
FSET? OBJ,INVISIBLE /FALSE
EQUAL? L,GLOBAL-OBJECTS /FALSE
EQUAL? L,WINNER,HERE /TRUE
EQUAL? L,LOCAL-GLOBALS \?ELS11
CALL GLOBAL-IN?,OBJ,HERE
ZERO? STACK \TRUE
?ELS11: CALL CORRIDOR-LOOK,OBJ
ZERO? STACK \TRUE
CALL SEE-INSIDE?,L
ZERO? STACK /FALSE
CALL VISIBLE?,L
ZERO? STACK /FALSE
RTRUE
.FUNCT WEIGHT,OBJ,CONT,WT=0
FIRST? OBJ >CONT \?CND1
?PRG4: CALL WEIGHT,CONT
ADD WT,STACK >WT
NEXT? CONT >CONT /?PRG4
?CND1: GETP OBJ,P?SIZE
ADD WT,STACK
RSTACK
.FUNCT V-ADJUST
CALL YOU-CANT
RSTACK
.FUNCT PRE-SAIM
CALL PERFORM,V?AIM,PRSI,PRSO
RTRUE
.FUNCT V-SAIM