-
Notifications
You must be signed in to change notification settings - Fork 0
/
scottfor.f
564 lines (485 loc) · 17.3 KB
/
scottfor.f
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
C
C SCOTTFOR - FORTRAN INTERPRETER FOR SCOTT ADAMS' TEXT ADVENTURES
C
C CURRENTLY IMPLEMENTED USING MODERN FORTRAN (F77)
C
C ETHAN DICKS <ETHAN.DICKS@GMAIL.COM>
C
C
INTEGER N, IL, CL, NL, RL, MX, AR, TT, LN, LT, ML, TR
INTEGER PRINT_HEADER, PRINT_WORDS, PRINT_VOCAB, PRINT_ACTIONS
INTEGER PRINT_ROOMS, PRINT_MSG, PRINT_ITEMS, PPRINT_ACTIONS
INTEGER VERB, NOUN, WORD_LEN, WORD_FIRST, WORD_LAST, STRLEN
INTEGER IS_SYN, RM_LINES, MSG_LINES
INTEGER W(5), LL(5)
INTEGER AC(4)
INTEGER C(280, 8)
INTEGER RM(40, 6)
INTEGER IA(105), I2(105)
INTEGER GAME_VERSION, GAME_NUMBER, GAME_CHECKSUM
INTEGER GAME_MAJOR, GAME_MINOR, GAME_CALCSUM
CHARACTER(1) LAST_CHR
CHARACTER(8) WORD, RAW_WORD
CHARACTER(70) RAW_ITEM, ITEM_NAME
CHARACTER(80) RM_BUF(3)
CHARACTER(100) MSG_BUF(8)
CHARACTER(70) IAS_BUF(2)
CHARACTER(6) O, V
CHARACTER(6) NOUNS(90)
CHARACTER(6) VERBS(90)
CHARACTER(80) RS(40)
C ALLOCATE SPACE FOR SHORT MESSAGE STRINGS FOR NOW
CHARACTER(100) MS(100)
CHARACTER(70) IAS(105)
CHARACTER(30) COMMENTS(280)
C TRACE/DEBUGGING FLAGS
PRINT_HEADER = 1
PRINT_WORDS = 0
PRINT_VOCAB = 0
PRINT_ACTIONS = 0
PPRINT_ACTIONS = 0
PRINT_ROOMS = 0
PRINT_MSG = 0
PRINT_ITEMS = 0
OPEN (UNIT=2, FILE="adv02.dat", STATUS='old', ACTION='read')
C READ GAME HEADER
110 FORMAT (I6)
READ (2, 110) N, IL, CL, NL, RL, MX, AR, TT, LN, LT, ML, TR
C DISPLAY STATS FROM GAME HEADER
210 FORMAT (A15, I5)
IF (PRINT_HEADER .NE. 0) THEN
PRINT 210, 'STRING BYTES:', N
PRINT 210, 'ITEM COUNT:', IL
PRINT 210, 'ACTION COUNT:', CL
PRINT 210, 'VOCAB COUNT:', NL
PRINT 210, 'ROOM COUNT:', RL
PRINT 210, 'CARRY MAX:', MX
PRINT 210, 'START ROOM:', AR
PRINT 210, 'TREASURE COUNT:', TT
PRINT 210, 'WORD LENGTH:', LN
PRINT 210, 'LIGHT TURNS:', LT
PRINT 210, 'MSG COUNT:', ML
PRINT 210, 'TREASURE ROOM:', TR
ENDIF
C READ GAME LOGIC TABLE
DO 320 I=1, CL+1
DO 310 J=1, 8
READ (2, 110) C(I, J)
310 CONTINUE
C DISPLAY ACTIONS WITH NUMBERED VERBS AND NOUNS
220 FORMAT (A, I3, A, I3, A, I3)
230 FORMAT (A, I3, A, I3, A)
240 FORMAT (5(I3, I3))
250 FORMAT (4(I5))
VERB = C(I, 1) / 150
NOUN = C(I, 1) - 150 * VERB
IF (PRINT_ACTIONS .NE. 0) THEN
IF (VERB .EQ. 0) THEN
PRINT 230, '[', I, '] AUTO ', NOUN, '%'
ELSE
PRINT 220, '[', I, '] VERB #', VERB, ' NOUN #', NOUN
ENDIF
ENDIF
DO 330 J=1, 5
LL(J) = C(I,J+1) / 20
W(J) = C(I, J+1) - 20 * LL(J)
330 CONTINUE
IF (PRINT_ACTIONS .NE. 0) THEN
DO 340 J=1, 5
CALL TEST_PRINT(W(J), LL(J))
340 CONTINUE
ENDIF
DO 350 J=0, 1
AC(J*2+1) = C(I, J+7) / 150
AC(J*2+2) = C(I, J+7) - 150 * AC(J*2+1)
350 CONTINUE
IF (PRINT_ACTIONS .NE. 0) THEN
DO 360 J=1, 4
CALL ACTION_PRINT(AC(J))
360 CONTINUE
ENDIF
320 CONTINUE
C READ VOCABULARY
380 FORMAT (A)
382 FORMAT (A, I3, A, A, A, A)
DO 370 I=1, 2*(NL+1)
READ (2, 380) RAW_WORD
C GET ACTUAL STRING LENGTH
STRLEN = LEN(RAW_WORD)
DO WHILE (RAW_WORD(STRLEN:STRLEN) .EQ. ' ')
STRLEN = STRLEN - 1
ENDDO
C STRIP OFF LEADING QUOTE IF PRESENT
WORD_FIRST = 1
IF (RAW_WORD(1:1) .EQ. '"') THEN
WORD_FIRST = 2
ENDIF
C POINT PAST '*' IF PRESENT
IS_SYN = 0
IF (RAW_WORD(WORD_FIRST:WORD_FIRST) .EQ. '*') THEN
WORD_FIRST = WORD_FIRST + 1
IS_SYN = 1
ENDIF
C CHECK FOR TRAILING '"' TO CATCH SHORT WORDS
WORD_LAST = STRLEN
IF (RAW_WORD(WORD_LAST:WORD_LAST) .EQ. '"') THEN
WORD_LAST = WORD_LAST - 1
ENDIF
C CHECK FOR VOCAB LENGTH
IF (WORD_LAST - WORD_FIRST .GE. LN) THEN
WORD_LAST = LN + 1
ENDIF
C CHECK FOR SYNONYMS (STARTS WITH '*')
IF (IS_SYN .EQ. 1) THEN
WORD_FIRST = WORD_FIRST - 1
ENDIF
C COPY JUST THE WORD FROM THE RAW BUFFER
WORD = RAW_WORD(WORD_FIRST:WORD_LAST)
IF (PRINT_VOCAB .NE. 0) THEN
PRINT 382, 'WORD #', I, ' ', WORD
ENDIF
IF (IAND(I, 1) .EQ. 1) THEN
VERBS(I/2+1) = WORD
ELSE
NOUNS(I/2) = WORD
ENDIF
370 CONTINUE
C DISPLAY VOCABUARY
IF (PRINT_VOCAB .NE. 0) THEN
DO 390 I=1, NL+1
PRINT 382, '# ',I, ' VERB: ', VERBS(I), ' NOUN: ', NOUNS(I)
390 CONTINUE
ENDIF
C READ ROOMS
400 FORMAT (I3)
405 FORMAT (A)
406 FORMAT (A, I3, A, I3, A)
407 FORMAT (6I3, A)
DO 410 I=1, RL+1
DO 420 J=1, 6
READ (2, 400) RM(I, J)
420 CONTINUE
C READ UP TO 3 LINES FOR ONE STRING
DO 425 J=1,3
RM_BUF(J) = ""
425 CONTINUE
DO 430 RM_LINES=1,3
READ (2, 405) RM_BUF(RM_LINES)
C CHECK FOR ADDITIONAL LINES FOR THIS SAME MESSAGE STRING
STRLEN = LEN(RM_BUF(RM_LINES))
DO WHILE (RM_BUF(RM_LINES)(STRLEN:STRLEN) .EQ. ' ')
STRLEN = STRLEN - 1
ENDDO
C STOP LOOKING IF THE LAST CHARACTER READ WAS CLOSING DOUBLE-QUOTE
IF (RM_BUF(RM_LINES)(STRLEN:STRLEN) .EQ. '"') EXIT
430 CONTINUE
C PRINT ROOM DESCRIPTIONS IF ENABLED
IF (PRINT_ROOMS .NE. 0) THEN
IF (RM_LINES .GT. 1) THEN
PRINT 406, 'RM #', I, ' HAS', RM_LINES, ' LINES'
ENDIF
PRINT 407,I,RM(I,1),RM(I,2),RM(I,3),RM(I,4),RM(I,5),RM_BUF(1)
ENDIF
C ONLY STORE THE FIRST LINE FOR NOW, PENDING GENERAL SOLUTION
RS(I) = RM_BUF(1)
410 CONTINUE
C PRINT ACTIONS AFTER READING VOCAB WORDS
520 FORMAT (A, I3, A, A, A, A)
IF (PPRINT_ACTIONS .NE. 0) THEN
DO 500 I=1, CL+1
VERB = C(I, 1) / 150
NOUN = C(I, 1) - 150 * VERB
IF (VERB .EQ. 0) THEN
PRINT 230,'[',I,'] AUTO ', NOUN,'%'
ELSE
VERB = VERB + 1
NOUN = NOUN + 1
PRINT 520,'[',I,'] VERB ',VERBS(VERB),' NOUN ',NOUNS(NOUN)
ENDIF
DO 530 J=1, 5
LL(J) = C(I,J+1) / 20
W(J) = C(I, J+1) - 20 * LL(J)
530 CONTINUE
DO 540 J=1, 5
CALL TEST_PRINT(W(J), LL(J))
540 CONTINUE
DO 550 J=0, 1
AC(J*2+1) = C(I, J+7) / 150
AC(J*2+2) = C(I, J+7) - 150 * AC(J*2+1)
550 CONTINUE
DO 560 J=1, 4
CALL ACTION_PRINT(AC(J))
560 CONTINUE
500 CONTINUE
ENDIF
C READ MESSAGES
605 FORMAT (A)
606 FORMAT (A, I3, A, I3, A)
DO 600 I=1,ML+1
C READ UP TO 8 LINES FOR ONE STRING
DO 610 J=1,8
MSG_BUF(J) = ""
610 CONTINUE
DO 620 MSG_LINES=1,8
READ (2, 605) MSG_BUF(MSG_LINES)
C CHECK FOR ADDITIONAL LINES FOR THIS SAME MESSAGE STRING
STRLEN = LEN(MSG_BUF(MSG_LINES))
DO WHILE (MSG_BUF(MSG_LINES)(STRLEN:STRLEN) .EQ. ' ')
STRLEN = STRLEN - 1
ENDDO
C STOP LOOKING IF THE LAST CHARACTER READ WAS CLOSING DOUBLE-QUOTE
IF (MSG_BUF(MSG_LINES)(STRLEN:STRLEN) .EQ. '"') THEN
C (SPECIAL HANDLING FOR MESSAGE LINES WITH ONLY A DOUBLE-QUOTE)
IF (STRLEN .GT. 1 .OR. MSG_LINES .GT. 1) EXIT
ENDIF
620 CONTINUE
C DISPLAY MESSAGES
IF (PRINT_MSG .EQ. 1) THEN
PRINT 606, 'MSG #', I, ' HAS', MSG_LINES, ' LINES'
DO 630 J=1,MSG_LINES
PRINT 605, MSG_BUF(J)
630 CONTINUE
ENDIF
C ONLY STORE THE FIRST LINE FOR NOW, PENDING GENERAL SOLUTION
MS(I) = MSG_BUF(1)
600 CONTINUE
C READ ITEMS
705 FORMAT (A)
DO 700 I=1,IL+1
C READ UP TO 2 LINES FOR ONE ITEM
DO 710 J=1,2
IAS_BUF(J) = ""
710 CONTINUE
DO 720 IAS_LINES=1,2
READ (2, 705) IAS_BUF(IAS_LINES)
C CHECK FOR ADDITIONAL LINES FOR THIS SAME MESSAGE STRING
STRLEN = LEN(IAS_BUF(IAS_LINES))
DO WHILE (IAS_BUF(IAS_LINES)(STRLEN:STRLEN) .EQ. ' ')
STRLEN = STRLEN - 1
ENDDO
C STOP LOOKING IF THE LAST CHARACTER READ WAS A DIGIT
LAST_CHR = IAS_BUF(IAS_LINES)(STRLEN:STRLEN)
IF (LAST_CHR .GE. '0' .AND. LAST_CHR .LE. '9') EXIT
720 CONTINUE
730 FORMAT (A, I3, A, I2, A)
IF (IAS_LINES .GT. 1) THEN
PRINT 730, 'ITEM #', I, ' HAS', IAS_LINES, ' LINES'
ENDIF
C ONLY STORE THE FIRST LINE FOR NOW, PENDING GENERAL SOLUTION
IAS(I) = IAS_BUF(1)
IA(I) = 0
I2(I) = IA(1)
700 CONTINUE
C DISPLAY ITEMS
750 FORMAT (A, I3, A, I2)
IF (PRINT_ITEMS .NE. 0) THEN
DO 760 I=1,IL+1
PRINT 750, 'ITEM #', I, IAS(I), IA(I)
760 CONTINUE
ENDIF
C READ COMMENTS
810 FORMAT (A)
DO 800 I=1, CL+1
READ (2, 810) COMMENTS(I)
800 CONTINUE
C PRINT ACTIONS AFTER READING VOCAB WORDS AND COMMENTS
920 FORMAT (A, I3, A, A, A, A, A, A, A)
922 FORMAT (A, I3, A, I3, A, A)
IF (PPRINT_ACTIONS .NE. 0) THEN
DO 900 I=1, CL+1
VERB = C(I, 1) / 150
NOUN = C(I, 1) - 150 * VERB
IF (VERB .EQ. 0) THEN
PRINT 922,'[',I,'] AUTO ', NOUN,'% ', COMMENTS(I)
ELSE
V = VERBS(VERB+1)
O = NOUNS(NOUN+1)
PRINT 920,'[',I,'] VERB ',V,' NOUN ',O,' ',COMMENTS(I)
ENDIF
DO 930 J=1, 5
LL(J) = C(I,J+1) / 20
W(J) = C(I, J+1) - 20 * LL(J)
930 CONTINUE
DO 940 J=1, 5
CALL TEST_PRINT(W(J), LL(J))
940 CONTINUE
DO 950 J=0, 1
AC(J*2+1) = C(I, J+7) / 150
AC(J*2+2) = C(I, J+7) - 150 * AC(J*2+1)
950 CONTINUE
DO 960 J=1, 4
CALL ACTION_PRINT(AC(J))
960 CONTINUE
900 CONTINUE
ENDIF
C READ TRAILER AND DISPLAY VERSION
1000 FORMAT (I5)
READ (2, 1000) GAME_VERSION
READ (2, 1000) GAME_NUMBER
READ (2, 1000) GAME_CHECKSUM
GAME_MAJOR = GAME_VERSION / 100
GAME_MINOR = GAME_VERSION - GAME_MAJOR * 100
C GAME "SECURITY CHECKSUM" is 2*ACTIONS+OBJECTS+VERSION
GAME_CALCSUM = CL * 2 + IL + GAME_VERSION
1010 FORMAT (A, I1, A, I2, A, I2)
1020 FORMAT (A, I3, A, I3, A)
IF (PRINT_HEADER .NE. 0) THEN
PRINT 1010, 'ADVENTURE #', GAME_NUMBER, ' VERSION ',
& GAME_MAJOR, '.', GAME_MINOR
PRINT 1020, 'GAME CHECKSUM ', GAME_CHECKSUM, ' (PROVIDED) ',
& GAME_CALCSUM, ' (CALCULATED)'
ENDIF
END
CCCCCCC
C PRINT OUT TEST ARGS
C
C CONDITIONS 0-14 USED BY ALL GAMES
C CONDITIONS 15+ NOT USED BY VERSIONS WRITTEN IN BASIC
SUBROUTINE TEST_PRINT(TESTNUM, TESTARG)
INTEGER TESTNUM, TESTARG
10010 FORMAT (A, I3, A)
IF (TESTNUM .EQ. 0) THEN
IF (TESTARG .NE. 0) THEN
PRINT 10010, ' DATA ', TESTARG
ENDIF
ELSE IF (TESTNUM .EQ. 1) THEN
PRINT 10010, ' IF ITEM(', TESTARG, ') IS HELD'
ELSE IF (TESTNUM .EQ. 2) THEN
PRINT 10010, ' IF ITEM(', TESTARG, ') IN ROOM WITH PLAYER'
ELSE IF (TESTNUM .EQ. 3) THEN
PRINT 10010, ' IF ITEM(', TESTARG, ') IS HELD OR IN ROOM'
ELSE IF (TESTNUM .EQ. 4) THEN
PRINT 10010, ' IF PLAYER IN ROOM #', TESTARG
ELSE IF (TESTNUM .EQ. 5) THEN
PRINT 10010, ' IF ITEM(', TESTARG, ') NOT IN ROOM WITH PLAYER'
ELSE IF (TESTNUM .EQ. 6) THEN
PRINT 10010, ' IF ITEM(', TESTARG, ') IS NOT HELD'
ELSE IF (TESTNUM .EQ. 7) THEN
PRINT 10010, ' IF PLAYER NOT IN ROOM #', TESTARG
ELSE IF (TESTNUM .EQ. 8) THEN
PRINT 10010, ' IF BIT(', TESTARG, ') SET'
ELSE IF (TESTNUM .EQ. 9) THEN
PRINT 10010, ' IF BIT(', TESTARG, ') CLEAR'
ELSE IF (TESTNUM .EQ. 10) THEN
PRINT 10010, ' IF ANYTHING HELD'
ELSE IF (TESTNUM .EQ. 11) THEN
PRINT 10010, ' IF NOTHING HELD', TESTARG
ELSE IF (TESTNUM .EQ. 12) THEN
PRINT 10010,' IF ITEM(', TESTARG, ') NOT HELD AND NOT IN ROOM'
ELSE IF (TESTNUM .EQ. 13) THEN
PRINT 10010, ' IF ITEM(', TESTARG, ') EXISTS'
ELSE IF (TESTNUM .EQ. 14) THEN
PRINT 10010, ' IF ITEM(', TESTARG, ') DOES NOT EXIST'
ELSE IF (TESTNUM .EQ. 15) THEN
PRINT 10010, ' IF COUNTER <= ', TESTARG
ELSE IF (TESTNUM .EQ. 16) THEN
PRINT 10010, ' IF COUNTER >= ', TESTARG
ELSE IF (TESTNUM .EQ. 17) THEN
PRINT 10010, ' IF ITEM(', TESTARG, ') IN INITIAL ROOM'
ELSE IF (TESTNUM .EQ. 18) THEN
PRINT 10010, ' IF ITEM(', TESTARG, ') NOT IN INITIAL ROOM'
ELSE IF (TESTNUM .EQ. 19) THEN
PRINT 10010, ' IF COUNTER NUM IS ', TESTARG
ELSE
PRINT 10010, 'UNKNOWN TEST', TESTNUM
ENDIF
RETURN
END
C PRINT ACTIONS
C
C ACTIONS 51-72 USED BY ALL GAMES
C ACTIONS 72+ NOT USED BY VERSIONS WRITTEN IN BASIC
C ACTIONS 64 AND 76 HAVE IDENTICAL RESULTS
SUBROUTINE ACTION_PRINT(ACTIONNUM)
INTEGER ACTIONNUM
10210 FORMAT (A, I3, A)
C PRINT 10210, ' --- AP ', ACTIONNUM
IF (ACTIONNUM .EQ. 0) THEN
PRINT 10210, ' 0'
ELSE IF (ACTIONNUM .GT. 0 .AND. ACTIONNUM .LE. 51) THEN
PRINT 10210, ' THEN PRINT MSG #', ACTIONNUM - 1
ELSE IF (ACTIONNUM .EQ. 52) THEN
PRINT 10210, ' THEN GET ITEM <DATA>'
ELSE IF (ACTIONNUM .EQ. 53) THEN
PRINT 10210, ' THEN DROP ITEM <DATA>'
ELSE IF (ACTIONNUM .EQ. 54 .OR. ACTIONNUM .EQ. 59) THEN
PRINT 10210, ' THEN MOVE ITEM <DATA> TO CURRENT ROOM'
ELSE IF (ACTIONNUM .EQ. 55) THEN
PRINT 10210, ' THEN DESTROY ITEM <DATA>'
ELSE IF (ACTIONNUM .EQ. 56) THEN
PRINT 10210, ' THEN SET DARKFLAG'
ELSE IF (ACTIONNUM .EQ. 57) THEN
PRINT 10210, ' THEN CLEAR DARKFLAG'
ELSE IF (ACTIONNUM .EQ. 58) THEN
PRINT 10210, ' THEN SET BIT #<DATA>'
ELSE IF (ACTIONNUM .EQ. 59) THEN
PRINT 10210, ' THEN #59'
ELSE IF (ACTIONNUM .EQ. 60) THEN
PRINT 10210, ' THEN CLEAR BIT #<DATA>'
ELSE IF (ACTIONNUM .EQ. 61) THEN
PRINT 10210, ' THEN KILL PLAYER'
ELSE IF (ACTIONNUM .EQ. 62) THEN
PRINT 10210, ' THEN MOVE ITEM <DATA1> TO ROOM #<DATA2>'
ELSE IF (ACTIONNUM .EQ. 63) THEN
PRINT 10210, ' THEN END GAME'
ELSE IF (ACTIONNUM .EQ. 64) THEN
PRINT 10210, ' THEN DESCRIBE CURRENT ROOM(64)'
ELSE IF (ACTIONNUM .EQ. 65) THEN
PRINT 10210, ' THEN SCORE'
ELSE IF (ACTIONNUM .EQ. 66) THEN
PRINT 10210, ' THEN PRINT INVENTORY'
ELSE IF (ACTIONNUM .EQ. 67) THEN
PRINT 10210, ' THEN SET BIT 0'
ELSE IF (ACTIONNUM .EQ. 68) THEN
PRINT 10210, ' THEN CLEAR BIT 0'
ELSE IF (ACTIONNUM .EQ. 69) THEN
PRINT 10210, ' THEN REFILL LAMP(?)'
ELSE IF (ACTIONNUM .EQ. 70) THEN
PRINT 10210, ' THEN CLEAR SCREEN'
ELSE IF (ACTIONNUM .EQ. 71) THEN
PRINT 10210, ' THEN SAVE GAME'
ELSE IF (ACTIONNUM .EQ. 72) THEN
PRINT 10210,' THEN SWAP ITEM <DATA1> LOC AND ITEM <DATA2> LOC'
ELSE IF (ACTIONNUM .EQ. 73) THEN
PRINT 10210, ' THEN CONTINUE TO NEXT ACTION'
ELSE IF (ACTIONNUM .EQ. 74) THEN
PRINT 10210, ' THEN MOVE ITEM <DATA> TO PLAYER'
ELSE IF (ACTIONNUM .EQ. 75) THEN
PRINT 10210, ' THEN MOVE ITEM <DATA1> NEXT TO ITEM <DATA2>'
ELSE IF (ACTIONNUM .EQ. 76) THEN
PRINT 10210, ' THEN DESCRIBE CURRENT ROOM(76)'
ELSE IF (ACTIONNUM .EQ. 77) THEN
PRINT 10210, ' THEN DECREMENT CURRENT COUNTER'
ELSE IF (ACTIONNUM .EQ. 78) THEN
PRINT 10210, ' THEN PRINT CURRENT COUNTER'
ELSE IF (ACTIONNUM .EQ. 79) THEN
PRINT 10210, ' THEN SET CURRENT COUNTER TO <DATA>'
ELSE IF (ACTIONNUM .EQ. 80) THEN
PRINT 10210, ' THEN MOVE PLAYER TO ALT ROOM'
ELSE IF (ACTIONNUM .EQ. 81) THEN
PRINT 10210, ' THEN SAVE COUNTER AND SWITCH TO <DATA>'
ELSE IF (ACTIONNUM .EQ. 82) THEN
PRINT 10210, ' THEN INCREASE` COUNTER BY <DATA>'
ELSE IF (ACTIONNUM .EQ. 83) THEN
PRINT 10210, ' THEN REDUCE COUNTER BY <DATA>'
ELSE IF (ACTIONNUM .EQ. 84) THEN
PRINT 10210, ' THEN GET PRINT THE NOUN TYPED (NO NEWLINE)'
ELSE IF (ACTIONNUM .EQ. 85) THEN
PRINT 10210, ' THEN GET PRINT THE NOUN TYPED (W/NEWLINE)'
ELSE IF (ACTIONNUM .EQ. 86) THEN
PRINT 10210, ' THEN GET PRINT NEWLINE'
ELSE IF (ACTIONNUM .EQ. 87) THEN
PRINT 10210, ' THEN SWAP CURRENT LOC WITH ALT LOC <DATA>'
ELSE IF (ACTIONNUM .EQ. 88) THEN
PRINT 10210, ' THEN SLEEP 2 SECONDS'
ELSE IF (ACTIONNUM .EQ. 89) THEN
PRINT 10210, ' *THEN DRAW PICTURE <DATA>'
ELSE IF (ACTIONNUM .GE. 90 .AND. ACTIONNUM .LE. 101) THEN
PRINT 10210, ' *UNUSED ACTION #', ACTIONNUM
ELSE IF (ACTIONNUM .GE. 102 .AND. ACTIONNUM .LE. 150 ) THEN
PRINT 10210, ' THEN PRINT MSG #', ACTIONNUM - 51
ELSE
PRINT 10210, ' *UNHANDLED ACTION #', ACTIONNUM
ENDIF
RETURN
END