The Trident is a text adventure game set in an underwater world where the player must recover Poseidon’s lost trident. The engine uses a compact bytecode-like command table stored in string arrays, with a central dispatcher at line 2227 that walks through condition/action pairs encoded as character codes in the string K$. Player state — including room number, inventory flags, and counters — is tracked via N$(), M$(), and C() arrays, and a snapshot system at lines 6410–6447 serializes the full game state into an S$() array for save/restore without tape access. The game features an air-supply countdown (C1), a darkness counter (C2), and a move counter (C3) that triggers periodic random events, as well as PEEK of the system variable at address 16398/16399 to detect when the screen is nearly full before prompting “MORE…”. Room exits are encoded as single characters in E$ strings, with their ASCII values directly used as room numbers via GOTO A*10 dispatch.
Program Analysis
Program Structure
The Trident is organized into several functional zones:
- Lines 5–19: Room display loop — prints the current room description and visible objects by scanning N$() for items whose location matches
A(current room). - Lines 20–42: Input parsing and single-character direction handling.
- Lines 62–421: Room-specific action stubs that load
E$and dispatch to a movement or action handler. - Lines 500–586: Darkness, underwater air, and drowning sequences.
- Lines 900–944: Full verb/noun parser (three-letter verb matching against V$(), noun matching against F$()).
- Lines 945–982: TAKE logic.
- Lines 990–1020: Main print/status loop with screen-full detection.
- Lines 1200–1266: DROP, inventory, and SAVE game routines.
- Lines 2190–2440: Bytecode dispatcher (the core engine).
- Lines 3000–3175: Condition subroutines (GOSUB dispatch table).
- Lines 5000–5085: Action subroutines (GOSUB dispatch table).
- Lines 6000–6630: Response message blocks and complex action handlers.
- Lines 6699–6706: Scrolling print utility.
- Lines 7000–7006: Per-turn counter decrement (C1, C2, C3).
- Lines 9400–9445: Exit display subroutine.
- Lines 9800–9912: Game initialization and title/intro sequence.
Room Dispatch via GOTO A*10
The current room number is stored in A. Line 9 executes GOTO A*10, so room 6 jumps to line 60, room 16 to line 160, and so on. Each room stub loads an eight-character E$ string encoding exits and metadata, then jumps to a handler label (J, L, K, B, or N). This is a memory-efficient way to avoid a large IF/THEN chain or ON/GO TO table.
Exit Encoding in E$
The eight characters of E$ encode the six directional exits (N, S, E, W, U, D) plus two additional bytes. Exits are stored as single characters whose CODE values equal the destination room number. A space character (code 32) means no exit in that direction. Lines 31–42 handle single-letter direction commands by reading CODE E$(X) and assigning it to A before jumping to the turn-end handler T. The exit display routine at line 9400 prints human-readable direction labels from Y$ for any non-space exit slot.
Bytecode Engine (Lines 2190–2440)
The heart of the game is a bytecode interpreter stored in the string array K$(). Verbs map via V(X) to an offset in K$. Each entry consists of:
- A three-character noun field (
P$) — “ANY” matches any noun. - A length byte (so the interpreter can skip to the next entry via
NX+CODE K$(NX)). - A sequence of condition bytes and action bytes terminated by
"."(condition phase ends) then":"(entry ends).
Conditions are dispatched by GOSUB 2620+CODE K$(C)*10, which maps to lines 3000–3175 (offset 2620 + 0–15 × 10). Actions are dispatched by GOTO 4620+CODE K$(C)*10, mapping to lines 5000–5085 (offset 4620 + 38–… × 10, where action codes start at 38). Each condition subroutine sets boolean D and returns; the dispatcher skips to the action block only if all conditions pass.
Condition and Action Dispatch Tables
| Code range | GOSUB target | Meaning |
|---|---|---|
| 0 | 3000 | Current room = E |
| 1 | 3010 | N$(E) = current room or “USR ” (carried) |
| 2 | 3020 | N$(E) not in room and not carried |
| 3 | 3030 | N$(E) = “USR ” (in inventory) |
| 4 | 3040 | M$(E) = “S” (flag set) |
| 5 | 3050 | M$(E) ≠ “S” (flag clear) |
| 6 | 3060 | C(E) = 0 |
| 7 | 3070 | Noun matches F$(E)(4 TO 6) |
| 8 | 3080 | E$(7) code = E |
| 9 | 3090 | Current room ≠ E |
| 10 | 3100 | N$(E) = ” ” (absent) |
| 11 | 3110 | N$(E) ≠ ” ” (present) |
| 12 | 3120 | N$(E) ≠ “USR ” (not carried) |
| 13 | 3130 | Noun matches F$(E) and N$(E) present |
| 14 | 3140 | Noun does not match F$(E) |
| 15 | 3150 | Inventory count > E |
| 16 | 3160 | N$(E) = CHR$ A (in current room) |
| 17 | 3170 | Room is 13, 17, or 20 (special locations) |
State Snapshot System
Lines 6410–6447 implement an in-memory save/restore. The snapshot action serializes all of N$() (item locations, 29 entries), M$() (flags, 9 entries), and the scalars C1, C2, C3, I, and A into a block of S$() starting at offset GM. Restore simply reverses the copy. The variable GM is set to 1 (line 6450) or 44 (line 6460), allowing two independent snapshot slots. The game also supports tape saving at lines 1256–1266 with a SAVE "TRIDENT" call, and a full reset at line 9995.
Screen-Full Detection
Line 991 uses PEEK 16398+256*PEEK 16399 to read the system variable DF_CC (display file current cursor), comparing it against 27975. When the cursor is near the bottom of the screen, the game pauses and prints “MORE… (PRESS ENTER)” before clearing and continuing. This avoids text scrolling off before the player can read it.
Air and Darkness Counters
Three per-turn counters are decremented at line 7000: C1 is the underwater air supply (triggers drowning sequence when it reaches C(2) at line 550), C2 is the darkness penalty counter (incremented in dark rooms at line 512 until it reaches 3, then the player is dragged to the land of the dead), and C3 is a global move counter that wraps at 250 and triggers scripted events at specific values via line 1015.
Inventory Representation
Item locations are stored in N$(X) as single characters: CHR$ A means the item is in room A, "USR " means it is in the player’s inventory, and " " means it has been permanently removed. The inventory count I is maintained manually and capped (the player can carry 7 items, checked at line 1234 and condition code 15).
Notable Techniques
- Three-letter abbreviation matching for both verbs (
V$(X)) and nouns (F$(X)(4 TO 6)) keeps the parser compact and forgiving of full-word variations. - Room description text is stored packed in
Q$()as a single long string, with start/end offsets retrieved by the subroutine at line 900 reading two-byte encoded positions fromF$(X). GOSUB VandGOTO J/K/L/B/Nuse single-letter variable names as line number aliases, a common ZX81 BASIC technique for computed jumps without a lookup table.- Line 421 uses
LET E$=" 8 WRND"— the extra characters beyond position 8 suggest the engine only reads the first 8 characters ofE$for exits and metadata, and the trailing characters are unused padding or a development artifact. - The cookies-in-jar cross-reference check at line 1237 directly tests two inventory slots (
N$(12)andN$(3)), showing that item indices are hardcoded for puzzle-critical logic outside the bytecode engine.
Anomalies and Observations
- Line 9902 contains a date reference in the copyright string embedded in a PRINT statement; this is display text, not metadata.
- Line 584 accepts “GS1”, “GS2”, or “RES” after drowning but the subsequent
GOTO 21jumps to the main input loop without actually branching on which option was chosen — all three responses behave identically, suggesting “GS1″/”GS2” (presumably “go to save 1/2”) were planned but not implemented differently. - Line 421’s
E$=" 8 WRND"is longer than 8 characters; only the first 8 are used by the exit/handler system, so “ND” is dead data. - Line 75 references
LET C=EELand line 152 referencesLET C=COOK— these appear to be unquoted string variable names used as numeric labels, which would cause an error unlessEELandCOOKare defined numeric variables pointing to bytecode offsets. The same pattern applies toBREATH,SOG,WG,LION, andCSFelsewhere — these are all numeric variables initialized in the program’s data setup (not shown in this listing) that serve as named entry points into the K$ bytecode table.
Content
Image Gallery
Source Code
5 CLS
6 PRINT "==========>";D$
8 PRINT "YOU ARE:"
9 GOTO A*10
10 FOR X=1 TO TN
11 IF CODE N$(X)=A THEN GOTO 15
12 NEXT X
13 LET M$(8)="N"
14 GOTO 990
15 GOSUB V
16 IF M$(8)="N" THEN PRINT "YOU SEE..."
17 LET M$(8)="S"
18 PRINT Q$(S TO F),
19 GOTO 12
20 INPUT D$
21 LET ACT=0
23 IF LEN D$=1 THEN GOTO 29
24 IF LEN D$<7 THEN LET D$=D$+" "
26 GOTO 910
30 IF D$="I" THEN GOTO 1220
31 FOR X=1 TO 6
32 IF D$=Z$(X) THEN GOTO 36
34 NEXT X
35 GOTO W
36 IF E$(X)<>" " THEN GOTO 40
37 LET P$="YOU CANT GO THAT WAY."
38 GOTO T
40 LET A=CODE E$(X)
42 GOTO T
62 LET E$="▞8▛3 4W▘"
65 GOTO J
72 LET E$="(8(▞D(W▖"
74 IF C(3)<>13 THEN GOTO J
75 LET C=EEL
79 GOTO 2227
91 LET E$="3 L▛"
92 GOSUB M
99 GOTO B
105 LET E$=" ,, L~~"
106 GOSUB M
109 GOTO B
111 LET E$=" ? L$"
112 GOSUB M
115 LET C2=0
119 GOTO B
132 LET E$="<<< )DW("
139 GOTO J
142 LET E$=" ▛ L<"
144 LET C1=0
149 GOTO K
150 LET E$=" "+CHR$ 11+"L-"
152 LET C=COOK
153 IF N$(12)="?" THEN GOTO 2227
159 GOTO L
162 LET E$="6666▛5W;"
169 GOTO J
172 LET E$="<<< >$W0"
179 GOTO J
182 LET E$="<=< <)W3"
189 GOTO J
190 CLS
191 LET A=16
192 PRINT AT 10,2;"A CURRENT SWEEPS YOU AWAY."
193 PAUSE 100
195 GOTO T
202 LET E$="> W6"
209 GOTO J
210 LET CC=CODE E$(8)
211 LET C=CODE J$(CC)*100
212 PRINT H$(C+CODE J$(CC+1) TO C+CODE J$(CC+2))
215 IF A=30 THEN GOTO 230
216 IF A=15 THEN GOTO 235
220 RETURN
230 IF M$(9)="S" THEN PRINT "THERE IS A ROPE HANGING HERE."
232 RETURN
235 IF M$(9)="S" THEN PRINT L$
236 IF M$(9)<>"S" THEN PRINT U$
237 RETURN
300 LET E$=" L9"
309 GOTO L
312 LET E$=" ,,4 LC"
313 GOSUB M
314 LET C1=0
319 GOTO B
322 LET C1=0
324 LET E$="4453▞ WF"
325 GOSUB M
329 GOTO N
332 LET E$="5564( WI"
333 GOSUB M
334 LET C1=0
338 PRINT TAB 9;"""FINS TO THE EAST""===>"
339 GOTO N
340 CLS
341 PRINT AT 11,5;"A SHARK EATS YOU."
344 GOTO U
362 LET E$="▞8▛3 4WL"
365 GOTO J
372 LET E$=" A LO"
379 GOTO L
381 LET E$=" 9 LR"
389 GOTO K
395 LET E$=" LU"
399 GOTO K
412 LET E$="DD( $▛WX"
419 GOTO J
421 LET E$=" 8 WRND"
429 GOTO J
450 LET C=BREATH
451 GOTO AB
500 IF A=14 THEN GOTO 502
501 IF N$(2)<>CHR$ A AND N$(2)<>"USR " THEN GOTO 510
502 LET C2=0
506 GOSUB M
508 GOTO B
510 CLS
512 LET C2=C2+1
514 PRINT "YOU ARE IN A DARK PLACE."
516 PAUSE 100
517 PRINT
518 IF C2=1 THEN PRINT "SOMETHING IS COMING..."
520 IF C2=2 THEN PRINT "SOMETHING IS BREATHING ON YOU."
522 IF C2=3 THEN GOTO 530
523 PAUSE 100
528 GOTO 1000
530 PRINT "YOU ARE GRABBED BY DOZENS OF ICYHANDS AND DRAGGED-OFF TO THE LAND OF THE DEAD."
532 LET C=WG
534 GOTO AB
540 IF N$(16)="USR " THEN GOTO 544
541 LET B=1000
542 PRINT "UNDERWATER, YOU SEE BLURRY SHAPES."
543 GOTO 546
544 GOSUB M
546 LET C1=C1+1
548 IF C1=C(1) THEN LET C$="UMMMMMPPPPPHHHH..."
550 IF C1=C(2) THEN GOTO 560
551 LET C=SOG
553 GOSUB 2190
554 GOTO B
560 CLS
561 PRINT AT 6,0;"YOUR LUNGS ARE CRYING FOR AIR..."
562 GOTO 576
570 IF M$(1)="S" AND M$(2)="S" THEN GOTO 572
571 GOTO L
572 CLS
573 PRINT AT 6,0;"A WALL OF RUSHING WATER..."
574 PAUSE 100
575 PRINT AT 8,7;"CARRIES YOU OFF..."
576 PAUSE 100
578 PRINT AT 10,14;"YOU HAVE DROWNED."
579 PAUSE 100
580 PRINT AT 20,1;"ENTER...GS1, GS2, OR RESET."
581 INPUT D$
582 LET D$=(D$+" ")(1 TO 3)
584 IF D$="GS1" OR D$="GS2" OR D$="RES" THEN GOTO 21
585 CLS
586 GOTO U
900 LET S=CODE F$(X)(2)+CODE F$(X)(3)
902 LET F=CODE F$(X+1)(2)+CODE F$(X+1)(3)-1
904 RETURN
910 FOR X=1 TO LEN D$
912 IF D$(X)=" " THEN GOTO 920
914 NEXT X
916 GOTO W
920 LET A$=D$(1 TO 3)
922 LET B$=D$(X+1 TO X+3)
928 IF A$<>"GO " AND A$<>"ENT" THEN GOTO 936
929 FOR X=1 TO 9
930 IF B$=G$(X)(1 TO 3) THEN GOTO 933
931 NEXT X
932 GOTO W
933 LET C=CODE G$(X)(4)
934 GOTO AB
936 IF A$="DRO" OR A$="LEA" THEN GOTO 1200
938 FOR X=1 TO TV
939 IF A$=V$(X) THEN GOTO 943
940 NEXT X
941 LET P$="???......THAT DOES NOT COMPUTE."
942 GOTO SS
943 LET C=V(X)
944 GOTO 2200
945 FOR X=1 TO TN
946 IF N$(X)=" " OR B$<>F$(X)(4 TO 6) THEN GOTO 950
947 IF F$(X)(1)="Y" AND A=CODE N$(X) THEN GOTO 966
948 IF N$(X)="USR " THEN GOTO 956
949 IF F$(X)(1)="N" AND A=CODE N$(X) THEN GOTO 970
950 NEXT X
954 GOTO Z
956 GOSUB V
957 LET P$="YOU HAVE THE "+Q$(S TO F)
960 GOTO T
966 LET N$(X)="USR "
967 LET I=I+1
968 LET P$="O.K., TAKEN."
969 GOTO T
970 GOSUB V
971 IF N$(X)<>CHR$ A THEN GOTO Z
972 LET P$=Q$(S TO F)+" CANT BE CARRIED"
974 GOTO T
980 LET P$="YOU CANNOT CARRY ANY MORE."
982 GOTO T
990 PRINT
991 IF PEEK 16398+256*PEEK 16399<27975 THEN GOTO 1000
992 PRINT ,,,,"MORE... (PRESS ENTER)"
994 INPUT T$
996 CLS
1000 PRINT "▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄"
1001 PRINT C$
1002 LET C$=""
1003 LET T$=""
1004 LET D$=""
1005 LET ACT=0
1006 PRINT P$
1007 LET P$=""
1009 LET B=9400
1012 LET C3=C3+1
1013 IF C3>250 THEN LET C3=105
1014 LET C(3)=0
1015 IF C3=1 OR C3=100 THEN GOTO 9850
1016 IF PR>0 THEN GOSUB PR
1017 PRINT W$
1018 LET W$=""
1019 LET PR=0
1020 GOTO 20
1200 FOR X=1 TO H
1201 IF N$(X)=" " THEN GOTO 1204
1202 IF B$=F$(X)(4 TO 6) AND N$(X)="USR " THEN GOTO 1209
1204 NEXT X
1206 LET P$="YOU DONT HAVE IT."
1207 GOTO T
1209 LET I=I-1
1210 LET N$(X)=CHR$ A
1211 LET P$="O.K."
1212 LET C(3)=X
1213 IF A=15 AND A$="THR" THEN GOTO 1216
1214 LET C=LION
1215 GOTO AB
1216 LET N$(X)=" "
1217 LET P$="SPLASH..."
1218 GOTO T
1220 CLS
1221 PRINT "HMMM..LETS SEE (FUMBLE). I HAVE:"
1222 PRINT
1224 FOR X=1 TO H
1225 IF N$(X)<>"USR " THEN GOTO 1229
1226 GOSUB V
1227 PRINT "===> "+Q$(S TO F)
1229 IF N$(X)="USR " THEN LET IV=1
1230 NEXT X
1231 IF IV=0 THEN PRINT "===> NOTHING AT ALL"
1232 LET IV=0
1233 PRINT
1234 PRINT "I CAN HANDLE ";7-I;" MORE ITEM(S)."
1235 PRINT
1237 IF N$(12)="USR " AND N$(3)="USR " THEN PRINT "THE COOKIES ARE IN THE JAR."
1238 PRINT
1239 PRINT "ENTER COMMAND..."
1240 INPUT D$
1241 IF D$="" THEN GOTO T
1242 GOTO 23
1256 CLS
1257 PRINT AT 10,0;"DO YOU WANT TO SAVE THIS GAME? ANSWER Y OR N"
1258 INPUT D$
1259 IF D$<>"Y" THEN GOTO T
1260 PRINT "PRESS <ENTER> TO RECORD"
1261 INPUT D$
1262 LET P$="STOP RECORDER"
1263 SAVE "TRIDEN[T]"
1264 LET D$="""TRIDENT"" SAVED"
1266 GOTO T
2190 LET ACT=0
2195 GOTO 2227
2200 LET C=V(X)
2205 LET P$=K$(C)+K$(C+1)+K$(C+2)
2210 IF B$=P$ OR P$="ANY" THEN GOTO 2225
2215 LET P$="THAT DOES NOT WORK."
2220 GOTO 2430
2225 LET C=C+3
2227 LET NX=C
2230 IF K$(NX)=":" THEN GOTO Z
2232 LET C=NX
2235 LET NX=NX+CODE K$(NX)
2240 LET C=C+1
2250 IF K$(C)="." THEN GOTO 2360
2260 LET E=CODE K$(C+1)
2270 GOSUB 2620+CODE K$(C)*10
2280 IF NOT D THEN GOTO 2310
2290 LET C=C+2
2300 GOTO 2250
2310 IF ACT=1 THEN GOTO 2430
2320 GOTO 2230
2340 IF ACT=0 THEN GOTO Z
2355 GOTO 2430
2360 LET ACT=1
2370 LET C=C+1
2380 IF K$(C)=":" THEN GOTO 2310
2390 LET E=CODE K$(C+1)
2400 GOTO 4620+CODE K$(C)*10
2410 LET C=C+2
2420 GOTO 2380
2430 LET ACT=0
2440 GOTO T
3000 LET D=(E=A)
3005 RETURN
3010 LET D=(N$(E)=CHR$ A OR N$(E)="USR ")
3015 RETURN
3020 LET D=(CODE N$(E)<>A AND N$(E)<>"USR ")
3025 RETURN
3030 LET D=(N$(E)="USR ")
3035 RETURN
3040 LET D=(M$(E)="S")
3045 RETURN
3050 LET D=(M$(E)<>"S")
3055 RETURN
3060 LET D=(C(E)=0)
3065 RETURN
3070 LET D=(B$=F$(E)(4 TO 6))
3075 RETURN
3080 LET D=(CODE E$(7)=E)
3085 RETURN
3090 LET D=(E<>A)
3095 RETURN
3100 LET D=(N$(E)=" ")
3105 RETURN
3110 LET D=(N$(E)<>" ")
3115 RETURN
3120 LET D=(N$(E)<>"USR ")
3125 RETURN
3130 LET D=(B$=F$(E)(4 TO 6) AND N$(E)<>" ")
3135 RETURN
3140 LET D=(B$<>F$(E)(4 TO 6))
3145 RETURN
3150 LET D=(I>E)
3155 RETURN
3160 LET D=(N$(E)=CHR$ A)
3165 RETURN
3170 LET D=(A=13 OR A=17 OR A=20)
3175 RETURN
5000 GOTO 6000+(E-38)*10
5010 LET M$(E)="S"
5015 GOTO G
5020 LET M$(E)="N"
5025 GOTO G
5030 LET T$=STR$ E
5032 LET C(VAL T$(1))=VAL T$(2)
5035 GOTO G
5040 LET T$=N$(E)
5042 LET N$(E)=N$(E+1)
5044 LET N$(E+1)=T$
5046 GOTO G
5050 LET N$(E)=CHR$ A
5055 GOTO G
5060 LET N$(E)=" "
5065 GOTO G
5070 LET A=E
5075 GOTO G
5080 LET I=I-1
5085 GOTO G
6000 LET P$="NOT FROM HERE."
6005 GOTO T
6010 LET P$="ITS LOCKED."
6015 GOTO T
6020 LET P$="THE DOOR IS HELD TIGHT BY HUGE ""DOGS"", YOU MUST ""FREE"" THEM BE-FORE YOU CAN GO IN."
6025 GOTO T
6030 LET P$="IT WONT BUDGE."
6035 GOTO T
6040 LET P$="THE TANK IS TOO LARGE."
6045 GOTO T
6050 LET P$="GRRRRRRRR, FORGET IT."
6055 GOTO T
6060 LET P$="THE EEL WONT LET YOU."
6065 GOTO T
6070 CLS
6071 PRINT AT 10,0;"SNAP...YOU HAVE BROKEN YOUR NECK"
6078 GOTO 579
6080 LET P$="WITH WHAT, YOUR TOENAILS?"
6085 GOTO T
6090 LET P$="CREEEEEEK...A COLD, DANK, DRAFT PUSHES THE DOOR OPEN."
6095 GOTO G
6100 LET P$="ITS NOT LOCKED."
6105 GOTO T
6110 LET P$="I DONT SEE A KEYHOLE."
6115 GOTO T
6120 LET P$="IT IS CLOSED."
6125 GOTO T
6130 LET P$="CLICK..."
6135 GOTO G
6140 GOTO Y
6150 LET P$="YOU CANT CARRY ANY MORE."
6155 GOTO T
6160 LET P$="ITS TIED TO THE ANCHOR."
6165 GOTO T
6170 GOTO 945
6180 GOTO AC
6190 LET P$=X$(96 TO 181)
6195 GOTO J
6200 LET P$="SPLASH..."
6205 GOTO T
6210 LET P$=X$(182 TO 253)
6212 IF N$(24)=" " THEN LET W$="HE THEN YAWNS AND TROTS INTO THECAVERN."
6214 GOTO T
6220 LET P$="SCARF, LICK, WAG, WAG, WAG, ..."
6225 GOTO 154
6230 LET P$="A SEA LION GRABS SOMETHING AND SWIMS AWAY."
6232 LET N$(C(3))="E"
6234 IF A=42 THEN LET P$="A SEA LION NODS IN APPROVAL."
6236 IF X=15 THEN LET C1=-1
6238 IF X=17 THEN LET C1=3
6239 IF X=12 THEN LET N$(X)=" "
6240 GOTO T
6250 GOTO AC
6260 LET P$="TIIIMBERRR...CRASH."
6265 GOTO G
6270 LET P$="O.K."
6275 GOTO G
6280 LET P$="WHATEVER YOU SAY (HEH, HEH)"
6285 GOTO T
6290 LET P$="SHAME ON YOU."
6295 GOTO T
6300 LET P$="YOU CAN KNOT DO THAT...GORDIUS"
6305 GOTO T
6310 LET C(3)=6
6315 GOTO 6230
6320 LET P$="THE HATCH IS SECURE"
6325 GOTO T
6330 LET P$="THAT DOES NOT WORK"
6335 GOTO T
6340 LET P$="GULP..."
6345 GOTO GI
6350 LET P$="YUCK...THE CLAMS ARE SPIT OUT."
6355 GOTO GI
6360 LET P$=X$(1 TO 95)
6362 LET N$(18)="E"
6364 GOTO GI
6370 LET P$="NO SNACKING BETWEEN MEALS."
6375 GOTO T
6380 LET P$="TRY TO GO THERE."
6385 GOTO T
6390 LET P$="THE DOGS ARE LOOSE (ARF, ARF)."
6395 GOTO T
6400 LET P$="YOU FOUND SOMETHING."
6405 GOTO T
6410 LET CT=GM-1
6411 FOR X=GM TO GM+28
6412 LET S$(X)=N$(X-CT)
6414 NEXT X
6416 FOR X=GM+29 TO GM+37
6418 LET S$(X)=M$(X-29-CT)
6420 NEXT X
6421 LET S$(GM+38)=CHR$ C1
6422 LET S$(GM+39)=CHR$ C2
6423 LET S$(GM+40)=CHR$ C3
6424 LET S$(GM+41)=CHR$ I
6425 LET S$(GM+42)=CHR$ A
6426 LET P$="SNAPSHOT TAKEN."
6428 GOTO SS
6430 LET CT=GM-1
6431 FOR X=GM TO GM+28
6432 LET N$(X-CT)=S$(X)
6434 NEXT X
6436 FOR X=GM+29 TO GM+37
6438 LET M$(X-29-CT)=S$(X)
6440 NEXT X
6441 LET C1=CODE S$(GM+38)
6442 LET C2=CODE S$(GM+39)
6443 LET C3=CODE S$(GM+40)
6444 LET I=CODE S$(GM+41)
6445 LET A=CODE S$(GM+42)
6446 LET P$="SNAPSHOT RETRIEVED"
6447 GOTO SS
6450 LET GM=1
6454 GOTO G
6460 LET GM=44
6465 GOTO G
6470 CLS
6472 PRINT "AS YOU ENTER THE CAVE YOUR LIGHTGOES OUT..."
6474 PRINT
6476 PAUSE 200
6478 GOTO 530
6480 LET W$="THE COOKIES FALL APART AND ARE EATEN BY SWIMMING CRABS."
6490 RETURN
6500 GOTO 9800
6510 GOTO 1256
6520 GOTO U
6530 PRINT
6531 LET S=O
6532 LET F=P
6533 SLOW
6534 GOSUB 6699
6535 LET S=Q
6536 LET F=R
6537 GOSUB 6700
6538 FAST
6539 GOTO U
6540 GOTO 1017
6550 LET P$="THE LIGHT CANNOT BE TURNED OFF."
6555 GOTO T
6560 LET P$="A PLATE ON THE HATCH READS... ""SECURE BEFORE PRESSURIZING."""
6565 GOTO T
6570 LET P$=X$(254 TO 336)
6575 GOTO T
6580 LET P$="DOGS HOLDING THE DOOR SHUT CAN BE FREED WITH THE PROPER TOOL."
6585 GOTO T
6590 LET P$="YOU SEE A SMOOTH DOOR."
6595 GOTO T
6600 LET P$="IT WINKS AND HAS LONG EYELASHES."
6605 GOTO T
6610 LET P$="POOR THING LOOKS HUNGRY."
6615 GOTO T
6620 LET P$="LOOKS LIKE A DOGWOOD."
6625 GOTO T
6630 LET P$="YOU SEE NOTHING SPECIAL."
6635 GOTO T
6699 PAUSE 200
6700 FOR X=S TO F
6702 PRINT K$(X);
6703 NEXT X
6704 PRINT
6705 PRINT
6706 RETURN
7000 IF C2>0 THEN LET C2=C2-1
7002 IF C1>0 THEN LET C1=C1-1
7004 LET C3=C3-1
7006 GOTO T
9400 PRINT
9402 IF E$(1 TO 6)=" " THEN GOTO 10
9404 PRINT "VISIBLE EXIT(S)..."
9410 FOR X=1 TO 5
9412 IF E$(X)<>" " THEN PRINT Y$((X*6)-5 TO X*6);
9414 NEXT X
9416 IF E$(6)<>" " THEN PRINT "UP"
9442 PRINT
9443 IF A=15 THEN GOTO 10
9444 PRINT
9445 GOTO 10
9800 FOR X=1 TO TN
9805 LET N$(X)=I$(X)
9810 NEXT X
9811 FOR X=1 TO 9
9812 LET M$(X)="N"
9813 NEXT X
9814 LET C3=0
9815 LET A=31
9816 LET I=0
9825 GOTO T
9850 IF C3=1 THEN GOTO 9900
9851 LET C3=105
9852 LET C=CSF
9853 GOTO 2227
9900 CLS
9901 PRINT AT 5,7;"""THE TRIDENT"""
9902 PRINT AT 7,1;"COPYRIGHT GEORGE GREEN, 1983"
9904 PRINT AT 10,0;"PRESS ENTER OR NEW LINE TO CONT."
9905 INPUT D$
9907 LET PR=9910
9908 CLS
9909 GOTO 7
9910 PRINT "A VOICE BOOOOOOOOOOOOOOOOOOOOOMSOUT FROM OVER THE WAVES..., ""I, POSEIDON, GOD OF THE SEAS, HAVE LOST MY TRIDENT. RETURN IT AND I WILL MAKE YOU RICH BEYOND YOUR WILDEST DREAMS."""
9912 RETURN
9995 SAVE "TRIDEN[T]"
9996 GOTO 9800
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.