-
Notifications
You must be signed in to change notification settings - Fork 27
/
verbs.zap
5511 lines (4912 loc) · 120 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
.SEGMENT "0"
.FUNCT V-VERBOSE
SET 'VERBOSITY,2
PRINTI "Maximum verbosity."
CRLF
CRLF
CALL1 V-LOOK
RSTACK
.FUNCT V-BRIEF
SET 'VERBOSITY,1
PRINTR "Brief descriptions."
.FUNCT V-SUPERBRIEF
SET 'VERBOSITY,0
PRINTR "Superbrief descriptions."
.FUNCT NOT-IN-DEMO
PRINTR "[Sorry, but that command is not available in this demonstration version.]"
.FUNCT V-SAVE,X,WRD,COLOR-SAME
CALL1 SAVE-UNDO-CHECK
ZERO? STACK \TRUE
ZERO? DEMO-VERSION? /?CND3
ICALL1 NOT-IN-DEMO
RETURN 2
?CND3: PUTB G-INBUF,2,0
SET 'P-CONT,FALSE-VALUE
SAVE >X
ZERO? X \?CCL9
SET 'P-CONT,-1
PRINTI "SAVE failed!"
CRLF
RETURN 2
?CCL9: EQUAL? X,1 \?CND7
ICALL1 RESTORE-ORPHAN
PRINTI "SAVE completed."
CRLF
RETURN 2
?CND7: WINGET S-TEXT,WCOLOR >WRD
SHIFT WRD,-8
EQUAL? STACK,FG-COLOR \?CCL17
BAND WRD,255
EQUAL? STACK,BG-COLOR \?CCL17
SET 'COLOR-SAME,TRUE-VALUE
JUMP ?CND15
?CCL17: SET 'COLOR-SAME,FALSE-VALUE
?CND15: COLOR FG-COLOR,BG-COLOR
SET 'OLD-HERE,FALSE-VALUE
ICALL1 SETUP-SCREEN
ICALL1 V-$REFRESH
ICALL1 RESTORE-ORPHAN
PRINTI "Okay, restored."
CRLF
CRLF
SET 'P-CONT,-1
CALL1 V-LOOK
RSTACK
.FUNCT SAVE-UNDO-CHECK
EQUAL? HERE,ROOM-OF-THREE-DOORS \FALSE
PRINTR "[You can't SAVE or UNDO here. You'll have to solve the puzzle!]"
.FUNCT RESTORE-ORPHAN
IN? JESTER,HERE \FALSE
ZERO? LIT /FALSE
EQUAL? HERE,ENTRANCE-HALL \?PRD8
FSET? PORTCULLIS,OPENBIT \?CCL3
?PRD8: EQUAL? HERE,SOLAR \?PRD11
IN? EAST-KEY,JESTER /?CCL3
?PRD11: EQUAL? HERE,OUBLIETTE /?CCL3
EQUAL? HERE,CAVE-IN \?PRD15
IN? PIT-BOMB,LOCAL-GLOBALS /?CCL3
?PRD15: EQUAL? HERE,TAX-OFFICE \?PRD18
IN? ZORKMID-COIN,LOCAL-GLOBALS /?CCL3
?PRD18: EQUAL? HERE,STREAM \FALSE
FSET? DIPLOMA,TRYTAKEBIT \FALSE
?CCL3: CALL2 SETUP-ORPHAN,STR?44
RSTACK
.FUNCT V-RESTORE
ZERO? DEMO-VERSION? /?CND1
ICALL1 NOT-IN-DEMO
RETURN 2
?CND1: RESTORE
ZERO? STACK \FALSE
PRINT FAILED
RTRUE
.FUNCT V-UNDO,X
SET 'OLD-HERE,FALSE-VALUE
SET 'OLD-REGION,FALSE-VALUE
CALL1 SAVE-UNDO-CHECK
ZERO? STACK \FALSE
IRESTORE >X
EQUAL? X,-1 \?CCL6
PRINTR "UNDO is unavailable on your computer system."
?CCL6: PRINT FAILED
RTRUE
.FUNCT V-SCRIPT
ZERO? DEMO-VERSION? /?CND1
ICALL1 NOT-IN-DEMO
RETURN 2
?CND1: PRINTI "[Transcript on.]"
CRLF
DIROUT D-PRINTER-ON
ICALL2 CORP-NOTICE,STR?45
RTRUE
.FUNCT V-UNSCRIPT
ZERO? DEMO-VERSION? /?CND1
ICALL1 NOT-IN-DEMO
RETURN 2
?CND1: ICALL2 CORP-NOTICE,STR?46
DIROUT D-PRINTER-OFF
PRINTI "[Transcript off.]"
CRLF
DIROUT D-SCREEN-OFF
CRLF
DIROUT D-SCREEN-ON
RTRUE
.FUNCT CORP-NOTICE,STRING
DIROUT D-SCREEN-OFF
PRINTI "Here "
PRINT STRING
PRINTI " a transcript of interaction with"
CRLF
ICALL1 V-VERSION
DIROUT D-SCREEN-ON
RTRUE
.FUNCT V-COLOR,DEFAULT
ZERO? COLOR-NOTE \?CND1
SET 'COLOR-NOTE,TRUE-VALUE
PRINTI "Aesthetically, we recommend not changing the standard setting, which is black text on a white background. "
GETB 0,30
EQUAL? STACK,MACINTOSH \?CND3
CALL1 MAC-II?
ZERO? STACK /?CND3
PRINTI "Also, if your Mac II displays only 16 colors, you probably won't get the color you ask for. "
?CND3: PRINTI "Do you still want to go ahead?"
CRLF
PRINTI "(Y or N) >"
CALL1 Y?
ZERO? STACK /TRUE
?CND1: CRLF
?PRG9: ICALL1 DO-COLOR
PRINTI "You should now get "
GET COLOR-TABLE,FG-COLOR
PRINT STACK
PRINTI " text on a "
GET COLOR-TABLE,BG-COLOR
PRINT STACK
PRINTI " background. Is that what you want?
(Y or N) >"
CALL1 Y?
ZERO? STACK \?REP10
GETB 0,30
EQUAL? STACK,MACINTOSH \?CND13
CALL1 MAC-II?
ZERO? STACK \?CND13
EQUAL? BG-COLOR,2 \?CCL19
SET 'BG-COLOR,9
SET 'FG-COLOR,2
JUMP ?REP10
?CCL19: SET 'BG-COLOR,2
SET 'FG-COLOR,9
JUMP ?REP10
?CND13: CRLF
PRINTI "Do you want to pick again, or would you like to just go back to the standard colors? (Type Y to pick again) >"
CALL1 Y?
ZERO? STACK /?CCL22
CRLF
JUMP ?PRG9
?CCL22: SET 'DEFAULT,TRUE-VALUE
?REP10: ZERO? DEFAULT /?CCL25
COLOR 1,1
JUMP ?CND23
?CCL25: COLOR FG-COLOR,BG-COLOR
?CND23: CALL1 V-$REFRESH
RSTACK
.FUNCT DO-COLOR
GETB 0,30
EQUAL? STACK,MACINTOSH \?CCL3
CALL1 MAC-II?
ZERO? STACK \?CCL3
EQUAL? BG-COLOR,2 \?CCL8
SET 'BG-COLOR,9
SET 'FG-COLOR,2
RETURN FG-COLOR
?CCL8: SET 'BG-COLOR,2
SET 'FG-COLOR,9
RETURN FG-COLOR
?CCL3: CALL PICK-COLOR,FG-COLOR,STR?47,TRUE-VALUE >FG-COLOR
CALL PICK-COLOR,BG-COLOR,STR?48 >BG-COLOR
RETURN BG-COLOR
.FUNCT PICK-COLOR,WHICH,STRING,SETTING-FG,CHAR
PRINTI "The current "
PRINT STRING
PRINTI " color is "
GET COLOR-TABLE,WHICH
PRINT STACK
PRINT PERIOD-CR
FONT 4
PRINTI " 1 --> WHITE 4 --> GREEN"
CRLF
PRINTI " 2 --> BLACK 5 --> YELLOW"
CRLF
PRINTI " 3 --> RED 6 --> BLUE"
CRLF
FONT 1
PRINTI "Type a number to select the "
PRINT STRING
PRINTI " color you want. >"
?PRG1: ZERO? DEMO-VERSION? /?CCL5
CALL2 INPUT-DEMO,1 >CHAR
JUMP ?CND3
?CCL5: INPUT 1 >CHAR
?CND3: SUB CHAR,48 >CHAR
EQUAL? CHAR,1 \?CND6
SET 'CHAR,9
?CND6: EQUAL? CHAR,2,3,4 /?CTR9
EQUAL? CHAR,5,6,9 \?CCL10
?CTR9: ZERO? SETTING-FG \?REP2
EQUAL? CHAR,FG-COLOR \?REP2
CRLF
PRINTI "You can't make the background the same color as the text! Pick another color. >"
JUMP ?PRG1
?CCL10: CRLF
PRINT TYPE-A-NUMBER
PRINTI "6. >"
JUMP ?PRG1
?REP2: CRLF
CRLF
RETURN CHAR
.ENDSEG
.SEGMENT "STARTUP"
.FUNCT V-CREDITS
ICALL CENTER-1,STR?59,TRUE-VALUE
ICALL CENTER-1,STR?60,TRUE-VALUE
CRLF
ICALL CENTER-1,STR?61,TRUE-VALUE
ICALL2 CENTER-1,STR?62
CRLF
ICALL CENTER-1,STR?63,TRUE-VALUE
ICALL CENTER-2,STR?64,STR?65
ICALL CENTER-2,STR?66,STR?62
CRLF
ICALL CENTER-1,STR?67,TRUE-VALUE
ICALL2 CENTER-1,STR?68
CRLF
ICALL CENTER-1,STR?69,TRUE-VALUE
ICALL CENTER-3,STR?70,STR?71,STR?72
ICALL CENTER-2,STR?73,STR?74
CRLF
ICALL CENTER-1,STR?75,TRUE-VALUE
ICALL CENTER-2,STR?64,STR?76
CRLF
ICALL CENTER-1,STR?77,TRUE-VALUE
ICALL CENTER-2,STR?64,STR?66
CRLF
ICALL CENTER-1,STR?78,TRUE-VALUE
ICALL2 CENTER-1,STR?79
ICALL2 CENTER-1,STR?80
ICALL2 CENTER-1,STR?81
ICALL2 CENTER-1,STR?82
CRLF
ICALL CENTER-1,STR?83,TRUE-VALUE
ICALL CENTER-3,STR?84,STR?85,STR?86
ICALL CENTER-3,STR?87,STR?88,STR?89
ICALL CENTER-3,STR?90,STR?91,STR?92
ICALL CENTER-3,STR?93,STR?94,STR?95
ICALL CENTER-2,STR?96,STR?97
CRLF
ICALL CENTER-1,STR?98,TRUE-VALUE
ICALL CENTER-2,STR?99,STR?100
CRLF
ICALL CENTER-1,STR?101,TRUE-VALUE
ICALL CENTER-2,STR?86,STR?100
ICALL2 CENTER-1,STR?62
CRLF
ICALL CENTER-1,STR?102,TRUE-VALUE
CALL2 CENTER-1,STR?103
RSTACK
.ENDSEG
.SEGMENT "0"
.FUNCT V-DIAGNOSE
GRTR? DESERT-DEATH,0 \?CCL3
PRINTI "You're "
GRTR? DESERT-DEATH,4 \?CCL6
PRINTI "about to pass out"
JUMP ?CND4
?CCL6: GRTR? DESERT-DEATH,2 \?CCL8
PRINTI "dangerously close to passing out"
JUMP ?CND4
?CCL8: PRINTI "feeling a bit faint"
?CND4: PRINTR " from the heat."
?CCL3: ZERO? ALLIGATOR /?CCL10
PRINTR "You're a perfectly healthy alligator."
?CCL10: ZERO? TURNED-INTO /?CCL12
EQUAL? TURNED-INTO,VIOLIN \?CCL15
PRINTR "You're fit as a fiddle. In fact, you ARE a fiddle."
?CCL15: PRINTI "You are"
ICALL2 APRINT,TURNED-INTO
PRINTR ". Other details of health pale in comparison."
?CCL12: FSET? CLOWN-NOSE,WORNBIT \?CCL17
PRINTI "You're having a bit of trouble breathing, thanks to the "
ICALL2 DPRINT,CLOWN-NOSE
PRINTR " on your nose."
?CCL17: GRTR? HUNGER-COUNT,0 \?CCL19
PRINTI "You feel "
EQUAL? HUNGER-COUNT,2 \?CCL22
PRINTI "very "
JUMP ?CND20
?CCL22: EQUAL? HUNGER-COUNT,3 \?CND20
PRINTI "incredibly "
?CND20: PRINTR "hungry."
?CCL19: PRINTR "You're as fit as a fiddle."
.FUNCT V-INVENTORY
SUB 0,WORNBIT >D-BIT
ADD D-ALL?,D-PARA?
CALL D-CONTENTS,WINNER,FALSE-VALUE,STACK
ZERO? STACK \?CND1
ZERO? TURNED-INTO /?CCL5
PRINTI "You are carrying nothing."
JUMP ?CND1
?CCL5: PRINTI "You are empty-"
ZERO? ALLIGATOR /?CCL8
PRINTI "claw"
JUMP ?CND6
?CCL8: PRINTI "hand"
?CND6: PRINTI "ed."
?CND1: SET 'D-BIT,WORNBIT
ADD D-ALL?,D-PARA?
ICALL D-CONTENTS,WINNER,FALSE-VALUE,STACK
SET 'D-BIT,FALSE-VALUE
FSET? GLOVE,WORNBIT \?CND9
ZERO? GLOVE-COMMENT \?CND9
SET 'GLOVE-COMMENT,TRUE-VALUE
PRINTR " [It's probably none of my business, but when you wear that single glove you resemble singer Michael Flathead, formerly of the Flathead Five.]"
?CND9: CRLF
RTRUE
.FUNCT V-MODE
CLEAR -1
ZERO? BORDER-ON /?CCL3
SET 'BORDER-ON,FALSE-VALUE
JUMP ?CND1
?CCL3: SET 'BORDER-ON,TRUE-VALUE
?CND1: ICALL2 SPLIT-BY-PICTURE,CURRENT-SPLIT
SCREEN S-FULL
ICALL2 INIT-STATUS-LINE,TRUE-VALUE
SCREEN S-TEXT
PRINTI "Border o"
ZERO? BORDER-ON /?CCL6
PRINTC 110
JUMP ?CND4
?CCL6: PRINTI "ff"
?CND4: PRINTR " (obviously)."
.FUNCT V-QUIT
ICALL1 V-SCORE
ICALL2 DO-YOU-WISH,STR?104
CALL1 Y?
ZERO? STACK /?CCL3
QUIT
RTRUE
?CCL3: PRINT OK
RTRUE
.FUNCT V-RESTART
ICALL1 V-SCORE
ICALL2 DO-YOU-WISH,STR?105
CALL1 Y?
ZERO? STACK /FALSE
PRINTI "Restarting."
CRLF
COLOR 1,1
RESTART
PRINT FAILED
RTRUE
.FUNCT DO-YOU-WISH,STRING
CRLF
PRINTI "Do you really want to "
PRINT STRING
PRINTI " (y or n)? >"
RTRUE
.FUNCT FINISH,REPEATING,CNT
?PRG1: CRLF
ZERO? REPEATING \?CND3
SET 'REPEATING,TRUE-VALUE
ICALL1 V-SCORE
?CND3: ICALL1 UPDATE-STATUS-LINE
PRINTI "Would you like to start over, restore a saved position, "
EQUAL? HERE,ROOM-OF-THREE-DOORS /?CND5
PRINTI "undo your last turn, "
?CND5: PRINTI "end this session of the game, or "
EQUAL? SCORE,1000 \?CCL9
PRINTI "see the credits?"
CRLF
JUMP ?CND7
?CCL9: PRINTI "get a hint?"
CRLF
?CND7: PRINTI "(Type RESTART, RESTORE, "
EQUAL? HERE,ROOM-OF-THREE-DOORS /?CND10
PRINTI "UNDO, "
?CND10: PRINTI "QUIT, or "
EQUAL? SCORE,1000 \?CCL14
PRINTI "CREDITS"
JUMP ?CND12
?CCL14: PRINTI "HINT"
?CND12: PRINTI "): >"
PUTB P-LEXV,0,10
PUTB P-INBUF,1,0
ZERO? DEMO-VERSION? /?CCL17
ICALL READ-DEMO,P-INBUF,P-LEXV
JUMP ?CND15
?CCL17: READ P-INBUF,P-LEXV
?CND15: ICALL1 MOUSE-INPUT?
PUTB P-LEXV,0,LEXV-LENGTH
INC 'CNT
GET P-LEXV,1
EQUAL? STACK,W?RESTART \?CCL20
COLOR 1,1
RESTART
PRINT FAILED
JUMP ?PRG1
?CCL20: GET P-LEXV,1
EQUAL? STACK,W?RESTORE \?CCL22
RESTORE
ZERO? STACK \?CCL22
PRINT FAILED
JUMP ?PRG1
?CCL22: GET P-LEXV,1
EQUAL? STACK,W?QUIT,W?Q /?CTR25
GRTR? CNT,10 \?CCL26
?CTR25: QUIT
JUMP ?PRG1
?CCL26: GET P-LEXV,1
EQUAL? STACK,W?UNDO \?CCL30
CALL1 V-UNDO
ZERO? STACK \?PRG1
?CCL30: GET P-LEXV,1
EQUAL? STACK,W?CREDIT,W?CREDITS \?CCL34
ICALL1 V-CREDITS
JUMP ?PRG1
?CCL34: GET P-LEXV,1
EQUAL? STACK,W?HINTS,W?HINT,W?HELP /?CCL36
GET P-LEXV,1
EQUAL? STACK,W?CLUE,W?CLUES \?PRG1
?CCL36: ICALL1 V-HINT
JUMP ?PRG1
.FUNCT V-VERSION,IDX
SET 'IDX,18
PRINTI "ZORK ZERO: The Revenge of Megaboz
Copyright (c) 1988 by Infocom, Inc. All rights reserved.
ZORK is a registered trademark of Infocom, Inc."
CRLF
ICALL1 INTERPRETER-ID
PRINTI "Release "
GET 0,1
BAND STACK,2047
PRINTN STACK
PRINTI " / Serial number "
?PRG1: GETB 0,IDX
PRINTC STACK
IGRTR? 'IDX,23 \?PRG1
CRLF
RTRUE
.FUNCT INTERPRETER-ID
GETB 0,30
GET MACHINES,STACK
PRINT STACK
PRINTI " Interpreter version "
GETB 0,0
PRINTN STACK
PRINTC 46
GETB 0,31
PRINTN STACK
CRLF
RTRUE
.FUNCT MAC-II?
PICINF ICON-OFFSET,PICINF-TBL /?BOGUS1
?BOGUS1: GET PICINF-TBL,0
ZERO? STACK /TRUE
RFALSE
.ENDSEG
.SEGMENT "STARTUP"
.FUNCT V-$COMMAND
DIRIN 1
RTRUE
.FUNCT V-$RANDOM
EQUAL? PRSO,INTNUM /?CCL3
PRINTR "ILLEGAL."
?CCL3: SUB 0,P-NUMBER
RANDOM STACK
RTRUE
.FUNCT V-$RECORD
DIROUT D-RECORD-ON
RTRUE
.FUNCT V-$UNRECORD
DIROUT D-RECORD-OFF
RTRUE
.FUNCT V-$VERIFY
EQUAL? PRSO,INTNUM \?CCL3
EQUAL? P-NUMBER,232 \?CCL3
PRINTN SERIAL
CRLF
RTRUE
?CCL3: ICALL1 INTERPRETER-ID
PRINTI "Verifying..."
CRLF
VERIFY \?CCL8
PRINT OK
RTRUE
?CCL8: PRINTR "** Bad **"
.ENDSEG
.SEGMENT "0"
.FUNCT V-$REFRESH,DONT-CLEAR
EQUAL? P-CAN-UNDO,2 \?CND1
ICALL1 RESTORE-ORPHAN
SET 'DIR-CNT,0
?CND1: EQUAL? CURRENT-SPLIT,MAP-TOP-LEFT-LOC \?CCL5
ICALL1 DO-MAP
RTRUE
?CCL5: EQUAL? CURRENT-SPLIT,B-SPLIT \?CCL7
ICALL1 DRAW-TOWER
RTRUE
?CCL7: EQUAL? CURRENT-SPLIT,PBOZ-SPLIT \?CCL9
ICALL1 SETUP-PBOZ
RTRUE
?CCL9: EQUAL? CURRENT-SPLIT,SN-SPLIT \?CCL11
ICALL1 SETUP-SN
RTRUE
?CCL11: EQUAL? CURRENT-SPLIT,F-SPLIT \?CCL13
ICALL1 SETUP-FANUCCI
RTRUE
?CCL13: ZERO? DONT-CLEAR /?CCL16
ICALL INIT-SL-WITH-SPLIT,CURRENT-SPLIT,TRUE-VALUE
JUMP ?CND14
?CCL16: ICALL1 INIT-STATUS-LINE
?CND14: ICALL1 UPDATE-STATUS-LINE
GET 0,8
BAND STACK,-5
PUT 0,8,STACK
EQUAL? P-CAN-UNDO,2 \TRUE
PRINTR "[Undone.]"
.ENDSEG
.SEGMENT "0"
.FUNCT V-ALARM
EQUAL? PRSO,ME,ROOMS \?CCL3
ICALL2 PERFORM-PRSA,ME
RTRUE
?CCL3: FSET? PRSO,ANIMATEDBIT \?CCL5
FSET? PRSO,FEMALEBIT \?CCL8
PRINTI "Sh"
JUMP ?CND6
?CCL8: PRINTC 72
?CND6: PRINTR "e's wide awake, or haven't you noticed..."
?CCL5: PRINTR "You're nuts."
.FUNCT V-ASK-ABOUT,OWINNER
EQUAL? PRSO,ME \?CCL3
ICALL PERFORM,V?TELL,ME
RTRUE
?CCL3: FSET? PRSO,ACTORBIT \?CCL5
SET 'OWINNER,WINNER
SET 'WINNER,PRSO
ICALL PERFORM,V?TELL-ABOUT,ME,PRSI
SET 'WINNER,OWINNER
ICALL2 THIS-IS-IT,PRSI
ICALL2 THIS-IS-IT,PRSO
RTRUE
?CCL5: ICALL PERFORM,V?TELL,PRSO
RTRUE
.FUNCT V-ASK-FOR
EQUAL? PRSO,BROGMOID \?CCL3
PRINT TALK-TO-BROGMOID
RTRUE
?CCL3: PRINTI "Unsurprisingly,"
ICALL1 TPRINT-PRSO
PRINTR " doesn't oblige."
.FUNCT V-ASK-NO-ONE-FOR,ACTOR
CALL FIND-IN,HERE,ACTORBIT >ACTOR
ZERO? ACTOR /?CCL3
ICALL PERFORM,V?ASK-FOR,ACTOR,PRSO
RTRUE
?CCL3: PRINTR "There's no one here to ask."
.FUNCT V-BEHEAD,CALLED-BY-V-HANG
PRINTI "You usually need a "
ZERO? CALLED-BY-V-HANG /?CCL3
PRINTI "noose"
JUMP ?CND1
?CCL3: PRINTI "axe"
?CND1: PRINTI " to do this"
FSET? PRSO,ACTORBIT /?CND4
EQUAL? PRSO,ME /?CND4
PRINTI ", and besides, it doesn't look like"
ICALL1 TPRINT-PRSO
PRINTI " even has a "
ZERO? CALLED-BY-V-HANG /?CCL10
PRINTI "neck"
JUMP ?CND4
?CCL10: PRINTI "head"
?CND4: PRINT PERIOD-CR
RTRUE
.FUNCT V-BITE
CALL2 HACK-HACK,STR?117
RSTACK
.FUNCT V-BURN
ZERO? PRSI \?CND1
CALL FIND-IN,PROTAGONIST,FLAMEBIT >PRSI
ZERO? PRSI /?CCL5
PRINTI "[with"
ICALL1 TPRINT-PRSI
PRINTC 93
CRLF
ICALL PERFORM,V?BURN,PRSO,PRSI
RTRUE
?CCL5: PRINTR "Your burning gaze is insufficient."
?CND1: FSET? PRSI,FLAMEBIT /?CCL8
PRINTI "With"
ICALL2 APRINT,PRSI
PRINTR "??!?"
?CCL8: FSET? PRSO,BURNBIT \?CCL10
PRINTI "Instantly,"
ICALL1 TPRINT-PRSO
PRINTI " catches fire and is consumed."
CALL2 ULTIMATELY-IN?,PRSO
ZERO? STACK /?CCL13
CALL2 JIGS-UP,STR?118
RSTACK
?CCL13: REMOVE PRSO
CRLF
RTRUE
?CCL10: EQUAL? PRSO,CANDLE \?CCL15
FSET CANDLE,FLAMEBIT
FSET CANDLE,ONBIT
PRINTR "You relight the candle."
?CCL15: PRINT YOU-CANT
PRINTI "burn"
CALL2 ARPRINT,PRSO
RSTACK
.FUNCT V-BUY
PRINTR "That's not for sale."
.FUNCT V-CALL
EQUAL? PRSO,INTQUOTE \?CCL3
CALL1 V-SAY
RSTACK
?CCL3: CALL2 VISIBLE?,PRSO
ZERO? STACK /?CCL5
IN? PRSO,GLOBAL-OBJECTS /?CCL5
ICALL PERFORM,V?TELL,PRSO
RTRUE
?CCL5: CALL2 DO-FIRST,STR?119
RSTACK
.FUNCT V-CATCH
ZERO? PRSI /?CCL3
PRINTI "Sorry,"
ICALL1 TPRINT-PRSI
PRINTI " isn't much help in catching"
CALL2 TRPRINT,PRSO
RSTACK
?CCL3: PRINTR "The only thing you're likely to catch is a cold."
.FUNCT V-CHASTISE
EQUAL? PRSO,INTDIR \?CCL3
PRINT YOULL-HAVE-TO
PRINTR "go in that direction to see what's there."
?CCL3: CALL USE-PREPOSITIONS,STR?120,STR?121,STR?122,STR?123
RSTACK
.FUNCT USE-PREPOSITIONS,VRB,PREP1,PREP2,PREP3
PRINTI "[Use prepositions to indicate precisely what you want to do: "
PRINT VRB
PRINT PREP1
PRINTI " the object, "
PRINT VRB
PRINT PREP2
PRINTI " it, "
PRINT VRB
PRINT PREP3
PRINTR " it, etc.]"
.FUNCT V-CLEAN
SET 'AWAITING-REPLY,1
ICALL QUEUE,I-REPLY,2
PRINTR "Do you also do windows?"
.FUNCT V-CLIMB
EQUAL? PRSO,ROOMS \?CCL3
CALL2 DO-WALK,P?UP
RSTACK
?CCL3: CALL2 ULTIMATELY-IN?,PRSO
ZERO? STACK /?CCL5
EQUAL? PRSO,WALDO /?CCL5
IN? PRSO,WALDO /?CCL5
PRINT HOLDING-IT
RTRUE
?CCL5: CALL1 IMPOSSIBLES
RSTACK
.FUNCT V-CLIMB-DOWN
EQUAL? PRSO,ROOMS \?CCL3
CALL2 DO-WALK,P?DOWN
RSTACK
?CCL3: CALL2 ULTIMATELY-IN?,PRSO
ZERO? STACK /?CCL5
EQUAL? PRSO,WALDO /?CCL5
IN? PRSO,WALDO /?CCL5
PRINT HOLDING-IT
RTRUE
?CCL5: CALL1 IMPOSSIBLES
RSTACK
.FUNCT V-CLIMB-ON
EQUAL? PRSO,CAMEL \?CCL3
IN? PROTAGONIST,CAMEL \?CCL3
EQUAL? P-PRSA-WORD,W?RIDE \?CCL3
PRINTR "[You'll have to say which direction you want to ride in.]"
?CCL3: EQUAL? PRSO,INTDIR \?CCL8
CALL2 VISIBLE?,CAMEL
ZERO? STACK /?CCL8
IN? PROTAGONIST,CAMEL \?CCL13
ICALL PERFORM,V?RIDE-DIR,CAMEL,PRSO
RTRUE
?CCL13: CALL DO-FIRST,STR?124,CAMEL
RSTACK
?CCL8: FSET? PRSO,VEHBIT \?CCL15
ICALL PERFORM,V?ENTER,PRSO
RTRUE
?CCL15: CALL2 ULTIMATELY-IN?,PRSO
ZERO? STACK /?CCL17
EQUAL? PRSO,WALDO /?CCL17
IN? PRSO,WALDO /?CCL17
PRINT HOLDING-IT
RTRUE
?CCL17: GET PARSE-RESULT,7
EQUAL? STACK,W?IN \?CCL22
CALL2 CANT-VERB-A-PRSO,STR?125
RSTACK
?CCL22: CALL2 CANT-VERB-A-PRSO,STR?126
RSTACK
.FUNCT V-CLIMB-OVER
CALL2 ULTIMATELY-IN?,PRSO
ZERO? STACK /?CCL3
EQUAL? PRSO,WALDO /?CCL3
IN? PRSO,WALDO /?CCL3
PRINT HOLDING-IT
RTRUE
?CCL3: CALL1 IMPOSSIBLES
RSTACK
.FUNCT V-CLIMB-UP
EQUAL? PRSO,ROOMS \?CCL3
CALL2 DO-WALK,P?UP
RSTACK
?CCL3: CALL2 ULTIMATELY-IN?,PRSO
ZERO? STACK /?CCL5
EQUAL? PRSO,WALDO /?CCL5
IN? PRSO,WALDO /?CCL5
PRINT HOLDING-IT
RTRUE
?CCL5: CALL1 IMPOSSIBLES
RSTACK
.FUNCT V-CLOSE
FSET? PRSO,SURFACEBIT /?CTR2
FSET? PRSO,ACTORBIT /?CTR2
FSET? PRSO,VEHBIT \?CCL3
EQUAL? PRSO,IRON-MAIDEN,LADDER,DB /?CCL3
EQUAL? PRSO,WATER-CHAMBER,SNAKE-PIT /?CCL3
?CTR2: CALL1 YOU-MUST-TELL-ME
RSTACK
?CCL3: FSET? PRSO,DOORBIT /?CTR11
FSET? PRSO,CONTBIT \?CCL12
?CTR11: FSET? PRSO,OPENBIT \?CCL17
FCLEAR PRSO,OPENBIT
PRINTI "Okay,"
ICALL1 TPRINT-PRSO
PRINTI " is now closed."
CRLF
CALL1 NOW-DARK?
RSTACK
?CCL17: PRINT ALREADY-IS
RTRUE
?CCL12: CALL1 YOU-MUST-TELL-ME
RSTACK
.FUNCT V-COUGH
EQUAL? HERE,ICKY-CAVE \?CCL3
IN? SICKLY-WITCH,HERE /?CCL3
ZERO? LIT /?CCL8
MOVE SICKLY-WITCH,HERE
MOVE PRICKLY-WITCH,HERE
PRINTI "Two witches appear, spraying fumigation spells throughout the cave. One of the witches, less healthy than the other, frets, ""Oh, dear, I'm not certain my frail body can stand all these germs!"" The other witch, less friendly than the first, gives you a blistering glare. ""What manners! I certainly wouldn't walk into YOUR home and start spewing phlegm around!"""
IN? JESTER,HERE \?CCL11
ICALL1 REMOVE-J
CRLF
PRINTI " They notice the jester for the first time."
PRINT WITCH-REMOVES-J
RTRUE
?CCL11: CRLF
RTRUE
?CCL8: PRINTR "You hear, briefly, a sound that just might be witches disinfecting a cave. But, in the dark, who can really tell for sure?"
?CCL3: PRINTR "Hmmm. You seem to be catching a cold. [Can't say I'm surprised, considering you spent last night sleeping on the cold stone floor of Flatheadia castle.]"
.FUNCT PRE-COUNT
EQUAL? PRSO,ROOMS \FALSE
PRINTI "There are "
PRINTN P-MULT
PRINT PERIOD-CR
RTRUE
.FUNCT V-COUNT
CALL1 IMPOSSIBLES
RSTACK
.FUNCT V-CRAWL-UNDER
FSET? PRSO,TAKEBIT /?CCL3
CALL1 TELL-HIT-HEAD
RSTACK
?CCL3: CALL1 IMPOSSIBLES
RSTACK
.FUNCT V-CROSS
CALL1 V-WALK-AROUND
RSTACK
.FUNCT V-CUT
ZERO? PRSI \?CCL3
CALL1 IMPOSSIBLES
RSTACK
?CCL3: PRINTI "Strange concept, cutting"
CALL2 TRPRINT,PRSO
RSTACK
.FUNCT V-DATE
PRINTR """It was on a fateful day in the year 883 GUE..."" is how poets of the future will begin their tales of your quest. Not being a poet of the future, you think of it as the 14th day of Mumberbur."
.FUNCT V-DECODE
PRINT YOULL-HAVE-TO
PRINTR "figure it out yourself."
.FUNCT V-DIG
EQUAL? PRSI,SHOVEL \?CCL3
EQUAL? PRSO,GROUND /?CCL6
CALL1 IMPOSSIBLES
RSTACK
?CCL6: FSET? HERE,OUTSIDEBIT /?CCL8
FSET? HERE,DESERTBIT /?CCL8
PRINTR "The floor is a bit harder than the shovel."
?CCL8: EQUAL? JUMP-X,STUMP-X \?CCL12
EQUAL? JUMP-Y,STUMP-Y \?CCL12
IN? TREASURE-CHEST,LOCAL-GLOBALS \?CCL12
MOVE TREASURE-CHEST,HERE
PRINTR "You dig and dig and dig. And dig. Then, summoning hidden reserves of strength, you dig some more. Suddenly... ""Clank."" It's a treasure chest! With a burst of energy you uncover it and drag it out of the hole. As you do so, the walls of the hole collapse, filling it in, and you barely make it out alive."
?CCL12: PRINTR "You dig a sizable hole but, finding nothing of interest, you fill it in again out of consideration to future passersby and current gamewriters."
?CCL3: PRINTI "Digging with"
ZERO? PRSI \?CCL18
PRINTI " your hands"
JUMP ?CND16
?CCL18: ICALL1 TPRINT-PRSI
?CND16: PRINTR " is slow and tedious."
.FUNCT V-DIG-WITH
ICALL PERFORM,V?DIG,GROUND,PRSO
RTRUE
.FUNCT V-DRINK
FSET? PRSO,WATERBIT \?CCL3
CALL2 PERFORM-PRSA,WATER
RSTACK
?CCL3: CALL2 CANT-VERB-A-PRSO,STR?127
RSTACK
.FUNCT V-DRINK-FROM
FSET? PRSO,WATERBIT \?CCL3
ICALL PERFORM,V?DRINK,WATER
RTRUE
?CCL3: CALL1 IMPOSSIBLES
RSTACK
.FUNCT V-DRINK-WITH
EQUAL? PRSI,STRAW \?CCL3
EQUAL? PRSO,ELIXIR \?CCL6
CALL2 JIGS-UP,STR?128
RSTACK
?CCL6: ICALL PERFORM,V?DRINK,PRSO
RTRUE
?CCL3: PRINT YOU-CANT
PRINTI "drink something with"
CALL2 ARPRINT,PRSI
RSTACK