ÓÓÓQ’’’’Ö' ‹8‹8‹8ł’’³0į 100000’’  Ž *** QUEST ***ŽGŽ by Roger Chaffee, published in BYTEf(Ž July 1979.”2Ž Adapted for Nascom 1 and 2 fitted withæ<Ž NAS-SYS by D. Parkinson and R. BealŻFŽ Janķ’’’’Ö& 1980.ćPŽūZŽ Variables useddŽ N Node (cave) number1nŽ MO Move counter9xD“0g‚Ž----------------------------------------ŒŽ Give them something to do while IÆ–Ž get the data base set up.Ó ™ : Ž Start with a clear screenźŖ:’’’’Ö% H$“"*** QUEST ***"ś“ I“1¦Č(H$)¾• 3030¬I,Ė(Ļ(H$,I,1)) : ‚DȞ "You were walking through the woods,"mŅž "and you came across the entrance"”ܞ "of a cave, covered with brush."½ęž "People say that many years ago a"ęšž "pirate hid his tre/’’’’Ö$ asure in these"śž "woods, but no one has ever found it."Až "It may still be there for all I know."P† M9,T1,T2d… W(M9),M(6,M9)€"Ž Read map into M array£, I“1 ¦ M9 : † N : Š I“N © 320Ä6ž "Database problem",I,N : į@ J“1 ¦ 6 : † 1’’’’Ö# M(J,I) : ‚ēJ‚ķTžų^Œ 1680#hŽ-------------------------------------MrN“5 : MO“0 : M6“0 : T“T1 : P“0 : P1“0i| J“1 ¦ M9 : W(J)“0 : ‚o†ž~Ž Describe‰šŒ 1740¶¤Ž---------------------------------------Ū®Ž Main loop starts |’’’’Ö" hereļøŽ Count movesūĀMO“MO¬1ĢŽ MoveÖŒ 11902ąŽ Check for finding treasure=źŒ 640 RōŽ Try the pirate]žŒ 850 xŽ Loop unless finished‰Š T³0 © 420 ›Š Nµ³5 © 420 µ&Ž Calculate the scoreĄ0Œ 790 Ę:žóDž"Congratula„’’’’Ö! tions! You got the treasure"Nž "out in";MO;" moves and you got"0Xž S¬10;" points!"Wbž : ž "Do you want to hunt again?"slA$“"YN" : A2“2 : Œ 1090v‘ A1 ˆ 360 ,3600, 610ŗ€Ž---------------------------------------ĒŠŽ Found?Ö”Š Tµ³N © 5’’’’Ö äžŠ Tµ0 © öØŠ M6¬5³MO © ²ž "Do you want to take it with you?";¼A$“"YN" : A2“2 : Œ 1090PĘ‘ A1 ˆ 730 , 750kŠž "well?...." : ˆ 700 xŚT“­1 : žžäž "Ok, let's get out of here" : ¤īžŌųž "We'll leave it here and you can explore"ēā’’’’Ö ž "some more."õ M6“MO : Ž------------------------------------9 Ž ScoreR*S“0 : Š T“­1 © S“S¬5e4Š P“1 © S“S¬10ƒ> J“2 ¦ M9 : S“S¬W(J) : ‚‰H³RŽ------------------------------------Ķ\Ž PirateÜfŠ N“T’’’’Ö 2 © źpŠ P“1 © śzŠ T1“T2 ©  „Š Tµ³­1 © 3ŽŽ He's at the exit with the treasureF˜Ž so Zap him.Y¢Š N“16 © P“160†¬Ž Count moves since hitting tight tunnelž¶Ž with the treasure³ĄŠ P1³0 © P1“P1¬1ĒŹŠ N“3 © P1“P1¬1ōŌŽ Give him X’’’’Ö a few more moves then Zap himŽŠ P1µ15 ©  čž7ņž "Suddenly the pirate leaps out of the"füž "gloom and grabs the treasure from you!"ž "'Hah!', he shouts, 'you found my"½ž "treasure, did you? Well, I'll hide it"Ųž "better this time!'ś’’’’Ö "$ž "And he disappears into the darkness".ž "with the treasure."38P“1 : T“ T2 : `BŽ --------------------------------------yLŽ Input‰VQ$“"H":„ Q$Ø`Ž Convert lowercase to u/cŹjQQ“Ė(Q$) : Š QQ³96 © QQ“QQ­32×tQ$“Ģ(QQ)9’’’’Ö ē~ A1“1 ¦ A2’ˆŠ Q$“Ļ(A$,A1,1) © ’‚œA1“A2¬1 : A¦Ž--------------------------------------Z°N9“N : N8“0 : Œ 1540tŗŠ Nµ³1 © N0“N : A0“A1†Äž : I“M(A1,N)˜ĪŠ I“­2 © I“N9¼ŲŠ Dµ³0 © ž " Debug ";N;" to ";IĻāŠ Iµ500 © 1280ŪģI“If’’’’Ö ­500÷öJ“0 ¦ 100 : ‚ : ˆ 1230‘ IÆ100 ˆ 1300,1340  N“I : ˆ 1370LŽ N+100. add 1 if carrying the treasureXN“I­100k(Š T“­1 © N“N¬1v2ˆ 1370¢<Ž N+200. add 1 if carrying the treasureøFŽ the second timeÕPN“I­200 : Š T“­1 © N“N¬Pē3’’’’Ö ZŠ Nµ³1 © 1400d J“1 ¦ 6 : M(J,N)“2 : ‚nM(7­A0,N)“N0:xŽ Print out the node descriptionO‚Š N8µ³2 © Œ 1740oŒŽ Remember where we've been–W(N)“1 : N8“N™ Š M(1,N)µ³­2 © 1530ÄŖŽ Forced move with random destinationsŃ“I“M(6,N)ņ¾Š ’’’’Ö M(4,N)³100®¾(1) © I“M(5,N) ČŠ M(2,N)³100®¾(1) © I“M(3,N)7 ŅŠ Dµ³0 © ž " Debug bounce to"Ic ÜŽ Now we have a new destination.Go backv ęŽ and redo it šˆ 1230‡ ś³ Ž--------------------------------------Å Ž Which way?Ś ž " Which waD’’’’Ö  y?"ū "A$“"NEUDWSP" : A2“7 : Œ 1090 !,Š A1µ8 © 16102!6ž "Which way do you want to go?"O!@Œ 1680 : Œ 1740 : ˆ 1560a!JŠ A1µ7 © 1670…!TŽ Calculate and print the score!^Œ 790 «!hž "You have"S"points."½!rŽ Start againČ!|ˆ 1560Ī!†ś!Ž---’’’’Ö! -----------------------------------#"šŽ Subroutine to give instructionsO"¤ž"Type N,S,E,W,U or D for North, South"q"®ž "East, West, Up or Down. ";Œ"øž "Type P for Points."’"Āæ"ĢŽ---------------------------------------ä"ÖŽ Describe the curO’’’’Ö" rent locationż"ąI“·(NÆ5) : J“N­5®I¬1'#ź‘ I¬1 ˆ 1790,1800,1810,1820,1830,1840G#ō‘ I­5 ˆ 1850,1860,1870,1880j#ž‘ J ˆ 1980,2030,2050,2080,2120#‘ J ˆ 2150,2190,2230,2270,2300°#‘ J ˆ 2320,2350,2390,2410,2470Ó#‘ J ˆ 2520,2550,2600,2640,2670ö#&T’’’’Ö# ‘ J ˆ 2720,2770,2830,2850,2880$0‘ J ˆ 2920,2960,3020,3050,3070<$:‘ J ˆ 3110,3150,3190,3230,3260_$D‘ J ˆ 3290,3320,3350,3380,3450‚$N‘ J ˆ 3490,3520,3560,9430,9440„$X‘ J ˆ 9450,9460,9470,9480,9490·$bŠ Tµ³N © 1910Ł$lž : ž "The treasure is hereS’’’’Ö$ !"ģ$vŠ Tµ³T2 © 1970’$€Š T1“T2 © 1970%ŠŠ T1µ³N © 19706%”ž : ž "A note on the wall says"f%žž " 'Pirates never leave their treasure"%Øž " twice in the same place.'"“%²æ%¼Ž--------------------------------------ē%ĘŽ First data statemS’’’’Ö% ent is number of&ŠŽ nodes, and the 2 hiding places for%&ŚŽ the treasure.4&äƒ 42,23,12H&īƒ 1,0,0,0,0,0,0o&ųž "You're at a dead end!" : ˆ 1890‡&ƒ 2,-2,101,-2,0,0,0Æ& ž "You can't go in that direction."¾&ž : ˆ 1890Ö& ƒ 3,33,2,1,10,106,4|’’’’Ö& ł&*ž "A tunnel goes North-South.""'4ž "There is an opening to the West."-'>ˆ 1890C'Hƒ 4,3,20,2,11,2,1i'Rž "You're on the brink of a pit."t'\ˆ 1890‹'fƒ 5,8,8,15,10,8,16¬'pž "You're outside the cave."Ē'zž "Go South to enter."Ņ'„ˆ 1890č'Ž5’’’’Ö' ƒ 6,16,3,2,10,2,2(˜ž "You're at the home of the Gnome-king."A(¢ž "Fortunately he's gone for the day."L(¬ˆ 1890d(¶ƒ 7,-2,101,-2,0,0,0„(Ąž "The Gnome King is here!"¢(Źž "You'd better get out!"±(Ōž : ˆ 1890Ź(Žƒ 8,18,18,15,10,18,9ģ(čž "You'rS’’’’Ö( e lost in the woods."÷(ņˆ 1890)üƒ 9,-2,33,5,1,0,-2) ˆ 18902) ƒ 10,-2,101,-2,0,0,0^) ž "You're not going to get far digging")$ ž "through rock." : ž : ˆ 1890—). ƒ 11,1,13,4,2,1,2Ē)8 ž "You're at the bottom of a pit. A little"ń)B ž "stream fH’’’’Ö) lows over the rocks here."ü)L ˆ 1890*V ƒ 12,36,2,1,2,1,29*` ž "You're at a dead end!" : ˆ 1890Q*j ƒ 13,2,37,2,1,11,14{*t ž "You're at a wide spot. There is a"©*~ ž "sooty patch where somebody has rested"Õ*ˆ ž "a torch against the wall. There are"õ’’’’Ö* *’ ž "jagged rocks above you."+œ ˆ 1890+¦ ƒ 14,13,1,19,2,31,31F+° ž "You're in a canyon. High on the wall"q+ŗ ž "above you is scratched the message"+Ä ž " 'Bilbo was here'"š+Ī ˆ 1890³+Ų ƒ 15,-2,101,-2,0,0,0Ż+ā ž "You're not a bird. You can't·’’’’Ö+ fly!"ģ+ģ ž : ˆ 1890,ö ƒ 16,5,33,2,10,1,106., ž "You're in a low chamber. A tight"[, ž"tunnel goes East, and you can walk to"†, ž"the South or West. There is a light"„, ž "to the North." : ˆ 1890¾,( ƒ 17,-2,101,-2,0,0,0ę,2 ž "It's a tight sque"’’’’Ö, eze. You can't" -< ž "get past with the treasure."-F ž : ˆ 18901-P ƒ 18,-2,101,8,0,0,0^-Z ž "I don't think you can find the cave."i-d ˆ 1890‚-n ƒ 19,224,2,2,14,1,42Ø-x ž "You're at the top of a climb."Ė-‚ ž "Below you a message says -"ķ-Œ ž " ’’’’Ö- 'Bilbo was here'"ų-– ˆ 1890.  ƒ 20,226,1,2,2,25,2<.Ŗ ž"You're at the North side of a chasm,"j.“ ž "too wide to jump. Ringing echoes from"š.¾ ž "below are the only indication of depth."„.Č ˆ 1890¾.Ņ ƒ 21,1,226,2,2,38,25č.Ü ž "You're in Xanadu.Ž’’’’Ö. Below you Alph,"/ę ž "the sacred river runs through"2/š ž "caverns measureless to man,"Q/ś ž "down to a sunless sea."\/ ˆ 1890w/ ƒ 22,-2,33,13,50,29,30‚/ ˆ 1890˜/" ƒ 23,2,1,2,31,2,2É/, ž "You're on the ledge above the guillotine"ą/6 ž "room."ō’’’’Ö/ : ˆ 1890ł/@ ƒ 24,-2,101,19,0,0,00J ž "I hear the Giant there!!!"90T ž "You'd better go back!"H0^ ž : ˆ 1890`0h ƒ 25,21,20,2,2,1,190r ž "You're in the Giant's cavern. Better"·0| ž "not be here when the Giant comes!"Ā0† ˆ 1890Ż0 ƒ 26,-2,65,-2,500’’’’Ö0 ,11,141š ž "You're in the Quest Research and"$1¤ ž "Development area." : žL1® ž "I'm sorry, but visitors are not"s1ø ž "allowed. You'll have to leave."1Ā ž : ˆ1890™1Ģ ƒ 27,2,40,2,2,21,20Ć1Ö ž "You're in the Crystal Palace. The"ī1ą ž "walls resona¹’’’’Ö1 te with awesome music." 2ź ƒ 28,-2,60,221,50,14,192ō ˆ 1890,2ž ƒ 29,2,42,2,13,1,1]2 ž "You're at the top of a giant stalactite."Œ2 ž "You could slide down, but you couldn't"¬2 ž "climb back up." : ˆ 1890Ć2& ƒ 30,34,34,2,1,4,2ó20 ž "You're in th—’’’’Ö2 e little grotto. There is a"#3: ž "book here called Jane's Fighting Ships,"@3D ž "dated 1763." : ˆ 1890X3N ƒ 31,14,14,23,2,1,2‡3X ž "You're in the guillotine room. A sharp"±3b ž "rock balances precariously on the"Ó3l ž "ledge above you." : ˆ 1890ķ3vN’’’’Ö3 ƒ 32,-2,101,516,0,0,04€ ž "You're in a chute, scrambling down the"D4Š ž "rocks! No way to stop! Hang on!"S4” ž : ˆ 1890j4ž ƒ 33,2,1,2,1,116,3“4Ø ž "The tight tunnel turns a corner."ž4² ˆ 1890¶4¼ ƒ 34,1,35,2,1,30,30Ż4Ę ž "You're in a little twist +’’’’Ö4 maze."č4Š ˆ 18905Ś ƒ 35,2,1,2,37,34,36*5ä ž "You're in a little twisting maze."55ī ˆ 1890N5ų ƒ 36,35,2,1,37,34,12x5 ž "You're in a twisting little maze."ƒ5 ˆ 1890š5 ƒ 37,2,1,35,2,13,2Ā5 ž "You're in a twisty little maze."Ķ5* ˆ 1890å54 ƒ 38,`’’’’Ö5 2,21,2,116,1,26> ž "You're in a prehistoric dwelling. On">6H ž "the wall are drawings of bison done"l6R ž "in red clay. The floor is strewn with"›6\ ž "bones, the remains of ancient rituals."Ź6f ž "A small tunnel goes through the floor."Õ6p ˆ 1890ī³’’’’Ö6 6z ƒ 39,2,40,2,32,21,267„ ž "You're in a black hole. The"<7Ž ž "force of gravity is overwhelming."G7˜ ˆ 1890`7¢ ƒ 40,40,40,2,2,40,417¬ ž "You're in the Labyrinth."Œ7¶ ˆ 1890¦7Ą ƒ 41,40,40,40,2,40,39Ē7Ź ž "You're in the Labyrinth."ē7Ō ž "It's ver"’’’’Ö7µĀy dark in here."ņ7Ž ˆ 1890 8č ƒ 42,28,28,28,28,28,28<8ņ ž "You're in the Ashram. Incense is heavy"l8ü ž "in the air, and all directions seem the"ƒ8ž "same." : ˆ 1890‰8€ż