ZXTape! 0Created with Ramsoft MakeTZXDIRS.H1A qV@,sVD~~|BDDTDF@DD@T@DBBBD8T<<<<-= ))---=== ))))-----===== ))))))-------======= ))))))))999999999999999999999999999999993# # <@__ߕ\\\YgXHZkkV\d6l4X![!@PP!! h K SR P::\(* ((:\d(>d2\>2\!;\ >2\> >2\2\>2k\>2i!\"j> G^!R]T]*K\+6+R(Z>>GV ** PEAK MATHS PROGRAM ** ** H1A ** ** Keep on the path ** ** Alan Brighouse ** (** David Godber ** 2** Peter Patilla ** <** Version 1.12 Nov 83 ** F** Written by S.Sandhu ** P**for the BBC Micro 32K** Z**Modified for the 48K ** d**Sinclair ZX Spectrum ** n**by Andrew R. Thomson.** x } **Copyright Thomas Nelson Ltd. **No reproduction of the whole **or any part of this software **by any means whatsoever is **permitted without the **authority of ** Thomas Nelson Limited.   G0:0:7::11 ,6;"Please stop the tape" 350^ ,** Initialisation ** 6** Display title ** @ 1000 J** Sound on/off ** T 5000 |** Main control loop ** ======================= 0home4500:** Draw maze if necessary ** 6000p:** Init man ** %6500d:** Print jogging man ** (7000X:** Make man run to turn ** home=07500L 'home=0crash=0430 home02500 3000 :** Print score ** $18,1;"Do you want to"  19,3;"try again?" !21,2;"Type Y or N" b$="N":c$="Y"  2000  600X a$="Y"400 & 700 0 : X** Wipe text ** b=============== l;n=03:18+n,0;" " vn    ** Menu block ** ================ 0:0:7  4,11 ;"OPTIONS" 5,10 ;"---------" (11 ,6;"1 Return to start" .13 ,6;"2 Go on to next program"  $15,6;"3 End program" 320,3;"Type the number you require ";  a$=:a$=""800  * a=(a$) 4"a<491a>513800  9a=a-480 >a=1:300, Ha=2:5500| R** Header then end ** \ 1000 7:7:0::   ** Header routine ** ==================== 7:0:0  #1,9 ;"LEFT AND RIGHT" .4,8;5;"KEEP ON THE PATH" ** Define triangles ** $$a=1:b=128:c=64@ .n=07 8 "A"+n,a ; "B"+n,b >b=b+c:c=c/2 Ba=a*2+1 Ln V** Print triangle ** `n=08 jx=5:y=7 t.n/2=(n/2)x=1:y=5 ~'x:7+n,8-n;(144); n=01230 m=0n-1  x;" "; m m=0n-1  y;" "; m y;(145) n &n=031:7;" ";:n -7:8,13 ;"Alan Brighouse" #10 ,15;"David Godber" $12 ,17;"Peter Patilla"  &18,8;"Peak Mathematics" 220,2;" Thomas Nelson Limited 1983"  3500  4000  ( 2 ** Print man ** =============== ^man1=2real=2ypos,xpos;" ";ypos+1,xpos;m$(2)(12): Sypos,xpos;m$(man1)(12);ypos+1,xpos;m$(man1)(34)    ** Wait for key ** ================== a$=:a$=""2020 &(a$)>95_a$=((a$)-32 ) a$=b$a$=c$  2020    ** Man is home ** ================= 20 44000:** Play tune ** 21;7;19,3;"WELL DONE!" Hsc=Hsc+1 n=1300,:n )0;19,3;" "    ** Print score ** ================= 7:0 "18,1;"Your score :" )19,1;"Crash ";Csc;" time"; Csc1"s" )20,1;"Home ";Hsc;" time"; Hsc1"s" %21,1;"Press Space Bar" a$=:a$" "3090  600X 0 : D ** Initialisation ** ==================== Hsc=0:Csc=0 p(80P) m$(7,4) 7back=0:maze=6:text=7:man=0 home=-1:crash=0    ** Define man ** ================  ** 7 run **  9000(#  ch="A" val val=-14105  ch,val ch=ch+1  4070  85004! n=17 b=14 a "m$(n)(b)=(a) 6b @n J T ^ 0** Play home tune ** :==================== D 8000@ Nf,d S#f=0d*40(:4430N X!d-1d*dur,f:4430N b l v ** Draw maze ** =============== ** Pseudo-random maze 0:0:7  ;real=0:psn=1:limit=4:data=9500% oy=18:ox=0  s=1 limit data data chc=1+(*4) n=1 chc  line n  line *s=1dirn 4ndirn 9dirn=05200P >dirn05700D H dirn=ndirn Rndirn \psn=psn+1 fndirn346659 ps zp(psn)=4 41;1;4;8,1;"HOME"    ** Volume control ** ==================== m:9 ,0;"Do you want sound ?";11 ,0;"Type Y for YES or N for NO ";9 ,20; ** Get Y or N ** b$="Y":c$="N"  2000 a$="Y""Yes":dur=1 a$="N""No":dur=0 n=0100d:n    P** Straight path ** Z=================== dreal=0oy=oy-2 nreal=1ox=ox+2 xreal=2oy=oy+2 real=3ox=ox-2 (maze;oy,ox;" ";oy+1,ox;" "; p(psn)=0    |** Run next program ** ======================  *5,5;"Please start the tape" +10 ,5;"Please wait while the" ,12 ,5;"next program is loaded" 17,0;  "DIRS.H1B"   D** Turn in path ** N================== X=dirn=2real=real+1:real=4real=0 b>dirn=1real=real-1:real=-1real=3 l 5200P v p(psn)=dirn    p** Draw man at start ** z======================= xpos=0:ypos=16 real=0:psn=2 man1=0 home=0:crash=0 hypos,xpos;maze;0;m$(1)(12);ypos+1,xpos;m$(1)(34)    d** Draw jogger ** n================= xHtext;19,0;"Press Space Bar";21,4;"to start" }6:0  i=1 a$="" .05|L*dur,-.75@  i=8-i man1=i:1500  n=13:a$=""a$= n a$" "6535 K0;19,0;" ";21,4;" "    ,** Display crash ** 6=================== @Csc=Csc+1 Ereal=0 Jcrash=1 Tdur*.5,20 ^F1;6;0;1;19,2;"YOU CRASHED!" c** Define crash chars ha="A" r 8600! |b b=-16830 a,b  a=a+1  6780| man1=1:1500 3n=40(-20-2:.04|# =*dur,n:n man1=2:1500 dur*2,-20 6;ypos,xpos;" " a="A"  9000(# &n=16:g=07  b:a+g,b:g a=a+8:n +0;19,2;" "  & 0 X** Make man run ** b================== li=1:j=0 vi=3-i:j=j+1 4real=0man1=i:i=1ypos=ypos-1 <real=1man1=i+4:i=1xpos=xpos+1 4real=2man1=i:i=1ypos=ypos+1 <real=3man1=i+2:i=1xpos=xpos-1  1500 .05|L*dur,-.75@ j47030v psn=psn+1 p(psn)=07020l p(psn)=4home=1     ** Correct turn ** *================== 4@p(psn)=1real=real-1:real=-1real=3 >?p(psn)=2real=real+1:real=4real=0 H 1500 R \ f L** Turn man ** V============== `Z7;0;19,0;"Type L for LEFT";21,2;"or R for RIGHT" jb$="L":c$="R" t 2000 ~Q0;19,0;" ";21,2;" " a=1:a$="R"a=2 a=p(psn)7200  ap(psn)6700,    @** Data for tune ** J=================== T14,.5,12 ,.75@,11 ,.25~,12 ,.5,9 ,.5,7,1.5@,-1,-1 ^ h !4** Data for m$ ** !>================= !H144,145,146,147,148,149,32 ,32 ,150,151,152,153,154,32 ,155,32 ,156,157,158,159,32 ,160,32 ,161 !W)144,162,163,164 !\ !f !** Data for crash ** !==================== !0,0,0,17,9 ,0,0,24,0,0,0,16,32 ,0,0,480 !0,0,9 ,17,0,0,0,0,0,0,32 ,16,0,0,0,0 !0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,128 ! -1 ! ! #(** Data for men ** #2================== #<0,0,0,0,3,3,1,7,0,0,0,0,128,128,0,192 #F11 ,11 ,2,2,0,0,0,0,160,144,128,128,0,0,0,0 #P3,3,1,7,11 ,7,2,4,128,128,0,208,160,128,64@,128 #Z0,0,0,0,3,3,1,1,0,0,0,0,128,128,0,0 #d1,1,1,3,0,0,0,0,0,0,0,0,0,0,0,0 #n0,0,0,0,568,568,16,88X,524,16,40(,100d,0,0,0,0 #x0,0,0,0,3,3,1,1,0,0,0,0,128,128,0,0 #1,1,1,1,0,0,0,0,0,0,0,128,0,0,0,0 #0,0,0,0,568,568,16,524,88X,16,40(,76L,0,0,0,0 #0,0,0,0,128,128,0,208,11 ,7,2,4,0,0,0,0,160,128,64@,128,0,0,0,0 # -1 # # %** Data for maze ** %&=================== %0** Segment 1 ** %:89590v%,9540D%,9550N%,9560X%,9570b% %Dq0,0,0,2,0,2,0,1,0,0,0,1,2,3 %N0,0,0,0,2,0,0,2,0,0,1,0,1,2,0,3 %X0,0,2,0,1,0,2,0,2,0,0,1,0,1,2,3 %b0,0,2,0,2,1,0,1,0,0,2,0,2,0,1,3 %l** Segment 2 ** %v89650%,9600%,9610%,9620%,9630% %0,2,0,1,0,0,1,0,2,0,0,0,1,0,1,0,2,3 %0,0,2,0,0,1,0,0,1,2,0,1,0,1,0,2,0,2,1,3 %a0,1,2,0,0,2,1,0,1,0,0,3 %a0,2,1,0,0,1,0,2,1,2,1,3 %** Segment 3 ** %89710%,9660%,9670%,9680%,9690% %a0,0,1,0,0,1,0,2,0,2,1,3 %q0,1,2,0,0,1,0,1,0,0,2,0,0,3 %q0,2,1,0,1,0,0,1,0,2,0,0,0,3 %q0,2,1,0,1,0,0,0,0,1,0,2,0,3 %** Segment 4 ** %50,9720%,9730&,9740 &,9750& %2,0,1,0,1,0,2,0,2,0,0,1,0,0,1,0,0,1,1,3 &a0,0,2,0,1,0,0,0,1,0,0,3 & q2,0,0,1,0,0,1,0,2,0,0,1,1,3 &q0,2,1,0,0,2,0,1,0,1,0,0,0,3 abc xyssP! acazexaomraspa23755\,255:"DIRS.H1A"16384@,((23653e\+256*23654f\)-16383?):23820 ]: DIRS.H1A qV@@ DIRS.H1B FR@SHR<~~|B~|<<<|@x< @@@BB@BBBB8xB<@8D88D8DB8 8<||B~||BBBD| 0DxDD@DBD0<@D<BDDTDF@DD@T@DBBBD8T<<<<-= ))---=== ))))-----===== ))))))-------======= ))))))))999999999999999999999999999999998# # <@_9\\\.m-/@@R\6l1X![!@PP!!h K SR P::\(* ((:\d(>d2\>2\!;\ >2\> >2\2\>2k\>2i!\"j> G^!R]T]*K\+6+R(Z>>GV ** PEAK MATHS PROGRAM ** ** H1B ** ** Steer the boat ** ** Alan Brighouse ** (** David Godber ** 2** Peter Patilla ** <** Version 1.11 Nov 83 ** F** Written by S.Sandhu ** P**for the BBC Micro 32K** Z**Modified for the 48K ** d**Sinclair ZX Spectrum ** n**by Andrew R. Thomson.** x } **Copyright Thomas Nelson Ltd. **No reproduction of the whole **or any part of this software **by any means whatsoever is **permitted without the **authority of ** Thomas Nelson Limited.   G0:0:7::11 ,6;"Please stop the tape" 350^ ,** Initialisation ** 6** Display title ** @ 1000 J** Sound on/off ** T 5000 ^** Show instructions ** h:3000 k o r** Main control loop ** w======================= |** Draw harbour **  4500  5100 ** Pilot boat **  5500| ?crash=0home=07000X:420:** turn ** crash=17300 home=16500d !a$="Y"crash=1400 a$="Y"390   ** Menu block ** ================ 0:0:7  4,11 ;"OPTIONS" 5,10 ;"---------" (11 ,6;"1 Return to start"  $13 ,6;"2 End program" 320,3;"Type the number you require ";  a$=:a$=""800  * a=(a$) 4"a<491a>502800  9a=a-480 >a=1:300, R** Header then end ** \ 1000 f 7:7:0::   ** Header routine ** ==================== 7:0:0  #1,9 ;"LEFT AND RIGHT" ,4,9 ;5;"STEER THE BOAT" ** Define triangles ** $$a=1:b=128:c=64@ .n=07 8 "A"+n,a ; "B"+n,b >b=b+c:c=c/2 Ba=a*2+1 Ln V** Print triangle ** `n=08 jx=5:y=7 t.n/2=(n/2)x=1:y=5 ~'x:7+n,8-n;(144); n=01230 m=0n-1  x;" "; m m=0n-1  y;" "; m y;(145) n &n=031:7;" ";:n -7:8,13 ;"Alan Brighouse" #10 ,15;"David Godber" $12 ,17;"Peter Patilla"  &18,8;"Peak Mathematics" 220,2;" Thomas Nelson Limited 1983"  3500  4000  150  ( 2 ** Print boat ** ================ ac=dirn*3+1+ab Rdirn=0dirn=2ay,ax;s$(ac)(1);ay+1,ax;s$(ac)(2) *dirn=1dirn=3ay,ax;s$(ac) Nac=ac-1:wake=1wake=0:0:1550+dirn*10   5ac=2ax*8+4,164-ay*8 Aax*8+4,168-ay*8-ac-5*(ac=1)  ax*8+3*(ac-3)-1-(ac=4),172-ay*8:ac=4ax*8+3,172-ay*8  "Kax*8+4,170-ay*8+3*(8-ac)+(ac=7) #5ac=7ax*8+4,172-ay*8 ' ,7ac=11 ax*8+11 ,172-ay*8 -Bax*8+ac-2+5*(ac=10 ),172-ay*8 1 6 ; ** Wait for key ** ================== a$=:a$=""2020 &(a$)>95_a$=((a$)-32 ) a$="Y"a$="N"  2020    ** Update clock ** ================== :ti=((256*(23673y\)+(23672x\))/502) y=(ti/60<) x=ti-y*60< x$=x:x<10 x$="0"+x$ y$=y:y<10 y$="0"+y$ .1,0;7;0;y$;":";x$   ( ** Instructions ** ================== 7:0 23,0;"Get the boat into the harbour" !'"Do it as quickly as possible" '"Do not hit any of the rocks" &''"Press Space Bar to stop the boat" '"Type L to turn LEFT" '" or R to turn RIGHT" !'"Stop the boat before turning" "''"Now press Space Bar to start" &a$=:a$" "3110& + 0 : D ** Initialise vars ** ===================== s$(12 ,2) m$(8)    ** Define characters ** =======================  9000(#  ch="A" val val=-14110 ch,val ch=ch+1  4070  9500% n=112 "a,b ,s$(n)=(a)+(b) 6n @a Jr$=(a)+(a) T ^ h 0** Play home tune ** :==================== D 8000@ Nf,d S#f=0d*40(:4430N X!d-1d*dur,f:4430N b l v ** Draw harbour ** ==================  1: ]4;1;0,27;" ";1,31;" ";2,27;" "  n=120 *x=(*31):y=(*12 )+4 y,x;4;r$ n n=02 n,0;0;" " n -7;0,175-18*8 7;255,0     ** Volume control ** ==================== m:9 ,0;"Do you want sound ?";11 ,0;"Type Y for YES or N for NO ";9 ,20; ** Get Y or N **  2000 a$="Y""Yes":dur=1 a$="N""No":dur=0 n=1502:n   ** Draw man rowing ** ===================== xp=30:yp=17  8wake=0:boat=0:dirn=0:turn=0 crash=0:home=0  7 #1,0;0;"00:00" (.20,4;"Press Space Bar to start" 2 col=1 <col=8-col Fcol Kax=xp:ay=yp:ab=boat P1500:** Print boat ** Za$="" dn=15 na$" "a$= xn a$" "5180<  7 71;20,4;" "  1500 ** Zero clock ** *23672x\,0:23673y\,0    |** Pilot boat ** ================ 120,3;"Hold Space Bar down to stop" a$="" ab=boat:ax=xp:ay=yp &6000p:** Increment position ** crash0home0 /boat=boat+1:boat=3boat=0 .05|L*dur,-12.25D 1:1500 boat=0turn=0 ab=boat:ax=xp:ay=yp wake=1-turn 1500:** Print wake **  0  2500 :** Update clock ** a$" "a$= *a$" "(a$=" "boat0)5525 :1;20,3;" "    p** Increment pos ** z=================== dirn*10 +6020 6dirn=0boat=0yp=yp-1:6060  6dirn=1boat=2xp=xp+1:6060  6060 6dirn=2boat=2yp=yp+1:6060  6060 6dirn=3boat=0xp=xp-1:6060  6yp=17dirn=2boat2crash=1 Pxp<0(xp>30boat=0dirn=1)yp<0crash=1: C(xp*8+1,168-yp*8)=1crash=1 5xp=30yp=1crash=0:home=1 &yp<3xp<6crash=1    d** Home routine ** n================== 120,3;" " *1;20,11 ;"WELL DONE!" 44000:** Tune **  200 !20,11 ;" " 119,1;"Would you like another go ?" 021,1;"Type Y for YES or N for NO"  2000 19,28; a$="Y""Yes" a$="N""No"    ,** Crash tune ** 6================ @ 8100 Jn=111 Tf,d ^ d*dur,f h 1 rn |   X** Turn boat ** b=============== l%19,8;"Type L for LEFT" v%21,10 ;"or R for RIGHT" 2500 :** Clock ** a$= ,(a$="l"a$="L"a$="r"a$="R")7040 %19,8;" " %21,10 ;" " 1:1500:0 ?a$="l"a$="L"dirn=dirn-1:dirn=-1dirn=3 >a$="r"a$="R"dirn=dirn+1:dirn=4dirn=0  1500 turn=1    ** Crash routine ** =================== 120,3;" " ,1;20,10 ;"YOU CRASHED!" 6700,:** Tune **  85004!  ch="A" val val=-17420 ch,val ch=ch+1  7370 n=07 m$(n+1)=(n+144) n $'dirn3x=ax-1:a=1 .2dirn=3ax=0x=ax+1:a=5 3#x=32 x=30:a=1 8%y=ay-1:ay=0y=0 B y,x;m$(a) Gdur*.1}L,-15 Ln=020:n Vy,x;1;m$(a) [y=ay `b=24 j y,x;m$(b) tay,ax;m$(b+4) ydur*.1}L,-15 ~n=020:n b dur*.1}L,-15 y,x;" ";ay,ax;" " #20,10 ;" " 019,1;"Do you want to try again ?" 021,1;"Type Y for YES or N for NO"  2000 19,28; a$="Y""Yes":4000 %a$="N""No":n=125:n n=02 Sn+19,1;" ";0;n,0;" " n    @** Data for tune ** J=================== T24,.25~,23,.25~,24,.5,12 ,.4L,12 ,.5,19,.25~,17,.25~,16,.25~,19,.25~,24,.25~,23,.25~,24,.25~,-1,-1 ^ h ** Crash tune ** ================ [16,1,16,.85Y,16,.1}L,16,1,19,.85Y €18,.1}L,18,.85Y,16,.1}L,16,.85Y,16,.1}L,16,1,-1,-1   !4** Data for crash ** !>==================== !HH28,28,8,62>,93],28,34",65A !RJ568,568,16,254,568,568,40(,40( !\I0,0,568,568,146,124|,568,568 !fE0,0,0,0,0,568,568,146 !pL568,568,16,124|,186,568,68D,130 !zH0,24,24,36$,36$,60<,36$,60< !F0,0,0,24,24,36$,36$,60< !C0,0,0,0,0,0,24,24 ! -1 #(** Data for boats ** #2==================== #7 ** UP ** #<24,24,36$,165,126~,36$,60<,0,0,0,0,0,0,24,24,36$ #F36$,255,36$,60<,0,0,0,0,0,0,24,24,36$,36$,126~,165 #PB60<,0,0,0,0,0,0,0 #U ** RIGHT ** #Z8,16,124|,83S,83S,124|,16,8,2,2,15,10 ,10 ,15,2,2 #d0,0,128,96`,96`,128,0,0,0,0,1,1,1,1,0,0 #nM128,64@,240,76L,76L,240,64@,128 #s ** DOWN ** #x0,60<,36$,126~,165,36$,24,24,0,0,0,0,60<,36$,255,36$ #36$,24,24,0,0,0,0,0,0,0,0,0,0,0,0,60< #I165,126~,36$,36$,24,24,0,0 # ** LEFT ** #16,8,62>,202,202,62>,8,16,0,0,1,6,6,1,0,0 #64@,64@,240,80P,80P,240,64@,64@,1,2,15,502,502,15,2,1 #I0,0,128,128,128,128,0,0 # ** ROCK ** #K0,16,24,568,60<,126~,127,255 # -1 # # %** Data for boats ** %&==================== %0144,8,145,146,147,148,149,8,150,151,152,153,154,8,155,156,157,158,159,8,160,161,162,163,164 abc xy   a|23755\,255:"DIRS.H1B"16384@,((23653e\+256*23654f\)-16383?):23820 ]: DIRS.H1B FR@@9