--- title: "Adventure 2 Phoenix Tower" id: 57530 type: "computer_media" slug: "adventure-2-phoenix-tower" url: "http://localhost/computer_media/adventure-2-phoenix-tower/" markdown_url: "http://localhost/computer_media/adventure-2-phoenix-tower.md" published_at: "2024-10-05T21:32:13+00:00" modified_at: "2026-04-03T07:58:23+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2024/10/285_A2P.png" excerpt: "Navigate all 15 floors of a procedurally populated dark tower, battling monsters and collecting items — powered by hand-assembled Z80 machine code POKEd at startup." 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: "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/" media_contents: - id: 56737 title: "Timex Sinclair Public Domain Library Tape 1006" type: "computer_media" url: "http://localhost/computer_media/timex-sinclair-public-domain-library-tape-1006/" media_type: "Program" mediadate: "198x" images: - url: "http://localhost/wp-content/uploads/2024/10/285_A2P.png" media_type_tags: "Game" --- Murky Adventure 2: Phoenix Tower is a text-based dungeon crawler in which the player explores a 15-floor tower, collecting items (key, jewel, torch, sword, ring, armour, wand, and more), fighting monsters, and ultimately retrieving a jewel guarded by a Phoenix on the top floor. The game world is stored as a three-dimensional string array `A$(15,6,6)` representing a 6×6 grid per floor, with cell contents encoded as single characters (CHR$ codes 3–18 for items and entities, “G” for gold, “S” for stairs, “% ” for walls). A block of Z80 machine code is POKEd in during startup from a hex string stored in `A$`, providing utility routines (screen-clear, newline via TAB USR C, and display helpers) called repeatedly through `USR C` and `USR 16583`. The SAVE routine at line 2120 uses an inverse-video character in the filename as an auto-run flag so the game restarts automatically on LOAD. *** ## Program Analysis ### Program Structure The program divides into several logical phases: 1. **Machine code installation (lines 1–14):** A hex string is built in `A$` and decoded byte-by-byte into memory starting at address 16514. 2. **Initialisation (lines 15–80):** The 3-D array `A$(15,6,6)` is dimensioned, the stats array `E(14)` is set up, and strength `E(1)` is seeded at 9999. 3. **Title / instructions (lines 130–210):** Welcome screen and optional instructions are displayed using the machine-code newline helper. 4. **World generation (lines 220–580):** Each of 15 floors is populated randomly with walls, gold, items, monsters, stairs, pits, and a wizard cell. 5. **Main game loop (lines 590–870):** Player position, floor, and command dispatch. 6. **Command handlers (lines 880–5110):** Movement, combat, item use, stairs, save/load, and win/lose conditions. ### Machine Code Installation Lines 2–7 concatenate a hex string into `A$`. Lines 10–14 decode each two-character pair using `CODE A$(I)-28` (exploiting the ZX81 character set where digit ‘0’ is code 28) and POKE the byte at successive addresses starting at 16514. The machine code itself is echoed verbatim in the REM at line 1, giving a useful reference copy. After installation, `A$` is re-dimensioned at line 15 as `A$(15,6,6)`, overwriting the hex string. The installed routines are invoked in two ways: - `USR C` (where `C`=16514) — called as a side-effecting function; its return value is used as a `TAB` argument to produce newlines, or compared to detect display state. - `USR 16583` and `USR 16563` — additional entry points within the same machine code block, used for screen checks and a loop-based delay effect at death. The Z80 disassembly embedded in the REM shows use of `ED B0` (LDIR — block copy), `C3 D9 40` (JP to address $40D9), and manipulation of the system variable at address $400C (the display file pointer), consistent with ZX81/TS1000 screen-scrolling and cursor utilities. ### World Representation The game map is a 3-D string array `A$(15,6,6)` — 15 floors each with a 6×6 grid. Each cell holds a single-character code: | Value | Meaning | | --- | --- | | `CHR$ 0` | Empty / passable | | `"% "` | Wall (two chars; blocks movement) | | `"S"` | Staircase | | `"G"` | Hoard of treasure | | `CHR$ 3` | Grand Phoenix (floor 15) | | `CHR$ 4` | Book of Spells | | `CHR$ 5` | Golden Key (floor 1) | | `CHR$ 6–14` | Various items (sword, ring, torch, shield, water, wand, armour, club) | | `CHR$ 15` | Nasty monster | | `CHR$ 17` | Pit of Mush | | `CHR$ 18` | Wise Wizard | Item pickup stores the cell’s character code directly: `E(CODE D$)` is incremented (line 1690), creating a neat mapping between item codes and inventory slots. ### Key BASIC Idioms - **Boolean arithmetic for movement:**`A=A+(B$(1)="S")-(B$(1)="N")` (lines 950, 990) — ZX81 BASIC evaluates boolean expressions as 1/0, allowing compact direction updates. - **Conditional string printing:** Lines like `("GOLDEN KEY" AND D$=CHR$ 5)` exploit the ZX81 string AND operator, which returns the left string if the condition is true or a null string otherwise — used extensively in the room description GOSUB at line 3220. - **Computed GOTO/GOSUB:** Line 830 uses `GOTO VAL B$*100+3000` and line 840 uses `GOSUB 190` via a numeric dispatch on item number — item N’s use-handler lives at line N*100+3000 (e.g. item 5/key = line 3500, item 6/sword = line 3600). - **`TAB USR C` as newline:** The machine code routine returns a value used as a TAB column; when this value equals the current column, a newline is produced, giving a portable scroll/newline mechanism within PRINT statements. - **Random empty-cell finder:** The GOSUB at line 90 loops until it finds an unoccupied cell (`A$(N,A,B)=CHR$ 0`), ensuring no two objects share a cell during world generation. ### Combat System Combat is initiated by the BASH command (line 1490) or automatically when the SWORD item (item 6, line 3600) or RING item (line 3900, redirects to 5100) is used. The basic combat loop (lines 1495–1610) generates a random monster strength `MS`, then in each round subtracts a random fraction of `MS` from the player’s strength `E(1)` and a random fraction of `E(1)` from `MS`. Armour (`E(13)>0`) reduces incoming damage; Shield (`E(9)>0`) adds to outgoing damage. A random flavour word (OUCH/KICK/KNOCK/BATTER/BASH/PUNCH) is printed each round by indexing into a fixed string. ### Inventory and Stats Array The array `E(14)` doubles as both the stats tracker and inventory. Slot 1 is strength; slot 2 is gold value; slots 3–14 map to item CHR$ codes. Each item’s quantity is incremented on pickup and decremented on drop. The movement handler (lines 960–980) subtracts the sum of `E(3)` through `E(14)` from strength each step, modelling an encumbrance penalty. ### Save / Load The SAVE command (line 4450) pauses for tape readiness, then falls through to line 2120 which executes `SAVE "1028%5"` followed immediately by `RUN`. The `%5` in the filename is an inverse-video character acting as an auto-run flag, so reloading the tape resumes the game at `RUN` automatically. ### Bugs and Anomalies - Line 1370 prints `"SP$"` literally — this is almost certainly a typo for `"SPs"` (strength points) or a variable substitution that was left unresolved. - Items 3 (jewel) and 12 are never assigned a floor cell during world generation (line 1830 explicitly skips `CHR$ 12`); item 3 is obtainable only by defeating the Phoenix on floor 15. - Line 3500 and line 3900 both `GOTO 5100` (“YES,YOU HAVE IT”), which seems to be a stub; the key (item 5) and ring (item 9 — wait, line 3900 is for item 9 which maps as ring at line 390) handler never performs its intended effect. - Line 2000 calls `GOSUB 195` but is itself unreachable (execution falls from line 1990 to 2005 skipping 2000); the GOSUB target 195 is mid-line within line 195’s PRINT statement — this will produce a BASIC error if ever reached. - Line 1430 executes `RAND USR 16601`, which calls into the machine code block at an offset beyond the installed bytes — this is likely an intentional restart/reset vector rather than a bug. - The instruction text at line 185 spells “STRENGH” (missing a T), consistent with the same misspelling at line 2100. ## Source Code ``` 1 REM 2AC4011B62196207EC680772310F92AC401121019ED5BC401D62EDB0212132239402AC4011B621922E40C92AC40615C5620237EC6807710F923C110F2C92AC40615C562023368010FB23C110F4C92AC4011E019360233634112001936323368023363112001936801120019366232336862AC4011E01936861121019360C3D94032323232 2 LET A$="2A0C4011B6021906207EC680772310F92A0C4011210019ED5B0C4001D602EDB0" 3 LET A$=A$+"2121032239402A0C4011B60219220E40C9" 4 LET A$=A$+"2A0C400615C50620237EC6807710F923C110F2C9" 5 LET A$=A$+"2A0C400615C5062023368010FB23C110F4C9" 6 LET A$=A$+"2A0C40110E0019360023363411200019360323368023360311200019368011200019360623233686" 7 LET A$=A$+"2A0C40110E00193686112100193600C3D940" 8 LET C=16513 9 FAST 10 FOR I=1 TO LEN A$ STEP 2 11 LET C=C+1 12 POKE C,16*(CODE A$(I)-28)+CODE A$(I+1)-28 14 NEXT I 15 DIM A$(15,6,6) 16 SLOW 20 RAND 25 LET D$=CHR$ 0 30 DIM E(14) 40 LET E(1)=9999 50 LET C=16514 60 LET T=0 80 GOTO 130 90 LET A=INT (RND*6)+1 100 LET B=INT (RND*6)+1 110 IF A$(N,A,B)<>CHR$ 0 THEN GOTO 90 120 RETURN 130 IF USR 16583<>USR C THEN PRINT "WELCOME TO ";TAB USR C;"MURKY ADVENTURE 2 PHOENIX TOWER";TAB USR C;TAB USR C;"YOU ARE ABOUT TO ENTER THE TOWER";TAB USR C;"IN WHICH YOU MUST FIND A KEY,";TAB USR C;"A JEWEL,A TORCH AND MANY OTHER";TAB USR C;"THINGS TO SURVIVE.";TAB USR C;"WOULD YOU LIKE INSTUCTIONS?"; 140 INPUT B$ 150 PRINT " ";B$;TAB USR C;TAB USR C; 160 IF B$="" THEN GOTO 130 170 IF B$(1)="Y" THEN GOSUB 185 180 GOTO 220 185 PRINT "YOUR TASK IS TO GET THE GREAT";TAB USR C;"JEWEL FROM THE PHOENIX THAT";TAB USR C;"LIVES ON THE 15TH FLOOR";TAB USR C;"WHEN %N%E%X%T IS DISPLAYED,ENTER";TAB USR C;"THE WORD OR NUMBER YOU WANT TO ";TAB USR C;"USE.YOU WILL LEARN THE RULES OF";TAB USR C;"THE GAME AS YOU PLAY.";TAB USR C;"GOOD LUCK" 190 PRINT TAB USR C;TAB USR C;"WORDS:MOVE,HELP,BASH,UP,DOWN,";TAB USR C;"TAKE,DROP,INFO,SAVE,SNEEZE.";TAB USR C;TAB USR C;"1=STRENGH","2=TREASURE" 195 PRINT TAB USR C;"3=JEWEL","4=SPELL BOOK";TAB USR C;"5=KEY","6=SWORD";TAB USR C;"7=RING","8=LIGHT";TAB USR C;"9=SHIELD","10=WATER";TAB USR C;"11=WAND";TAB USR C;"13=ARMOUR","14=CLUB";TAB USR C;TAB USR C; 196 PRINT "PRESS A KEY AND WAIT" 200 IF INKEY$="" THEN GOTO 200 210 RETURN 220 FAST 240 FOR N=1 TO 15 250 FOR I=2 TO 8 260 GOSUB 90 270 LET A$(N,A,B)="% " 280 GOSUB 90 290 LET A$(N,A,B)="G" 300 NEXT I 310 GOSUB 90 340 IF N=1 THEN LET A$(N,A,B)=CHR$ 5 350 IF N=2 THEN LET A$(N,A,B)=CHR$ 14 360 IF N=5 THEN LET A$(N,A,B)=CHR$ 11 370 IF N=6 THEN LET A$(N,A,B)=CHR$ 13 380 IF N=7 THEN LET A$(N,A,B)=CHR$ 10 390 IF N=8 THEN LET A$(N,A,B)=CHR$ 9 400 IF N=9 THEN LET A$(N,A,B)=CHR$ 8 410 IF N=10 THEN LET A$(N,A,B)=CHR$ 7 420 IF N=11 THEN LET A$(N,A,B)=CHR$ 6 430 IF N=13 THEN LET A$(N,A,B)=CHR$ 4 450 IF N=15 THEN LET A$(N,A,B)=CHR$ 3 460 GOSUB 90 470 IF N=15 THEN LET A$(N,A,B)=CHR$ 18 480 GOSUB 90 490 LET A$(N,A,B)="S" 500 FOR I=1 TO 5 510 GOSUB 90 520 LET A$(N,A,B)=CHR$ 17 550 GOSUB 90 560 LET A$(N,A,B)=CHR$ 15 570 NEXT I 580 NEXT N 590 LET N=1 600 LET L=1 610 GOSUB 90 615 LET Y1=A 620 LET Y2=B 630 SLOW 640 FOR I=0 TO 5 650 NEXT I 660 PRINT TAB USR C;TAB USR C;TAB USR C;"YOU ARE ON THE GROUND FLOOR OF";TAB USR C;"THE DARK TOWER" 665 PRINT TAB USR C;"YOU ENTER THROUGH AN OPEN DOOR";TAB USR C;"THE DOOR SLAMS SHUT BEHIND YOU";TAB USR C; 670 IF USR C=0 THEN GOTO 4900 675 IF E(1)<200 THEN PRINT "YOU ARE FEELING TIRED";TAB USR C; 680 PRINT "NEXT ? "; 690 INPUT B$ 700 PRINT B$;TAB USR C; 705 IF B$="" THEN GOTO 680 710 IF B$(1)="M" THEN GOTO 915 720 IF B$(1)="H" THEN GOTO 1840 725 IF B$(1)="U" THEN GOTO 1220 730 IF B$(1)="B" THEN GOTO 1490 734 LET B$=B$+" " 735 IF B$( TO 2)="DO" THEN GOTO 1270 740 IF B$(1)="T" THEN GOTO 1660 750 IF B$( TO 2)="DR" THEN GOTO 2005 755 IF B$="SAVE " THEN GOTO 4450 760 IF B$(1)="I" THEN GOTO 2100 770 IF B$( TO 2)="SN" THEN GOTO 880 780 FOR I=1 TO 14 790 IF STR$ I+CHR$ 0=B$ THEN GOTO 830 800 NEXT I 810 GOSUB 190 820 GOTO 670 830 IF E(VAL B$)>0 THEN GOTO VAL B$*100+3000 840 PRINT "SORRY,CANNOT DO THAT" 850 GOTO 670 880 IF T>0 THEN GOTO 1155 885 PRINT "YOU HAVE JUST SNEEZED" 890 LET E(1)=E(1)-1 900 IF RND>.6 THEN GOTO 1620 910 GOTO 670 915 IF T>0 THEN GOTO 1155 920 PRINT "WHICH WAY? (N,E,W,S) "; 930 INPUT B$ 935 PRINT B$ 940 IF B$="" THEN GOTO 4600 950 LET A=A+(B$(1)="S")-(B$(1)="N") 960 FOR I=3 TO 14 970 LET E(1)=E(1)-E(I) 980 NEXT I 990 LET B=B+(B$(1)="E")-(B$(1)="W") 1000 IF E(1)<1 THEN GOTO 1440 1006 IF A>6 OR A<1 OR B>6 OR B<1 THEN GOTO 1110 1009 LET D$=A$(L,A,B) 1010 IF D$="% " THEN GOTO 1110 1020 IF Y1=A AND Y2=B THEN GOTO 1200 1030 LET Y1=A 1040 LET Y2=B 1050 IF D$=CHR$ 18 THEN GOTO 1810 1060 IF D$=CHR$ 15 THEN GOTO 1130 1065 IF D$=CHR$ 17 THEN GOTO 1760 1070 GOSUB 3220 1090 IF D$=CHR$ 3 OR D$=CHR$ 15 THEN LET T=1 1100 GOTO 670 1110 IF USR C+USR 16583<>USR C THEN PRINT "BONK.YOU HAVE HIT A WALL";TAB USR C; 1111 LET A=Y1 1112 LET B=Y2 1120 GOTO 915 1130 LET X=INT (RND*7)*8+1 1140 PRINT TAB USR C;"HERE IS A";" WOLF N EAGLE TRICORD MUSHMAN TROG NUMPIC GROG "(X TO X+7);TAB USR C; 1150 GOTO 1090 1155 PRINT "WHAT ABOUT THE MONSTER?" 1190 GOTO 670 1200 PRINT TAB USR C;"PARDON?";TAB USR C; 1210 GOTO 915 1220 IF T>0 THEN GOTO 1155 1225 IF A$(L,A,B)<>"S" THEN GOTO 1330 1230 IF E(5)<1 THEN GOTO 1350 1235 IF L=15 THEN GOTO 4430 1240 LET L=L+1 1250 PRINT "YOU HAVE GONE UP THE STEPS" 1260 GOTO 665 1270 IF T>0 THEN GOTO 1155 1275 IF A$(L,A,B)<>"S" THEN GOTO 1330 1280 IF E(5)<1 THEN GOTO 1350 1290 LET L=L-1 1300 PRINT "YOU HAVE GONE DOWN THE STEPS" 1310 IF L=0 THEN GOTO 1370 1320 GOTO 665 1330 PRINT "NO STAIRS HERE" 1340 GOTO 670 1350 PRINT "YOU NEED A KEY" 1360 GOTO 670 1370 PRINT TAB USR C;TAB USR C;"WELLDONE";TAB USR C;("YOU GOT THE JEWEL AND " AND E(3)>0);TAB USR C;"$";E(2);" WORTH OF TREASURE AND YOU";TAB USR C;"GOT AWAY WITH ";E(1);" SP$" 1380 PRINT TAB USR C;TAB USR C;"WOULD YOU LIKE ANOTHER GAME? "; 1390 INPUT B$ 1400 PRINT B$;TAB USR C; 1410 IF B$="" THEN GOTO 1380 1420 IF B$(1)="Y" THEN RUN 1425 CLS 1430 RAND USR 16601 1440 PRINT TAB USR C;"WHAT A PITY,YOU HAVE DIED";TAB USR C;("BUT YOU STILL GOT THE JEWEL AND " AND E(3)>0);TAB USR C;"YOU GOT $";E(2);" WORTH OF TREASURE" 1450 FOR I=0 TO 9 1460 IF USR 16563 THEN NEXT I 1485 GOTO 1380 1490 IF T<1 THEN GOTO 4700 1495 LET MS=INT (RND*2000) 1500 LET M=INT (RND*MS) 1505 IF E(13)>0 THEN LET M=M-INT (RND*100) 1510 LET Y=INT (RND*E(1)) 1515 IF E(9)>0 THEN LET Y=Y+INT (RND*E(1)) 1520 LET X=INT (RND*6)*6+1 1530 PRINT TAB USR C;"OUCH KICK KNOCK BATTERBASH PUNCH "(X TO X+5) 1540 LET E(1)=E(1)-M 1550 IF E(1)<1 THEN GOTO 1440 1560 LET MS=MS-Y 1570 IF MS<1 THEN GOTO 1590 1580 GOTO 1500 1590 PRINT TAB USR C;"YOU KNOCKED THAT MONSTER A MILE" 1600 LET T=0 1605 IF A$(L,A,B)=CHR$ 15 THEN LET A$(L,A,B)=CHR$ 0 1610 GOTO 670 1620 PRINT TAB USR C;" AND DRAWN ATTENTION TO YOURSELF" 1625 LET T=1 1630 GOTO 1130 1660 IF T>0 THEN GOTO 1155 1670 LET D$=A$(L,A,B) 1675 IF D$=CHR$ 15 OR D$="% " OR D$=CHR$ 0 OR D$="S" OR D$=CHR$ 17 OR D$=CHR$ 18 THEN GOTO 1740 1676 PRINT "OK" 1680 IF D$="G" THEN GOTO 1720 1690 LET E(CODE D$)=E(CODE D$)+1 1700 LET A$(L,A,B)=CHR$ 0 1710 GOTO 670 1720 LET E(2)=E(2)+INT (RND*1000) 1730 GOTO 1700 1740 PRINT "NOTHING HERE TO TAKE" 1750 GOTO 670 1760 PRINT TAB USR C;"YOU HAVE FALLEN INTO MUSH" 1770 LET E(1)=E(1)-INT (RND*100) 1780 IF E(1)<1 THEN GOTO 1440 1790 PRINT TAB USR C;"BUT YOU ARE ALL RIGHT" 1800 GOTO 670 1810 PRINT "HERE IS A WIZARD AND HE GIVES";TAB USR C;"YOU AN OBJET AND HE SAYS " 1820 LET A$(L,A,B)=CHR$ (INT (RND*11)+4) 1825 LET D$=A$(L,A,B) 1830 IF D$=CHR$ 12 THEN GOTO 1820 1835 GOTO 1070 1840 IF RND>.7 THEN GOTO 1990 1950 PRINT "SORRY,NO HELP HERE" 1960 LET E(1)=E(1)-10 1970 IF E(1)<1 THEN GOTO 1440 1980 GOTO 670 1990 GOTO 1820 2000 GOSUB 195 2005 IF T>0 THEN GOTO 1440 2010 PRINT "WHICH NUMBER WILL YOU DROP?"; 2020 INPUT B$ 2025 PRINT B$;TAB USR C; 2030 FOR I=2 TO 14 2040 IF STR$ I=B$ THEN GOTO 2080 2050 NEXT I 2060 GOSUB 195 2070 GOTO 2010 2080 IF E(VAL B$)<1 THEN GOTO 4500 2085 LET E(VAL B$)=E(VAL B$)-1 2090 GOTO 670 2100 PRINT TAB USR C;"YOU HAVE $";E(2);" OF TREASURE";TAB USR C;" AND ";E(1);" STRENGH AND YOU ARE ON";TAB USR C;"LEVEL ";L 2110 GOTO 810 2120 CLEAR 2130 SAVE "1028%5" 2140 RUN 3100 PRINT "YOU ";E(1);" STRENGH" 3110 GOTO 670 3200 PRINT "YOU HAVE $";E(2);" OF GOLD" 3210 GOTO 670 3220 PRINT TAB USR C;"HERE IS A";TAB USR C;("PIT OF MUSH" AND D$=CHR$ 17);("WISE WIZARD" AND D$=CHR$ 18);("SOLID WALL" AND D$="% ");("SILVER SWORD" AND D$=CHR$ 6);("GOLD RING" AND D$=CHR$ 7);("TORCH" AND D$=CHR$ 8);("POSH SHIELD" AND D$=CHR$ 9);("BUCKET OF WATER" AND D$=CHR$ 10);("SILVER WAND" AND D$=CHR$ 11);("SUIT OF HEAVY ARMOUR" AND D$=CHR$ 13);("WOODEN CLUB" AND D$=CHR$ 14);("STAIR CASE" AND D$="S");("GRAND PHOENIX GUARDING A JEWEL" AND D$=CHR$ 3);("NASTY LOOKING MONSTER" AND D$=CHR$ 15);("HOARD OF TREASURE" AND D$="G");("BOOK OF SPELLS" AND D$=CHR$ 4);(" LOAD OF NOTHING" AND D$=CHR$ 0);("GOLDEN KEY" AND D$=CHR$ 5);TAB USR C; 3230 RETURN 3300 PRINT TAB USR C;"THE JEWEL LIGHTS UP";TAB USR C 3305 PRINT TAB USR C;"NORTH";TAB USR C 3310 LET D$=A$(L,A-(A>1),B) 3315 GOSUB 3220 3320 PRINT TAB USR C;"SOUTH";TAB USR C 3325 LET D$=A$(L,A+(A<6),B) 3330 GOSUB 3220 3335 PRINT TAB USR C;"EAST";TAB USR C 3340 LET D$=A$(L,A,B+(B<6)) 3345 GOSUB 3220 3350 PRINT TAB USR C;"WEST";TAB USR C 3355 LET D$=A$(L,A,B-(B>1)) 3360 GOSUB 3220 3365 GOSUB 196 3370 GOTO 670 3400 IF T>0 THEN GOTO 1155 3405 PRINT TAB USR C;"THE SPELL BOOK MAKES SOMETHING";TAB USR C;" FOR YOU" 3410 LET E(1)=E(1)-INT (RND*E(1)) 3420 GOTO 1820 3500 GOTO 5100 3600 IF T<1 THEN GOTO 4700 3610 PRINT TAB USR C;"YOUR SWORD KILLED THE MONSTER" 3620 GOTO 1600 3700 PRINT TAB USR C;"TO GET OUT OF THE TOWER,YOU MUST";TAB USR C;"GO DOWN THE STEPS ON THE BOTTOM";TAB USR C;"FLOOR" 3710 GOTO 670 3800 PRINT TAB USR C;"YOU SWITCH ON THE LIGHT AND SEE " 3810 GOTO 3305 3900 GOTO 5100 4000 IF A$(L,A,B)=CHR$ 3 AND T>0 THEN GOTO 4020 4010 GOTO 5100 4020 PRINT TAB USR C;"WATER HAS PUT OUT THE PHOENIX" 4030 GOTO 1600 4100 PRINT TAB USR C;"WITH A WAVE OF YOUR WAND,YOU ARE";TAB USR C;"ON THE NEXT LEVEL" 4110 IF L<15 THEN LET L=L+1 4120 GOTO 1600 4300 GOTO 5100 4400 IF T<1 THEN GOTO 4700 4405 PRINT TAB USR C;"YOU SURE BASHED THAT MONSTER" 4410 GOTO 1600 4430 PRINT "THESE STEPS DO NOT GO UP" 4440 GOTO 670 4450 IF USR 16583<>USR C THEN PRINT "START TAPE RECORDER AND PRESS";TAB USR C;"NEWLINE WHEN READY.";TAB USR C;TAB USR C;TAB USR C; 4460 PAUSE 4E4 4470 GOTO 2120 4480 GOTO 670 4500 PRINT "NOTHING TO DROP" 4510 GOTO 670 4600 PRINT TAB USR C; 4610 GOTO 920 4700 PRINT "NOTHING HERE TO BASH" 4710 GOTO 670 4900 PRINT TAB USR C; 5000 IF PEEK (PEEK 16396+PEEK 16397*256+1)<>128 THEN GOTO 4900 5010 GOTO 675 5100 PRINT "YES,YOU HAVE IT" 5110 GOTO 670 ```