--- title: "Keys of Gondrun" id: 51909 type: "computer_media" slug: "keys-to-gondrun" url: "http://localhost/computer_media/keys-to-gondrun/" markdown_url: "http://localhost/computer_media/keys-to-gondrun.md" published_at: "2023-08-16T01:42:21+00:00" modified_at: "2026-04-04T20:17:53+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2023/08/SCR-20260404-eemy.png" excerpt: "Navigate underground tunnels, battle monsters with timed keypress combat, and manage a six-item inventory in this text adventure to recover the mystical Keys of Gondrun." category: - name: "Archived Media" slug: "archived-media" taxonomy: "category" url: "http://localhost/category/archived-media/" post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "International Publishing & Software Inc" slug: "international-publishing-software-inc" taxonomy: "post_tag" url: "http://localhost/tag/international-publishing-software-inc/" - name: "TS 1000" slug: "ts1000" taxonomy: "post_tag" url: "http://localhost/tag/ts1000/" model: - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" genre: - name: "Game" slug: "game" taxonomy: "genre" url: "http://localhost/type/game/" - name: "Text Adventure" slug: "text-adventure" taxonomy: "genre" url: "http://localhost/type/text-adventure/" media_type: "Cassette" download_url: "https://archive.org/download/timex-sinclair-software-archive/KeysToGondrun (1982)(IPS)(US)(TS1000)(Cassette).zip" mediadate: "1982" producer_company: - id: 10960 title: "International Publishing & Software Inc" type: "company" url: "http://localhost/company/international-publishing-software-inc/" images: - url: "http://localhost/wp-content/uploads/2023/08/SCR-20260404-eemy.png" - url: "http://localhost/wp-content/uploads/2023/08/SCR-20260404-eekn.png" related_products: - id: 14337 title: "Keys to Gondrun" type: "product" url: "http://localhost/product/the-keys-to-gondrun/" media_type_tags: "Game, Text Adventure" --- Keys of Gondrun is a text-adventure game in which the player navigates underground tunnels and caves to recover the titular Keys of Gondrun. The game features a combat system driven by timed INKEY$ polling loops, where the player must press a key within a limited number of iterations controlled by the skill-level variable SK. An inventory system uses a DIM K$(6,17) string array to track up to six carried items, with flag variables (J1, O1, MO, G1, D1) tracking individual item possession. Random outcomes are generated throughout using RND, including a strength rating rolled at startup by summing three simulated six-sided dice via subroutine 9920. The game supports mid-session saving via a SAVE subroutine that writes the program state to tape, with a warning against overwriting the master copy. *** ## Program Analysis ### Program Structure The program is organized as a collection of loosely linked scene blocks, utility subroutines, and a shared input dispatcher. Execution starts at line 1 with a title screen, then jumps to line 11 for the main game loop. Navigation between scenes uses `GOTO` targeting narrative line numbers, while common functions are handled via `GOSUB`. The major structural regions are: - Lines 1–99: Title screen, initialization, inventory setup, and skill level selection. - Lines 100–3250: Scene narrative blocks forming the game map (country lane, tunnels, caves, river). - Lines 3500–3530: Reusable “you have been here before” subroutine, parameterized by `G$`. - Lines 4500–4680: Central input dispatcher handling CARRY, DISPLAY, SAVE, QUIT, and normal input. - Lines 4685–4699: Save-to-tape routine. - Lines 5000–5086: Item pickup subroutine, parameterized by `F$`. - Lines 6000–6230: Monster combat subroutine, parameterized by `M$`. - Lines 7–9 (delay loop) and 8800–8999 (variable initialization): Utility routines. - Lines 9900–9999: Error handling (PARDON?), death sequence, and game-over/restart logic. - Lines 9920–9961: Dice-rolling routines. ### Input Dispatching Pattern All player input is routed through the subroutine at line 4500. After each `INPUT A$`, the routine checks for system commands (CARRY, DISPLAY, SAVE, QUIT) before returning. The variable `V9` is set to 1 if the player viewed their inventory and needs to be re-prompted; `SAVE` is set to 1 if a save was requested. Every call site checks both flags immediately after the `GOSUB 4500` before testing the actual player command. A `RETLINE` variable stores the line to return to if the player needs re-prompting, used by the “PARDON?” error handler at line 9900 and by the “too many items” branch. ### Skill Level and Timing Mechanic The skill level (1–6) chosen at lines 60–75 controls `SK`, which starts at 27 and is repeatedly multiplied by 0.75 for each level step, using `INT` to truncate. This gives an exponentially shrinking window: at level 1, SK≈20; at level 6, SK≈4. The variable `SK` is then used as the iteration count in `FOR` loops that poll `INKEY$` during combat (lines 6040–6058 and 6130–6135) and during the magic shoes escape sequence (lines 2080–3000). A lower skill level means far fewer iterations to respond, making the game harder. | Skill Level (X) | SK (approx) | | --- | --- | | 1 | 20 | | 2 | 15 | | 3 | 11 | | 4 | 8 | | 5 | 6 | | 6 | 4 | ### Inventory System The inventory is stored in the string array `K$(6,17)`, dimensioned at line 91 to hold up to six items of up to 17 characters each. Item presence is detected by checking whether the first character of a slot is a space (`K$(X,1)=" "`). Separate boolean flag variables (`J1`, `O1`, `MO`, `G1`, `D1`) shadow the inventory state for individual story-critical items (Giant Jam Butty, Leather Sandal, Silver Trumpet, Sack of Gold, Box of Diamonds), allowing fast conditional checks in narrative code without scanning the array. When an item is dropped during an overflow swap (lines 5069–5073), these flags are cleared using string slice comparisons on `K$(A,1 TO N)`. ### Combat Subroutine (Line 6000) The combat system at line 6000 is a two-phase attack-defence mini-game. A monster rating `MR` is set randomly (1–18); the player’s strength copy `STR1` is initialized from `STR`. In the attack phase, the player presses H, S, K, or B within the SK-iteration window. Success is random (MOVE 1–6, only values 3–6 count as hits). In the defence phase, the monster’s attack type is stored in `D$` (HITS/STABS/KICKS/BASHES) and the player must press the matching key (D/P/C/B) within the window. A correct key still only blocks with probability 3/6. The subroutine is parameterized entirely by `M$`, making it reusable for all four monster encounters. ### Randomness and Dice Rolling Subroutine 9920 simulates rolling `X` six-sided dice by summing `X` values of `INT(RND*6)+1` into `Q2`. Line 9950 calls it with `X=3` to generate the initial strength rating (3d6, range 3–18). The subroutine at line 9960 simply returns `CHOICE=INT(RND*6)+1`, used widely as a d6 roll to gate random events throughout the narrative (e.g., whether a monster appears again, whether a magic effect triggers). ### Save/Restore Mechanism The game supports saving via the `SAVE` flag in the input dispatcher. When triggered, lines 4685–4699 prompt the player to set up a tape and then execute `SAVE "GONDRU%N"`. Since saving the BASIC program preserves all variable values, reloading effectively restores the game state. The routine warns against overwriting the master tape. After saving, execution resumes at `RETLINE`. ### Notable Techniques and Idioms - Centered text is achieved using `PRINT TAB INT((32-LEN X$)/2);X$`, computing the left margin dynamically from string length. - The delay subroutine at lines 7–9 is a simple `FOR X=1 TO 200: NEXT X` busy-wait, reused throughout for pacing. - The `RETLINE` variable acts as a software return address for the “PARDON?” error handler and for navigation after saves, since BASIC does not support computed `RETURN` targets. - Line 430 is referenced by `GOTO 430` from line 411/415/420 (the door-opening success path), but the actual code at line 430 is absent — line 432 contains the door-opens narrative. This is a minor off-by-two anomaly in line numbering that works because `GOTO 430` will fall through to the next existing line (432). - Line 1005 references `GOTO 952`, which does not exist; execution will fall to line 953, which is the intended re-prompt point — another intentional use of the fall-through behavior. - Line 820 is referenced by `GOTO 820` at lines 1530 and 1580, but does not exist in the listing. This will cause a run-time error if reached via those paths, making the passage-stuck puzzle potentially unresolvable — a genuine bug. - The `Z8` flag at line 5043 is used to suppress the “PRESS NEWLINE TO CONTINUE” re-prompt when the carry list is displayed during item overflow, preventing an infinite loop in the input dispatcher. ### Variable Summary | Variable | Purpose | | --- | --- | | `STR` | Player strength rating (3d6 at start) | | `SK` | Skill-derived timing window for INKEY$ loops | | `RETLINE` | Scene return address for error/save handler | | `V9` | Flag: player viewed inventory, needs re-prompt | | `SAVE` | Flag: player requested tape save | | `PICK` | Flag: item was picked up in subroutine 5000 | | `CHOICE` | Random d6 result from subroutine 9960 | | `J1,O1,MO,G1,D1` | Item possession flags for story items | | `RET1,RET2,RET4` | Scene-visit flags to prevent repeated events | | `K$(6,17)` | Inventory array | | `F$,M$,G$` | Parameters for item, monster, and location subroutines | ## Source Code ``` 1 PRINT AT 6,4;"LEISURE GAMES PRESENTS" 3 GOSUB 7 4 CLS 5 RAND 6 GOTO 11 7 FOR X=1 TO 200 8 NEXT X 9 RETURN 11 PRINT AT 8,7;"THE KEYS OF GONDRUN" 12 PRINT AT 4,0;"*******************************" 13 PRINT AT 12,0;"*******************************" 19 LET P$="PRESS NEWLINE TO CONTINUE" 20 LET B$="YOU MAY " 21 LET E$=" FOR YOU THE GAME IS OVER" 22 GOSUB 8800 25 GOSUB 9950 26 LET STR=Q2 53 CLS 54 PRINT AT 5,2;"YOUR STRENGTH RATING FOR THIS" 55 PRINT AT 7,11;"JOURNEY IS" 56 PRINT AT 9,15;STR 57 GOSUB 7 58 CLS 59 LET RETLINE=60 60 PRINT AT 5,10;"SKILL LEVEL?" 61 PRINT AT 7,7;"FROM 1 (BEGINNER)" 62 PRINT AT 9,5;"TO 6 (PLAIN RECKLESS)" 63 GOSUB 4500 64 IF V9 THEN GOTO 60 65 IF SAVE THEN GOTO 4685 67 IF LEN A$>1 THEN GOTO 9900 68 IF A$<"0" OR A$>"6" THEN GOTO 9900 69 LET X=VAL A$ 72 LET SK=27 73 FOR A=1 TO X 74 LET SK=INT (SK*.75) 75 NEXT A 76 CLS 77 PRINT TAB 8;"YOU ARE CARRYING" 83 PRINT TAB 9;"A SHORT DAGGER" 85 PRINT TAB 12;"A SHIELD" 90 PRINT TAB 8;"A PIECE OF CHEESE" 91 DIM K$(6,17) 92 LET K$(1)="SHORT DAGGER" 93 LET K$(2)="SHIELD" 95 LET K$(3)="PIECE OF CHEESE" 98 LET P$="PRESS NEWLINE TO CONTINUE" 99 PRINT AT 18,4;P$ 100 INPUT A$ 105 CLS 199 LET RETLINE=200 200 PRINT TAB 3;"YOU START IN A COUNTRY LANE" 220 PRINT TAB 9;"A CART APPEARS" 240 PRINT TAB 5;"PULLED BY A MASSIVE DOG" 290 PRINT TAB 12;B$ 296 PRINT TAB 6;"HIDE OR FLAG IT DOWN" 301 LET RETLINE=200 302 GOSUB 4500 303 IF SAVE THEN GOTO 4685 304 IF V9 THEN GOTO 275 306 IF A$="HIDE" THEN GOTO 312 307 IF A$="FLAG" THEN GOTO 330 308 GOTO 9900 312 PRINT TAB 12;"YOU FOOL" 314 PRINT TAB 2;"YOU CANNOT HIDE ALL THE TIME" 317 PRINT TAB 11;"TRY AGAIN" 319 GOTO 290 330 PRINT "YOU JUMP ON AND TELL THE DRIVER" 334 PRINT "ABOUT YOUR QUEST. HE POINTS HIS" 336 PRINT TAB 3;"WHIP AND YOU FIND YOURSELF" 338 PRINT " BEFORE A HUGE TREE WITH A DOOR" 375 PRINT TAB 4;"IN IT. THE DOOR IS LOCKED" 391 PRINT 392 GOSUB 9960 393 PRINT 394 PRINT TAB 3;"HOW CAN YOU TRY TO OPEN IT?" 396 PRINT 397 PRINT TAB 13;B$ 399 PRINT TAB 7;"KICK IT. BANG ON IT" 401 PRINT TAB 5;"OR WALK ROUND THE TREE" 402 LET RETLINE=330 403 GOSUB 4500 404 IF SAVE THEN GOTO 4685 405 IF V9 THEN GOTO 394 406 IF A$="KICK" THEN GOTO 411 407 IF A$="BANG" THEN GOTO 415 408 IF A$="WALK" THEN GOTO 420 409 GOTO 9900 411 IF CHOICE=1 OR CHOICE=2 THEN GOTO 430 412 GOTO 423 415 IF CHOICE=3 OR CHOICE=4 THEN GOTO 430 416 GOTO 421 420 IF CHOICE=5 OR CHOICE=6 THEN GOTO 430 423 PRINT " THE DOOR STAYS SHUT. TRY AGAIN" 429 GOTO 397 432 PRINT "THE DOOR OPENS. YOU GO DOWN THE" 434 PRINT TAB 4;"STEPS AND IT SLAMS SHUT" 437 PRINT 438 PRINT TAB 7;"YOU SEE 3 PASSAGES" 439 PRINT 445 PRINT 447 LET RET1=1 450 PRINT TAB 11;B$;" GO" 452 PRINT TAB 6;"AHEAD, LEFT OR RIGHT" 456 LET RETLINE=432 457 GOSUB 4500 458 IF SAVE THEN GOTO 4685 459 IF V9 THEN GOTO 450 460 IF A$="AHEAD" THEN GOTO 1660 465 IF A$="LEFT" THEN GOTO 496 470 IF A$="RIGHT" THEN GOTO 1240 480 GOTO 9900 496 PRINT TAB 8;"YOU WANDER ALONG" 497 IF J1 THEN GOTO 561 505 LET F$="GIANT JAM BUTTY" 506 GOSUB 5000 507 IF PICK THEN LET J1=1 561 PRINT TAB 5;"YOU COME TO SOME STEPS" 563 PRINT TAB 9;"LEADING UPWARDS" 565 PRINT TAB 3;"AND A STEEP DROP DOWNWARDS" 568 PRINT 570 PRINT AT 12,11;"UP OR DOWN?" 571 LET RETLINE=561 572 GOSUB 4500 573 IF SAVE THEN GOTO 4685 574 IF V9 THEN GOTO 561 576 IF A$="UP" THEN GOTO 590 580 IF A$="DOWN" THEN GOTO 780 585 GOTO 9900 590 LET M$="HUGE JUBJAROO" 591 GOSUB 6000 600 IF RET2 THEN GOTO 900 601 LET RET2=1 602 CLS 603 IF MO THEN GOTO 830 610 LET F$="SILVER TRUMPET" 611 GOSUB 5000 666 IF PICK THEN LET MO=1 667 GOTO 830 780 PRINT TAB 11;"DOWN YOU GO" 830 PRINT TAB 3;B$;"GO NORTH OR SOUTH" 831 LET RETLINE=780 832 GOSUB 4500 833 IF SAVE THEN GOTO 4685 834 IF V9 THEN GOTO 830 850 IF A$="NORTH" THEN GOTO 900 851 IF A$="SOUTH" THEN GOTO 860 855 GOTO 9900 860 PRINT " YOU ARE BACK WHERE YOU BEGAN" 862 GOSUB 7 866 GOTO 438 900 CLS 910 PRINT TAB 2;"YOU ARE IN A LARGE CAVE AND" 915 PRINT "THREE HUGE DAISIES WITH LEGS ARE" 920 PRINT TAB 5;"DANCING TO SOFT MUSIC" 940 PRINT 950 PRINT TAB 12;B$ 951 PRINT TAB 6;"DANCE ALONG WITH THEM" 953 PRINT "PLAY A TRUMPET IF YOU HAVE ONE" 957 PRINT TAB 11;"CREEP PAST" 975 PRINT TAB 11;"KICK THEM" 976 LET RETLINE=910 977 GOSUB 4500 978 IF SAVE THEN GOTO 4685 979 IF V9 THEN GOTO 910 985 IF A$="PLAY" THEN GOTO 1090 990 IF A$="DANCE" THEN GOTO 994 991 IF A$="CREEP" THEN GOTO 1010 992 IF A$="KICK" THEN GOTO 1140 993 GOTO 9900 994 PRINT TAB 12;"YOU FOOL" 996 PRINT TAB 4;"THIS IS NO TIME TO DANCE" 997 GOSUB 7 1000 PRINT TAB 12;B$ 1005 GOTO 952 1010 CLS 1011 GOSUB 9960 1015 PRINT TAB 5;"YOU REACH THE FAR SIDE" 1016 GOSUB 7 1030 IF CHOICE<4 THEN GOTO 1045 1035 LET M$="PURPLE ORC" 1040 GOSUB 6000 1045 PRINT TAB 6;"THE DAISIES REAPPEAR" 1060 GOTO 950 1085 GOTO 900 1090 IF NOT MO THEN PRINT TAB 13;"CHEAT" 1091 IF NOT MO THEN GOSUB 7 1092 IF NOT MO THEN GOTO 950 1093 PRINT TAB 5;"THE FLOWERS ARE PLEASED" 1095 GOSUB 9960 1096 IF CHOICE<=4 THEN GOTO 1190 1100 PRINT " SUDDENLY THEY GROUP ROUND YOU." 1110 PRINT " YOU HURTLE THRU SPACE AND WHEN" 1120 PRINT TAB 5;"YOU STOP YOU SEE THAT" 1130 GOTO 1900 1140 PRINT TAB 8;"YOU KICK AT ONE" 1150 PRINT TAB 8;"THEN THEY VANISH" 1155 GOSUB 7 1156 LET M$="GIANT TROLL" 1160 GOSUB 6000 1170 GOTO 860 1191 PRINT TAB 11;"SUDDENLY..." 1195 PRINT TAB 2;"THEY TURN INTO 3 GREEN BEARS" 1200 PRINT " ONE OF THEM PICKS YOU UP. YOU" 1210 PRINT "HURTLE THRU SPACE THEN STOP WITH" 1215 PRINT TAB 13;"A BUMP" 1216 GOSUB 7 1230 GOTO 1900 1237 GOSUB 7 1238 CLS 1240 PRINT ;" YOU WANDER ALONG A DAMP TUNNEL" 1241 GOSUB 7 1242 IF O1 THEN GOTO 1400 1250 LET F$="LEATHER SANDAL" 1255 GOSUB 5000 1256 IF PICK THEN LET O1=1 1400 CLS 1410 PRINT TAB 5;"YOU COME TO A JUNCTION" 1415 PRINT TAB 7;"TWO PATHS LEAD OFF" 1430 PRINT TAB 6;B$;"GO UP OR DOWN" 1431 LET RETLINE=1410 1432 GOSUB 4500 1433 IF SAVE THEN GOTO 4685 1434 IF V9 THEN GOTO 1410 1455 IF A$="UP" THEN GOTO 1480 1460 IF A$="DOWN" THEN GOTO 1660 1470 GOTO 9900 1480 PRINT TAB 6;"IT IS NARROWER HERE" 1481 IF G1 THEN GOTO 1492 1482 LET F$="SACK OF GOLD" 1483 GOSUB 5000 1484 IF PICK THEN LET G1=1 1492 GOSUB 9960 1493 IF CHOICE>=4 THEN GOTO 1540 1530 GOTO 820 1540 PRINT "YOU START TO GROW UNTIL YOU FILL" 1550 PRINT TAB 3;"THE PASSAGE AND ARE STUCK" 1566 PRINT TAB 3;B$;"BANG ON THE WALL" 1567 PRINT TAB 8;"OR KICK THE FLOOR" 1570 LET RETLINE=1540 1571 GOSUB 4500 1572 IF SAVE THEN GOTO 4685 1573 IF V9 THEN GOTO 1540 1580 IF A$="KICK" THEN GOTO 820 1590 IF A$="BANG" THEN GOTO 1610 1595 GOTO 9900 1610 PRINT TAB 4;"A GREAT LIGHT FLASHES ON" 1640 PRINT TAB 2;"YOU ARE HURLED INTO DARKNESS" 1650 GOTO 9991 1660 PRINT TAB 5;"THE PATH GETS STEEPER" 1690 PRINT 1691 IF NOT RET4 THEN GOTO 1695 1692 LET G$="THE SKELETON" 1693 GOSUB 3500 1694 GOTO 1400 1695 LET RET4=1 1700 PRINT "LYING ON THE FLOOR IS A SKELETON" 1720 LET F$="SPADE" 1730 GOSUB 5000 1740 IF PICK THEN GOTO 1770 1755 GOTO 1400 1770 GOSUB 9960 1775 IF CHOICE<=2 THEN GOTO 1820 1780 PRINT " THE SKELETON MAKES SWIMMING" 1785 PRINT "MOTIONS WITH ITS BONY HANDS BUT" 1790 PRINT TAB 7;"THERE IS NO WATER" 1810 PRINT TAB 6;"YOU STAND AND WONDER" 1811 PRINT TAB 1;"THEN YOU GO BACK ALONG THE PATH" 1813 PRINT 1814 PRINT 1816 GOSUB 7 1817 GOTO 1410 1820 PRINT TAB 2;"THE SPADE GLEAMS AND SHIMMERS" 1830 PRINT TAB 8;"SUDDENLY THERE IS" 1835 PRINT TAB 7;"A RUMBLE OF THUNDER" 1840 PRINT "AND YOU ARE HURLED INTO DARKNESS" 1841 GOSUB 7 1845 GOTO 900 1900 PRINT TAB 4;"THE TUNNEL IS WIDER HERE" 1910 PRINT " YOU ARE ON THE BANK OF A RIVER" 1911 IF D1 THEN GOTO 1914 1912 LET F$="BOX OF DIAMONDS" 1913 GOSUB 5000 1914 IF PICK THEN LET D1=1 1915 PRINT 1917 PRINT TAB 6;"A PAIR OF GREEN SHOES" 1920 PRINT TAB 5;"IS ON THE OPPOSITE BANK" 1922 PRINT 1925 PRINT TAB 7;B$;"WADE ACROSS" 1926 PRINT TAB 7;"OR STAMP YOUR FEET" 1927 LET RETLINE=1900 1928 GOSUB 4500 1929 IF SAVE THEN GOTO 4685 1930 IF V9 THEN GOTO 1900 1940 IF A$="WADE" THEN GOTO 2000 1945 IF A$="CROSS" THEN GOTO 2000 1950 IF A$="STAMP" THEN GOTO 1970 1960 GOTO 9900 1970 PRINT "THERE IS A MIGHTY CRACK AND THEN" 1980 GOTO 860 2000 PRINT TAB 8;"YOU GET VERY WET" 2005 PRINT TAB 4;"BUT REACH THE OTHER SIDE" 2010 PRINT TAB 6;B$;"TRY THE SHOES" 2011 PRINT TAB 9;"OR IGNORE THEM" 2012 LET RETLINE=2000 2013 GOSUB 4500 2014 IF SAVE THEN GOTO 4685 2015 IF V9 THEN GOTO 2000 2020 IF A$="TRY" THEN GOTO 2050 2030 IF A$="IGNORE" THEN GOTO 3070 2040 GOTO 9900 2050 PRINT TAB 3;"THE SHOES ARE FULL OF MAGIC" 2055 PRINT " YOU ARE GROWING TO A HUGE SIZE" 2060 PRINT 2061 GOSUB 7 2065 PRINT " QUICK,TYPE P TO PULL THEM OFF" 2080 FOR X=1 TO SK 2090 IF INKEY$="P" THEN GOTO 3030 3000 NEXT X 3005 PRINT 3010 PRINT TAB 2;"SORRY,YOU HAVE GROWN TOO BIG" 3015 GOSUB 7 3020 GOTO 9990 3030 PRINT TAB 10;"JUST IN TIME" 3035 PRINT TAB 6;"YOU SHRINK TO NORMAL" 3038 PRINT TAB 13;B$ 3039 PRINT TAB 2;"THROW THE SHOES IN THE RIVER" 3040 PRINT TAB 10;"OR LEAVE THEM" 3042 LET RETLINE=3035 3043 GOSUB 4500 3044 IF SAVE THEN GOTO 4685 3045 IF V9 THEN GOTO 3035 3055 IF A$="THROW" THEN GOTO 3065 3056 IF A$="LEAVE" THEN GOTO 3075 3060 GOTO 9900 3065 PRINT " YOU FOOL.THE RIVER GROWS AND" 3066 PRINT TAB 11;"SWAMPS YOU" 3067 GOSUB 7 3068 GOTO 9990 3069 PRINT TAB 10;"YOU WANDER ON" 3070 GOSUB 7 3071 LET M$="TWO HEADED THRONGA" 3072 GOSUB 6000 3079 PRINT TAB 5;"NOW THE TUNNEL NARROWS" 3080 PRINT TAB 3;"AND THE WAY IS BLOCKED BY A" 3085 PRINT TAB 9;"LUMINOUS DOOR" 3090 PRINT 3091 PRINT TAB 6;"ON THE WALL IS A BELL" 3092 PRINT TAB 6;B$;" RING THE BELL" 3095 PRINT TAB 7;"OR BANG ON THE DOOR" 3096 LET RETLINE=3079 3097 GOSUB 4500 3098 IF SAVE THEN GOTO 4685 3099 IF V9 THEN GOTO 3079 3110 IF A$="RING" THEN GOTO 3130 3120 IF A$="BANG" THEN GOTO 3150 3125 GOTO 9900 3130 PRINT TAB 9;"THE DOOR OPENS" 3131 PRINT 3135 PRINT TAB 3;"FOR AN INSTANT YOU GLIMPSE" 3140 PRINT TAB 8;"A GIGANTIC FACE" 3141 PRINT TAB 6;"AND THEN A HUGE HAND" 3142 PRINT TAB 5;"HURLS YOU INTO DARKNESS" 3145 GOTO 860 3150 PRINT TAB 5;"AFTER A SHORT PAUSE THE" 3155 LET RETLINE=3150 3156 PRINT TAB 11;"DOOR OPENS" 3158 PRINT " AND A BIG HAND APPEARS HOLDING" 3159 PRINT TAB 8;"A LEATHER SANDAL" 3160 PRINT 3161 PRINT " IF YOU HAVE THE OTHER ONE YOU" 3162 PRINT " CAN THROW IT THRO THE DOOR" 3163 PRINT " OR YOU CAN STAMP YOUR FEET" 3165 PRINT TAB 9;"TO LOOK FOR IT" 3166 GOSUB 4500 3167 IF SAVE THEN GOTO 4685 3168 IF V9 THEN GOTO 3157 3169 IF A$="STAMP" THEN GOTO 900 3170 IF A$="THROW" THEN GOTO 3172 3171 GOTO 9900 3172 CLS 3173 IF O1 THEN GOTO 3177 3174 PRINT AT 10,13;"CHEAT" 3175 GOSUB 7 3176 GOTO 3161 3177 PRINT TAB 11;"SUDDENLY" 3180 PRINT TAB 7;"THE KEYS OF GONDRUN" 3190 PRINT TAB 8;"FALL AT YOUR FEET" 3200 PRINT 3210 PRINT TAB 4;"YOU PICK THEM UP AND ARE" 3220 PRINT TAB 3;"INSTANTLY BACK IN THE TOWER" 3230 PRINT TAB 10;"WITH GONDRUN" 3235 PRINT 3240 PRINT TAB 3;"THIS IS INDEED A HAPPY DAY" 3245 PRINT TAB 12;"WELL DONE" 3250 GOTO 9999 3500 PRINT TAB 4;"YOU HAVE BEEN HERE BEFORE" 3510 PRINT TAB 7;"IT IS WHERE YOU SAW" 3515 PRINT TAB INT ((32-LEN G$)/2);G$ 3520 PRINT TAB 7;"BUT NOW IT IS EMPTY" 3526 GOSUB 7 3530 RETURN 4500 INPUT A$ 4501 LET V9=0 4502 LET SAVE=0 4510 CLS 4520 IF A$="CARRY" THEN GOTO 4610 4530 IF A$="DISPLAY" THEN GOTO 4650 4540 IF A$="SAVE" THEN GOTO 4590 4550 IF A$="QUIT" THEN GOTO 9999 4570 GOTO 4680 4590 LET SAVE=1 4600 GOTO 4680 4610 PRINT TAB 7;"YOU ARE CARRYING -" 4611 PRINT 4615 FOR X=1 TO 6 4620 IF K$(X,1)=" " THEN GOTO 4630 4625 PRINT TAB 7;K$(X,1 TO ) 4626 LET Z=1 4630 NEXT X 4631 IF NOT Z THEN PRINT TAB 7;"NOTHING" 4632 IF Z8 THEN GOTO 4680 4636 LET Z=0 4637 PRINT AT 18,4;P$ 4638 LET V9=1 4640 INPUT A$ 4641 CLS 4642 GOTO 4680 4650 PRINT AT 5,2;"YOUR STRENGTH RATING FOR THIS" 4651 PRINT AT 7,11;"JOURNEY IS" 4655 PRINT AT 9,15;STR 4656 GOSUB 7 4660 PRINT 4661 FOR X=1 TO 6 4662 IF K$(X,1)<>" " THEN LET Z=Z+1 4665 NEXT X 4668 PRINT TAB 4;"YOU ARE CARRYING ";Z;" ITEMS" 4670 LET Z=0 4675 GOTO 4637 4680 RETURN 4685 PRINT "PLEASE SET UP YOUR TAPE" 4686 PRINT AT 7,0;"************WARNING************" 4687 PRINT 4688 PRINT "DO NOT OVERWRITE YOUR MASTER" 4689 PRINT 4690 PRINT 4691 PRINT "START THE TAPE AND PRESS" 4692 PRINT "NEWLINE TO SAVE" 4693 PRINT 4694 PRINT "THE PROGRAM NAME IS GONDRUN" 4695 LET SAVE=0 4696 INPUT A$ 4697 SAVE "GONDRU%N" 4698 CLS 4699 GOTO RETLINE 5000 PRINT TAB 7;"SUDDENLY YOU SEE A" 5005 PRINT TAB INT ((32-LEN F$)/2);F$ 5010 PRINT B$;"IGNORE IT OR PICK IT UP" 5015 LET RETLINE=5000 5020 GOSUB 4500 5022 IF V9 THEN GOTO 5000 5025 IF A$="IGNORE" THEN GOTO 5079 5026 IF A$="PICK" THEN GOTO 5030 5027 GOTO 9900 5030 FOR A=1 TO 6 5035 IF K$(A,1)=" " THEN GOTO 5074 5040 NEXT A 5041 PRINT TAB 4;"YOU HAVE TOO MANY ITEMS" 5042 PRINT 5043 LET Z8=1 5046 GOSUB 4610 5047 LET Z8=0 5050 PRINT 5055 PRINT TAB 7;"WHICH ONE TO DROP" 5056 PRINT " ENTER 1 TO 6 OR 7 TO LEAVE THE" 5057 PRINT TAB INT ((32-LEN F$)/2);F$ 5058 LET RETLINE=5055 5060 GOSUB 4500 5065 IF A$<="6" THEN GOTO 5068 5066 IF A$="7" THEN GOTO 5079 5067 GOTO 9900 5068 LET A=VAL A$ 5069 IF K$(A,1 TO 15)="GIANT JAM BUTTY" THEN LET J1=0 5070 IF K$(A,1 TO 14)="LEATHER SANDAL" THEN LET O1=0 5071 IF K$(A,1 TO 14)="SILVER TRUMPET" THEN LET MO=0 5072 IF K$(A,1 TO 12)="SACK OF GOLD" THEN LET G1=0 5073 IF K$(A,1 TO 15)="BOX OF DIAMONDS" THEN LET D1=0 5074 LET K$(A)=F$ 5075 LET PICK=1 5076 GOTO 5080 5079 LET PICK=0 5080 PRINT TAB 15;"OK" 5083 FOR X=1 TO 8 5084 NEXT X 5085 CLS 5086 RETURN 6000 CLS 6001 PRINT TAB 11;"SUDDENLY A" 6010 PRINT TAB INT ((32-LEN M$)/2);M$ 6011 PRINT TAB 12;"APPEARS" 6016 PRINT 6020 LET MR=INT (RND*18)+1 6021 LET STR1=STR 6025 PRINT TAB 8;"ITS RATING IS ";MR 6030 PRINT 6035 PRINT AT 17,11;"YOUR MOVE" 6040 FOR X=1 TO SK 6050 IF INKEY$="H" THEN GOTO 6070 6055 IF INKEY$="S" THEN GOTO 6070 6056 IF INKEY$="K" THEN GOTO 6070 6057 IF INKEY$="B" THEN GOTO 6070 6058 NEXT X 6060 CLS 6065 PRINT TAB 12;"TOO LATE" 6066 PRINT TAB INT ((32-(LEN M$+12))/2);"THE ";M$;" ATTACKS" 6068 GOTO 6100 6070 LET MOVE=INT (RND*6)+1 6071 CLS 6075 IF MOVE<=2 THEN GOTO 6095 6080 PRINT AT 2,7;"YOUR ATTACK WORKED" 6085 PRINT AT 4,7;"YOU SCORED ";MOVE;" HITS" 6086 LET MR=MR-MOVE 6087 IF MR>0 THEN GOTO 6100 6088 PRINT AT 9,12;"WELL DONE" 6089 PRINT TAB INT ((32-(LEN M$+12))/2);"THE ";M$;" IS DEAD" 6094 GOTO 6220 6095 PRINT TAB 7;"YOUR ATTACK MISSED" 6100 LET MOVE=INT (RND*4)+1 6105 IF MOVE=1 THEN LET D$="HITS" 6110 IF MOVE=2 THEN LET D$="STABS" 6115 IF MOVE=3 THEN LET D$="KICKS" 6120 IF MOVE=4 THEN LET D$="BASHES" 6125 PRINT AT 8,14;"THE" 6126 PRINT AT 10,INT ((32-LEN M$)/2);M$ 6127 PRINT AT 12,INT ((32-LEN D$)/2);D$ 6128 PRINT AT 14,14;"YOU" 6130 FOR X=1 TO SK 6131 IF INKEY$="D" THEN GOTO 6145 6132 IF INKEY$="P" THEN GOTO 6150 6133 IF INKEY$="C" THEN GOTO 6155 6134 IF INKEY$="B" THEN GOTO 6157 6135 NEXT X 6136 CLS 6140 PRINT TAB 12;"TOO LATE" 6141 GOTO 6195 6145 IF D$<>"HITS" THEN GOTO 6160 6146 GOTO 6170 6150 IF D$<>"STABS" THEN GOTO 6160 6151 GOTO 6170 6155 IF D$<>"KICKS" THEN GOTO 6160 6156 GOTO 6170 6157 IF D$<>"BASHES" THEN GOTO 6160 6158 GOTO 6170 6160 CLS 6165 PRINT "YOUR DEFENCE IS USELESS AGAINST" 6166 PRINT TAB 11;"THIS ATTACK" 6167 GOTO 6195 6170 CLS 6171 LET MOVE=INT (RND*6)+1 6175 IF MOVE>3 THEN GOTO 6190 6180 PRINT TAB 7;"YOUR DEFENCE WORKED" 6185 GOTO 6035 6190 PRINT TAB 7;"YOUR DEFENCE FAILED" 6195 PRINT TAB INT ((32-(LEN M$+11))/2);"THE ";M$;" SCORES" 6196 PRINT TAB 15;MOVE 6197 PRINT TAB 14;"HITS" 6200 LET STR1=STR1-MOVE 6205 PRINT AT 13,9;"STRENGTH NOW ";STR1 6210 IF STR1>0 THEN GOTO 6035 6215 PRINT AT 17,12;"TOO BAD" 6216 GOSUB 7 6217 GOTO 9990 6220 GOSUB 7 6221 GOSUB 9960 6222 CLS 6223 IF CHOICE>=4 THEN GOTO 6230 6224 PRINT TAB 12;"ANOTHER" 6225 GOTO 6010 6230 RETURN 8800 LET RET1=0 8801 LET RET2=0 8803 LET RET4=0 8804 LET SAVE=0 8805 LET V9=0 8806 LET Z=0 8807 LET MO=0 8808 LET J1=0 8809 LET PICK=0 8810 LET O1=0 8811 LET G1=0 8812 LET D1=0 8813 LET Z8=0 8999 RETURN 9900 PRINT AT 10,13;"PARDON?" 9901 FOR X=1 TO 8 9902 NEXT X 9903 CLS 9904 GOTO RETLINE 9920 LET Q2=0 9922 FOR Q=1 TO X 9925 LET Q1=INT (RND*6)+1 9930 LET Q2=Q2+Q1 9935 NEXT Q 9940 RETURN 9950 LET X=3 9951 GOSUB 9920 9952 RETURN 9960 LET CHOICE=INT (RND*6)+1 9961 RETURN 9970 PRINT AT 12,12;E$ 9971 RETURN 9990 CLS 9991 PRINT E$ 9995 PRINT TAB 10;"YOU ARE DEAD" 9996 STOP 9998 SAVE "GON%D" 9999 GOTO 1 ```