10 poke53280,0:poke53281,0:poke646,3:printchr$(142) 20 print"{clear}{space*8}{213}{195*21}{201}" 30 print"{space*8}{194}quantum logic systems{194}" 40 print"{space*8}{202}{195*21}{203}" 50 poke646,1:print"{down*2}{space*12}p r e s e n t s" 60 poke646,6:print"{down*3}{light blue} e s c a p e f r o m s t a n k" 70 print"{down*5}{yellow}{space*7}programmed by neil kendall" 80 print"{down}{yellow} idea & text by jon-paul aitchison" 90 print"{down*3}{cyan}{space*7}press a key to enter stank" 100 geta$:ifa$=""then100 110 poke53280,0:poke53281,0:poke646,1:printchr$(14);chr$(8) 120 print"{clear}{193}s you are unlikely to survive,please " 130 print"enter your name so that {201} know what to" 140 print"have inscribed on your tombstone!" 150 inputn$ 160 printchr$(147);"{210}ighto!,just a minute" 170 gosub1730 180 gosub3190 190 l=7 200 printl$(l) 210 goto1600 220 print 230 print"{215}hat shall {201} do now ";n$ 240 inputt$ 250 fi$=left$(t$,2) 260 forj=1tolen(t$) 270 ifmid$(t$,j,1)=" "thense$=mid$(t$,j+1,2) 280 nextj 290 iffi$="go"then420 300 iffi$="lo"thenprint"{clear}":goto200 310 iffi$="qu"then10 320 iffi$="ge"then710 330 iffi$="ta"then710 340 iffi$="in"then830 350 iffi$="dr"then910 360 iffi$="hi"then1030 370 iffi$="ki"then1250 380 iffi$="he"then1320 390 iffi$="vo"then1340 400 iffi$="ph"then1380 410 print"{down}{201} don't understand.":goto230 420 ifse$="no"then470 430 ifse$="so"then530 440 ifse$="we"then590 450 ifse$="ea"then650 460 goto410 470 d$=e$(l) 480 fora=1tolen(d$) 490 f$=mid$(d$,a,1) 500 iff$="n"thenl=l-7:print"{clear}{217}ou go north.":gosub1520:goto200 510 nexta 520 print"{down}{217}ou can't go north.":goto230 530 d$=e$(l) 540 fora=1tolen(d$) 550 f$=mid$(d$,a,1) 560 iff$="s"thenl=l+7:print"{clear}{217}ou go south.":gosub1520:goto200 570 nexta 580 print"{down}{217}ou can't go south.":goto230 590 d$=e$(l) 600 fora=1tolen(d$) 610 f$=mid$(d$,a,1) 620 iff$="w"thenl=l-1:print"{clear}{217}ou go west.":gosub1520:goto200 630 nexta 640 print"{down}{217}ou can't go west.":goto230 650 d$=e$(l) 660 fora=1tolen(d$) 670 f$=mid$(d$,a,1) 680 iff$="e"thenl=l+1:print"{clear}{217}ou go east.":gosub1520:goto200 690 nexta 700 print"{down}{217}ou can't go east.":goto230 710 rem take 720 ifse$="ri"thenprint"{210}ichard is too heavy!":goto230 730 forj=1to15 740 d$=left$(o$(j),2) 750 ifd$=se$thenh=j:goto780 760 nextj 770 print"{201} don't know the noun ";se$;".":goto230 780 ifpeek(00837+h)<>lthenprint"{201} don't see ";se$;" here.":goto230 790 ifpeek(00854)=0thenpoke00854,h:poke00837+h,0:print"{207}{203}.":goto230 800 ifpeek(00855)=0thenpoke00855,h:poke00837+h,0:print"{207}{203}.":goto230 810 ifpeek(00856)=0thenpoke00856,h:poke00837+h,0:print"{207}{203}.":goto230 820 print"{201} can't carry any more.":goto230 830 rem inventory 840 print"{217}ou are carrying:-"; 850 ifpeek(00854)=0andpeek(00855)=0andpeek(00856)=0thenprint"nothing":goto230 860 forj=1to3 870 y=peek(00853+j) 880 printo$(y);",";:nextj 890 print 900 goto230 910 rem drop 920 forj=1to15 930 t$=left$(o$(j),2) 940 ift$=se$thengoto970 950 nextj 960 print"{201} don't know the noun ";se$:goto230 970 fork=1to3 980 t=peek(00853+k) 990 ift=jthen1020 1000 nextk 1010 print"{201} am not carrying ";se$ 1020 poke00853+k,0:poke00837+j,l:print"{207}{203}.":goto230 1030 ifse$="ri"then1060 1040 ifse$="el"then1150 1050 print"{down}{206}othing happens.":goto230 1060 forj=1to15 1070 e$=left$(o$(j),2) 1080 ife$="ri"thenh=j:goto1100 1090 nextj 1100 ifpeek(837+h)<>lthenprint"{201} can't see {210}ichard here.":goto230 1110 print"{clear}{217}ou hit {210}ichard." 1120 print"{200}e is not amused." 1130 print"{200}e bounces you to death !." 1140 goto1550 1150 forj=1to15 1160 e$=left$(o$(j),2) 1170 ife$="el"thenh=j:goto1190 1180 nextj 1190 ifpeek(837+h)<>lthenprint"{201} can't see the {197}lectron.":goto230 1200 print"{clear}{217}ou hit the {197}lectron !" 1210 print"{201}t breaks up !" 1220 print"{217}ou see the second part of the phone number "; 1230 print"which reads - 21980" 1240 poke841,0:goto230 1250 ifse$<>"ri"thenprint"{down}{196}on't be silly !":goto230 1260 forj=1to15 1270 e$=left$(o$(j),2) 1280 ife$="ri"thenh=j:goto1300 1290 nextj 1300 ifpeek(837+j)<>lthenprint"{201} can't see {210}ichard.":goto230 1310 goto1110 1320 print"{green}{212}his is {211}tank.{217}ou won't get help here!{white}" 1330 goto230 1340 print"{195}ommands available are :-" 1350 print"{204}ook,take,get,drop,inventory,hit,kill," 1360 print"go,help,quit,vocabulary,phone." 1370 goto230 1380 ifl<>1thenprint"{212}here is no phone here.":goto230 1390 fora=1to3 1400 t=peek(853+a):ift=3then1430 1410 nexta 1420 print"{217}ou need money to use the phone.":goto230 1430 print"{208}lease enter the number you wish to dial" 1440 inputy 1450 ify<>2759221980thenprint"{215}rong phone number.":goto230 1460 print"{clear}{down*2}{right*11}{yellow}{215}{160}{197}{160}{204}{160}{204}{160*2}{196}{160}{207}{160}{206}{160}{197}{160}!{white}" 1470 print"{down}{right*2}{193} helicopter comes and picks you up." 1480 print"{down}{right*6}{217}ou have escaped from {211}tank." 1490 print"{down*2}{195}{207}{205}{201}{206}{199}{160}{211}{207*2}{206}{160}- {212}{200}{197}{160}{197}{204}{197}{195}{212}{210}{207}{206}{160}{211}{212}{210}{201}{203}{197}{211}{160}{194}{193}{195}{203}." 1500 wait197,32 1510 goto10 1520 ifl=9orl=24then1540 1530 return 1540 printl$(l) 1550 print"{down}{217}ou are dead !" 1560 print"{down}{217}ou have failed your mission !" 1570 print"{down}{yellow}{208}{210}{197}{211*2} {211}{208}{193}{195}{197}" 1580 geta$:ifa$<>" "then1580 1590 clr:goto10 1600 rem print objects 1610 poke251,l 1620 u=len(n$):forj=1tou:poke827+j,asc(mid$(n$,j,1)):nextj:poke252,u 1630 clr:gosub1730:l=peek(251) 1640 t=0 1650 print"{217}ou can see - "; 1660 forj=1to15 1670 ifpeek(00837+j)=lthenprinto$(j);",";:t=t+1 1680 nextj 1690 ift=0thenprint" nothing special." 1700 u=peek(252) 1710 forj=1tou:n$=n$+chr$(peek(827+j)):nextj 1720 goto220 1730 diml$(35):dime$(35):dimo$(15):dimo(15) 1740 l$(1)="{217}ou are at a telephone box. {212}here is a sign here which reads:-" 1750 l$(1)=l$(1)+" {198}ind the secret phone number to escape from stank.{space*6}" 1760 l$(1)=l$(1)+"{214}isible exits are:- east." 1770 l$(2)="{217}ou are on the main road running{space*8}" 1780 l$(2)=l$(2)+"through stank.{214}isible exits are:- east and west." 1790 l$(3)="{217}ou are on the main road running{space*8}" 1800 l$(3)=l$(3)+"through stank.{214}isible exits are:- east and west." 1810 l$(4)="{217}ou are on the main road running{space*8}" 1820 l$(4)=l$(4)+"through stank.{212}o the south you see a garden gate." 1830 l$(4)=l$(4)+"{214}isible exits are:- east, west and south." 1840 l$(5)="{217}ou are on the main road running{space*8}" 1850 l$(5)=l$(5)+"through stank.{214}isible exits are:- east and west." 1860 l$(6)="{217}ou are on the main road running{space*8}" 1870 l$(6)=l$(6)+"through stank.{217}ou can see a garage to the south.{214}isible" 1880 l$(6)=l$(6)+" exits are:- east,west and south" 1890 l$(7)="{217}ou are on the main road running{space*8}" 1900 l$(7)=l$(7)+"through stank.{212}o the south you can see some trees." 1910 l$(7)=l$(7)+"{214}isible exits are:- west and south." 1920 l$(8)="{217}ou are in {195}liff ({210}ichard) {194}rown's shed. " 1930 l$(8)=l$(8)+"{214}isible exits are:- east and south." 1940 l$(9)="{217}ou are in {205}uffin's domain.{space*13}" 1950 l$(9)=l$(9)+"{217}ou are mauled to death by the mad dog, {205}uffin-" 1960 l$(9)=l$(9)+"who has not been fed for years!" 1970 l$(10)="{217}ou are in the front garden.{space*12}" 1980 l$(10)=l$(10)+"{214}isible exits are:- east and west." 1990 l$(11)="{217}ou are on a garden path.{212}o the south you" 2000 l$(11)=l$(11)+" can see the front door,to the east a" 2010 l$(11)=l$(11)+" sandpit and to the west is a front garden." 2020 l$(12)="{217}ou are in a sandpit." 2030 l$(12)=l$(12)+"{214}isible exits are:-south and west" 2040 l$(13)="{217}ou are in the north end of a garage. " 2050 l$(13)=l$(13)+"{214}isible exits are:- north and south." 2060 l$(14)="{217}ou are in a clump of trees.{space*12}" 2070 l$(14)=l$(14)+"{214}isible exits are:- north and south." 2080 l$(15)="{217}ou are amongst some apple trees.{space*7}" 2090 l$(15)=l$(15)+"{214}isible exits are:- north,south and east" 2100 l$(16)="{217}ou are in a delapidated greenhouse. " 2110 l$(16)=l$(16)+"{214}isible exits are:- west." 2120 l$(17)="{217}ou are in the front room.{space*14}" 2130 l$(17)=l$(17)+"{214}isible exits are:- south and east." 2140 l$(18)="{217}ou are in the hallway." 2150 l$(18)=l$(18)+"{214}isible exits are:- north,south and west." 2160 l$(19)="{217}ou are in the extension.{217}ou can see " 2170 l$(19)=l$(19)+"some of {195}liff's {196}.{201}.{217}. furniture." 2180 l$(19)=l$(19)+"{214}isible exits are:- north and south." 2190 l$(20)="{217}ou are in the south end of a old garage" 2200 l$(20)=l$(20)+"{214}isible exits are north." 2210 l$(21)="{217}ou are are at a village dump.{212}here{space*5}" 2220 l$(21)=l$(21)+"is many of {195}liff's {196}.{201}.{217}. attempts.{space*5}" 2230 l$(21)=l$(21)+"{214}isible exits are:- north and south." 2240 l$(22)="{217}ou are at {210}ichard's worm pit.{212}here are " 2250 l$(22)=l$(22)+"thousands of worms here.{space*16}" 2260 l$(22)=l$(22)+"{214}isible exits are:- north,south and east" 2270 l$(23)="{217}ou are at a snail farm.{space*16}" 2280 l$(23)=l$(23)+"{214}isible exits are:- west." 2290 l$(24)="{217}ou are in the loft.{217}ou see a hole where" 2300 l$(24)=l$(24)+"{195}liff fell through.{217}ou try to examine " 2310 l$(24)=l$(24)+"itbut you fall through it and die!" 2320 l$(25)="{217}ou are in a dusty,old,derelict bedroom." 2330 l$(25)=l$(25)+"{201}t belongs to the {214}illage {201}diot.{212}here is" 2340 l$(25)=l$(25)+"dry rot and fungus everywhere.{212}here is a" 2350 l$(25)=l$(25)+"dead black rat on the floor,it has been " 2360 l$(25)=l$(25)+"disected by the {214}illagers disection kit." 2370 l$(26)=l$(26)+"washing line.{200}anging from the line is a " 2380 l$(26)="{217}ou are in the back-garden.{217}ou can see a" 2390 l$(26)=l$(26)+"washing line.hanging from the line is a " 2400 l$(26)=l$(26)+"skull,to warn off all visitors!{space*9}" 2410 l$(26)=l$(26)+"{214}isible exits:- are north and east." 2420 l$(27)="{217}ou are in a old shed.{space*18}" 2430 l$(27)=l$(27)+"{201}t stinks of rotting apples.{212}here is a " 2440 l$(27)=l$(27)+"sign here saying'{199}{210}{207}{198*2}' and '{212}{210}{197}{211}{208}{193}{211*2}{197}{210}{211}" 2450 l$(27)=l$(27)+"{215}{201}{204*2} {194}{197} {196}{201}{211}{197}{195}{212}{197}{196} {yellow}{193}{204}{201}{214}{197}{white}'.{space*14}" 2460 l$(27)=l$(27)+" {214}isible exits are:- west." 2470 l$(28)="{217}ou are amongst some trees.{space*13}" 2480 l$(28)=l$(28)+"{214}isible exits are:- north and south." 2490 l$(29)="{217}ou are in a field of bulls.{space*12}" 2500 l$(29)=l$(29)+"{214}isible exits are:- north and east." 2510 l$(30)="{217}ou are in a field.{space*21}" 2520 l$(30)=l$(30)+"{214}isible exits are:- east and west." 2530 l$(31)="{217}ou are in a grassy field.{space*14}" 2540 l$(31)=l$(31)+"{214}isible exits are:- east and west." 2550 l$(32)="{217}ou are in a marsh.{space*21}" 2560 l$(32)=l$(32)+"{214}isible exits are:- east and west." 2570 l$(33)="{217}ou are in a small field of goats.{space*6}" 2580 l$(33)=l$(33)+"{214}isible exits are:- east and west." 2590 l$(34)="{217}ou are in a large field.{217}ou can see two" 2600 l$(34)=l$(34)+"gates.{212}hey are both east and west.{space*6}" 2610 l$(35)="{217}ou are in a overgrown field.{space*11}" 2620 l$(35)=l$(35)+"{217}ou can see sheep all around you.{space*7}" 2630 l$(35)=l$(35)+"{214}isible exits are:- north and west." 2640 e$(1)="e" 2650 e$(2)="ew" 2660 e$(3)="ew" 2670 e$(4)="esw" 2680 e$(5)="ew" 2690 e$(6)="esw" 2700 e$(7)="ws" 2710 e$(8)="se" 2720 e$(9)="" 2730 e$(10)="ew" 2740 e$(11)="nesw" 2750 e$(12)="ws" 2760 e$(13)="ns" 2770 e$(14)="ns" 2780 e$(15)="nse" 2790 e$(16)="w" 2800 e$(17)="se" 2810 e$(18)="nsw" 2820 e$(19)="ns" 2830 e$(20)="n" 2840 e$(21)="ns" 2850 e$(22)="nse" 2860 e$(23)="w" 2870 e$(24)="" 2880 e$(25)="n" 2890 e$(26)="ne" 2900 e$(27)="w" 2910 e$(28)="ns" 2920 e$(29)="ne" 2930 e$(30)="ew" 2940 e$(31)="ew" 2950 e$(32)="ew" 2960 e$(33)="ew" 2970 e$(34)="ew" 2980 e$(35)="nw" 2990 rem objects 3000 o$(0)="" 3010 o$(1)="rotten turnips" 3020 o$(2)="matches" 3030 o$(3)="ten-pence-piece" 3040 o$(4)="electron!" 3050 o$(5)="ninja-stick" 3060 o$(6)="richard" 3070 o$(7)="parrafin" 3080 o$(8)="zx81" 3090 o$(9)="knife" 3100 o$(10)="gravey-stained-jumper" 3110 o$(11)="karate-book" 3120 o$(12)="grrof-signs" 3130 o$(13)="disection-kit" 3140 o$(14)="jar-of-apple-slime" 3150 o$(15)="argentinian-flag" 3160 l$(35)=l$(35)+chr$(13)+"{217}ou can also see the first part of a " 3170 l$(35)=l$(35)+"phone number - 27592{space*20}" 3180 return 3190 fora=1to15 3200 readb 3210 poke00837+a,b 3220 nexta 3230 data16,16,8,25,20,27,27,21,17,17,25,27,26,27,18 3240 poke00854,0:poke00855,0:poke00856,0 3250 return