-
Notifications
You must be signed in to change notification settings - Fork 15
/
verbs.zap
2961 lines (2588 loc) · 62 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 V-SCRIPT
GET 0,8
BOR STACK,1
PUT 0,8,STACK
PRINTI "Here begins"
PRINTI " a transcript of interaction with "
CALL V-VERSION
RTRUE
.FUNCT V-UNSCRIPT
PRINTI "Here ends"
PRINTI " a transcript of interaction with "
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: CRLF
PRINTR "** Disk Failure **"
.FUNCT V-$TANDY,X,MSG
ZERO? DEBUG \?CND1
CALL PICK-ONE,UNKNOWN-MSGS >MSG
GET MSG,0
PRINT STACK
PRINTI "$ta"
GET MSG,1
PRINT STACK
CRLF
RTRUE
?CND1: GETB 0,1 >X
BAND X,8
ZERO? STACK \?ELS10
BOR X,8
PUTB 0,1,STACK
PRINTR "[on]"
?ELS10: BAND X,-9
PUTB 0,1,STACK
PRINTR "[off]"
.FUNCT V-$WHERE,CNT=0,O,L,MSG
ZERO? DEBUG \?ELS5
CALL PICK-ONE,UNKNOWN-MSGS >MSG
GET MSG,0
PRINT STACK
PRINTI "$whr"
GET MSG,1
PRINT STACK
CRLF
RTRUE
?ELS5: ZERO? PRSI /?ELS9
MOVE PRSI,PRSO
RTRUE
?ELS9: ZERO? PRSO /?ELS12
CALL GOTO,PRSO
RSTACK
?ELS12:
?PRG16: GET CHARACTER-TABLE,CNT >O
ZERO? O /?CND18
LOC O >L
PRINTD O
PRINTI " is "
ZERO? L /?ELS25
PRINTI "in"
CALL THE?,L
PRINTI " "
PRINTD L
PRINTI "."
CRLF
JUMP ?CND18
?ELS25: PRINTI "nowhere."
CRLF
?CND18: IGRTR? 'CNT,CHARACTER-MAX \?PRG16
RTRUE
.FUNCT V-DEBUG,MSG
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 V-BRIEF
SET 'VERBOSE,FALSE-VALUE
SET 'SUPER-BRIEF,FALSE-VALUE
SET 'P-SPACE,1
PRINTI "(O.K., you will get "
PRINTI "brief"
PRINTR " descriptions.)"
.FUNCT V-SUPER-BRIEF
SET 'SUPER-BRIEF,TRUE-VALUE
SET 'P-SPACE,0
PRINTI "(O.K., you will get "
PRINTR "super-brief descriptions. Remember that objects and people won't be described, only the name of the place you are entering.)"
.FUNCT V-VERBOSE
SET 'VERBOSE,TRUE-VALUE
SET 'SUPER-BRIEF,FALSE-VALUE
SET 'P-SPACE,1
PRINTI "(O.K., you will get "
PRINTI "verbose"
PRINTR " descriptions.)"
.FUNCT V-SPACE
SET 'P-SPACE,1
PRINTR "(O.K., you will now see a space before each input line.)"
.FUNCT V-UNSPACE
SET 'P-SPACE,0
PRINTR "(O.K., you will not see a space before each input line.)"
.FUNCT V-INVENTORY
FIRST? WINNER \?ELS5
CALL PRINT-CONT,WINNER
RSTACK
?ELS5: PRINTR "You are empty-handed."
.FUNCT V-TIME
PRINTI "It's now "
CALL TIME-PRINT,PRESENT-TIME
CRLF
RTRUE
.FUNCT TIME-PRINT,NUM,HR,AM=0
DIV NUM,60 >HR
GRTR? HR,12 \?ELS3
SUB HR,12 >HR
SET 'AM,TRUE-VALUE
JUMP ?CND1
?ELS3: EQUAL? HR,12 \?CND1
SET 'AM,TRUE-VALUE
?CND1: PRINTN HR
PRINTI ":"
MOD NUM,60 >HR
LESS? HR,10 \?CND8
PRINTI "0"
?CND8: PRINTN HR
PRINTI " "
ZERO? AM /?ELS21
PUSH STR?148
JUMP ?CND17
?ELS21: PUSH STR?149
?CND17: PRINT STACK
RTRUE
.FUNCT V-QUIT,ASK?=1,SCOR
ZERO? ASK? /?ELS9
PRINTI "(If you want to continue from this point at another time, you must ""SUSPEND"" first.) Do you want to "
PRINTI "stop your investigation now?"
CALL YES?
ZERO? STACK \?THN6
?ELS9: ZERO? ASK? \?ELS5
?THN6: ZERO? TOO-LATE /?CND12
CALL TOO-LATE-F
?CND12: QUIT
RTRUE
?ELS5: PRINTR "O.K."
.FUNCT V-RESTART
PRINTI "Do you wish to restart your investigation?"
CALL YES?
ZERO? STACK /FALSE
RESTART
PRINTI "Your original"
PRINTI " status couldn't be restored."
PRINTI " Consult your instruction manual"
PRINTR " if necessary."
.FUNCT V-RESTORE
RESTORE \?ELS5
PRINTI "O.K."
CRLF
CALL V-FIRST-LOOK
RSTACK
?ELS5: PRINTI "Your previous"
PRINTI " status couldn't be restored."
PRINTI " Consult your instruction manual"
PRINTI " or Reference Card"
PRINTR " if necessary."
.FUNCT V-FIRST-LOOK
CALL DESCRIBE-ROOM
ZERO? STACK /FALSE
ZERO? SUPER-BRIEF \FALSE
CALL DESCRIBE-OBJECTS
RSTACK
.FUNCT V-SAVE
SAVE \?ELS5
PRINTR "O.K."
?ELS5: PRINTI "Your story couldn't be suspended."
PRINTI " Consult your instruction manual"
PRINTI " or Reference Card"
PRINTR " if necessary."
.FUNCT TANDY?
GETB 0,1
BAND STACK,8
ZERO? STACK /FALSE
RTRUE
.FUNCT V-VERSION,CNT=17
PRINTI "The WITNESS: An INTERLOGIC Mystery
Copyright (c) 1983 Infocom, Inc. All rights reserved.
"
CALL TANDY?
ZERO? STACK /?CND3
PRINTI "Licensed to Tandy Corporation.
"
?CND3: PRINTI "WITNESS and INTERLOGIC are trademarks of Infocom, Inc.
Revision number "
GET 0,1
BAND STACK,2047
PRINTN STACK
PRINTI " / Serial number "
?PRG12: IGRTR? 'CNT,23 \?ELS16
JUMP ?REP13
?ELS16: GETB 0,CNT
PRINTC STACK
JUMP ?PRG12
?REP13: CRLF
RTRUE
.FUNCT YES?
PRINTI " (Answer YES or NO.) >"
READ P-INBUF,P-LEXV
GETB P-LEXV,P-LEXWORDS
ZERO? STACK /FALSE
GET P-LEXV,1
EQUAL? STACK,W?YES,W?Y \FALSE
RTRUE
.FUNCT DESCRIBE-OBJECT,OBJ,V?,LEVEL,STR=0,AV
ZERO? LEVEL \?CND1
GETP OBJ,P?DESCFCN
CALL STACK,M-OBJDESC
ZERO? STACK \TRUE
?CND1: FSET? OBJ,PERSON \?ELS8
CALL THIS-IS-S-HE,OBJ
JUMP ?CND6
?ELS8: CALL THIS-IS-IT,OBJ
?CND6: ZERO? LEVEL \?ELS13
FSET? OBJ,TOUCHBIT /?ELS19
GETP OBJ,P?FDESC >STR
ZERO? STR \?THN16
?ELS19: GETP OBJ,P?LDESC >STR
ZERO? STR /?ELS13
?THN16: PRINT STR
JUMP ?CND11
?ELS13: ZERO? LEVEL \?ELS23
FSET? OBJ,PERSON \?ELS26
PRINTD OBJ
PRINTI " is here."
JUMP ?CND11
?ELS26: PRINTI "There's "
FSET? OBJ,AN \?ELS37
PUSH STR?150
JUMP ?CND33
?ELS37: PUSH STR?151
?CND33: PRINT STACK
PRINTD OBJ
PRINTI " here."
JUMP ?CND11
?ELS23: GET INDENTS,LEVEL
PRINT STACK
FSET? OBJ,PERSON \?ELS46
PRINTD OBJ
JUMP ?CND11
?ELS46: FSET? OBJ,AN \?ELS57
PUSH STR?150
JUMP ?CND53
?ELS57: PUSH STR?151
?CND53: PRINT STACK
PRINTD OBJ
?CND11: ZERO? LEVEL \?CND60
LOC WINNER >AV
ZERO? AV /?CND60
FSET? AV,VEHBIT \?CND60
PRINTI " (outside"
CALL THE?,AV
PRINTI " "
PRINTD AV
PRINTI ")"
?CND60: CRLF
CALL SEE-INSIDE?,OBJ
ZERO? STACK /FALSE
FIRST? OBJ \FALSE
CALL PRINT-CONT,OBJ,V?,LEVEL
RSTACK
.FUNCT DESCRIBE-OBJECTS,V?=0
ZERO? LIT /?ELS5
FIRST? HERE \FALSE
ZERO? V? /?ORP15
PUSH V?
JUMP ?THN12
?ORP15: PUSH VERBOSE
?THN12: POP 'V?
CALL PRINT-CONT,HERE,V?,-1
RSTACK
?ELS5: PRINTR "You can't see anything in the dark."
.FUNCT DESCRIBE-ROOM,LOOK?=0,V?,F?=0,STR,L
ZERO? LOOK? /?ORP4
PUSH LOOK?
JUMP ?THN1
?ORP4: PUSH VERBOSE
?THN1: POP 'V?
FSET? HERE,TOUCHBIT /?CND5
FSET HERE,TOUCHBIT
SET 'V?,TRUE-VALUE
SET 'F?,TRUE-VALUE
?CND5: IN? HERE,ROOMS \?CND8
ZERO? P-PROMPT /?ELS13
PRINTI "You are now "
FSET? HERE,ON-NOT-IN \?ELS21
PUSH STR?152
JUMP ?CND17
?ELS21: PUSH STR?11
?CND17: PRINT STACK
CALL THE?,HERE
PRINTI " "
PRINTD HERE
PRINTI "."
CRLF
JUMP ?CND8
?ELS13: PRINTI "("
PRINTD HERE
PRINTI ")"
CRLF
?CND8: ZERO? LOOK? \?THN33
ZERO? SUPER-BRIEF \?CND30
?THN33: SET 'L,PLAYER-HIDING
ZERO? L /?ELS37
PRINTI "(You are hiding behind"
CALL THE?,L
PRINTI " "
PRINTD L
PRINTI ".)"
CRLF
JUMP ?CND35
?ELS37: LOC WINNER >L
FSET? L,VEHBIT \?CND35
PRINTI "(You are "
FSET? L,SURFACEBIT \?ELS49
PRINTI "sitting o"
JUMP ?CND47
?ELS49: PRINTI "standing i"
?CND47: PRINTI "n"
CALL THE?,L
PRINTI " "
PRINTD L
PRINTI ".)"
CRLF
?CND35: ZERO? V? /?ELS62
GETP HERE,P?ACTION
CALL STACK,M-LOOK
ZERO? STACK \TRUE
?ELS62: ZERO? V? /?ELS66
GETP HERE,P?FDESC >STR
ZERO? STR /?ELS66
PRINT STR
CRLF
JUMP ?CND60
?ELS66: ZERO? V? /?ELS72
GETP HERE,P?LDESC >STR
ZERO? STR /?ELS72
PRINT STR
CRLF
JUMP ?CND60
?ELS72: GETP HERE,P?ACTION
CALL STACK,M-FLASH
?CND60: EQUAL? HERE,L /?CND30
GETP L,P?ACTION
CALL STACK,M-LOOK
?CND30: GETP HERE,P?CORRIDOR
ZERO? STACK /TRUE
CALL CORRIDOR-LOOK
RTRUE
.FUNCT FIRSTER,OBJ,LEVEL
EQUAL? OBJ,WINNER \?ELS5
PRINTR "You are carrying:"
?ELS5: IN? OBJ,ROOMS /FALSE
GRTR? LEVEL,0 \?CND10
GET INDENTS,LEVEL
PRINT STACK
?CND10: FSET? OBJ,SURFACEBIT \?ELS19
PRINTI "Sitting on"
CALL THE?,OBJ
PRINTI " "
PRINTD OBJ
PRINTR " can be seen:"
?ELS19: FSET? OBJ,PERSON \?ELS25
PRINTD OBJ
PRINTR " is holding:"
?ELS25: PRINTI "The "
PRINTD OBJ
PRINTR " contains:"
.FUNCT GONE-CRAZY
PRINTI "You vaguely hear screaming and yelling through a haze of confusion and the tugs of your conscience asking ""How could you have done it?"" Before you can answer, you hear police sirens come near. Sergeant Duffy and two others enter and grab you by the arms. They take you to a waiting car, where, forlorn and disgusted, you think about being sent up for life. ""Maybe,"" you think, ""I shouldn't have done that."""
CRLF
CALL CASE-OVER
RSTACK
.FUNCT GOTO,RM,V?=1,F,WT
CALL WHERE-UPDATE,PLAYER
MOVE PLAYER,RM
SET 'HERE,RM
SET 'LIT,TRUE-VALUE
GETP HERE,P?ACTION
CALL STACK,M-ENTER
ZERO? V? /FALSE
CALL V-FIRST-LOOK
RSTACK
.FUNCT HACK-HACK,STR
IN? PRSO,GLOBAL-OBJECTS \?ELS5
SET 'P-WON,FALSE-VALUE
PRINTI "(You can't see any"
CALL PRSO-PRINT
PRINTR " here.)"
?ELS5: 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
PRINTD PRSO
PRINTI " wouldn't enjoy that."
CRLF
RFALSE
?ELS5: IN? PRSO,WINNER /?ELS9
LOC PRSO
IN? STACK,WINNER /?ELS9
PRINTI "You're not carrying"
CALL THE-PRSO-PRINT
PRINTI "."
CRLF
RFALSE
?ELS9: IN? PRSO,WINNER /?ELS15
LOC PRSO
FSET? STACK,OPENBIT /?ELS15
PRINTI "Too bad, but"
CALL THE-PRSO-PRINT
PRINTI " is closed."
CRLF
RFALSE
?ELS15: MOVE PRSO,HERE
RTRUE
.FUNCT ITAKE,VB=1,CNT,OBJ,?TMP1
FSET? PRSO,TAKEBIT /?ELS5
ZERO? VB /FALSE
PRINTI "You can't take"
CALL THE-PRSO-PRINT
PRINTI "."
CRLF
RFALSE
?ELS5: LOC PRSO
IN? STACK,WINNER /?ELS13
CALL WEIGHT,PRSO >?TMP1
CALL WEIGHT,WINNER
ADD ?TMP1,STACK
GRTR? STACK,LOAD-ALLOWED \?ELS13
ZERO? VB /?CND16
PRINTI "Your load's too heavy"
LESS? LOAD-ALLOWED,LOAD-MAX \?ELS24
PRINTI ", especially in light of your condition."
JUMP ?CND22
?ELS24: PRINTI "."
?CND22: CRLF
?CND16: RETURN 2
?ELS13: CALL CCOUNT,WINNER >CNT
GRTR? CNT,FUMBLE-NUMBER \?ELS34
MUL CNT,FUMBLE-PROB >?TMP1
RANDOM 100
GRTR? ?TMP1,STACK \?ELS34
FIRST? WINNER >OBJ /?KLU56
?KLU56: NEXT? OBJ >OBJ /?KLU57
?KLU57: PRINTI "Too bad, but"
CALL THE?,OBJ
PRINTI " "
PRINTD OBJ
PRINTI " slips from your arms while you are taking"
CALL THE-PRSO-PRINT
PRINTI ", and both tumble to the "
GETP HERE,P?LINE
EQUAL? STACK,OUTSIDE-LINE-C \?ELS43
PRINTI "ground"
JUMP ?CND41
?ELS43: PRINTI "floor"
?CND41: PRINTI "."
CRLF
MOVE OBJ,HERE
MOVE PRSO,HERE
RETURN 2
?ELS34: MOVE PRSO,WINNER
FSET PRSO,TOUCHBIT
FCLEAR PRSO,NDESCBIT
FCLEAR PRSO,INVISIBLE
RTRUE
.FUNCT CCOUNT,OBJ,CNT=0,X
FIRST? OBJ >X \?CND1
?PRG4: INC 'CNT
NEXT? X >X /?PRG4
?CND1: RETURN CNT
.FUNCT NOT-HERE,OBJ
SET 'P-WON,FALSE-VALUE
PRINTI "(You can't see"
CALL THE?,OBJ
PRINTI " "
PRINTD OBJ
PRINTR " here.)"
.FUNCT PRINT-CONT,OBJ,V?=0,LEVEL=0,Y,1ST?,AV,STR=0,PV?=0,INV?=0
FIRST? OBJ >Y \TRUE
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
FSET? Y,PERSON \?ELS48
CALL THIS-IS-S-HE,Y
JUMP ?CND40
?ELS48: CALL THIS-IS-IT,Y
?CND40:
?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
?CND18: NEXT? Y >Y /?KLU99
?KLU99: JUMP ?PRG16
?CND11: FIRST? OBJ >Y /?KLU100
?KLU100:
?PRG56: ZERO? Y \?ELS60
ZERO? PV? /?CND61
ZERO? AV /?CND61
FIRST? AV \?CND61
CALL PRINT-CONT,AV,V?,LEVEL
?CND61: ZERO? 1ST? \?PRD66
PUSH 1
RETURN STACK
?PRD66: PUSH 0
RETURN STACK
?ELS60: EQUAL? Y,AV,PLAYER \?ELS69
JUMP ?CND58
?ELS69: FSET? Y,INVISIBLE /?CND58
ZERO? INV? \?THN74
FSET? Y,TOUCHBIT /?THN74
GETP Y,P?FDESC
ZERO? STACK \?CND58
?THN74: FSET? Y,NDESCBIT \?THN79
ZERO? DEBUG /?ELS78
PRINTI "[ndescbit] "
?THN79: ZERO? 1ST? /?CND85
CALL FIRSTER,OBJ,LEVEL
ZERO? STACK /?CND89
LESS? LEVEL,0 \?CND89
SET 'LEVEL,0
?CND89: INC 'LEVEL
SET '1ST?,FALSE-VALUE
?CND85: CALL DESCRIBE-OBJECT,Y,V?,LEVEL
JUMP ?CND58
?ELS78: FIRST? Y \?CND58
CALL SEE-INSIDE?,Y
ZERO? STACK /?CND58
CALL PRINT-CONT,Y,V?,LEVEL
?CND58: NEXT? Y >Y /?KLU101
?KLU101: JUMP ?PRG56
.FUNCT PRINT-CONTENTS,OBJ,F,N,1ST?=1
FIRST? OBJ >F \FALSE
?PRG6: NEXT? F >N /?KLU45
?KLU45: 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: FSET? F,AN \?ELS34
PUSH STR?150
JUMP ?CND30
?ELS34: PUSH STR?151
?CND30: PRINT STACK
PRINTD F
?CND21: FSET? F,PERSON \?ELS39
CALL THIS-IS-S-HE,F
JUMP ?CND37
?ELS39: CALL THIS-IS-IT,F
?CND37: SET 'F,N
ZERO? F \?PRG6
RTRUE
.FUNCT ROOM-CHECK
IN? PRSO,ROOMS \?ELS5
EQUAL? PRSO,HERE,GLOBAL-HERE \?ELS10
CALL PERFORM,PRSA,GLOBAL-ROOM,PRSI
RTRUE
?ELS10: PRINTR "You aren't in that place!"
?ELS5: EQUAL? PRSO,PSEUDO-OBJECT /FALSE
CALL META-LOC,PRSO
EQUAL? STACK,HERE,GLOBAL-OBJECTS,LOCAL-GLOBALS /FALSE
SET 'P-WON,FALSE-VALUE
PRINTI "(You can't see any "
EQUAL? PRSO,CAR-WINDOW \?ELS25
PRINTI "window"
JUMP ?CND23
?ELS25: PRINTD PRSO
?CND23: PRINTR " here!)"
.FUNCT SEE-INSIDE?,OBJ
FSET? OBJ,INVISIBLE /FALSE
FSET? OBJ,TRANSBIT /TRUE
FSET? OBJ,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
?CND1: GETP OBJ,P?SIZE
ADD WT,STACK
RSTACK
.FUNCT PRE-ACCUSE
ZERO? PRSI \?CND1
SET 'PRSI,GLOBAL-MURDER
?CND1: FSET? CORPSE,INVISIBLE \?ELS8
PRINTR "Nothing's dead here but your head!"
?ELS8: EQUAL? PRSO,CORPSE,GLOBAL-LINDER \?ELS12
EQUAL? PRSI,GLOBAL-SUICIDE \?ELS12
PRINTI "Duffy appears for a moment. "
PRINTI """So you believe that Linder's death was suicide? I'm not convinced. But if you'll "
PRINTR "just ""arrest Mr. Linder,"" we can go on from there."" He disappears again."
?ELS12: EQUAL? PRSO,GLOBAL-MRS-LINDER \?ELS18
EQUAL? PRSI,GLOBAL-SUICIDE \?ELS18
PRINTR "Everybody knows that!"
?ELS18: EQUAL? PRSI,GLOBAL-MURDER /?ELS24
PRINTR "What an accusation!"
?ELS24: FSET? PRSO,PERSON /FALSE
PRINTI "What a detective! ""Quick, Sergeant! Arrest that "
PRINTD PRSO
PRINTR "!"""
.FUNCT V-ACCUSE
PRINTD PRSO
PRINTR " shrugs off your accusation."
.FUNCT PRE-SANALYZE
CALL PERFORM,V?ANALYZE,PRSI,PRSO
RTRUE
.FUNCT V-SANALYZE
PRINTR "[Foo!! This is a bug!!]"
.FUNCT PRE-ANALYZE
EQUAL? PRSI,GLOBAL-FINGERPRINTS /FALSE
ZERO? MET-DUFFY? \?ELS7
PRINTI "You haven't met Sergeant Duffy yet tonight."
PRINTR " You'll need his help to do that."
?ELS7: ZERO? DUFFY-WITH-STILES /FALSE
PRINTR "You'd better wait until Duffy takes care of his prisoner."
.FUNCT V-ANALYZE
EQUAL? PRSI,GLOBAL-FINGERPRINTS \?ELS5
CALL PERFORM,V?FINGERPRINT,PRSO
RTRUE
?ELS5: ZERO? FINGERPRINT-OBJ \?THN8
ZERO? DUFFY-AT-CORONER \?THN8
FSET? PRSO,TAKEBIT \?ELS7
?THN8: CALL DO-ANALYZE
RSTACK
?ELS7: IN? PRSO,GLOBAL-OBJECTS \?ELS11
PRINTI "Duffy appears in an instant. ""Well, I might be able to analyze"
CALL THE-PRSO-PRINT
PRINTR ", but you don't even have it with you!"" With that, he discreetly leaves."
?ELS11: PRINTI "Sergeant Duffy appears with a puzzled look on his face."
PRINTI " ""With all respect, I don't think I can take THAT to the laboratory! I'll be nearby if you need me."""
PRINTR " He leaves, shaking his head slowly."
.FUNCT V-ANSWER
PRINTI "Nobody seems to be waiting for your answer."
CRLF
SET 'P-CONT,FALSE-VALUE
SET 'QUOTE-FLAG,FALSE-VALUE
RTRUE
.FUNCT V-REPLY
SET 'P-CONT,FALSE-VALUE
SET 'QUOTE-FLAG,FALSE-VALUE
FSET? PRSO,DOORBIT \?ELS5
PRINTI "No one's knocking at"
CALL THE-PRSO-PRINT
PRINTR "."
?ELS5: PRINTI "Too bad, but"
CALL THE-PRSO-PRINT
PRINTR " doesn't care."
.FUNCT PRE-ARREST
FSET? CORPSE,INVISIBLE \?ELS5
PRINTR "For what? You have no evidence of a crime yet."
?ELS5: ZERO? MET-DUFFY? \?ELS9
PRINTI "You haven't met Sergeant Duffy yet tonight."
PRINTR " You'll need his help to do that."
?ELS9: ZERO? FINGERPRINT-OBJ \?THN14
ZERO? DUFFY-AT-CORONER /?ELS13
?THN14: PRINTR "Sergeant Duffy isn't around right now. You'll have to wait for him to help you make the arrest."
?ELS13: EQUAL? PRSO,OBJECT-PAIR,GLOBAL-LINDER,CORPSE /?ELS19
EQUAL? PRSI,RANDOM-CRIME,GLOBAL-SUICIDE \?ELS19
PRINTR "Your Chief would probably want you to be sure there's no bigger fish here, like an honest-to-Pete murderer."
?ELS19: EQUAL? PRSO,GLOBAL-DUFFY /FALSE
FSET? PRSO,PERSON /?ELS31
EQUAL? PRSO,OBJECT-PAIR,GLOBAL-LINDER,CORPSE \?THN28
?ELS31: ZERO? PRSI /FALSE
EQUAL? PRSI,GLOBAL-MURDER /FALSE
?THN28: PRINTI "What a detective! ""Quick, Sergeant! Arrest that "
PRINTD PRSO
ZERO? PRSI /?CND36
PRINTI " for "
PRINTD PRSI
?CND36: PRINTI " before "
FSET? PRSO,FEMALE \?ELS48
PUSH STR?172
JUMP ?CND44
?ELS48: EQUAL? PRSO,GLOBAL-DUFFY /?THN51
FSET? PRSO,PERSON \?ELS50
?THN51: PUSH STR?173
JUMP ?CND44
?ELS50: PUSH STR?174
?CND44: PRINT STACK
PRINTR " gets away!"""
.FUNCT V-ARREST
FSET? PRSO,PERSON \?ELS5
PRINTI "You realize that you don't have enough evidence to convict "
PRINTD PRSO
PRINTR ", so you decide to continue the investigation."
?ELS5: PRINTI "Sergeant Duffy enters, strokes his chin, and in a puzzled voice says, ""With all respect, I think we'd be laughed out of the station if we tried to charge"
CALL THE-PRSO-PRINT
PRINTR " with murder!"" He leaves quietly."
.FUNCT V-ASK-ABOUT
EQUAL? PRSO,PLAYER \?ELS5
PRINTR "It's been a long week, but talking to yourself won't end it any sooner."
?ELS5: FSET? PRSO,PERSON /?ELS9
PRINTI "Hey, Duffy! Look at your boss talking to "
FSET? PRSO,AN \?ELS16
PUSH STR?150
JUMP ?CND12
?ELS16: PUSH STR?151
?CND12: PRINT STACK
PRINTD PRSO
PRINTR "!"
?ELS9: FSET PRSO,TOUCHBIT
PRINTD PRSO
PRINTR " doesn't seem to know about that."
.FUNCT PRE-ASK-CONTEXT-ABOUT,P
ZERO? QCONTEXT /?ELS5
EQUAL? HERE,QCONTEXT-ROOM \?ELS5
CALL META-LOC,QCONTEXT
EQUAL? HERE,STACK \?ELS5
CALL PERFORM,V?ASK-ABOUT,QCONTEXT,PRSO
RTRUE
?ELS5: CALL FIND-FLAG,HERE,PERSON,WINNER >P
ZERO? P /FALSE
CALL PERFORM,V?ASK-ABOUT,P,PRSO
RTRUE
.FUNCT V-ASK-CONTEXT-ABOUT
PRINTR "You aren't talking to anyone!"
.FUNCT V-ASK-FOR
FSET? PRSO,PERSON \?ELS5
EQUAL? PRSO,PLAYER /?ELS5
FSET PRSO,TOUCHBIT
PRINTD PRSO
IN? PRSI,PRSO \?ELS14
PRINTI " hands you"
CALL THE-PRSI-PRINT
PRINTI "."
CRLF
MOVE PRSI,WINNER
RTRUE
?ELS14: PRINTR " doesn't have that."
?ELS5: CALL PICK-ONE,YUKS
PRINT STACK
CRLF
RTRUE
.FUNCT PRE-ASK-CONTEXT-FOR,P
ZERO? QCONTEXT /?ELS5
EQUAL? HERE,QCONTEXT-ROOM \?ELS5
CALL META-LOC,QCONTEXT
EQUAL? HERE,STACK \?ELS5
CALL PERFORM,V?ASK-FOR,QCONTEXT,PRSO
RTRUE
?ELS5: CALL FIND-FLAG,HERE,PERSON,WINNER >P
ZERO? P /FALSE
CALL PERFORM,V?ASK-FOR,P,PRSO
RTRUE
.FUNCT V-ASK-CONTEXT-FOR
PRINTR "You aren't talking to anyone!"
.FUNCT V-ATTACK
CALL IKILL,STR?175
RSTACK
.FUNCT V-BRUSH
EQUAL? PRSO,MUDDY-SHOES,OUTSIDE-GUN \?ELS5
PRINTR "You shouldn't try to clean a piece of evidence."
?ELS5: PRINTR """Cleanliness is next to Godliness,"" but in this case it seems to be next to Impossible."
.FUNCT V-CALL-LOSE
PRINTR "(You must use a verb!)"
.FUNCT V-$CALL,PER,MOT=0
FSET? PRSO,PERSON \?ELS5
GETP PRSO,P?CHARACTER
GET CHARACTER-TABLE,STACK >PER
CALL IN-MOTION?,PER
ZERO? STACK /?CND6
SET 'MOT,TRUE-VALUE
?CND6: CALL META-LOC,PER
EQUAL? STACK,HERE /?THN14
CALL CORRIDOR-LOOK,PER
ZERO? STACK /?ELS13
?THN14: FSET PER,TOUCHBIT
PRINTD PER
CALL GRAB-ATTENTION,PER
ZERO? STACK /?ELS22
ZERO? MOT /?ELS27
PRINTR " stops and turns toward you."
?ELS27: PRINTR " is listening."
?ELS22: PRINTR " ignores you."
?ELS13: SET 'P-WON,FALSE-VALUE
PRINTI "(You don't see "
PRINTD PER
PRINTR " here.)"
?ELS5: CALL V-CALL-LOSE
RSTACK
.FUNCT V-PHONE,PER
FSET? PRSO,PERSON \?ELS5
GETP PRSO,P?CHARACTER
GET CHARACTER-TABLE,STACK >PER
ZERO? PER /?ELS5
CALL META-LOC,PER
EQUAL? STACK,HERE /?THN8
CALL CORRIDOR-LOOK,PER
ZERO? STACK /?ELS5
?THN8: CALL PERFORM,V?$CALL,PRSO
RTRUE
?ELS5: ZERO? PRSI /?ELS11
EQUAL? PRSI,TELEPHONE /?ELS11
PRINTI "Too bad, but"
CALL THE-PRSI-PRINT
PRINTR " isn't wired for phoning."
?ELS11: CALL PHONE-IN?,HERE
ZERO? STACK \?ELS17
PRINTR "There's no phone here."
?ELS17: EQUAL? PRSO,INTNUM \?ELS21
ZERO? P-NUMBER \?ELS21
PRINTI "You dial the operator, who doesn't go for any of your cute lines, but does connect you with the police station. "
PRINTR "The night clerk at the station says he'll give Duffy your message."
?ELS21: EQUAL? PRSO,BRASS-LANTERN /?THN28
EQUAL? PRSO,INTNUM \?ELS27
EQUAL? P-NUMBER,1308 \?ELS27
?THN28: PRINTR "You dial the number. A voice with a thick Oriental accent answers and says, ""Sorry, Brass Lantern off tonight. Private party. Thank you."" Then the line goes dead."
?ELS27: EQUAL? PRSO,MATCHBOOK,GLOBAL-STILES,STILES /?THN36
EQUAL? PRSO,INTNUM \?ELS35
EQUAL? P-NUMBER,1729 \?ELS35
?THN36: PRINTR "You dial the number. It rings several times with no answer."
?ELS35: EQUAL? PRSO,INTNUM \?ELS43
PRINTR "There's no point in calling that number."
?ELS43: EQUAL? PRSO,GLOBAL-TERRY \?ELS47
PRINTR "You don't know the number."
?ELS47: FSET? PRSO,PERSON /?ELS51
PRINTI "Too bad, but"