EXTENDED CPC DSK File Disk-Info CPCDiskXP v1.6(Track-Info  * )K!`쇅o0$~#fo*.{(B 9>xCHR.H[glprw:|d0N!^#V !{yͼ_Y!yͼ0 !:022!6~#(˿,~#(!*y, Drive : $ad Datarite ".s(1![yS*"0{2e!",2j2h2k!)K!`쇅o0$~#fo*.{(B 9>xCHR.H[glprw:|d0N!^#V !{yͼ_Y!yͼ0 !:022!6~#(˿,~#(!*y, Drive : $ad Datarite Protecto Sectorot Readyad Selectile Lockrive Lock Try Again(Y/N/^C)?$ Unlock(Y/N)?$ Drive No.(0-9)?$!'~6 ͱC  :'   2'>> > O:&y !%4 5 5 60 >^@Cy > :% \  >#:%!$> ~$#,:%2$**~O#ͱ   8x(:%2&ax(#~,:&(!%2&T!&5 ( :$!%05T#w,x ڒp> ͼ/*y(  : !q> 2,**~(~!#8y} >22>#+~w:O|^#VS^#"A##"C##"E##G*I>ɯ*Cw#w*Ew#w!"u*u#"u*VR8:u2tvd͇F ͇S:2()3!y[?! ~O#}뮩'^(*^(=!(=! ( =! (!õ*u<<"p"w!pN#F*E^#V*C~#foyx0 *OR+*O8 yx8#*\" DM*Cs#r*Es#rR""DM[^z(N!!QN:n G>O:m (! ^#VO"p|:Q*p)= "r:RO:no"p:2n:2l!:S2m:d O:n2:l2:<=<:<=(!yw#xw*;v}!;͂*V#*As#r ~! ͵˾͚!͵*G:to$!~!6![u*A{#zr+s*w[ZR*G#[K*w ( äw ! vzSz:bOHS?K?KG$!u~#(: #~$ =2,ʹ:S/GyO >2c!gq>2b́(Q(0B:gOy($?(x ( ( N5 # :u2,!c~Яw|JF́aͶ6ʹWXPYy( ͊0*T{z0BK͊0<ͮy !F:2́Ͷ CXF́a CXH́!~ N Fwx(>0>2~#+w#w+2,2u2v͚H́ !͌͌ '# ! #  8 w ~>2`T!,5ìè?COPYRIGHT (C) 1983, Xtal RESEARCH % > _Z22< 7ȷ!+#N8#z(##~ &㇇!2:2a{_M~˿U#( !F#x(~ww! "Iɯ2:=!:=!:_Mͷ0U% ڂ=_.:;<> !~Ʌo$Â!2[IʹSK( /G:(:B<0  <=0UkM*K~ ( (U#%?Z!~  6?#2###^#VS!"!6? |($x4̓ M*͓%k Size,[͓%k Free,͓%k Tota{=ͥ ì=!o ~ ~##( [S~ : % ~> (>*͟>.͟:G)KU~#UZ!"!4F|̓4+\ : %ͬ_A >Y2FY 2h2|\͇=( % Erase! ҂2y^ '‚r ( S‚ ͳSIr (S‚ Z[Iʹ!d(~22\!!~(#x2Mͻ1yk: !‚".s(1![yS*"0{2e!",2j2h2k!Track-Info  * !F6H́p!w# 2?2`́͝!~<w( G:S!`( #!4~($H́ :a<(́( ^HJͻ>2d>2aH:n!l8 02n:, ( -_>J>ͻ>2d2a!͹H:n0 32f(O DM} >J"p!:fO s#r:,-:d== 5y== .*GWw#Vz*r"p *p:RG# "pt :n!l8w4w :d _0!,~ =2n6_2d!~~#~O~G#n,-. O!w!y !x(/͝.:,<('!q##pU:,< . (.:,<(J6}2,N! ~态O>G~G!~G}F!w#w#ẃ( 7_y#x#{8s+p+qX! 7!q#p#wɯ2go";"=p :e!w*=v͔( E!=͂Ͳ2>2h!~=2e0:2i~2jw:w**$>2k~?( :?HX*G[?:cJ*=:J*M*;*I",:e :J2!}/_|/*=W}_*;"=}o|g";:h(!6:j( w:i2e:k( [*!$*0*,}D1^Û39=AEKHROUX[ϚϜɜyϞyϟyϠϡ϶ϷϸϷϹϺϻ1S!Ͽ XtalDOS V.8!O!"!"S!"01!GOϤ!~8w!   !"#$%&'(^?ϛTrack-Info  *  "4L1,7:@3,14;" ".M@3,15;" 95B BLACKPOLE TRADING ESTATE ".N@3,16;" WORCESTER WR3 8TJ ".O@3,17;" ".P@3,18;" TELEPHONE (0905) 58351 ".Q@3,19;" "RT~1r1000:8S1,15::" Hit any key to clear or R to re-start "TK$~$:(K$)~0s40020UK$~"R"s"LOADER"V4:15,4:40::@zQ"ILE"1E"1M/FILE"1ILE"11:7,71:8,16:9,&t GJ@ͣG>26&8 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8W+8~#(0)f*(!x: x')͝>2g͟u>7ͪ! ͔)ͫs&r'2*!2* I)~+I)Á+(͟u)ͫ͝[A*C+͗8=)%~*w#%*W+~&ݶ' GN$ >G6#͊+Ä+!"?!.7ɯw#w#w#w=!%0 ͙+2-8#86#ͫ  ͈ǹO!:- w (8/G :( :-<x w+ +#6 #~?  y!G+ # # x !M+Track-Info  * }+++F #($ ## )# " @##C#U%%%<%K%3%($ %%% $ %%%% %%  `+#7̈́7`+b7O!5s5*58ʀ7|52=&{57G:/Gx( (͈5x('5')6!8<>7')(!˾7I)#7#87W+͋7 ~#( 7Hq$f*!~  6?#͹Drive:/&̓& !6:3ܕ6,8L7 Ã&̓&{+8& `+(#7͈͗7 (`+(b77͗G7͢7 ')͢r!')8<!! ')8<(>w!w"w#W`+!!"!u7888< ES+7u7!8\*7S+u7"87 ͽ7!87ȷW+\*"4!4"4#!^#Vz(r+s _:%ݾW* 0>*[8>.&~#&W+u7N&F' 0)j u$|ݾ! {ݾ" zݾ#(y7t!s"r#ͽ7W*88reakextyntaxeturnatatyvflem Fullranchangeimensionivisiontack Fullypemdtr Ovfltr Complexontn Defnperandad Datand of Textilerive Selectile Typeo Fileile Existsile Lockedisc Lockedisc Seekisc Fullir Fullhape Defney Defn{PC(TEPAB(OHENުODNDRORUTOHAINLEARLOSELSONTREATEATAEFELIMOKERIVELSENDOROSUBOTOOLDFNPUTETISTOADGEOSEWEXTFFNPENUTOKEOPRINTEADEMENUMNPLOTESTOREETURNUNAVELOTTOPWAPERIFYAITMTPPENDIRRAOCKENNLOCKUSICALLOMULLTREPPEEDIDTHONEI$EMPOOICESGBSSCTNHR$OSEEKVALXPEX$NPNTENNOGEEKOINTOSNDCRN$GNINQRTR$ANALEFT$ID$IGHT$RRRLOFNNCHBDUL$OTIIZERAWCOLCOLCOLPRITEAGHAPERIGINLLIPSEOSAD(EG(OLYILLPOKEPEEK(DOKEDEEK(EEPIN$(STEYDC(TN(SW-,,,.w.3.,-44--Q4~4f44004,P/8,P,5 )e,g) O;*o p (, T `(+   )< ]-L (-b R(w#6O675661f1!-000D0rS( 5#d001S0Lyv6pijs-"HX#  4 !+/bk6*###82-+"O"M[)R"K[+R"I͔ ,͹TATUNG/Xtal BASIC 3.18 !\ ~ ʀ*=6)[͖( *###82-+"O"M[)R"K[+R"I͔ ,͹TATUNG/Xtal BASIC 3.18 !\ ݇--Q4~4f44004,P/8,P,5 )e,g) O;*o p (, T `(+   )< ]-L (-b R(w#6O675661f1!-000D0rS( 5#d001S0Lyv6pijs-"HX#  41 DISC BACKUP & FORMAT V0.8 (C) 1984 Xtal 1 Press 'B' for BACKUP or 'F' for FORMAT or 'X' to exit Which (B/F/X)ϜϞ_XB( Fx>Ϟ1 BACKUP DISC Sourcͪ02T02Destinatioͪ02U02Source drive 0, Destination drive 0, ͇2VPut in SOURCX:VO:T!Ϥ:U Put in DESTINATIOX!ϥ!!Ϥ B# R :V 2V(0% Disc Backed up -- O͇ááá Unformatted -- FORMAT first and then retry BACKUP 0 VerifODisc::V=(=(=($=(.Not Read+I/$ProtecteNo Secto No Driv Error1 FORMAT DISC Formaͪ02P2U02Format drive 0 ͇ Ϯ+ N!EC !J!N>Ϯ !N  ! !!&k!&n#!!!N! !!!!!!N,!!N>>FϞ{(.ϧ66':U!Ϥ>6 ># >VϞy( ϯ Disc Formatted and Verified -- O͇{{2V>( disc and press ENTERϜϞϧX(x0ϧPress ENTER to continup drive (0-3)p0Invalid Drive No.:P!Ao~#ϯ0123456780 0}%8z <z :PO!X  :P!Ao~#ϯ012345678y  5207!.V(ˆ8!( !6#6ê  {2*Q"(T!~+~#w T{Ľ %*~&* {3|@̀*QR#B?`i+"W\ *W\ "Q~( (=~G(͢+K x M,(Oͪ(Gy!(!p#pM#s#r͟͢~Sk:f͈*kH (&w([~Y3Y~ä͡ɯw-s#r ~͢(͒͟͢~DMWw J^#V͗+~#N#F#N#F+++H ͈ͫ :5ͬq#pñ͢>2gGͥ:fğ"W\~#͕+~#̓ -|Ep#ws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fullypemdtr Ovfltr Complexontn Defnperandad Datand of Textilerive Selectile Typeo Fileile Existsile Lockedisc Lockedisc Seekisc Fullir Fullhape Defney Defn{PC(TEPAB(OHENުODNDRORUTOHAINLEARLOSELSONTREATEATAEFELIMOKERIVELSENDOROSUBOTOOLDFNPUTETISTOADGEOSEWEXTFFNPENUTOKEOPRINTEADEMENUMNPLOTESTOREETURNUNAVELOTTOPWAPERIFYAITMTPPENDIRRAOCKENNLOCKUSICALLOMULLTREPPEEDIDTHONEI$EMPOOICESGBSSCTNHR$OSEEKVALXPEX$NPNTENNOGEEKOINTOSNDCRN$GNINQRTR$ANALEFT$ID$IGHT$RRRLOFNNCHBDUL$OTIIZERAWCOLCOLCOLPRITEAGHAPERIGINLLIPSEOSAD(EG(OLYILLPOKEPEEK(DOKEDEEK(EEPIN$(STEYDC(TN(SWEGEPEATNTILRONROFFLUSINDSROCVER/8,P,5>? )e,g) O;*o p (, T `(+   )< ]-L@4?(-b R(w#6O67566t>f1!-000X>rS( 5#d001S0Lyv6pijs-"HX#  4͜+>2~+8͇+8W+8~#(0)f*(!x: x')͝>2g͟u>7ͪ! ͔)ͫs&r'2*!2* I)~+I)Á+(͟u)ͫ͝[A*C+͗8=)%~*w#%*W+~&ݶ' GN$ >G6#͊+Ä+!"?!.7ɯw#w#w#w=!%0 ͙+2-8#86#ͫ  ͈ǹO!:- w (8/G :( :-<x w+ +#6 #~?  y!G+ # # x !M+22x2.  7+(#* 6? w 7+#6 ɯ  .: ASCXBSOBJ6$(~ =,++Ë,+Ú5Ú5h5t5C7Ä7Þ7é66h877(:5D5H5 5[5hB9x;89<<>+ɷG(,  >  88ͨ"Ϟ+|55|555>&&SJϾ!"8!";""!2,0>(m,͹ɴ5f+y#=Ҽ88È#=ҼG Åͫ(!=(( 2'S)xl+> &= x 89,O(=GyO+/GyOyy x {,z,_W/CSɯ>!/- /Èr/͢r**/M-2ͫ"-ɯ+/5!o-o0$    o͝QÝ'S/CS͝os'SE/( o[~K*͘'M-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ECK0 XBS /0PFL0 XBS,19:SIMMOD0 XBS2K 3970# }"000014" s :A%~u1: 1450 A~89 s 1100: 3770 BEEPS,PITCH SET BY P%0,P%:1,08,&10:&C,&107,&7E:&D,0 I~1r1000:  A% s 3920 11,6+(@8,23;" Press SPACE BAR to continue";2 }32 3890 <15,1FP~"000000"Z }"000005" s 3930dn ERROR ROUTINE,x }0 s :4:$" error at line";:' Z s 320: :4:: FINISH LINEPB z1(415,4:(83)~255s83,47::902:936:40: 1005q15232,67,76,83,58,82,85,78,49,48,48,48,141,128,128,128,128,128,128,67,76,83,58,71,79,84,79,50,51,53,56,141/6984,16,0,48,16,16,16,56:6978,80,104:+@4,23;"Press space bar to continue.";Z~:Z}32s910:=:@2,10;"Press G go on, R return to last part,":G~(83)$:" I for index.Z~z223:Z~71sZ~73s6000Z~82sG~Gu1:83,G: 925640:@2,10;"Press G go on, I for Index. ":G~(83)Z~z223:Z~71sZ~73s6000 93783,(83)t1:+@4,23;"Press space bar to try this.";Z~:Z}32s955940::965:FS~1sFS~0:965 D~(262)t2:(D)900s1,899B$~(34)tA$t(34):4:15,4:15,4:920:FGu461010,1100,1200,1300,1400,1500,1600,1700,1800,1900,1960,2000/:" The simplest musical sound is made by/:" BEEP. This can have a parameter in a:" bracket./:" BEEP(10) will ring the beeper, if you!:" call it that, 10 times.0:" Try it if you must, but remember that0:" Shakespeare didn't have a computer at!:" the time when he wrote:0:" If music be the food of love, play on! 950HL:" ";:1,10:" MUSIC and TEMPO ";:15,4:" are the two reserved/N:" words you will need for simple tunes.P:" TEMPO is easy enough.R:" 0 is slow. 7 is fast.$T:" Something in between is...%V:" well, something in between! X905,Z:" MUSIC, well that's another matter..\:" It is probably easier to learn Basic,^:" than to play a musical instrument./`:" You can hardly expect me to teach you.b:" to read music if you don't know how.d:" But I'll do my best! f9051h:" We are going to program an intellectual*j" poem entitled: 'Three blind mice.'l5000,10,5001'n:" Here are the first two lines..p:" Letters C D E F G stand for notes as+r:" on a piano. (D is higher than C.)0t:" The numbers after the letter stand for1v:" the lengTrack-Info  *          ~"E6DC7R3"M2$~"G6F3R1F3E7R3""M3$~"G3+C4R1+C3BAB+C5G2R1G3R0(M5$~"G3+C1R1+C1R1+C2B3AB+C5G1R1G3R1*M6$~"G1R1+C1R1+C1R1+C2B3AB+C5G2R0G3R3M4$~"F3"tM1$"R1","R1","R1" N~3r7N$::" Three blind mice, M1$tM1$":" See how they run! M2$tM2$0:" They all ran after the farmer's wife, M3$+:" Who cut off their tails with a9:" ";:1,6:" CARVING KNIFE, ";:15,4: M5$0:" D'y'ever see such a thing in your life M6$#:" As three blind mice? M4$:P4>Z"+D6+C4B+D+CAG6#FG7","B6G4GBAED6C-B7","G6E4DGEC-B6-A-G7"dSM~1sSM~0:: op:" INDEX.q:" 1. BEEP.r:" 2. MUSIC and TEMPO.s:" 3. Three channels.t:" 4. Going further.!u:" 5. A warning about PSG!%}:" Press 6 for other programs.*:" Type in 1-6 and press ENTER.";PNPN~6s7000PN~(PN):PN1{PN}6s601883,46tPN:G~46tPN:X:"SELECT"a9a -ar"" diagonal direction."+"* Any trapped pieces turn into your"" pieces.)"* To place your counter enter the"0" co-ordinates.Row 1 to 8,Column A to H."+"* The game ends when all places are"" occupied."1"* The player with the most counters wins";,"* If you cannot capture at least one"-" piece you must forfeit your turn by"" entering 0A."+""* The best way to learn is to play."/,"* Press any key to continue.Good Luck."; 6G~:@ ** O415,4:(83)~255s83,47::902:936:40: 1005q15232,67,76,83,58,82,85,78,49,48,48,48,141,128,128,128,128,128,128,67,76,83,58,71,79,84,79,50,51,53,56,141/6984,16,0,48,16,16,16,56:6978,80,104:+@4,23;"Press space bar to continue.";Z~:Z}32s910:?40:@2,10;"Press G go on, R return to last part,":G~(83)$:" I for index.Z~z223:Z~71sZ~73s6000Z~82sG~Gu1:83,G: 925640:@2,10;"Press G go on, I for Index. ":G~(83)Z~z223:Z~71sZ~73s6000 93783,(83)t1:+@4,23;"Press space bar to try this.";Z~:Z}32s955940::965:FS~1sFS~0:965 D~(262)t2:(D)900s1,899B$~(34)tA$t(34):4:15,4:15,4:920: 0,0FGu461010,1100,1200,1300,1400,1500,1600,1700,1800,1900,1960,2000 N~1r15N"@10,10;"This is BCOL";N;" "NN~1r1500:4:15,4:,:" You have just seen all the colours(:" as a background to the scrth of note. 4 is longer than 3..x" If there is no number, the last value z:" is taken. R is a rest. |905}5002,,5008-~:" If you want the same note twice you-:" put the shortest rest you can . It%:" goes between the two notes.-:" A + before a letter means 'play one,:" octave higher. (7 white notes on a:" piano.)905:5009,,50120:" The Einstein has three channels but we":" only want one this time.):" Line 5009 shuts off the others.0:" Note that no music has been played, so0:" far.The strings are just ordinary ones/:" of letters and numbers until they are:" called by MUSIC./:" We are setting up a loop to go faster%:" and faster each time round. 905):" Here is the rest. Try RUN 5000.5015,14,5080 950SM~1:5200):" Here we use all three channels.':" It's a bit better than 3-B-M.5200,12,5220/:" Nothing to do with music but note the/:" trick with flag SM, so that I can use/:" it as a subroutine, and you can play&:" it as a program by RUN 5200.':" Also note use of # for sharp.1:" b means flat. (Black notes on a piano.) 9500:" This is about as far as we can go with0:" sound. You may like to experiment with$:" what we haven't mentioned.-:" + as we showed is one octave above.):" - is one octave below middle C.&:" Use ' for two octaves above. :" Use = for two below.,":" Use . for three below if you must! $9051&:" I must confess that I am not a computer/(" music addict, and so I've not done much!*" experimenting with VOICE.1,:" Page 237 in the manual explains it, if,." you do want to explore what it does.10:" Most computer music is written by trial!2" and error, I would guess! 4950*x:" PSG IS FRANKLY DIFFICULT TO USE.1z:" There are several routines in the Basic/|" manual. If you like this sort of thing,/~" you can alter these to your taste. This-" is easier than starting from scratch.-:" BUT THERE IS A TRAP FOR THE UNWARY! 905&:" PSG 7,20 locks the keyboard./:" Good-bye program! Reset the computer./:" The only harm will be to your temper.0:" To avoid this set the second parameter0:" of PSG 7, a number between 65 and 127.,:" PSG 7,126 sets channel 1 to noise.,:" PSG 7,119 sets channel 1 to music.84 :" ";:1,2:"That is the end of SOUND. ";:15,46 83,255:M1$Track-Info  *          een.-:" The screen itself was not affected.+:" This was achieved by using BCOL N%:" where N is a number 1 - 15.*:" Try various values for yourself. 950L4:15,4:CN:" ";:1,2:" TCOL ";:15,4:" followed by two parameters,-P:" e.g TCOL 1,10 will set the printing R:" colours on the screen..T:" Nothing will happen when the program.V:" encounters it, but if PRINT follows(X:" it is done in black on yellow. Z905\1150,10,1160-^:" Study this, it will all happen when#`:" the space bar is pressed.-b:" Notice what happens when the screen.d:" is cleared by the subroutine at 905. f905~:" Listen for the beeps.N~1r2000:13:(10)N~1r2000:1,10:(10):N~1r1000: 905+:" Yes, we're in Wolves' colors now!:" Have fun...&:" But first a word of warning. 905/:" Colour 0 is transparent. It does have-:" some uses, but can trap the unwary!-:" You may think the keyboard has died":" on you. Nothing happens.:" Press ENTER&:" Now type TCOL 15,4 and ENTER,:" Nothing comes on the screen but...:" ABACADABRA!+:" This also can happen if both TCOL:" parameters are equal. 950-:" You can use TCOL with one parameter-:" left out, TCOL 2 sets a green fore--:" ground on the previous colour back--:" ground. Similarly TCOL ,5 will just:" set the background. 905.:" If you tried a lot of different sets.:" of colours on the same screen, it is.:" possible that the result was RATHER:" MESSY!.:" It is not impossible to get improved.:" results with care on a FORTY column.:" screen, but I'll admit that it is a):" good deal easier on 32 columns. 905%:" This is possible by CLS 32.):" CLS 40 gets back to 40 columns./:" It becomes even more necessary to use/:" this, if you ever try to mix graphics:" and text. 950/:" Let's get the hang of how the graphic/:" screen works. The size is 256 by l92.-(:" Each graphic dot is called a pixel./2:" Unlike PRINT we work from the bottom,<:" left hand corner.0>:" PLOT 122,104 means start at the bottom0@:" go along 122, then up 104 and plot oneB:" single point. D905F5000,8,5025%H:" Don't worry about GCOL yet.,R:" You can see what the program does.-\:" Points are plotted in random places$f:" and colours on the screen.p:" RUN 5000 to test it. r9508x:" ";:1,8:" GCOL ";:15,4:" works like TCOL./z:" It sets foreground and background for/|:" the colours of pixels plotted in high~:" resolution./:" The first parameter, the foreground!:" one is easy to operate. 905.:" The second parameter causes problems.:" unless it is fully understood. One.:" magazine review of Einstein called.:" the graphics chunky. They are not if.:" GCOL is understood. You must learn+:" to program better than Mr XXXXX!" 905/:" If you are plotting individual points/:" or lines, GCOL should have the same/:" background as TCOL. Unless you state/:" it, it will take background colours/:" from the previous GCOL or, - if none@:" it will use BCOL ";:1,2:" and NOT TCOL. ";:15,4: 9054:15,4:15,4!:" Try the direct command::" DRAW 50,50 TO 130,100.:" Don't touch the colours and you will:" get a straight line.-:" Now mess around with TCOL and GCOL.%:" CLS and DRAW again. Chunky?/:" Now reset carefully in different GCOL':" and TCOL to avoid the chunks. 9500:" The reason for the problem is that the-:" computer works in rows of 8 pixels.0:" Each such row, there are 6144 of them,0:" has two locations in VRAM. One sets0:" which pixels to light, the other sets,:" foreground and background colours./:" You can actually deal with individual#:" locations by using VPOKE.:" But be careful! 905%:" A word about PEEK and POKE./:" ?PEEK(12000) will find what is stored&:" in memory at location 12000./:" POKE 12000, 255 will put 255 in that/:" location. VPEEK and VPOKE will do it/:" to the video memory which is seperate:" from the main memory. 905/:" PEEK is safe enough, but POKEing can/:" destroy everthing in memory, so that/:" the only thing to do is to switch off:" and start again./:" VPEEK more than 32767 is definitely.. :" NOT TO BE RECOMMENDED! 905 5100,10,5135%:" This is safe enough to try./:" It will show you one row of 8 pixels,/:" directly accessed. But don't try to/:" amend the program unless you are sure:" what you are doing. 950$@:" We have already seen DRAW.0B:" DRAW can be continued by TO and if the0D:" last point is the same as the first, a"FTrack-Info  *          lain:>:" ";:11,6:" SPRITE SHAPE MAG SPRITE OFF ";:15,4: :" BUT DON'T DESPAIR..... 9050:" When you feel up to it the manual does0:" describe SPRITES, much more fully than$:" commoner Basic statements. 905.:" Secondly on the disc I have included,:" two of my own programs seperately.-:" MSPR will create sprites for you in-:" a simple manner. These can be saved-:" onto disc. Then LSPR will load them-:" back into memory and you can use it-:" to incorporate them into a program.84 :" ";:1,2:"That is the end of COLGR. ";:15,46 83,255:4,1:,1:N~1r6000X~(128):Y~(96):G~(14)t1 G:X,Y4:15,4:15::15,4:4:" Enter number 1-255.";AA}255{A1s:5105#" Enter foreground colour.";FF1{F}15s:5115#" Enter background colour.";BB1{B}15s:5120 3000,A:11192,16wFtB)P:50,50 r 140,100 r 230,50 r 50,50Z 140,70,6d15,2:15,2: 128,96u128,0r127,00,u96r0,96 1,2N~0r40p.1X~2wNw(N):Y~2wNw(N)  X,Y:NN~1r3000:15,4:15,4: 0,0:&:" Enter name of your program.":" Maximum 10 letters. "" ";A$':" Enter your name.,:" Maximum 15 letters. 1" ";B$6(A$)}10sA$~(A$,10)#;B~(B$):B}15sB~15:B$~(B$,15)@13:1,2:2,2: 32+E0,0:128,128,50,.8:128,128,9:,9J@16u(A$)x2,7;A$)O8,56r16tBw8,56r16tBw8,32r8,32r8,56Y9,48,10:,10:@2,18;B$"c6,200,48,30:200,48,4:,4m@23,18;"1985"(w15,4:15,4:N~1r5000::4:40:op:" INDEX.q" 1. BCOL.r" 2. TCOL.s" 3. CLS 32.t" 4. PLOT.u" 5. GCOL. v" 6. VPOKE, (PEEK & POKE.)w" 7. FILLx" 8. ORIGINy" 9. UNPLOT.z" 10. ELLIPSE and POLY.{" 11. Title pages.|" 12. Sprites etc.&}:" Press 13 for other programs.+:" Type in 1-13 and press ENTER.";PNPN~13s7000PN~(PN):PN1{PN}13s601883,46tPN:G~46tPN:X:"SELECT"0hhHN:G~46tPN:X:"SELECT":40:op:" INDEX.q" 1. BCOL.r" 2. TCOL.s" 3. CLS 32.t" 4. PLOT.u" 5. GCOL. v" 6. VPOKE, (PEEK & POKE.)w" 7. FILLx" 8. ORIGINy" 9. UNPLOT.z" 10. ELLIPSE and POLY.{" 11. Title pages.|" 12. Sprites etc.&}:" Press 13 for other programs.+:" Type in 1-13 and press ENTER.";PNPN~13s7000PN~:" closed figure is formed..H:" FILL 80,80,6 may colour this figure.0L:" It won't unless 80,80 is a point that0N:" is INSIDE. Otherwise you get a mess &.P:" insult is added by STACK FULL ERROR! R905T5200,10,5220&V:" The 6 is the filling colour.0X:" Test this and write something like it. Z9500:" ORIGIN will set the origin so that the0:" counting starts from a point of user's):" choice, instead of bottom left.0:" For mathematical graphs it may be best-:" to use the screen centre as origin. 9055300,11,5350:" This draws a spiral.(:" Don't worry about SIN and COS.+:" These are mathematical functions. 950.:" If you use UNPLOT it will unplot any :" point already plotted.- :" DRAW may contain a third parameter.>:" We shall call it ";:1,10:" PLOT-TYPE. ";:15,4: 905-:" If plot-type is 0 or omitted normal:" plotting results.:" Plot-type 1 unplots..:" Plot type 2,3,4,5 give various types,:" of dotted lines. See for yourself.*:" E.G. CLS:DRAW 50,50,3 TO 120,130 950]l:" We now come to ";:1,9:" ELLIPSE ";:15,4:" and ";:10,1:" POLY. ";:15,4:0n:" These involve a new parameter which wep:" will call SCALE.0r:" If scale is omitted it takes the value0t:" 4/3. This produces an ellipse which is(v:" a circle or a regular polygon.0x:" RADIUS is the distance from the centre0z:" of the figure, to a point at the same|:" horizontal level. ~905#:" ELLIPSE has 5 parameters.%:" 1. X co-ordinate of centre.%:" 2. Y co-ordinate of centre.:" 3. Radius.:" 4. Scale (optional).":" 5. Plot-type (optional). 905 10,6: :" POLY has 6 parameters.:" 1. Number of sides.%:" 2. X co-ordinate of centre.%:" 3. Y co-ordinate of centre.:" 4. Radius.:" 5. Scale (optional).":" 6. Plot-type (optional.)15,4:950.:" We shall now design a title page for:" one of your programs.":" I need some info. first.:5400,11,5435 905:5440,11,5495$:" Study this and try it out./:" Using GCOL 2,2 plots the perimeters/:" in the computer's mind but not on the:" screen. 950.:" Sprites are too difficult to discuss*:" in an elementary basic tutorial..:" For one thing, they involve binary &!:" hexadecimal arithmetic.):" We shall not therefore expTrack-Info  *            7+(#* 6? w 7+#6 ɯ  .: ASCXBSOBJ6$(~ =,++Ë,+Ú5Ú5h5t5C7Ä7Þ7é66h877(:5D5H5 5[5hB9x;89<<>+ɷG(,  >  88ͨ"Ϟ+|55|555>&&SJϾ!"8!";""!2,0>(m,͹ɴ5f+y#=Ҽ88È#=ҼG Åͫ(!=(( 2'S)xl+> &= x 89,O(=GyO+/GyOyy x {,z,_W/CSɯ>!/- /Èr/͢r**/M-2ͫ"-ɯ+/5!o-o0$    o͝QÝ'S/CS͝os'SE/( o[~K*͘'M-KS!/=2:9(O+/s 29z29=&o))) ͈͝5g.(Og.( (  =5×,(Q=;.͝/0! 0E.RM0 $ y0PY,,˺z+/WW{+/_,ͪ>=;(.B 5O/415,4:(83)~255s83,47::902:936:40: 1005q15232,67,76,83,58,82,85,78,49,48,48,48,141,128,128,128,128,128,128,67,76,83,58,71,79,84,79,50,51,53,56,141/6984,16,0,48,16,16,16,56:6978,80,104:+@4,23;"Press space bar to continue.";Z~:Z}32s910:?40:@2,10;"Press G go on, R return to last part,":G~(83)$:" I for index.Z~z223:Z~71sZ~73s6000Z~82sG~Gu1:83,G: 925640:@2,10;"Press G go on, I for Index. ":G~(83)Z~z223:Z~71sZ~73s6000 93783,(83)t1:+@4,23;"Press space bar to try this.";Z~:Z}32s955940::965:FS~1sFS~0:965 D~(262)t2:(D)900s1,899B$~(34)tA$t(34): 920:PGu461010,1200,1400,1450,1500,1600,1700,1800,1850,1900,2000,2100,2200,2300+:" In TUTOR 1 we shall see how these,:" instructions to the computer work::" CLS" PRINT" LET" RUN" CHAIN" PRINT@.:" They could be called instructions or!:" commands or statements. 905/:" CLS is an instruction to the computer :" to clear the screen.% :" When you have read this try):" 1. Type in CLS and press ENTER.,:" 2. Type in 10 CLS and press ENTER./:" Nothing happens when you have done 2!-:" Now try typing RUN and press ENTER./:" When you have done this return to our5:" program by ";:1,9:"PRESSING F0 ";:15,4.::" WHEN YOU KNOW WHAT TO DO PRESS"" THE SPACE BAR.Z~:Z}32s1054 G~48:83,48:965:-:" When you typed in CLS, the computer,:" printed the letters on the screen.!:" Then you pressed ENTER..:" This was the signal to carry out the.:" instruction. The screen was cleared.;:" ";:1,2:"This is called DIRECT MODE.";:15,4:-:" When you typed 10 CLS and ENTER the.:" computer said, 'This has a number in,:" the front. It is a program line. I!:" must remember line 10.'<:" ";:1,2:"This is called PROGRAM MODE.";:15,4: 905-:" When you typed RUN the computer ran/:" your program! The first line was line-:" 10. Then it looked for another line':" with a higher number, say 20./:" There wasn't one so the computer said-:" Ready, and waited for the next job.0:" For the moment we are going to program0:" in direct mode and use the computer as:" a calculator. 905):" If you type LET A=3 (and ENTER).:" the computer memorises that A stands:" for the number 3.":" If you then type LET B=4(:" the computer remembers B also.(:" This isn't much use by itself!':" But if you now type PRINT A+B):" the computer obeys and types 7./:" You could have had the same result by!:" simply typing PRINT 3+4 905-:" Try a few sums for yourself by both:" these methods. :" Multiply is given by *:" Divide is / not ~,:" If the symbol is at the top of the':" key, press SHIFT and the key.-:" If you make a mistake press the key':" with DEL and INS, (no shift).E:" ";:1,13:"Don't forget ENTER after each entry.";:15,4:.:" Do what you like but include 347*589':" to check. Press F0 to return. 950)x" Sometimes we want the computer to)z:" write words instead of numbers.!|:" We might like it to say~:" THE ANSWER IS 204383.!:" (Did you get it right?)':" One way to do it is by typing,:" PRINT";(34);"THE ANSWER IS";(34):" PRINT 347 * 589.:" Note that to print words (or strings-:" as they are sometimes called),it is+:" essential to use ";(34);" marks.):" (Press SHIFT and 2 for quotes.) 950#:" Bit of a mess, wasn't it?/:" It would have been a little better to*:" put it into a program like this::" 10 LET A=347:" 20 LET B=589A$~"THE ANSWER IS":980:" 30 PRINT";B$:" 40 PTrack-Info  * itted the.|:" computer takes the last value given.,~:" If the third is omitted the end of.:" the program is taken. If you want to.:" give e.g the second value only, you.:" must put a comma for the first value,:" i.e LIST ,6. LIST 1000,,1500 would-:" list in batches of 6 from line 1000:" to 1500./:" When you have tried LIST we will come:" back to editing.FS~1:950/:" If you see 'Syntax error in 40' first/:" list your program so that line 40 is/:" included on the screen. Press ESC. It-:" can be done while listing proceeds.-:" Look at line 40 and find what's up.):" It might be 0 for O or I for 1.$:" These are common mistakes..:" It might be a wrong or omitted piece.:" of punctuation. Suppose you noticed.:" that in line 40, you have missed the":" quote marks after PRINT. 905-" Move the cursor upwards by pressing &(:" holding the correct arrow key./:" These are above ENTER. (You must hold/:" SHIFT as well for this one). Release/:" when you are on line 40. Now move the/:" cursor horizontally until you come to*:" where the quote mark should be.<:" Press ";:1,8:"SHIFT and DEL INS key.";:15,4:/:" This makes a space. Put in quote mark/:" and press enter. Move the cursor back/:" and run. Syntax error in 50? Oh well,:" you know what to do! 905-:" Your program should still be there!-:" Even if you haven't made any syntax,:" (or other) errors do some editing.-:" Change some of the comments and see*:" whether it still runs all right.FS~1:9500:" You may already have had two thoughts.0 :" Line 70 in my program just said PRINT.0 :" All this did was to leave a clear line:" on the screen.0:" It might have been better to have two :" printouts on one line.,:" There are several ways to do this. 9050:" If you end a PRINT statement with just0:" the close quote marks, the computer/:" PRINTs the next statement on the next/:" line. If you follow the quotes with a0 :" semi-colon the computer starts the new/":" PRINT line from where the last ended./$:" This also applies if you use a string&:" variable.(:" Example:L*:" PRINT A$;";(34);" SAYS ";(34);";B$;";(34);" IS INEDIBLE.";(34) ,950+::" Not quite as easy as you thought?!<:" It comes with practice!0>:" You can aRINT A*B 950:" Aren't I rude?):" We haven't introduced ouselves.):" I'M EINSTEIN. WHAT'S YOUR NAME?%:" Type it in and press ENTER.:" ";N$':" Tell me the name of a friend.%:" Type it in and press ENTER.:" ";F$.:" Let us write a program about you and:" ";F$ 9050:" Before we do this let me explain about0:" string variables. In the same way that0:" we can LET a letter = some number, we0:" can also let it stand for a string. To0:" indicate this to the computer you must?:" ";:1,10:"put a $ sign after the letter.";:15,4:0:" You must also put the letters in quoteA$~"CAT":980!:" marks. E.G. LET C$=";B$":" PRINT C$ will print CAT. 905," Here is a program you could type in.A$~N$:980" 10 LET A$=";B$A$~F$:980:" 20 LET B$=";B$A$~"A$":980:" 30 PRINT A$#A$~"IS VERY INTELLIGENT.":980:" 40 PRINT ";B$A$~"B$":980:" 50 PRINT B$A$~"IS AN IDIOT.":980:" 60 PRINT ";B$:" 70 PRINTA$~"A$":980:" 80 PRINT A$$A$~"IS VERY GOOD LOOKING.":980 :" 90 PRINT ";B$!A$~"B$":980":" 100 PRINT B$!#A$~"IS EXTREMELY UGLY.":980$:" 110 PRINT ";B$ &950.@:" That was a longer program. There may/B:" have been problems. If you got Syntax-D:" error in 50, or something like this!F:" no panic! We all do it./H:" If the program does not run perfectly<J:" first time it needs ";:1,2:"EDITING.";:15,4:.L:" The first thing to do is to LIST the'N:" relevant part of the program. P905-R:" If you type LIST and ENTER then the-T:" screen will fill up with lines from.V:" your program (and possibly the start)X:" of mine). Then nothing happens./Z:" If you press ESC you will get a Ready/\:" message and you can begin to edit. If/^:" you press virtually any other key the `:" listing will continue. b905-d:" The Einstein LIST is rather unusual-f:" You can follow LIST with 3 numbers.Fh:" ";:11,6:"These numbers aree called parameters.";:15,4:/j:" LIST 50,8,1500 means start listing at0l:" line 50. List in batches of 8 lines at!n:" a time until line 1500. p905/r:" You may leave out any of the numbers.-t:" The DEFAULT value, (the number that-v:" is assumed if none given), of first,x:" parameter is the start of program. y905-z:" If the second number is omTrack-Info  * lso use a comma, in or after0@:" a PRINT statement. This moves printing0B:" to the next horizontal quarter of the0F:" screen. If your last print ended in0H:" column 7, the next would start at col.0J:" 10. Similarly col.13 to col.20 or col.L:" 34 to a new line. N905$P:" Here is a list of animals. R5000T:-V:" See if you can write a program that-X:" does this. Then I'll show you mine. Z950l:" Here is my listing.3n:" Study it and then we'll talk about it.":p5000,10,5018 r905t5000,,5000)v:" This line probably puzzled you!-x:" PRINT@ followed by 2 parameters and,z:" then a semicolon will allow you to-|:" print where you like on the screen./~:" The first number can be from 0 to 39..:" It will print that number of columns/:" across. The second number (0-23) will':" give the number of rows down.,:" Don't worry about my line numbers.0:" They keep my programs out of your way! 905/:" When you press to go on, a title page/:" for a program will appear. Look at it/:" and then try to make one for yourself:" with your name on it. 9055100:N~1r5000: 950!:" This was my program.":5100,10,5150-:" You will notice I have used another2:" new word. ";:1,10:"TAB(13)";:15,4:.:" This moves the cursor along the line.:" and some people prefer it to PRINT@. 905.:" The Einstein has an unusual TAB. You/:" can use a second parmeter and instead-:" of spaces you can print rows of any:" character you choose..:" When you use TAB the parameters must0:" be in ";:14,1:"BRACKETS.";:15,4: 905$:" Try TAB(7,33) for example./:" Use numbers BIGGER than 32 if you use:" a second parameter.. :" When you have finished use 32 as the.":" second parameter. TAB will now be as-$:" it was. We shall explain this later&&:" when we mention ASCII codes. (950&4:" Have a look at this program.6:" 10 LET L=108:" 20 LET W=7::" 30 LET P=2*W+2*L<:" 40 LET A=L*W8>:" 50 PRINT";(34);" The perimeter is";(34);";P"3@:" 60 PRINT";(34);" The area is";(34);";A".B:" This program finds the perimeter and"D:" the area of a rectangle. E905.F:" By the way, you get small letters by0H:" pressing ALPHA LOCK. Type n and little.J:" n appears. With SHIFT big N appears..L:" Press ALPHA LOCK again to be back to@N:" normal. This is called a ";:1,2:"TOGGLE.";:15,4: P905)R:" Type in the program and RUN it./S:" NOW REWITE THE PROGRAM WITH DIFFERENTT:" VALUES FOR L AND W./U:" Next leave out lines 10 & 20. You can0V:" do this by typing 10 and enter and 20X:" and enter.1^:" In direct mode give L and W new values.(`" Try to run the program. No good?:b:" Instead of RUN use ";:1,10:" CHAIN.":15,4: d950/:" When you type RUN the computer clears/:" its memory of any variables. If CHAIN/:" is used instead of run, any variables/:" in memory are kept. Both commands are):" exactly the same in other ways./:" If you write a number after CHAIN or/:" RUN, the computer will try to run the/:" program from that line number,- if it:" can! 905/:" For your last exercise try to write a.:" program that finds the circumference/:" and area of a circle of given radius.%:" AREA = PI * RADIUS SQUARED.*:" CIRCUMFERENCE = 2 * PI * RADIUS.:" Take PI as 3.142.-:" Even if your Maths is not too good,&:" have a go! Nobody's looking! 950,:" We have told you a couple of white,:" lies. You don't have to put LET in- :" every time. You can say A=2 instead- :" of LET A=2. But to begin with, use* :" LET. It is easier to understand., :" You don't have to type PRINT every' :" time, either. Just ? will do! 905+ :" If you PRINT well, you're doing+ :" better than a lot of programmers!+ :" A few tips. Use CLS frequently.+ :" Double spacing is easier to read.+ :" Start print lines one column from :" the edge.+ :" If possible try to keep the lines+ :" so that they end in the same col.+ :" But don't worry about this yet if$ :" you find it too difficult. 905/" :" There are two other commands that you.$ :" can use with PRINT SPC(20) gives you& :" 20 spaces..( :" FMT followed by two parameters will.* :" allow numbers to be printed in tidy., :" columns. Look them up in the manual. :" if you want to./0 :" We shall come back to colour printing*2 :" and graphics in a later program.94 :" ";:1,2:"That is the end of TUTOR 1.";:15,46 83,255: @0,10;P$~"HIPPO"Q$~"ELEPHANT" R$~"COW"S$~"ANTELOPE"T$~"PANDA"U$~"BABOON" ,P$,,Q$ ,R$,,S$ ,T$,,U$@12,10;"***************"Track-Info  * Z~z223:Z~71sZ~73s6000 93783,(83)t1:+@4,23;"Press space bar to try this.";Z~:Z}32s955940::965:FS~1sFS~0:965 D~(262)t2:(D)900s1,899B$~(34)tA$t(34): 920:ZGu461010,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2250,2270,2300.:" So far, any program you have written.:" will run exactly the same unless you&:" actually change the program..:" Fair enough, but they get a bid dull+:" after you have run them 50 times!.:" The same program can be run, so that,:" each run gives a different result..:" One way that this can happen is that.:" the program user is asked to type in.:" a number or word, that is called an4:" ";:6,14:" INPUT.";:15,4 905/ :" Here is a program that finds the area/ :" and circumference of any circle. The':" user has to enter the radius.:5000,8,5050:" Notice the colons.:" Notice line 5010. 9050:" Sometimes it is more convenient to put,:" more than one statement on a line.:5030,,5030/:" This line is the same as if we wrote: :" 5030 C=2*P*R"" 5032 A=P*R*R.$:" Line 5010 gives R the value the user&:" has typed in.&(:" Try running this by RUN 5000 *950L:5000,8,5010+N:" These lines could be replaced by:0PA$~" Enter the radius of the circle. ":980+R:" 5000 CLS:PRINT:INPUT";B$;";R"FT:" If the INPUT has a ";:1,2:" PROMPT ";:15,4:" like thisV:" you do not get a ? . X905/Z:" You can INPUT more than one variable.-\:" Personally I think it is not a goodD^:" practice as it is not ";:1,9:"USER FRIENDLY.";:15,4:5`:" That's what they call it in the trade! "b5100,8,5140(d:" RUN 5100 to test this program. f950%:" You can also INPUT strings.,:" If you write INPUT K, the computer,:" will try to turn your input into a,:" number. If all else fails it will,:" call it 0! If you want to input a*:" string, you just write INPUT K$. 9050:" I want you to write a program that you:" can try on a friend.0:" At least he or she was a friend before:" trying the program./:" Get the computer to ask your friend's&:" name and then make comments.B:" We will then try to ";:1,14:" SAVE ";:15,4:" it." 950,:" YOU MAY WANT TO SAVE THIS PROGRAM.":" If so do q13);"* MY PROGRAM. *" q13);"***************"@28,20;"G.T.Childs."q32);"l984"(p:" INDEX.+r:" 1.CLS 2.DIRECT MODE.,t:" 3.PRINT WORDS. 4.PROGRAM MODE.'v:" 5.STRING VARIABLES.6.LISTING.+x:" 7.EDITING. 8.SEMI-COLONS.'z:" 9.COMMAS. 10.PRINT @/|:" 11.TAB. 12.RECTANGLE PROG..~:" 13.CHAIN. 14.THE WAY AHEAD.%:" 15.INDEX TO OTHER PROGRAMS.+:" Type in 1-15 and press ENTER.";PNPN~15s7000PN~(PN):PN1{PN}14s601883,46tPN:G~46tPN:XY"SELECT"?0`y;3:" 1.CLS 2.DIRECT MODE.,t:" 3.PRINT WORDS. 4.PROGRAM MODE.'v:" 5.STRING VARIABLES.6.LISTING.+x:" 7.EDITING. 8.SEMI-COLONS.'z:" 9.COMMAS. 10.PRINT @/|:" 11.TAB. 12.RECTANGLE PROG..~:" 13.CHAIN. 14.THE WAY AHEAD.%:" 15.INDEX TO OTHER PROGRAMS.+:" Type in 1-15 and press ENTER.";PNP 2830. 2770: 2740: 2790: 3020: 3020: 2490 ( *** END OF TESTS2 %< @2,5;"The tests are completed."F A~1100: 2790+P @2,10;"Press 'R' to repeat the tests.)Z @2,12;"Press any other to finish.";d G~:G~G z &DF%n G~82 s 1000:R~0:REP~0: 1390$x :@10,25u(A$)x2;"Goodbye ";A$ A~1000: 2790 Z s 320: : 4: * SET TO UPPER CASE/ V~(&FB3E): V128 s (&FB3E),Vt128:&22,0  * ERROR NOISE "V0=C5.GR","R","R"  * TRY AGAIN PROMPT( 15,9:@4,22;" try again":15,0: * PAUSE LOOP% Q~: B~1 r A: }0 s : B: * DELETE CHAR. ON ERROR @12tV,8;" ";(8);:  * HELP  @0,18;-" T 2870,2920,2940,2960,2980,2890,3000, 6 G$"A"{ G$}"Z" s 2880a; A~1100:" You are using upper case letters.": (&FB3E)}127 s" Press the ALPHA LOCk key."@ J G$"a"{G$}"z"s tT A~1300:" You should be using upper case letters.Press the ALPHA LOCK key. (or use the SHIFT) "^ Gh u415,4:(83)~255s83,47::902:936:40: 1005q15232,67,76,83,58,82,85,78,49,48,48,48,141,128,128,128,128,128,128,67,76,83,58,71,79,84,79,50,51,53,56,141/6984,16,0,48,16,16,16,56:6978,80,104:+@4,23;"Press space bar to continue.";Z~:Z}32s910:?40:@2,10;"Press G go on, R return to last part,":G~(83)$:" I for index.Z~z223:Z~71sZ~73s6000Z~82sG~Gu1:83,G: 925640:@2,10;"Press G go on, I for Index. ":G~(83)Track-Info  * precisely this:":" Ready is on your screen.3" Type in: ";:1,2:"HOLD 1, 800";:15,4:" Press ENTER" (Ready appears again)A" Type in: ";:1,2:"SAVE";(34);"INSULTS";(34);:15,4:" Press ENTER) " (After a whirr, Ready reappears.)+"" Type in: ";:1,2:" MGE";:15,4:#" Press ENTER$" (Another Ready comes.),&" Now press F0 to get back to program. (940:$x:" SAVEing is usually easier.:z:" All you need is SAVE";(34);"program name";(34).|:" By using HOLD and MGE you saved only.~:" your program. Without them you would.:" have saved all my program over again :" and wasted disc space.>:" You can now LOAD ";(34);"INSULTS";(34);" and rerun:" your program./:" (But don't do it until you have ended:" this program.) 9055200,8,5250*:" This was my program, by the way..:" I have put one new little trick into/:" it. Line 5240 delays for about 5 sec.%:" as if Einstein is thinking.(:" You will see this by RUN 5200.-:" FOR & NEXT will be discussed later. 950 :" GOTO is simple to use.+:" Some people say it is too simple!#:" More of that in a moment.,:" When a program executes a line, it-:" then looks for the next higher line$:" number, and executes that.&:" UNLESS IT IS TOLD OTHERWISE.,:" In a minute I want you to type in::" 10 GOTO 51000:" Your one-line program will have called.:" up my program about Giant Haystacks. 905/:" A simple GOTO is considered to be bad%:" programming by some people./:" I accept that it often shows that you/:" haven't thought out your program just$:" as carefully as you might. 905.:" But programming is fun and if you do/:" want to add something in, a couple of+:" GOTOs saves you a lot of trouble..:" There are occasions when GOTOs would):" be considered good programming..:" Anyway don't worry yet. Find out how! :" they work first of all! 950.@:" We now come to a very important idea=B:" in programming. ";:1,13:" BRANCHING. ";:15,4:.D:" We require the computer to carry out.F:" different tasks depending on what isH:" in its memory..J:" Luckily the keywords are very simple/L:" as they are almost as one would talk.(N:" IF is followed by a condition.)P:" After the condition comes THEN. R905*T:" Most conditions depend on signs..V:" If you are a bit rusty on Maths. tryX:" to learn them now: Z1,9$\:" = means equals.";:15,4: ]1,2'^:" > is greater than.";:15,4: _1,6$`:" < is less than.";:15,4: a1,12*b:" <= is less than or =.";:15,4: c1,10(d:" <> is not equal to.";:15,4:#e:" >= should be obvious now! f905/r:" The other words used with IF and THENt:" are mostly simple.v:" AND means and.x:" OR means or.z:" ELSE means else."|:" A little more difficult:1~:" IF NOT means if the condition is false.+" XOR means either, or, but not both.0:" You will rarely have to use these last:" two words. 905/:" Multiple statements can be very handy:" with IF THEN./:" If the condition is true then all the/:" subsequent statements up to ELSE, (if.:" there is an ELSE), will be executed./:" If the condition is false, only what/:" is after ELSE, (if there is an ELSE),:" will be carried out. 9055500,8,5520/:" You can experiment with this program./:" Do you get the result you expect from<:" different INPUTs of A$ and B after RUN"::" 5500?0:" Note that where more than 2 conditions+:" are made, brackets are advisable.+:" You don't often have it this bad!/:" Note ELSE must have a colon in front.*:" BEEP is new. Guess what it does! 950,:" Let us look at the Giant Haystacks,:" program again. We now rewrite it):" with checks for INPUT mistakes. 905C:" I am going to use the ";:1:"variable ";:15:"FW as a/:" flag for weight. You can, by the way,.:" use up to 4 letters or numbers after/:" an initial letter. STRAW would do for.:" one. S9BB5$ is O.K. You can use more/:" than 5 letters but the computer would/:" think the variable TWEEDLEDUM equal0:" to TWEEDLEDEE. Be careful that a name.:" doesn't include something that means0:" something. KNIFE won't do. It contains :" IF, (a reserved word.) 9055300,8,5320-:" The weight flag is set to 0 in line,:" 5300. It'll act as a signal to the,:" computer. The first two INPUTs are,:" tested and not rejected, although,:" a sly comment is made if they look:" silly. 9055330,8,5350":" Line 5340 sets the flag.-:" FW=FW+1 doesn't look mathematically-:" correct, but if you think of = as):" 'becomes', it makes morTrack-Info  * .-:" The screen will appear 5 ( more if-:" you like) times. Each time it will-:" show the capital town and name of a-:" country, wait l0 seconds and clear.):" Then the next country is shown.#:" You can get the delay by::" FOR N=1 TO 10000:NEXTj1,12::" TRY TO SHORTEN YOUR PROGRAM BY USING A SUBROUTINE. ";:15,4: 9505600,10,56800:" This was my program. RUN 5600 to test.:" Was yours better?0:" Note line 5645. You must END the main0:" program if subroutines are at the end. 950=4:" It is time to mention ";:15,8:" REM. ";:15,4:/6:" REM is used to indicate that the rest.8:" of the line that follows is ignored..::" It can be used to make comments. In.<:" the previous program we could put in(>:" 5649 REM PRINT OUT SUBROUTINE. @905.B:" Some programmers think that REMs are.D:" very important, and that a REM every.F:" 5 lines is a sign of a good program..H:" My view is that it depends on styles'J:" and purposes for the program..L:" There are times when you couldn't be.N:" less concerned whether the user does.P:" or doesn't understand the program. A.R:" lack of REMs doesn't matter, if that#T:" is how you like to write. V905.X:" Other programs are written for users.Z:" to understand or modify to their own.\:" requirements. They need explanation,(^:" and REMs are the simplest way..`:" I prefer to use either explanations.b:" that are contained in the program ord:" documentation..f:" Documentation means a seperate paper%h:" on which notes are written.-j:" Either method is likely to help the(l:" user more than half-line REMs. n905/p:" It's time for you to write a program!/r:" No, not one with REMs,- although you,t:" may add as many as you want to do./v:" Write a program that prints the seven/x:" times table on the screen. (If you do/z:" not know it, God bless you, Einstein|:" will help!) ~950/:" Probably your program was longer than.:" than this one. Note line 5730 where/:" N is increased by one to count to 12.:5700,8,5730 905-:" There is a better way to write thisA:" program using a ";:1,13:" FOR NEXT loop. ";:15,4::5800,8,5820:" N starts at 1./:" Each time NEXT is met, N is increased':" by 1. The loop is repeated...:" Until N=12e sense.(:" FW becomes 1 more than it was.-:" Notice that if two heavy INPUTs are-:" given FW=2 and the second INPUT is:" accepted. 9055360,,5410-" Study this carefully. The old program/:" might have given silly - answers. WeF:" also use ";:1,2:" END, ";:15,4:" otherwise the program,:" goes on to 5420 when it shouldn't..:" There have been hidden ENDs to stop+:" your programs at the right place! 9055420,,5430&:" The final devastaing remark!,:" You may as well run the program to*:" check that it works by RUN 5300. 950.:" If you write a long program you will. :" probably find that some part of your. :" program will be repeated many times.*:" Much time can be saved by using:6:" ";:1,2:" SUBROUTINES. ";:15,4: 9050:" The statement GOSUB 8000 will send the0:" program to line 8000 just as GOTO 8000:" would have done./:" The difference is that the subroutine/:" will be executed and then the program,:" will return to where it came from.0 :" This is done by the word RETURN at the ":" end of the subroutine. $905&905,8,915/(:" This subroutine has been used by this/*:" program many times. It is often best/,:" to put subroutines early in the lists/.:" of your program, as it saves computer/0:" time. If you list 900-1000 you will/2:" see a tangle of subroutines. You will/4:" not fully understand all of them, but&6:" it should give you the idea! 8950.l:" You have only written short programs.n:" so far so you may not have done much.p:" planning. Some people like to write.r:" down their programs on paper. Then.t:" they type them in. Probably this is.v:" a good idea, although I don't always.x:" do this myself! Others like a methodBz:" of planning using a ";:9,1:" FLOW CHART. ";:15,4:.|:" Since I hate the things, you'll have.~:" to find out how they work elsewhere! 905-:" It always seems to me that a better6:" method is ";:1,10:" TOP DOWN. ";:15,4:.:" You write what you want your program.:" to do in words (not in Basic), stage.:" by stage. You then write subroutines':" for each stage and test them.-:" Finally you write your program as a-:" series of GOSUBs, which should work#:" if all the parts are O.K. 905,:" Now I want you to write a programTrack-Info  * .,:" Try both by RUN 5700 and RUN 5800. 950/:" If you added STEP .5 to the statement':" FOR N=1 TO 12 changing it to:/:" FOR N=1 TO 12 STEP .5, then N would/:" be incremented by .5 each time. Try!/:" ( Just for once, I don't mind if you&:" muck about with my program!)&:" LIST 5800,,5820 and edit it. :" Then test by RUN 5800. 950?:" FOR NEXT loops can be ";:1,9:" nested. ";:15,4:,:" The best way to show this is by an,:" example. The M loop is inside the:" N loop.:5900,10,59700:" Work out what will happen and test it. 950/:" Did you notice one of the answers was/:" a little wrong! If you did you are on. :" the way to become a real programmer!. :" If you use ^ you can only rely on it. :" to about 5 figures. Good enough for :" most purposes!  905. :" The other sign of progress is if you. :" are thinking 'I might be able to get. :" that programmed...' when you come up& :" against an everyday problem.8 :" ";:12,14:" YOU PROBABLY CAN! ";:15,4:/ :" You haven't been shown all the tricks/ :" but what you have seen is the bread &  :" butter of programming.94 :" ";:1,2:"That is the end of TUTOR 2.";:15,46 83,255:'::" Enter the radius of circle. RP~3.14159C~2wPwR:A~PwRwR&:" Circumference of circle =";C:" Area of circle =";AC:" Enter age, height in inches, and weight in stones ";A,H,W+" To be like GIANT HAYSTACKS you must " Grow";84uH;"inches."" " Put on";40uW;"stones."(" You have";34uA;"years to do it!"P::" Type in your name." Z " ";N$0d:@1,10;N$;" is a triple-distilled womble.$n@1,16;N$;" has a face like....xN~1r5000:*:" the underside of a hippopotamus.":FW~0:" Enter your age. ";A,A}90s" Nice to meet you, Methusalah."(" Enter your height in inches. ";H(H}78s" Pull the other one, mate!"(" Enter your weight in stones. ";WW}22sFW~FWt1:FW~0/FW~1s" I don't believe it, fatty.":5330+:" To be as big as GIANT HAYSTACKS:--H84s" You must grow";84uH;"inches."/W40s" You must put on";40uW;"stones."CH}~84zW}~40s" BLIMEY":" You must be his big sister!5A34s" You have";34uA;"years to do it.": 5420"," You'll never do it now!6|" A$ ";A$ " B ";BDA$~"CAT"z(B~0 { B~1)s (5):"MIAOW": A$~"DOG"s(2):"WOOF"#C$~"ENGLAND":T$~"LONDON":5650!C$~"FRANCE":T$~"PARIS":5650&C$~"HOLLAND":T$~"AMSTERDAM":5650#C$~"AUSTRIA":T$~"VIENNA":5650C$~"ITALY":T$~"ROME":5650 ::@15,10;T$@10,15;"is the capital of&@15,20;C$0N~1r10000:: DN~1:NN," times 7 is ",7wN XN~12s bN~Nt1:5710:N~1r12N," times 7 is ",7wN  N: "No.","Sq.","Cu.","To 4th N~1r20 *M~1r4 4NvM,> MH NRp:" INDEX.;q" 1. INPUT. Mutiple statements.":" 2. Input prompts.r" 3. INPUT of strings.s" 4. SAVEing.t" 5. Delays.u" 6. GOTO.#v" 7. IF THEN ELSE AND OR etc.*w" 8. Input traps and variable names.(x" 9. GOSUB RETURN and subroutines.y" 10. Program planning.z" 11. Geography program.{" 12. REM.|" 13. FOR NEXT loops.}" 14. STEP~" 15. Nested loops.#" 16. How's it going, so far?&:" 17. INDEX TO OTHER PROGRAMS.+:" Type in 1-17 and press ENTER.";PNPN~17s7000PN~(PN):PN1{PN}16s601883,46tPN:G~46tPN:XY"SELECT"?" 5. Delays.u" 6. GOTO.#v" 7. IF THEN ELSE AND OR etc.*w" 8. Input traps and variable names.(x" 9. GOSUB RETURN and subroutines.y" 10. Program planning.z" 11. Geography program.{" 12. REM.|" 13. FOR NEXT loops.}" 14. STEP~" 15. Nested loops.#" 16. How's it going, so far?&:" 17. INDEX TO OTHER PROGRAMS.+:" Type in 1-17 ~Uw(B))|)R~Uw(C)) )103600)P~0zA}0sP~(QwQtRwRu2wQwRw(A))):105200)Q~0zB}0sQ~(PwPtRwRu2wPwRw(B))):105200)R~0zC}0sR~(PwPtQwQu2wPwQw(C))):105206)U~(PwAtQwBtRwC)x(AtBtC)x((A))t(B))t(C)))&)V~(AtBtBtCtCtC)x(AtBtC):V~(Vt.1)-)P}U{Q}U{R}Us@2,21;"Impossible!":10500)W~(R)t2w(Q)t3w(P)u2)V~1s10740-)P~UsA~90:A~S(PxU):V}1zA}0sA1~180uC)V~2s10760-)Q~UsB~90:B~S(QxU):V}2zB}0sB1~180uB)V~3s10770-*R~UsC~90:C~S(RxU):V}3zC}0sC1~180uC@*A~0sA~180uBuC:A1~180uB1uC1t(B1~0)wBt(C1~0)wC:P1~Uw(A1))@*B~0sB~180uAuC:B1~180uA1uC1t(A1~0)wAt(C1~0)wC:Q1~Uw(B1))@&*C~0sC~180uAuB:C1~180uA1uB1t(A1~0)wAt(B1~0)wB:R1~Uw(C1))(0*P~Uw(A)):Q~Uw(B)):R~Uw(C))2:*A10{B10{C10sA1~0:B1~0:C1~0:P1~0:Q1~0:R1~0 D*10360N*6:1,11:/X*:" To find all the details of a triangle/b*:" you need to know three things. The&l*:" computer will find the rest!1v*::" As the cursor moves answer every/*:Track-Info  * LEN ";:15,4:"gives the length of string./~:" Try testing and altering the program.#:" Take care with ( ) and $. 9502:" CYNTHIA IS A ";(34);"DOLLY-BIRD.";(34)?N~1r3000::@1,15;"I want you to print this line onto the,:" screen, with the same PUNCTUATION.:" It isn't easy! 950" But it can be done! ":1200,8,1200:5" The ";(34);" marks mean something to the/:" computer that is different from what:" you intended.0:" So you have to talk to the computer in :" in its own language!0":" As you become experienced, you'll find0$:" other uses of CHR$, although even the0&:" one just shown is hardly kindergarten(:" stuff! *905$,:" PRINT CHR$(69) gives an E.,.:" The reverse process is useful too.K0:"";:1,9:" PRINT ASC(";(34);"E";(34);") ";:15,4:" gives 69.-2:" You could also write PRINT ASC(A$)./4:" This would give the ASCII code of the 6:" first character in A$. 8905-::" In this program we use ASC to check-<:" input. ASCII code may seem rather/>:" random, but there is some pattern.":@5100,8,5150/B:" It would be very tedious to check all,C:" the letters A-J in some other way!0D:" (The computer is brilliant at French!)E905:5120,,5120:/F:" It's also possible to check the small/H:" letters at the same time. AND doesn't/J:" mean quite the same to Einstein as it/L:" does to you, and line 5120 converts a/N:" small letter c code into the capital/P:" C code for example. Don't worry just/R:" why it works. That involves binary.0T:" Just remember AND 223 as a programming0V:" trick to be used. If you don't believe&X:" it....test it with RUN 5100! Z9507x:" We now come to ";:1,10:" INCH. ";:15,4:,z:" This is a way to input a character|:" without an ENTER.,~:" If you write Z$=INCH$ the computer,:" will flash its cursor until a key,:" is pressed. If you press K then Z$#:" will be ";(34);"K";(34) 905,:" This could be used in an adventure:5200,13,5290 905/:" This was only part of a possible one,*:" and you won't be able to run it.,:" (Unless you go North to disaster.)0:" (Or E or W for fun. ON ERR? OFF ERR?)",:" It isn't very exciting anyway! You/:" may well be able to write adventures,.:" but they take up a lot of room to be.:" any good. But the program showed the415,4:(83)~255s83,47::902:936:40: 1005q15232,67,76,83,58,82,85,78,49,48,48,48,141,128,128,128,128,128,128,67,76,83,58,71,79,84,79,50,51,53,56,141/6984,16,0,48,16,16,16,56:6978,80,104:+@4,23;"Press space bar to continue.";Z~:Z}32s910:?40:@2,10;"Press G go on, R return to last part,":G~(83)$:" I for index.Z~z223:Z~71sZ~73s6000Z~82sG~Gu1:83,G: 925640:@2,10;"Press G go on, I for Index. ":G~(83)Z~z223:Z~71sZ~73s6000 93783,(83)t1:+@4,23;"Press space bar to try this.";Z~:Z}32s955940::965:FS~1sFS~0:965 D~(262)t2:(D)900s1,899B$~(34)tA$t(34): 920:7Gu461010,1100,1200,1300,1400,1500,1600,1700,2300%:" Computers are funny beasts./:" They prefer to code things in sets of(:" numbers that go from 0 to 255./:" Most of the time they do the coding &/:" the user does not have to worry about/:" it. There is one relatively simple/:" code that they use called 'ASCII'. It/:" is pronounced 'ASKEY' (like Arthur.) 905%:" If you tell the computer to0:" ";:1,9:" PRINT CHR$(69) ";:15,4::" you will get an E./ :" Give it any other number between 32 &/ :" 255, you will probably get something,):" but be careful of numbers 0-31./:" Try CHR$(7) or CHR$(12) if you like,-/:" but beware of l and 18. Einstein will/:" slumber in his grave until you reset!:" RUN 5800 for a list. 950/L:" In a moment we will suggest some uses0N:" for CHR$. First, let us see how we canP:" manipulate strings.0R:" As we have seen you can add to strings0T:" by the use of semi-colons. We can alsoV:" use +.=WA$~"CAT":980:C$~ B$:A$~"DOG":980:D$~B$:A$~"GONE ":980"X:" LET A$=";D$;":LETB$=";C$Z:" LET C$=A$+";B$;"+B$(\:" Printing C$ gives DOGGONE CAT. ^905'`:" We can also slice up strings: aSRL~1&b5000,8,5040::1,2:5000:15,4d:" Look at this program.1e:" The results of running it are in black. f905<g:" ";:1,2:" LEFT$ ";:15,4:"starts from left. "<h:" ";:1,10:" RIGHT$ ";:15,4:"ends from right.">j:" ";:1,6:" MID$ ";:15,4:"slices from the middle.-l:" The last number gives the number of.n:" characters. The number in the middle.p:" of MID$ indicates how far to go intor:" the string to start.Bt:" ";:1,13:" Track-Info  * -:" advantages of INCH$,- and one snag.:" Did you notice? 905.:" The computer would not accept little#:" n instead of N for North..:" If we use Z=INCH instead of Z$=INCH$-:" the value of Z is the ASCII code of:" the letter pressed.,:" Better is to write Z=INCH AND 223.-:" Now we can write IF Z=78 etc. for a-:" trip North! See if you can rewrite-:" my program using this, still better(:" write part of a new adventure. 950/:" There is one further use of INCH that/:" should be mentioned. If you write Z$=/:" INCH$(3), then the program will wait*:" until 3 characters are typed in./:" This is useful for business programs,/:" where a lot of information may occur,,:" and long names clutter the screen. 905D" ";:11,1:" KBD and KBD$ ";:15,4:" are similar to INCH..:" However Z=KBD does not wait for some.:" character to be typed in. If no key.:" is pressed at the time, the program.:" will carry on regardless. Z will be.:" 0. If a string has been called by Z$&:" =KBD$ then Z$ will be empty./:" Clearly this is needed in an invaders/:" game where the nasties will still get/:" you, even if you refuse to press any/:" keys! The game will be programmed to:" try again for a key. 905/:" I generally use KBD rather than INCH./:" This is partly habit, some computers :" don't give a choice!/ :" It also avoids an ungainly cursor, at*:" a point where you don't want it./:" Look again at the subroutines that we :" have used in 900-1000./:" Several of them use KBD and you might.:" be able to understand how some work. 950;@:" A very useful word is ";:1,2:" ON. ";:15,4:B:" ON Z GOTO 300,400,500/D:" means that if Z=1 the program will go/F:" to line 300, if Z=2 to 400, and if Z=/H:" 3, it will start at 500. If Z has any/J:" other value 0 or 4 or more, the ON Z/L:" will be ignored. (If Z is minus, you#N:" do get an error message.) P905R9020,11,9120-T:" This is part of our SELECT program.-V:" First the menu (or options list) is.X:" given, and a selection is requested. Z905\9130,10,9200.^:" If the KBD return is less than 48, a.`:" number hasn't been chosen. ASCII for+b:" 0 is 48. Another key is required..d:" Then ON Z sends the program to thef:" line chosen.>g1,9::" ON Z GOSUB 100,200,300 also works. ";:15,4:.h:" Write a 'menu' program of your own! j950>:" ";:6,14:" RND ";:15,4:" is another vital word./:" Instead of asking the user for input,.:" the computer introduces the elements%:" of variety off its own bat!/:" LET X=RND(8) makes X into a number 0,/:" 1,2,3,4,5,6 or 7. Nobody knows which!/:" Random numbers do NOT follow patterns/:" but in the long run, all the numbers&:" are equally likely to occur. 9050:" RND(1) is a special case. This returns+:" a decimal number between 0 and 1.0:" Random numbers are used for games, but0:" they do have serious uses for business$:" or scientific simulations.0:" Serious applications need mathematical0:" knowledge, but RND is not difficult to+:" apply to games, as we shall show.0:" EINDICE is a very simple to play game,0:" which needs a little bit of judgement,:" but is mainly luck. 9053"";:1,2:" Here are the rules!";:15,4::5500,12,5545 9055550,,5575*:" Use a subroutine for new screen. :" Give choice of levels./:" L is set at 1,2 or 3 by lines 5570/5. 9055585,,5595.:" R and S are the scores on your first#:" two dice. T is the total./:" Line 5590 delays slightly between the:" two throws. 9055600,,5600-:" Rather a complicated line. D is the!:" computer's first throw./:" E is the second. If the level is 1 it/:" can be anything. On level 3 it must/:" be 3,4,5 or 6. Try making L=1,2,3 to:" see how it works. 9055602,,5602- :" Line 5602 puts the element of skill. :" into the game. You may be interested.:" in the fact that it was an idea, put,:" in after the program was finished!.:" This explains the numbering, but as.:" well as that illustrates that when a.:" program is complete and working, you&:" may still find improvements.905:5605,,5625*:" These lines give you a choice of":" having your third throw. 90505630,,5655.2:" Tidying up, totalling and offering a.4:" choice of continuing. All this is a 6:" fairly common routine. 7905.8:" You may like to test the game. I do.::" not know, but I suspect the player.<:" should win in the long run at level(>:" 1 and the computer at level 3. @9500:" If you have understood TUTORS 1, 2 & 3Track-Info  * 0PN~(PN):PN1{PN}16s601883,46tPN:G~46tPN:&(#:15,4::4:q1,32)::83,25532#" ";:1,9:" SELECT. ";:15,4:<#:" 0. INTROF#" 1. TUTOR1P#" 2. TUTOR2Z#" 3. TUTOR3d#" 4. COLGRn#" 5. MATHSx#" 6. SOUND#" 7. ARRAYS#" 8. PROGAIDS#" 9. GLOSSARY.#:" Press 0-9 to select and run program.#Z~:Z48s9130<#Zu479160,9170,9180,9190,9200,9210,9220,9230,9240,9250 #9130 #"INTRO"#"TUTOR1"#"TUTOR2"#"TUTOR3" #"COLGR" #"MATHS" $"SOUND"$"ARRAYS"$"PROGAIDS""$"OTHERS",$0TECT. ";:15,4:<#:" 0. INTROF#" 1. TUTOR1P#" 2. TUTOR2Z#" 3. TUTOR3d#" 4. COLGRn#" 5. MATHSx#" 6. SOUND#" 7. ARRAYS#" 8. PROGAIDS#" 9. GLOSSARY.#:" Press 0-9 to select and run program.#Z~:Z48s9130<#Zu479160,9170,9180,9190,9200,9210,9220,9230,9240,9250 #9130 #"INTRO"#"TUTOR1"#"TUTOR2"#"TUTOR3" #"RETURN"4::" These lines have word RETURN in text.":  5::" These contain it as a reserved word."::G390,,390:::1190,,1190:::" These two lines are examples.":\:" A: ",(16000):" BC:",(16001):" DE:",(16003):" HL:",(16005):" SP:",(16007)C:" REG stores registers in buffer 16000-8.":::490,,490:.:" USR n,a WILL LOAD REGISTER BC WITH n-:" THEN IT CALLS MACHINE CODE FROM THE-:" ADDRESS a. FINALLY THE BUFFER 16000':" TO 1&(#:15,4::4:q1,32)::83,25532#" ";:1,9:" SELECT. ";:15,4:<#:" 0. INTROF#" 1. TUTOR 1P#" 2. TUTOR 2Z#" 3. TUTOR 3d#" 4. COLGRn#" 5. MATHSx#" 6. SOUND#" 7. ARRAYS#" 8. PROGAIDS#" 9. GLOSSARY#:" E. End program".#:" Press 0-9 to select and run program.#$~"E"{$~"e"s"SOLOGO"#Z~:Z48s9125<#Zu479160,9170,9180,9190,9200,9210,9220,9230,9240,9250 #9130 #"INTRO"#"TUTOR1"#"TUTOR2"#"TUTOR3" #"COLGR" #"MATHS" $"SOUND"$"ARRAYS"$"PROGAIDS""$"GLOSSARY",$X00,1400,1450,1500,1600#" 2. TUTOR 2Z#" 3. TUTOR 3d#" 4. COLGRn#" 5. MATHSx#" 6. SOUND#" 7. ARRAYS#" 8. PROGAIDS#" 9. GLOSSARY#:" E. End program".#:" Press 0-9 to select and run program.#$~"E"{$~"e"s"SOLOGO"#Z~:Z48s9125<#Zu479160,9170,9180,9190,9200,9210,9220,9230,9240,9250 #9130 #"INTRO"#"TUTOR1"#"TUTOR2"#"TUTOR3" #0:" you will now know the fundamenals that( :" you need to program seriously.0 :" The other programs are more specialsed0 :" and it is up to you whether you study0 :" all of them, and which order you try0 :" them in. Some may not interest you at+ :" the present. That doesn't matter.94 :" ";:1,2:"That is the end of TUTOR 3.";:15,46 83,255:A$~"LAWNMOWER"B$~(A$,3)C$~(A$,5,3)D$~(A$,4) (A$),B$,C$,D$SRL~1sSRL~0::1::" Print a boy's name starting with A-J." ";B$A~(B$) z 223. A65 { A}74 s 5110:" ";B$;" est un fils.&P::" Do you want to go N,S,E,W? UZ$~$ZZ$~"N"s5250dZ$~"S"s5300i 5297>nZ$~"E"{Z$~"W"s" The dragon has eaten your boots.":5350v x5200,:" You have found the fairy princess./" You get married and lose all your gold." Score 0. Try again? Y/NZ$~$:Z$~"N"sZ$~"Y"s 100: 5280,$;" ERROR in dragon!":"|::" EINDICE."0:" To play Eindice you have two throws of':" a dice. So does the computer..:" The computer puts `3 into the kitty.":" You put `5 in the kitty./:" In return, you may have a third go if:" you wish.!:" Third go counts double!1:" If you score over 12 the computer wins.%" Otherwise biggest score wins.&:" Money back for equal scores! 905!:" Press 1 for easy level.#:" Press 2 for medium level.&:" Press 3 for Einstein level."Z~:Z49{Z}51s5570L~Zu48:E~0:Y~0:R~(6)t1:S~(6)t1:T~RtS:,R,:N~1r300::S:" You have scored";TD~(6)t1:E~(7uL)tL:F~DtE':" Einstein's first throw was";D:" Another throw? Y/NZ~z223:Z~78s5630Z}89s5610"U~(6)t1::" You scored";U#T~2wUtT::" Total score is";T.:" Computer scored";D;"and";E;"total";F5T}12{F}Ts:" Computer wins.":C~Ct5:Y~Yu5:56450T}Fs:" You win.":C~Cu3:Y~Yt3::" Draw.? Y}~0s:" You have won `";Y;::" Computer has won `";C;"overall.:" Another one? Y/N.Z~z223:Z~78s!Z~89s5585:5660:N~32r100:N;(N),::p:" INDEX.q:" 1. CHR$.-r:" 2. Strings + MID$ LEFT$ RIGHT$ LEN.s:" 3. CHR$(34).t:" 4. ASC.u:" 5. INCH.v:" 6. INCH$(N) and KBD.w:" 7. ONx:" 8. RND and Eindice.y:" 9. Well done!&:" 10. INDEX TO OTHER PROGRAMS.+:" Type in 1-10 and press ENTER.";PNPN~10s900Track-Info  * }1sA$~D$::6X~LrHp(HuL)x240JY~((A$)uLX) x(HXuLX)w180TXP~(XuL)x(HuL)w240t10 ^XP,Yhir@3,(192uXB)x8u1;(L);|@37,(192uXB)x8u1;(H);@(YBx8t1),0;(A(HX));@(YBx8t1),22;(A(LX)); "END" L%~(E$) N~1 L%,E$ U~((E$,N,1)) V~((E$,Nt1,1)) U,V' U~41{(U}47zU58){U~88sMH~2:3100% U}47zU58zV}64zV91s3200:3100 U V~40{V~88s3200 N~Nt1:NL% s3020& , E$~(E$,N)t"*"t(E$,L%uN):L%~L%t1:E$:dFLAG~0s199f9000:FL~0:?h10:15,4:40:1,2:@5,8;" Press I for introduction. ";4j1,6:@5,11;" Press M for main menu. ";:15,44l@0,15;" It is sensible to press I, if you have)n:" not used these programs before.pZ~z223:Z~77s"SELECT"rZ~73s200:112 90004::q1,32): :9030:" We hope that you will find programming':" the Einstein in Basic is fun.0:" You don't have to be a genius in order0:" to make your computer do clever tricks0:" and Basic is not only an easy language0:" to learn, but on a machine such as the(:" Einstein, it is very powerful.0:" We shall start very gently, but as you0:" get more confident, you will learn the0:" tricks of the trade, even some that an.:" experienced programmer may not know. 9051:" These programs are designed to give you/" practice all the time you are learning.0:" I doubt whether this would be feasible$:" with many other computers.0:" You will be given some new idea. Then.:" we shall suggest what you should do.):" It may be to try something out..:" It may be to run one of my programs.A:" ";:1,2:" Or you may have to write your own! ":15,4 9050:" All the tutorial programs are arranged.:" so that this is as easy as possible.0:" It may be wise to have Pencil & Paper&:" handy, so why not start now?0:" On the next screen, there will be just0:" three vital points to run all of these:" programs. 905E" ";:1,10:" PROGRAM LINES 1-800 ";:15,4:"are for your own/:" use. You may not understand this yet,/:" but you soon will! You can write what/ :" you want in them, without affecting/ :" the tutorial program you are running.C:" ";:1,2:" FUNCTION KEY F0 ";:15,4:" is used whenever/:" you have been doodling and want to go:" back to the tutorial.C:" ";:1,9:" FUNCTION KEY F7 ";:15,4:" is used ':13:15,6 '32:4;'N~1r1000::0,50r256,50:0,120r256,120:100,119,14'55000:55117 '255'N~9:56000 '55017$'N~13:56000.'$B'130,"1E 22 40 40 42 26 1A 02"L'1$`'131,"3C 42 20 10 08 04 42 3C"e'0,60,136,2,131j'@10,8;"PRITE MAKER."t'1,112,112,9,130*~'@2,11;"Written by eoffrey Childs.'2,112,88,10,131'3,168,88,10,131*'@2,14;"Produced by olo oftware..'@2,18;"Do you want instructions? Y/N ";)'Z~z223:Z~89s30000: Z}78s10150':4:15 ':32 NC~130$*N129,"FF FF FF FF FF FF FF FF" 4NA$(30)29N40:@1,8;"Charcter 130 is your first sprite.!:N:" PRESS N TO CHANGE THIS.';N:" Press any other key to go on.'N32)HN:" Enter S for small, L for large.$RNZ~0:Z~z223:Z~83{Z~76s:20050\NR~8:Z~76sR~16#fNR~16zCx4}(Cx4)sC~Ct1:20070kN@2,3;"CHARACTER";C;lNR~16sCt1;Ct2;Ct3pN@4,4;("*",R)zN@4,Rt5;("*",R) NN~5r4tRN@3,N;"*":@4tR,N;"*": NN~5r4tR NP~4r3tRN@P,N;:Z~NZ32s20640:20180NZ}32s(129)NZ~32s" "N:,N@1,1;" PRESS R FOR REDO, G FOR GO ON."NN~8448r8703:N,33: N(5)NN~8448r8703:N,244:&NZ~z223:Z~82s20120:Z}71s20200(N1,10:@7,2;"Calculating!";:15,4NV~15360:W~5:J~0 ON~WrWt7OG~128:T~0 OP~4r3tR$OS~Vt32wNtP).OS~129sT~TtG 8OG~Gx2BO LOT$~(T)VOT$~(T$,2)`OA$(Cu129)~A$(Cu129)tT$t" "jO tOJ~Jt1~OC,A$(Cu129)OC~Ct1:R~8s20400OJ~1sV~15616:20230OJ~2sV~15368:20230OJ~3sV~15624:20230 O20540O1OC157s:" Another one? Y/N":Z~z223:20450OZ~78s20450OZ~89s20030:20410@O:" Shall we save sprites? Y/N.":Z~:Z~78s:Z}89s20450O:" Name your file!" O" ";N$ P20580 P N$,FD$ P#FD$PN~1r30:A$(N): (PFD$2P'qo([@(;(`,(*͈:f  ͷ*~:6:.gz&͹*:~, :22:2W:6/0: G͒+ͪz&Jj8#![[:.<(͹v z&`iͷ& S[Sa,LS[,MSa[[*a"[`* ëJ͟ [[?8[a?(`i͗DM*ABSAS[Q[[?C[a?(`iw#w*+"]*N#Fx(9#^#V+++415,4:(83)~255s83,47::902:936:40: 1005q15232,67,76,83,58,82,85,78,49,48,48,48,141,128,128,128,128,128,128,67,76,83,58,71,79,84,79,50,51,53,56,141/6984,16,0,48,16,16,16,56:6978,80,104:+@4,23;"Press space bar to continue.";Z~:Z}32s910 40:?40:@2,10;"Press G go on, R return to last part,":G~(83)$:" I for index.Z~z223:Z~71sZ~73s6000Z~82sG~Gu1:83,G: 925640:@2,10;"Press G go on, I for Index. ":G~(83)Z~z223:Z~71sZ~73s6000 93783,(83)t1:+@4,23;"Press space bar to try this.";Z~:Z}32s955940::965:FS~1sFS~0:965 D~(262)t2:(D)900s1,899B$~(34)tA$t(34):4:15,4:15,4:920:<Gu461010,1100,1200,1300,1400,1500,1600,1700,1800,1900.:" The order of operations in Maths canP:" be remebered by the word BODMA SL:" The computer order is BEDA whenever&:" you wish to end the program.1:" Using SHIFT BREAK could be used instead" but F7 is better. 9050,:" Tutor 1, 2 and 3 form the foundations.,.:" These should be mastered first....00:" Well, no, that's being too optimistic!02:" But you should try to know some of the4:" ideas involved..6:" Programs 4 to 9 deal with specialist8:" topics. :905-<:" COLGR is about colour and graphics.0>:" SOUND introduces various ..er, noises!/@:" ARRAYS is the introduction to storageB:" of DATA and FILES.1D:" MATHS is for blokes like Einstein & me.)F" PROGAIDS is for programming aids.(H:" GLOSSARY lists all XBAS words. J905/L:" This suite of programs is written for"N:" anyone between 7 and 90.NO:" Apologies to over 90's but one program ":" is a little rude to you!.P:" If some of the humour doesn't appeal-R:" to the grandpas, please forgive me./T:" I may have used too complicated ideas(V:" in places for some youngsters./X:" But I hope you feel that on the whole$Z:" a balance has been struck. \9050h:" This program is intended for newcomers-j:" to Basic, or newcomers to Einstein.0l:" I hear that Geoff Ridley is writing a.n:" book for experienced Einstein users./p:" I was impressed by his book about ther:" Sharp 700 series.Gt:" His";:1,2:" PEEKING and POKING on the EINSTEIN ";:15,4:-v" should cover the regions that are too$x:" advanced for this program. z905/:" When you use programs in future it is7:" easiest to type in RUN ";(34);"SELECT";(34)F:" ";:1,13:" Press E to end, S select a program. ";:15,4:Z~ z 223: Z~69s"SOLOGO"  Z} 83 s 406: "SELECT"*15,4:(83)~255s83,47::902:1010q15232,67,76,83,58,82,85,78,49,48,48,48,141,128,128,128,128,128,128,67,76,83,58,71,79,84,79,50,51,53,56,141&6978,96,104:6984,16,0,48,16:+@4,23;"Press space bar to continue.";Z~:Z}32s910:=:@2,10;"Press G go on, R return to last part,":G~(83)$:" I for index.Z~z223:Z~71sZ~73s6000Z~82sG~Gu1:83,G: 92583,(83)t1:+@4,23;"Press space bar to try this.";Z~:Z}32s955940::965:FS~1sFS~0:965 D~(262)t2:(D)900s1,899B$~(34)tA$t(34):%(#6:1,2:32:@10,2;"T H I N K"-#@11,5;"L I K E"/#@21,22;"G.T.Childs.";0#@25,23;"1984"; 2#9500*3#@1,2Track-Info  *  MS:" Brackets first.0:" Powers (exponentials given by ^) next./:" Divide and multiply in the order that:" they come./:" Finally add and subtract in the order:" that they come. 905" Consider:" 8+(60-(2+3)*4)/2^3 :" Inside bracket first: " 8+(60-5*4)/2^3:" Other bracket:'" Multiplication before subtract:" 8+(60-20)/2^3:" Finish off:" 8+40/2^3:" Powers:" 8+40/8:" Divide: " 8+5 :" Add:"" Answer is 13. $950-L:" Providing your Maths is up to it, a-N:" program of sorts to solve quadratic%P:" equations is easy to write.ER:" If you write ";:1,2:" SQR(X) ";:15,4:" you will getT:" the square root of X..V:" You must enclose the ARGUMENT of theX:" FUNCTION in brackets./Z:" SQR is a function, X is the argument..\:" If you can, try one for yourself and)^:" then look at mine at line 5000. `9505000,10,5005.:" This is a minor diversion. Line 5002(:" creates a shape for 'squared'..:" This technique is too advanced for a,:" beginners' program as it uses hex..:" Still you've braved the mathematics,!:" so you may be up to it!.:"!If you do wish to experiment use the$:" CHR$s between 128 and 159. 9055010,,5020&:" Note the check on line 5011..:" If A was 0 we should have trouble at.:" a later stage, when we try to divide:" by A. 9055025,,5045/:" Note the check in line 5030 for a SQR/:" of a negative number, also that 5041/:" tidies up in the case of equal roots./:" 5035 defines a function, which we'll/:" be looking into shortly. It is just+:" a method of rounding to 3 places. 9055040,,5040:5045,,5045-:" When you wrote your program (if you-:" did), it is likely that you ended":" with 2*A instead of 2/A.*:" Think why my version is correct./:" You could have written (2*A) instead..:" You could crash my program with very.:" large numbers, but see for yourself.:" if you can crash it, if respectable:" numbers are input. 950.:" A function operates on a number, or.:" variable to give a number or string(:" the result of that operation./:" We have seen LEN: number from string,$:" LEFT$: string from string,":" SQR: number from number.. :" These are all examples of functions. "905C$1,2::" ABS(X) ";:15,4:" returns the postive value of x.C&1,9::" INT(X) ";:15,4:" returns an integer nearest to X/(" that is under X. (Integer means a whole*" number.;,1,10::" SGN(X) ";:15,4:" returns the sign of X.(.:" 1 for +, 0 for zero, -1 for -.0:" IF X=2.4, Y=0, Z=-3.1(2" ABS(X)=2.4, ABS(Y)=0, ABS(Z)=3.1.4" INT(X)=2, INT(Y)=0, INT(Z)=-4 NOT -3'6" SGN(X)=1, SGN(0)=0, SGN(Z)=-1 8905@:1,13::" SQR(X) ";:15,4:" gives the square root of X.B<1,11::" LOG(x) ";:15,4:" gives the log of X. (base 10)C>1,9::" LN(X) ";:15,4:" gives natural log of X. (base E)@" E = 2.71828.>B1,6::" EXP(X) ";:15,4:" gives E to the power of X.0D:" (If 10 ^ 0.3010=2 then LOG(2)=0.3010.))F:" RUN 5100 will give LOG of 1-20. H950$x141,"00 00 7C 28 28 28 44 00"2z:" You will probably have heard of ";(141)/|:" The area of a circle is 2";(141);"r./~:" When we use trigonometrical functions/:" on a computer we work with radians, & :" not the usual degrees.6:" 180 degrees is equal to ";(141);" radians."/:" But dear old Einstein is sympathetic!@1,11::" DEG(X) ";:15,4:" changes radians to degrees.?1,2::" RAD(X) ";:15,4:" changes degrees to radians. 905):" Apart from this little problem,"1,2::" SIN(X) ";:15,4:"1,7::" COS(X) ";:15,4:"1,9::" TAN(X) ";:15,4:&:" are straight forward to use.D1,11::" ATN(X) ";:15,4:" gives the angle whose TAN is X.<:" It returns between -";(141);"/2 and ";(141);"/2.+:" DEG will convert this to degrees.0:" The program at line 5200 shows the use/:" of SIN and COS. Best to CLS 40 after. 95040B15,12::" DEF FN ";:15,4:" is very useful, particularly#:" in mathematical programs.A:" DEF FNA(X) = 3*X+4 ";:1,9:" in a program,":15,4:,:" allows you to use FNA(V) later on. 9055300,10,5320-:" This program demonstrates its use.-:" The CLEAR in line 5300 cancels all-:" the variables, since computers are-:" sometimes not happy if the same FN):" is defined twice in a program.*:" See for yourself how it works. 9500@:" DEF FNI(X)=INT(X*100+.5)/100 is a very&B:" useful one in many programs.+D:" It rounds up to 2 decimal places.0F:" We need the .5 for correctness, in all.H:" cases. E.G .967 becomes .97 not .96.0J:" Functions that are not on Track-Info  * ubroutine checks the function-&:" for syntax errors. Quantity errors-(:" may exist at only part of the range(*:" so that y=sqr(x) can be drawn. ,905.5626,10,5632/0:" The second error trap allows Einstein)2:" to miss out unplottable points..4:" Without this E.G. y=5/x would crash.6:" Try it for yourself. 8950l:" A few loose ends:/n:" PRINT 25 MOD(7) gives 4 since this is.p:" the remainder if 25 is divided by 7.-r:" Given that N = 6.712 you can write:,t:" N%=N:PRINT N% to get an integer 6./v:" PRINT INT(N) seems as easy! Contrary/x:" to expectations integer variables are/y:" actually slightly slower on Einstein.6z:" PRINT PI will give you the value of ";(141) {905%|:" For more advanced students:.~:" If Y$ has been entered as a function.:" of X, then you get the differential,:" coefficient (or gradient) at X by:(:" U=EVAL(Y$):X=X+.001:W=EVAL(Y$):" G=(W-U)/.001+:" G is a reasonable estimate of it.84 :" ";:1,2:"That is the end of MATHS. ";:15,46 83,255:1::" This program will solve quadratics of$140,"38 44 18 20 7C 00 00 00",:" the type Ax";(140);" + Bx + C = 0:" Enter A";:" ";A'A~0s:" Not a quadratic.":5010:" Enter B";:" ";B:" Enter C";:" ";CH~BwBu4wAwC$H0s:" NO SOLUTION.":(5): I(X)~(Xw1000t.5)x1000!:" X = ";I((uBt(H))x2xA) H~0s:" or#:" X = ";I((uBu(H))x2xA)::N~1r20:N,(N),::WP32:10,4:100,140r150,140r150,180r100,140:140,140r140,150r150,150:147,146,6#R@20,1;"A";@11,5;"B";@20,5;"C"(T@0,8;" Enter length of AB";:" ";CV C~0 s 5204,X:" Enter angle B in degrees.";:" ";B.Z B}~90{ B~0 s "Impossible":(2):5208\:" BC = ";Cw(B))^:" AC = ";Cw(B)) `15,4:: A(X)~3wXt4:" FNA(87)= ";A(87)*:" Table of FNA(N) from 1-20:"::"N~1r20:N,A(N),::132:10,4:100,140r150,140r130,180r100,140#@17,1;"A";@11,5;"B";@20,5;"C"(@0,8;" Enter length of BC";:" ";AA~0s (2):5404%:" Enter length of AC";:" ";BB~0s (2):5406% :" Enter length of AB";:" ";C!B~0s (2):5408" C(X)~((1uXwX)xX))$ I(X)~(Xw100t.5)x100 &K~(BwBtCwCuAwA)x2xBxC:5450(:" Angle A = ";I(J) *K~(AwAtCwCuBwB)x2xAxC:5450,:" Angle B = ";I(J) .K~(AwAtBwBuCwC)x2xAxB:54500:" Angle C = ";I(J)2`I It is safer to use Pthe computer0L:" can be user-defined. COSH(X) does not0N:" mean anything to the computer, but you%P:" could define it by writing:+Q:" DEF FN COSH(X)=(EXP(X)+EXP(-X))/2 R905.T:" Some people write a function library.V:" as a subroutine which is called from!X:" the start of a program..Z:" Two that are useful are the inverses\:" of SIN and COS6^1,2::" DEFFNS(X)=ATN(X/SQR(1-X*X))";:15,4:6b1,7::" DEFFNC(X)=ATN(SQR(1-X*X)/X)";:15,4:.d:" Care will be needed, and the program.f:" at line 5400 shows the 'cosine rule'h:" used in reverse. j950>1,9::" VAL(A$) ";:15,4:" gives the numerical value":" of A$ if A$ is a number./:" If A$ has a number before any letters&:" VAL will return this number.8:" A$=";(34);"20, HIGH ST.";(34);", VAL(A$)=20":" Otherwise VAL returns 0.>1,13::" STR$(X) ";:15,4:"is the reverse process. "*:" It turns a number into a string..:" It is useful for tidy printing. E.G.::" S$=STR$(B):IF B>0 THEN S$=";(34);"+";(34);"+S$ 905J1,2::4,14::" EVAL(A$) ";:1,2:" is not available on many0:" computers. It is much more useful than0:" VAL, as it evaluates a string as if it$:" a mathematical expression..:" Einstein has chosen new colours to":" celebrate! 905815,4:::" Without EVAL it would be very hard to-:" program to solve a simple equation.5510,10,55125516,,55185524,,55240:" This is sufficient to solve for X if a/:" simple equation is correctly entered. 905/:" What you saw was part of a program at/:" line 5500. The full program has more/:" error traps. ON ERR is used, and you-:" should be able to see how it works.-:" It is almost impossible to write a-:" program to solve equations of this-:" sort without EVAL. Try if you like':" but the challenge is unfair! 950-:" Mathemical computing often involves. :" graphs. EVAL is once again the clue.- :" I am going to give you a program at-:" line 5600 that is not as complex as-:" as some I have written, but it will-:" show the error trapping techniques.-:" You can try to improve it, the user-:" could input the range of x, you may-:" allow two or more graphs. It might-:" be better to let the computer elect :" the best y-axis scale. 905 5650,10,5662-$:" This sTrack-Info  * OP if you don't want to return from a subroutine."J(K)}1s:" IMPOSSIBLE!"::OK~0sJ~90:J~C(K)QJ0sJ~Jt180T/|::" Program to solve simple equations.%~:" Enter each side seperately.!:" Do not put equal signs./:" Use computer language, e.g 2*X not 2X#:" Use X as the only letter.(:" Enter left hand side";:" ";A$):" Enter right hand side";:" ";B$ 5550X~0:H~(A$)u(B$)X~1:G~(A$)u(B$)X~7:J~(A$)u(B$)(6wHu7wGtJ)}.00001s5540!:" Solution: X = ";Hx(HuG):" Another one? Y/N"Z~z223:Z~78sZ~89s:5502 5534/:" This is not a simple equation.":5530'::" Incorrectly entered.":5502'::" Incorrectly entered.":5502340::" Enter function of X in computer form." ";Y$:5650,:" The computer will draw a graph of::" Y = ";Y$:" form X=-4 to X=40:" When you have seen enough of it, press:" space bar to end. 90515,1:15,1:32 128,96 u127,0r127,0:0,u95r0,954@0,13;"-4";@29,13;"4";@17,2;"10";@17,22;"-10";ST~1x30:10,1X~u4r4pST 5632Y~(Y$)w8:V~Xw30 V,Y 91015,4:15,4:: 56603X~1.713:V~(Y$):X~u2.197:W~(Y$):V~0zW~0s5662 :Q$~"Qty"s:" It may not exist in the range. But we'll try!":56546::" Please re-enter. This won't work."::5602op:" INDEX.*q:" 1. Bedmas (order of operations.)r:" 2. Quadratic program.s:" 3. Error trapping.t:" 4. Functions.'u:" 5. Trigonometrical functions.v:" 6. DEF FN.+w:" 7. Useful user defined functions. x:" 8. VAL, STR$ and EVAL.&y:" 9. Graphs. 10. Loose ends.&}:" Press 11 for other programs.+:" Type in 1-11 and press ENTER.";PNPN~11s7000PN~(PN):PN1{PN}11s601883,46tPN:G~46tPN:X:"SELECT"0` B%|/H1o 9.f+Z~:Z49{Z}57s11110p+Z~56s12000u+Z~57s20000z+Z~49s"LMT0"+Z~50s"TON0"+Z~51s"EQN0"+Z~52s"FRA0"+Z~53s"DEC0"+Z~54s"CIRCLE0"+Z~55s"CP0".4:15,2.0.:" These programs have been developed for..:" the Einstein from the author's book: .10,1Z/:" Maths + Computers = Fun. G.T.Childs. Sigma Press " /15,2./" Where needed instructions are given in0/:" the programs, and these notes will be0&/:" a gide to the aims. The programs are00/:" designed for the age range 9-14, but0:/:" some deal with more advanced topicsD/:" than others.*N/@3,22;"Press M for menu, C continue.$X/Z~z223:Z~0s12120:Z~77s11000b/.l/:" The first two programs are intended.v/:" to be an entertaining way to acquire./:" familiarity with the tables. They./:" can show adults may not always be so&/:" good as they think they are!2/::" Program 3 is an unusual facili415,4:(83)~255s83,47::902:936:40: 1005q15232,67,76,83,58,82,85,78,49,48,48,48,141,128,128,128,128,128,128,67,76,83,58,71,79,84,79,50,51,53,56,141/6984,16,0,48,16,16,16,56:6978,80,104:+@4,23;"Press space bar to continue.";Z~:Z}32s910:?40:@2,10;"Press G go on, R return to last part,":G~(83)$:" I for index.Z~z223:Z~71sZ~73s6000Z~82sG~Gu1:83,G: 925640:@2,10;"Press G go on, I for Index. ":G~(83)Z~z223:Z~71sZ~73s6000 93783,(83)t1:+@4,23;"Press space bar to try this.";Z~:Z}32s955940::965:FS~1sFS~0:965 D~(262)t2:(D)900s1,899B$~(34)tA$t(34):4:15,4:15,4:920:(Gu461010,1100,1200,1300,1400,15000:" In this section we shall be discussing:" the storage of DATA.0:" This will be done through using arrays+:" which some people find difficult.0:" There will be two example programs for0:" you to study. The second of these will.:" also give an introduction to filing. 905/:" The program at 5000 will test whether/:" the user can match the country to the/:" given town. I make no claim that this(:" program would have real value./ :" However it may give you ideas so that/ :" you can write similar useful programs(:" on topics that you understand. 9055011,8,5011:5016,,5016D:" The word ";:1,2:" DATA ";:15,4:" sends this message:0:" Ignore this line until you are told to+ :" ";:1,9:" READ ";:15,4:" it.0":" Line 5016 tells the computer to read0$:" the next ten data statements, and call,&:" them C$(1),C$(2).....up to C$(10). (905*5011,,5011:5016,,5016/,:" Each seperate piece of DATA may be on/.:" a line starting with a DATA statementF0:" or it may be seperated by a ";:1,10:" COMMA. ";:15,4:/2:" The strings C$(1),C$(2) etc. are said44:" to form Track-Info  * 1,10:" ARRAY A ";:15,4:" is for a numerical code./:" This code gives the first two letters/:" of the name in capitals for use later:" in the program. 9050:" Before doing anything else I wrote the#:" subroutines I would need.0:" They were written between lines 5700 &0:" 5800. Try listing them and see if you0:" can guess what they do, before I tell:" you! 9500:" The routine at 5700 processes a single0:" entry. It checks for suitable length,0:" and calls the subroutine at 5770. This1:" codes N$ into the relevant value for A.):" 5720 prints out a single entry.&:" 5730 saves the file on disc.- :" 5750 loads back the file from disc./":" 5779 is an error trapping routine. No/$:" file errors may occur where the wrong&:" disc is in the drive! (905*5730,10,57340,:" 5730 defines the file name. TELE could0.:" be replaced by anything, but .DAT must00:" be there to indicate a DATA file, and2:" not an XBAS program.04:" FD$ is the file descriptor. In simple06:" cases like this it is empty, but the$8:" filing syntax requires it.0::" Line 5734 then tells the computer that0<:" output now goes to disc, until it is>:" instructed otherwise. @905B5736,,5744.D:" NE is the total number of entries so.F:" far. N is the current number of any H:" entry being processed.BJ:" ";:1,2:" CLOSE ";:15,4:" returns outp,1)~"."sP~(N$):N$~(N$,Nu1):N~PPPN$~N$t".DAT"PPZ~13sN~4tR:P~3tR2PZ~25s@Pu1,N;(32):P~Pu2 :P3sP~3:@P,N;"*"#PZ~10sN~Nt1:P~Pu1:N}4tRsN~4tRPZ~11sN~Nu1:P~Pu1:N4sN~4PZ~4sP~Pt1:P}3tRsP~3tRPZ~8sP~Pu2:P3sP~3PP PA$(30)PQ"Name of sprite file?";N$ QN$,FD$ Q#FD$"QN~1r30:A$(N): ,QFD$6Q0u:7,6:2:.Du:" You can use this program to make.Nu:" your own sprites without having to%Xu:" understand hex. notation!.bu:" Sprites are created by designing.lu:" new characters in an 8 by 8 square.vu:" just like the shape W for instance.u:" which has already been designed in.u:" memory and can be called by asking+u:" the computer to PRINT CHR$(89)..u:" Any character you invent will be)u:" numbered between 130 and 159. u40000.y:" First you will have a chance to."y:" change the number of the character.,y:" you generate. If you do not chaan ";:1,12:" ARRAY. ";:15,4:/6:" They will be called at random to give/8:" satisfaction comments after a correct/::" answer. (It is usually more fun to-<:" give insults after a wrong answer!) >905?5012,,5016/@:" When you are going to use an array it/A:" it usually necessary to warn Einstein,B:" to reserve space in memory for it.EC:" The ";:1,7:" DIM ";:15,4:" statement in line/D:" 5012 does this, setting up 3 arrays,-E:" of size 20, 20 and 10 respectively..F:" Test out the program by RUN 5000 and.G:" note how the C$ array works when youH:" get a correct answer. I950L5000,8,5002GN:" ";:1,2:" RESTORE 5000 ";:15,4:" sets the DATA pointer.0P:" On many computers you can only RESTORE&R:" to the start of the program.0T:" Einstein allows DATA to be read from a0V:" specified line. The first DATA it willX:" find is in line 5002."Y905:5002,9,5011:5014,,5014'Z:" Note the pairing of the DATA.0\:" Edinburgh will have the same number in)^:" array A$ as Scotland has in B$. _905`5018,15,5033/b:" Straightforward except for 5026-5029. d905f5026,,50291h:" This routine checks the first 4 letters/j" of every country entered with the right/l" answer. Small or capitals are accepted. m9051n:" There are two obvious criticisms of thep" checking:1r:" Innsbruck could be entered in Australia/t" and it would be correct! Vladivostock#v" in U.S.S.R. would be wrong.0x:" Perhaps you'd be able to improve this! z950/:" The second program allows you to have(:" a personal telphone directory./:" While it uses the same tecniques that/:" were used in the previous program, it.:" also uses elementary filing methods./:" This program is longer than the other/:" demonstrations we have used, so that/:" it can be used to show how menu types&:" of program can be developed. 9055200,10,52091:" This really explains itself except that/" there are two entry points. Line 5200/" is used initialy to clear variables and," DIM arrays. Later 5201 is the entry. 9050:" The arrays are all dimensioned to 200./:" Change lines 5200,5300,5308 for more.9:" ";:1,2:" ARRAY N$ ";:15,4:" is for names.=:" ";:1,7:" ARRAY E$ ";:15,4:" is for exchanges.;:" ";:1,9:" ARRAY T$ ";:15,4:" is for numbers.E:" ";:Track-Info  * nge.6y:" the number the program will number*@y:" your sprites upwards from 130./Jy:" You will then be asked to choose/Ty:" small or large. Small characters are/^y:" on an 8 by 8 grid, large ones on a/hy:" 16 by 16 one. These take 4 numbers/ry:" for their charcters, starting with a.|y:" multiple of 4, e.g 132,133,134,135. y400000 {:" You will then design your character0{:" on the given grid. The cursor is set* {:" over the current point to plot.&*{:" USE SPACE BAR FOR EMPTY.*4{:" USE ANY LETTER KEY FOR FULL.3>{:" You may also use the cursor control";3H{:" keys to move the cursor, the delete is";3R{:" used (guess what!) to delete. ENTER";3\{:" is used to escape from the grid before";-f{:" the cursor has recahed the bottom. p{40000-耢:" The rest of the program should be-:" self-explanatory. You should save-:" your sprites for use again. There-:" is no reason why yut to normal..L:" Note that ; or , should not be used)N:" as seperators in file printing. P905Q5750,,5764.R:" Almost the same routine! FL in line.T:" 5750 is a flag set when the computer.V:" has loaded the file. OPEN replaces)X:" CREATE. INPUT replaces PRINT. Z905\5779,,57851^:" This is the error trap. 5779 resets it.%`" ERR$ gives the type of error.#b:" ERL gives the error line.-d:" Studying these routines is advised. f950x5209,10,52161z:" Here is the end of the menu part of the/|" program. The options are surprisingly/~" easy to write because the work has been'" done in the subroutine writing. 9055300,,5314%:" This creates the directory.1:" L is 0, but when this routine is called/" again in the 'add to' option, L is set/" to NE. It is bad practice to jump out/" of a loop. Note how 5308 avoids this. 9055400,,5402$:" 5400: Have we loaded file?/:" 5402 sorts the two letters entered to%:" the code stored in array A. 9055405,,5416/:" J is used as a flag to signal whether.:" an entry is found. The rest is easy. 9055500,,5506/:" The amendment routine needs another(:" subroutine of its own at 5550./:" This and other subroutines are called%:" from the main program here./:" Line 5504 pauses after every 10 entry,:" listing. INT is used for the test. 9055550,10,55661:" Note in 5558 that we enter a subroutine/" after the usual start point. Nothing is+" wrong in this. The rest is routine. 9055600,,56021:" Not very lengthy! Despite what they say." a GOTO may be just as neat as a GOSUB!-:" Now run the program if you wish.#:" (RUN 5200) 950-:" I am not claiming that this program-:" uses hi-tech filing methods, but it-:" may be of use. If you wish to do so-:" copy it. You can have the copyright":" for a few thousand quid!-:" First change the disc in the drive.::" Type in: ";:1,9:" HOLD 5200,5800 ";:15,4:G:" Then: ";:1,7:" SAVE";(34);"TELEPROG";(34);" ";:15,4:0:" Finally: ";:1,10:" MGE ";:15,4:94 :" ";:1,2:"That is the end of ARRAYS. ";:15,46 83,255: 5000O Arnhem,Netherlands,Bern,Switzerland,Cherbourg,France,Dunedin,New Zealand] Edinburgh,Scotland,Frankfurt,Germany,Galway,Ireland,Helsinki,Finland,Innsbruck,AustriaE Kabul,Afghanistan,Llangollen,Wales,Malaga,Spain,Nagasaki,JapanT Oberammergau,Germany,Poona,India,Rangoon,Burma,Teheran,Iran,Ullapool,Scotland' Vladivostok,Russia,Wigan,Englandl Good,Smashing,Well done,Splendid,Fab,You must be cheating!,Lovely shot,OK,Wonderful,Give us a chance!A$(20),B$(20),C$(10)N~1r20:A$(N),B$(N):N~1r10:C$(N):T~0 N~1r10R~(20)t1A$(R)~""s5022.:@2,10;"Which country is ";A$(R);" in?" " ";K$(K$)4sK$~K$t" "?U~0:M~1r4:(((B$(R),M,1))z223)~(((K$,M,1))z223)sU~Ut1FU~4s:" ";C$((10)t1):T~Tt1::" No, it is in ";B$(R);"."M~1r3000::A$(R)~""):@2,10;"You scored";T;"out of 10."(P::N$(200),E$(200),T$(200),A(200)Q:" MENU.(R:" 1. Create telephone directory.T:" 2. Find a number.V:" 3. Alter directory.X:" 4. Add to directoryY:" 5. End. Z5779[:" PRESS 1, 2, 3, 4 or 5\Z~:Z49{Z}53s5212^Zu485300,5400,5500,5600`N~Lt1r200 5700":" Press A another, S save.Z~z223:Z}65zZ}83s5306 Z~83s NE~N:N~200 5730 :5201FL~0s5750C::" Enter first two letters of name ";:Z$~$(2)0Y~((Z$,1))z223:X~((Z$,1))z223:Y~Yw256tX J~0: N~1rNEY~A(N)s5720:J~1 )"J~0s" No names beginning with ";Z$"$:" Press A another, M menu.&Z~z223:Z~65 s 5400(Z~77s5201:5414|FL~0s5750~:N~1rNE:5720 Track-Info  * advanced programming.+^:" The manual gives full details.":2_:" This needs knowledge of hex & binary.":nd ABS,ADC,AND,APPEND,ASC,ATN,AUTO,BCOL,BEEP,BIN$,BTN,CALL,CHAIN,CHR$,CLEAR,CLOSE,CLS,CONT,COS,CREATE,DATAwi DEEK,DEF,DEG,DEL,DIM,DIR,DOKE,DOS,DRAW,DRIVE,ELLIPSE,ELSE,END,EOF,ERA,ERL,ERR,ERR$,EVAL,EXP,FILL,FMT,FN,FOR,GCOLUn GOSUB,GOTO,HEX$,HOLD,IF,INCH,INCH$,INP,INPUT,INPUT#,INT,IOM,KBD,KBD$,KEY,LEFT$[sLEN,LET,LIST,LISTP,LN,LOAD,LOCK,LOG,MAG,MGE,MID$,MOD,MOS,MUL$,MUSIC,NEW,NEXT,NOT,NULL^x OFF,ON,OPEN,OR,ORIGIN,OUT,PEEK,PI,PLOT,POINT,POKE,POLY,POP,POS,PRINT,PRINT#,PSG,PSW,PTRv} RAD,READ,REM,REN,RENUM,RESTORE,RETURN,RIGHT$,RND,RST,RUN,SAVE,SCRN$,SEP,SGN,SHAPE,SIN,SIZE,SPC,SPEED,SPRITE,SQRW STEP,STOP,STR$,SWAP,TAB,TAN,TCOL,TEMPO,THEN,TI$,TO,UNLOCK,UNPLOT,VAL,VDEEK,VDOKE3 VERIFY,VOICE,VPEEK,VPOKE,WAIT,WIDTH,XOR,ZONEA$(146):N~1r146:A$(N):3@1,20;"Enter number required.":" ";X'XP{X}Qs" Try again.":(5):200 Y~XuPt1 :" ";X;A$(X):+,@4,23;"Press space bar to continue.";.Z~:Z~32s:302Q1,2:::" RESERVED WORDS ++++++++ +++++#:" 1. Beginning with A to C.#:" 2. Beginning with D or E.#:" 3. Beginning with F to K.":" 4. Beginning with L to N#:" 5. Beginning with O or P.#:" 6. Beginning with R or S.#:" 7. Beginning with T to Z.:" Press 8 to end.$:" Press 9 for 'SELECT' menu.:" Press key 1 to 9 Z~:Z49{Z}57s522 15,4: Z~57s"SELECT"-Zu481000,2000,3000,4000,5000,6000,7000"SOLOGO"!:N~1r20:N;A$(N);" ",:P~1:Q~20:200GY60,91,20,92,30,60,80,40,50,95,91,90,10,30,1100,70,10,1150,60,70 300 :5000L:" CLEAR will make all the variables into0N:" 0 or null strings, and also clear any,P:" arrays which can be redimensioned.0R:" CLEAR 30000 will clear locations above!T:" 30000 from use by XBAS. V90:0~:" Using STOP instead of END as a program0:" statement allows you to use CONT which0:" will, usually, allow program execution*:" to continue from where it ended.0:" The same applies where SHIFT, BREAK is0:" used to halt a program. No editing may+:" take place if CONT is to be used.":N~21r41:N;A$(N);" ",:P~21:Q~41:200VY70,2100,60,60,80,70,2150,2100,2170,40,92,40,20,20,92,2200,2300,2300,2300,60,60 300 :500/4:" PEEK and POKE are mentioned in MATHS..6:" DEEK a(Nx10)~Nx10sH~N:5550:N~H:5550:5730::5201$:" Press A amend, C continue.Z~ z 223:Z~67s:Z}65s5552%::" Which number to amend?";NN1{N}NEs55565720:57020:" Press A another amendment, C continue.Z~z223:Z~67s:Z}65s5562 5556FL~0s5750L~NE:5300D::" Entry number";N7F" Name? (Surname followed by initials.) ";N$(N)G(N$(N))2s5702:5770;H::" Telephone exchange? ";E$(N);J::" Telephone number? ";T$(N)#L(N$(N))}15sN$(N)~(N$(N),15)!N(E$(N))}8sE$(N)~(E$(N),8)P X:N;N$(N);q20);E$(N),T$(N)ZbF$~"TELE.DAT" dF$,FD$ f# FD$hNE jN~1rNElN$(N):E$(N):T$(N):A(N)np:vF$~"TELE.DAT":FL~1 xF$,FD$ z# FD$ | NE ~N~1rNEN$(N):E$(N):T$(N):A(N):6A~((N$(N),1)):A~Az223:B~((N$(N),2,1)):B~Bz223A(N)~256wAtB 5779,$}"No File"s:" ";$;" in line";:+:" No telephone directory available./:" Change disc and press D if wrong one.(:" Press C to create a directory.Z~z223:Z~68s5750Z}67s5784:5300op:" INDEX.q:" 1. DATA, READ, DIMr:" 2. RESTORE.#s:" 3. Introduction to files.(t:" 4. File commands, error traps.u:" 5. Program options.,v:" 6. Saving ";(34);"TELEPROG";(34)%}:" Press 7 for other programs.*:" Type in 1-7 and press ENTER.";PNPN~7s7000PN~(PN):PN1{PN}7s601883,46tPN:G~46tPN:X:"SELECT"0Px@Q`;W:Z~z223:Z~68s5750Z}67s5784:5300op:" INDEX.q:" 1. DATA, READ, DIMr:" 2. RESTORE.#s:" 3. Introduction to files.(t:" 4. File commands, error traps.u:" 5. Program options.,v:" 6. Saving ";(34);"TELEPROG";(34)%}:" Press 7 for other programs.*:" Type in 1-7 and press ENTER.";PNPN~7s7000PN~(PN):PN1@9:15,4:15,4::q1,32):6978,80,104:6984,16,0,48,16100:8000:500" :" Explained in TUTOR 1.":":" Explained in TUTOR 2.":":" Explained in TUTOR 3.": (:" Explained in COLGR.": 2:" Explained in SOUND.": <:" Explained in MATHS.":!F:" Explained in ARRAYS.":#P:" Explained in PROGAIDS.":.Z:" Knowledge of machine code needed.":1[:" Only useful after peripherals added.":%\:" Advanced filing command.":.]:" This is fairly Track-Info  * nd DOKE are the same commands,,7:" but apply to two memory locations.,8:" DOKE 84,358 POKEs 84,102 and 85,1.-::" VPEEK, VPOKE, VDEEK, VDOKE refer to;:" the video ram. <90:0f:" DIR produces the directory of the disc$h:" currently in the drive.":.z:" DOS takes you back to DOS, the disc.{:" operating system that loads when you.|:" turn on the computer, with a disc in.}:" the drive. Working directly from DOS*~:" needs more than Basic knowledge./:" ERA erases a named program from your/:" disc. You can prevent accidental ERAs/:" by LOCKing your program. In this case0:" to ERA you would need to UNLOCK first..:" Error trapping is dealt with briefly. :" in MATHS and in a little more detail :" in ARRAYS. 93:" :N~42r61:N;A$(N);" ",: P~42:Q~61:200G Y40,3100,60,20,40,20,20,95,80,20,30,30,90,20,70,60,3050,30,30,80 300 :500 80:93:0 :" FMT will format subsequent PRINTing of0! :" numbers. The two parameters after the0& :" word give digits before, and after the+ :" decimal point.$0 :" FMT 0,0 returns to normal.05 :" FMT 5,2 may be useful for financial or0: :" business programs, giving one extra%? :" figure up to e.g ` 99999.99 D 93:":N~62r81:N;A$(N);" ",:P~62:Q~81:200KY30,30,10,10,91,60,20,2200,60,4100,80,30,60,90,4200,50,4300,20,20,91 300 :500):" Magnitude of sprite. See COLGR. 93:9h:" PRINT MUL$(";(34);"+";(34);",21) would print:i,("+",21):.:" If you have a program loaded and you.:" want to start writing another one it.:" is best to use NEW, which clears the":" old program from memory.#:N~82r100:N;A$(N);" ",:P~82:Q~100:200TY5100,5200,70,20,40,90,2100,60,40,5300,2100,40,5400,5500,10,70,5600,5700,5050 300 :500.:" Mentioned in PROGAIDS. For full use: 90:+:" SPRITE OFF turns off all sprites.*:" SPRITE OFF 6 turns off SPRITE 6..:" OFF ERR turns off an error trap set. 2300:" OFF EOF: 92:'P:" ON GOTO or GOSUB see TUTOR 3.Z:" ON ERR: d2300:0:" POINT (100,40) returns 0 if the point0:" 100,40 is not in foreground colour set-:" by GCOL or TCOL. Gives 1 otherwise.-:" Advisable to use if you jump from a.:" subroutine without the normal RETURN":" at the end. '93:|:" POS(0):91-:" POS(1) gives current cursor column.*:" POS(2) gives current cursor row.50:93:"D:" PSW stands for password. E93:$p:N~101r126:N;A$(N);" ",:rP~101:Q~126:200isY60,70,20,6100,80,70,20,30,30,6900,10,20,6200,6300,60,6400,60,6500,10,6600,6700,60,20,1150,60,6800 t300 v:500O:" REN";(34);"WOOF";(34);"TO";(34);"DOGPROG";(34);" would change the.:" directory name of WOOF into DOGPROG..8:" LET A$=SCRN$(10) would make A$ into.=:" a string containg all that currently%B:" is on row 10 of the screen.G0:" The normal seperator in DATA0:" statements is the comma. SEP 47 would0:" make the seperator a / sign. 47 is the/:" ASCII for /. SEP 44 reverts to comma.$:" Used in sprite generation.:" See COLGR.) :" Also used in one part of MATHS. 93:1d:" PRINT SIZE returns the amount of memoryi" left for programming.n/:" SPEED 200 slows down printing. 255 is+:" normal speed. Lower means slower.,:" See COLGR. 093:/:" SWAP A,B would exchange the values of/:" A and B. It can also be used to swap*:" strings or elements of an array.-:" RST is not mentioned in the manual..:" It acts as a general housekeeper for$:" the video RAM and the PSG..:" TCOL and GCOL are set to Foreground%:" white and Background BCOL..:" All sprites and generated characters.:" disappear. The PSG is set to default-:" values. Then the screen is cleared.$X:N~127r146:N;A$(N);" ",:ZP~127:Q~146:200Q[Y10,60,40,50,20,7100,20,2200,40,60,2100,2100,80,7050,2100,2100,91,91,20,91 \300 ^:500:" Mentioned in SOUND. 93:.:" TI$ is a six figure string for time./:" The first two numbers are hours 0-23.(:" The next two are minutes 0-59.(:" The last two are seconds 0-59.?:" LET TI$=";(34);"072000";(34);" sets the time to/:" twenty past seven. Eat your breakfast-:" then PRINT TI$ might return 074523.$@:" Press M for Glossary Menu.+E@1,10;"Press N for notes on glossary.JZ~z223:Z~77sOZ}78s80102T::" The glossary covers all the reserved0Y:" words in XBAS. Most of these have been0^:" discussed in other programs, and if so!c:" the reference is given.0h:" Those not mentioned so far may have+m:" been omitted for various reasons. r300.|::" Some involve knowledge of machine,:Track-Info  *          Z~z223:Z~71sZ~73s6000 93783,(83)t1:+@4,23;"Press space bar to try this.";Z~:Z}32s955940::965:FS~1sFS~0:965 D~(262)t2:(D)900s1,899B$~(34)tA$t(34):4:15,4:15,4:920:-Gu461010,1100,1200,1300,1400,1500,16000:" You will have used some of the aids to0:" programming available already. You may0:" not even have realised that they were0:" aids! Keys that repeat when you hold0:" them down were an expensive luxury two0:" years ago. Now they are usual. In an0:" earlier section, you were shown how to0:" use the screen editor to adjust errors0:" in your programs. Believe me, you only,:" love a good editor in its absence! 905.:" You were also shown how to use LIST.^ :" ";:1,2:" The screen editor ";:15,4:" & ";:1,10:" versatile list ";:15,4:/ :" are, if well used and understood more/:" valuable than other programming aids./:" You realise that when you come across0:" inflexible lists or xxxx line editors! 905/:" You will have used LOAD and SAVE, but(:" you may not have come across "2:" ";:1,13:" VERIFY.":15,4:/:" When you have saved a program, it is/:" sensible to check whether it has been/ :" correctly saved. VERIFY followed by0":" the name you have just used does this.*$:" If there is an error SAVE again./&:" With the accuracy of discs VERIFY may,(:" not be so necessary as with tapes. *950/L:" Auto generates line numbers and often/N:" is useful when writing a program. It/P:" does help to avoid errors, and speeds/R:" up the typing. Often, however, it may/T:" be quicker to edit old lines, to make/V:" new ones. If I think this can be done/X:" I do not use AUTO, though usually I Z:" do. (I'm on AUTO now!).\:" AUTO alone will start at line 10 and.^:" go up in 10's. I wrote this section`:" using AUTO 1100,2 b905Fd:" ";:1,7:"DEL 100,299 ";:15,4:"will delete all the linesf:" between 100 and 299./h:" Needless to say, be very careful to/j:" check that you have the right figures l:" before pressing ENTER!/n:" If you want to test this don't delete/p:" over 800 or you'll have to reload the/r:" program. DEL can be used in a program/t:" for example when an array has read in/v:" the DATA statements. It might savex:" memory" code to be operated safely. Others,:" need binary or hex to be workable.,:" I hope you will eventually wish to,:" find about these things, but this,:" program sticks to what is required':" to operate XBAS successfully. 3001::" Other words cannot be used if you do/:" not have suitable peripherals such as :" a joystick or printer..:" Some words would only be used by an.:" experienced Basic programmer, thus-:" being beyond this program's scope. 3000::" More often, the words have been left/:" out because they did not fit into any/:" particular topic and were not vitally-:" important. These will be explained. 300'#h`O3001::" Other words cannot be used if you do/:" not have suitable peripherals such as :" a joystick or printer..:" Some words would only be used by an.:" experienced Basic programmer, thus-:" being beyond this pro!2:" Find the product of ";(132);" diagonal.:" This is ";AwE3:" Find the product of ";(133);" diagonal.":" This is ";BwD$:" Subtract ";BwD;"from ";AwE:" The answer is ";G1540:U~1?:P~E:Q~uB:R~uD:S~A:1500::" This is adj. Det is ";G::zBO Ɠo0@ (HTփhJN~150s4,250:5,250:10,15YRC,RD:@RA,RB;(RE)r w7,127|15,2:40-:" SORRY! Should have said Data Error- /Èr/͢r**/M-2ͫ"-ɯ+/5!o-o0$    o͝QÝ'S/CS͝os'SE/( o[~K*͘'M-KS!/=2:9(O+/s 29z29=&o))) ͈͝5g.(Og.( (  =5×,(Q=;.͝/0! 0E.RM0 $ y0PY,,˺z+/WW{+/_,ͪ>=;(.B 5O/415,4:(83)~255s83,47::902:936:40: 1005q15232,67,76,83,58,82,85,78,49,48,48,48,141,128,128,128,128,128,128,67,76,83,58,71,79,84,79,50,51,53,56,141/6984,16,0,48,16,16,16,56:6978,80,104:+@4,23;"Press space bar to continue.";Z~:Z}32s910:?40:@2,10;"Press G go on, R return to last part,":G~(83)$:" I for index.Z~z223:Z~71sZ~73s6000Z~82sG~Gu1:83,G: 925640:@2,10;"Press G go on, I for Index. ":G~(83)Track-Info ! *!!!!!!!!!!  on occasions. z950H:" ";:1,10:" HOLD ";:15,4:" is rightly considered to be one":" of the features of XBAS.0:" If part of a program is held, you will0:" not be able to LIST the rest. It stays0:" in memory. You can get it back later0:" by using ";:12,14:" MGE.";:15,4:*:" We will study some uses of HOLD. 905-:" We have already used HOLD to save a:" part of a program.-:" HOLD 800,1000 followed by SAVE will#:" save only lines 800-1000.-:" MGE will subsequently restore your:" program as before. 905B:" ";:1,2:" RENUM ";:15,4:" can be used without HOLD.0:" It will renumber the program in memory(:" starting at 10 in steps of 10./:" RENUM 2000,5 will start at line 2000./:" Each later line number will be 5 more :" than the previous one./:" References to line numbers will be/:" corrected by RENUM, (e.g GOSUB 5000/:" might become GOSUB 6000 after RENUM.) 905.:" Using HOLD will allow you to RENUM a!:" part of a program only..:" HOLD 800,850 followed by RENUM5000,5.:" might move a routine from the middle":" of a program to the end..:" MGE will get the program back. If it.:" worked before, and ended before line!:" 5000, it will work now! 9050:" If you wish to append a second program0:" numbered 10000-11000 to one already in0:" memory numbered 100-2000, it is simple:" enough.0:" HOLD 3000 (or anyhting between 2001 &-:" 9999) then LOAD the second program..:" Now MGE has both programs in memory. 9050:" If the second program starts with line0:" numbers less than some of the first0:" program lines, you will have to do a0:" bit of RENUMbering and SAVEing, before' :" trying to merge the programs. 905:" TIME FOR A TEA-BREAK!0:" If you experiment now with HOLD and0:" RENUM you will probably have to reload-:" this program. So press F0 to go on.940:965:/:" There is one further use for HOLD. In/:" a long program, HOLD can be used with/:" CHAIN to save memory. I suggest that/:" if you wish to use this you study the/:" mailing program in the manual. It is/ :" an advanced technique, so most of you-":" will probably leave it until later. $905K&:" The command: ";:1,7:" KEY 5 ";(34);"DATA";(34);" ";:15,4:'(:" programs the function key F5..*:" This particular one would clearly be.,:" useful if you were writing a program..:" consisting mainly of DATA statements.0:" allowing a single key press at every.2:" start of such a line. (This sort of.4:" program is useful, but is tedious to6:" write.).8:" KEY 8 to KEY 15 programs the keys#::" for their use with SHIFT. <905->:" If you follow the word in quotes by.@:" pressing GRAPH and ENTER at the same.B:" time before closing quotes, a press.D:" of the relevant key will execute the.F:" statement, just as though you typed"H:" it in and pressed ENTER..J:" Pressing SHIFT GRAPH and 2 all at.L:" once, will let function key commands N:" end with a quote mark. P905-R:" The function key that I use most is-T:" programmed to PRINT a double space,"V:" quote marks and a space.-X:" Unfortunately there is no way to do-Z:" this from the keyboard. If you use)\:" F0 for this, it can be done by:=^:" ";:1,3:" VPOKE 15232,63,58,63,34,160 ";:15,4:-`:" This is the ASCII codes for ? colon-b:" ? quote space. 128 is added to the-d:" final code to signal end of F0. The(f:" next memory locations give F1. h905/j:" I suggest you try programming some of/l:" your function keys. But please leave/n:" F0 and F7 alone, as the program needs/p:" them. You could then try to make a/r:" bit of sense from the program at 5000-t:" which PEEKs the function key table. v950;x:" ";:1,15:" IOM ";:15,4:" (Input Output Mode))z:" is fairly advanced programming.-|:" You may wish, however, to know that-~:" IOM 3,0 will disable SHIFT BREAK in(:" a program. IOM 3,1 re-enables.-:" POKE 3531,0,0,0 disables BREAK also-:" but don't try this until you really":" know what you are doing.&:" POKE 3531,205:DOKE 3532,2666:" will re-enable BREAK. 950C:" ";:1,7:" PTR ";:15,4:" IS ALSO NOT FOR BEGINNERS. "0:" It can be used to change or locate the0:" Basic pointers. If you try to change0:" them it is long odds you will have bad0:" crashes. It doesn't do any harm to try:" to locate them.:" For example:*:" ?PTR(1) will locate Basic start./:" ?PTR(2) will give reserved word table:" start. 9500@:" When I first had the Einstein, I was a/B:" newcomer to Crystal Basic, or XBAS as0D:" it is called. I am convinced tTrack-Info " *""""" """""ions.,v:" 6. Saving ";(34);"TELEPROG";(34)%}:" Press 7 for other programs.*:" Type in 1-7 and press ENTER.";PNPN~7s7000PN~(PN):PN1{PN}7s601883,46tPN:G~46tPN:X:"SELECT"e#:" subroutines I would n:" worked before, and ended before line!:" 5000, it will work now! 905p:" INDEX.q:" 1. DATA, READ, DIMr" 2. restore#s:" 3. Introduction to files.(t:" 4. File commands, error traps.u:" 5. Program opt;"*": NN~5r4tR NP~4r3tRN@P,N;:Z~NZ32s20640:20180NZ}32s(129)NZ~32s" "N:,N@1,1;" PRESS R FOR REDO, G FOR GO ON."&NZ~z223:Z~82s20120:Z}71s20200N@7,2;"Calculating!"NV~15360:W~5:J~0 ON~WrWt7OG~128:T~0 OP~4r3tR$OS~Vt32wNtP).OS~129sT~TtG 8OG~Gx2BO LOT$~(T)VOT$~(T$,2)`OA$(Cu129)~A$(Cu129)tT$t" "jO tOJ~Jt1~OC,A$(Cu129)OC~Ct1:R~8s20400OJ~1sV~15616:20230OJ~2sV~15368:20230OJ~3sV~15624:20230 O20540O1OC157s:" Another one? Y/N":Z~z223:20450OZ~78s20450OZ~89s20030:20410@O:" Shall we save sprites? Y/N.":Z~:Z~78s:Z}89s20450O:" Name your file!" O" ";N$ P20580 P N$,FD$ P#FD$PN~1r30:A$(N): (PFD$2P$::" You recover them by LOAD";(34);"LSPR";(34);"."+.:" RUN it and your sprite will be in8:" memory ready for use. B40000/܂:" There are two Xbasic commands to know&悢:" in order to use your spritesG::" MAG0- Sprite single charcter 8 by 8 size.F:" MAG1- Sprite single character 16 by 16 sizeF:" MAG2- Sprite group of 4 characters 16 by 16 sizeG:" MAG3- Sprite group of 4 charccters 32 by 32 size..:" (Sizes in pixels, CLS32 before use.) "40000/Є:" The other command is SPRITE A,B,C,D,E+ڄ:" A,B,C,D,E stand for numbers thus:-䄢:" A (0-31) is the priority. A sprite*" with priority 6 would blank out a+" sprite with priority 9 at the same," place, but not one with priority 2.. :" B (0-255) number of pixels from the," left for top left corner ofhat it0F:" is a better Basic than most, and it is0H:" easier to use than some highly praisedJ:" systems.0L:" Even so, the challenge was to gild the0N:" lily, and I have made an effort in two)P:" areas in my own extension GBAS. Q905/T:" The first area was to allow some more/V:" structured programming. I admit that/X:" have mixed feelings about this, but/Z:" some people would feel that XBAS does-\:" not contain much in this direction..^:" The second area was in program aids.D_:"";:1,7:" Now for some blatant advertsising!..";:15,4: `905.b:" GBAS is part of 'Programmers Kit'./d:" It is also being produced by SOLO for/f:" EINSOFT. It includes a TRON which is.h:" used to trace a program, as it runs./j:" FIND can be used to locate a phrase,(l:" variable or word in a program./n:" PLUS is a simpler appending command./p:" The kit contains a Basic program for/r:" listing all variables used, as well&t:" as some more advanced ideas.;4 :" ";:1,2:"That is the end of PROGAIDS. ";:15,46 83,255: N~15232 r 15291 N),:p:" INDEX.)q:" 1. Editing, listing, VERIFYing.r:" 2. AUTO, DEL.s:" 3. HOLD, RENUM.t:" 4. KEY, VPOKE.u:" 5. IOM.v:" 6. PTR.w:" 7. GBAS.%}:" Press 8 for other programs.*:" Type in 1-8 and press ENTER.";PNPN~8s7000PN~(PN):PN1{PN}7s601883,46tPN:G~46tPN:X:"SELECT"0Px@"SELECT"ELECT"N,128:615232,63,58,63,34,160,63,34,160,63,35,49,59,162W N~15232 r 15291 N),:p:" INDEX.)q:" 1. Editing, listing, VERIFYing.r:" 2. AUTO, DEL.s:" 3. HOLD, RENUM.t:" 4. KEY, VPOKE.u:" 5. IOM.v:" 6. PTR.w:" 7. GBAS.%}:" Press 8 for other programs.*:" Type in 1-8 and press ENTER.";PNPN~8s7000PN~(PN):PN1{PN}7s601883,46tPN:G~46tPN:XFLAG~1:"INTRO"10:15,4:40:1,2:@5,8;" Press I for introduction. ";4j1,6:@5,11;" Press M for main menSPR0 XBS/QRWMMENU XBS>EDASS0 XBS&OP[MATHMAG XBS?@GRPL0 XBS-ABCMUS3 XBSDTHUNSUB XBSISTRIG1 XBSCIRCLE0 XBSYZVLIST0 XBS \REG0 XBSNRWORD0 XBSXTrack-Info # *##########  sprite.0 :" C (0-191) pixels from bottom upwards./*:" D is colour number for sprite.(0-15).4:" E is charceter number of sprite. If.>" MAG is 2 or 3. F will be the multipleR" of 4 below E..\:" F top left. F+1 bottom left.-f" F+2 top right. F+3 bottom right. p40000:?@N~1r1500:$A@7,23;"PRESS A KEY TO GO ON.";JZ~0:Z~:Z~0s40010T:.Pâ:" Enter start character a number which#Uâ:" is between 130 and 155.";(VZ$~$(3):C~(Z$):C130{C}155s50000Zè#132,"00 00 00 00 00 07 04 05&133," 05 07 3F 7F FF 70 20 00'134," 00 00 00 00 00 FC 44 44$140,"00 00 02 07 07 00 00 00")֏N~141r143:N,"0000000000000000": ,135," 44 FC FC FC FE 38 10 00":31֏N~136r139:N,"00 00 00 00 00 00 00 00"::֏N~250ru40pu48,N,100,2,1329,2wNu100,104,1,132֓(Nx5)}Nx5s1:550401,2wNu100,104,4,140כ<רM׏N~250ru140pu2N8,N,100,2,132O9,2wNt100,104,1,132Pד(Nx5)~Nx5s1:55040Q1,2wNt100,104,4,140dכ:0,0,N,0,5,01,0,Nt1,0,5,02,0,Nt2,0,5,05(ڷ"V0B6G4R2V1B6G4R2V2B6G4R7","R","R"ڨh x@p H031֏N~136r139:N,"00 00 00 00 00 00 00 00"::֏N~250ru40pu48,N,100,2,1329,2wNu100,104,1,132֓(Nx5)}Nx5s1:550401,2wNu100,104,4,140כ<רM׏N~250ru140pu2N8,N,100,2,132O9,2wNt100,104,1,132Pד(N Z}78s10150':4:15 ':32 NC~130$*N129,"FF FF FF FF FF FF FF FF" 4NA$(30)29N40:@1,8;"Charcter 130 is your first sprite.!:N:" PRESS N TO CHANGE THIS.';N:" Press any other key to go on.'N32)HN:" Enter S for small, L for large.$RNZ~0:Z~z223:Z~83{Z~76s:20050\NR~8:Z~76sR~16#fNR~16zCx4}(Cx4)sC~Ct1:20070kN@2,3;"CHARACTER";C;lNR~16sCt1;Ct2;Ct3pN@4,4;("*",R)zN@4,Rt5;("*",R) NN~5r4tRN@3,N;"*":@4tR,N;"*": NN~5r4tR NP~4r3tRN@P,N;:Z~NZ32s20640:20180NZ}32s(129)NZ~32s" "N:,N@1,1;" PRESS R FOR REDO, G FOR GO ON."&NZ~z223:Z~82s20120:Z}71s20200N@7,2;"Calculating!"NV~15360:W~5:J~0 ON~WrWt7OG~128:T~0 OP~4r3tR$OS~Vt32wNtP).OS~129sT~TtG 8OG~Gx2BO LOT$~(T)VOT$~(T$,2)`OA$(Cu129)~A$(Cu129)tT$t" "jO tOJ~Jt1~OC,A$(Cu129)OC~Ct1:R~8s20400OJ~1sV~15616:20230OJ~2sV~15368:20230OJ~3sV~15624:20230 O20540O1OC157s:" Another one? Y/N":Z~z223:20450OZ~78s20450OZ~89s20030:20410@O:" Shall we save sprites? Y/N.":Z~:Z~78s:Z}89s20450O:" Name your file!" O" ";N$ P20580 P N$,FD$ P#FD$PN~1r30:A$(N): (PFD$2P?ARRAYS XBS]@ABDEFCOLLIDE XBS in an 8 by 8 square.vu:" just like the shape W for instance.u:" which has already been designed in.u:" memory and can be called by asking+u:" the computer to PRINT CHR$(89)..u:" Any character you invent will be)u:" numbered between 130 and 159. u40000.y:" First you will have a chance to."y:" change the number of the character.,y:" you generate. If you do not change.6y:" the number the program will number*@y:" your sprites upwards from 130./Jy:" You will then be asked to choose/Ty:" small or large. Small characters are/^y:" on an 8 by 8 grid, large ones on a/hy:" 16 by 16 one. These take 4 numbers/ry:" for their charcters, starting with a.|y:" multiple of 4, e.g 132,133,134,135. y400000 {:" You will then design your character0{:" on the given grid. The cursor is set* {:" over the current point to plot.&*{:" USE SPACE BAR FOR EMPTY.*4{:" USE ANY LETTER KEY FOR FULL.3>{:" You may also use the cursor control";3H{:" keys to move the cursor, the delete is";3R{:" used (guess what!) to delete. ENTER";3\{:" is used to escape from the grid before";-f{:" the cursor has recahed the bottom. p{40000-耢:" The rest of the program should be-:" self-explanatory. You should save-:" your sprites for use again. There-:" is no reason why you shouldn't use-:" this disc. Call the saved sprites-:" anythiTrack-Info $ *$$$$$ $$$$$N~2r(N$),}(N$,N,1)~"."sP~(N$):N$~(N$,Nu1):N~PN$~N$t".DAT"YSPRITE.DAT, GOSUB640400:" add 64091 RETURN, use in your program.+@4,23;" Press any key to go on.";:Z~Z~:Z~0s64025#("Name of sprite file?";N$-N$~""s64040 264115 7A$(30) " MAG is 2 or 3. F will be the multipleR" of 4 below E.:@1,15:40:" To see our extensive range of EINSTEIN"1A" software, send for our catalogue today":4B15,6:@3,4;" "-C@3,5;" "-D@3,6;" 렠 "-E@3,7;" 렠 "-F@3,8;" 렠 "-G@3,9;" ".H@3,10;" ".I@3,11;" S O F T W A R E ".J@3,12;" "4L1,7:@3,14;" ".M@3,15;" 95B BLACKPOLE TRADING ESTATE ".N@3,16;" WORCESTER WR3 8TJ ".O@3,17;" ".P@3,18;" TELEPHONE (0905) 58351 ".Q@3,19;" "RT~1r1000:8S1,15::" Hit any key to clear or R to re-start "TK$~$:(K$)~0s40020UK$~"R"s"LOADER"V4:15,4:40::15,4:40::"M/FILE"1E"1M/FILE"1ILE"11:7,71:8,16:9,&(#:15,4::4:q1,32)::83,25532#" ";:1,9:" SELECT. ";:15,4:<#:" 0. INTROF#" 1. TUTOR 1P#" 2. TUTOR 2Z#" 3. TUTOR 3d#" 4. COLGRn#" 5. MATHSx#" 6. SOUND#" 7. ARRAYS#" 8. PROGAIDS#" 9. GLOSSARY#:" E. End program".#:" Press 0-9 to select and run program.#$~"E"{$~"e"s"SOLOGO"#Z~:Z48s9125<#Zu479160,9170,9180,9190,9200,9210,9220,9230,9240,9250 #9130 #"INTRO"#"TUTOR1"#"TUTOR2"#"TUTOR3" #"COLGR" #"MATHS" $"SOUND"$"ARRAYS"$"PROGAIDS""$"GLOSSARY",$sX00,1400,1450,1500,1600#" 2. TUTOR 2Z#" 3. TUTOR 3d#" 4. COLGRn#" 5. MATHSx#" 6. SOUND#" 7. ARRAYS#" 8. PROGAIDS#" 9. GLOSSARY#:" E. End program".#:" Press 0-9 to select and run program.#$~"E"{$~"e"s"SOLOGO"#Z~:Z48s9125<#Zu479160,9170,9180,9190,9200,9210,9220,9230,9240,9250 #9130 #"INTRO"#"TUTOR1"#"TUTOR2"#"TUTOR3" #OT,NULL^x OFF,ON,OPEN,OR,ORIGIN,OUT,PEEK,PI,PLOT,POINT,POKE,POLY,POP,POS,PRINT,PRINT#,PSG,PSW,PTRv} RAD,READ,REM,REN,RENUM,RESTORE,RETURN,RIGHT$,RND,RST,RUN,SAVE,SCRN$,SEP,SGN,SHAPE,SIN,SIZE,SPC,SPEED,SPRITE,SQRW STEP,STOP,STR$,SWAP,TAB,TAN,TCOL,TEMPO,THEN,TI$,TO,UNLOCK,UNPLOT,VAL,VDEEK,VDOKE3 VERIFY,VOICE,VPEEK,VPOKE,WAIT,WIDTH,XOR,ZONEA$(146):N~1r146:A$(N):3@1,20;"Enter number required.":" ";X'XP{X}Qs" Try again.":(5):200 Y~XuPt1 :" ";X;A$(X):+,@4,23;"Press space bar to continue.";.Z~:Z~32s:302Q1,2:::" RESERVED WORDS ++++++++ +++++#:" 1. Beginning with A to C.#:" 2. Beginning with D or E.#:" 3. Beginning with F to K.":" 4. Beginning with L to N#:" 5. Beginning with O or P.#:" 6. Beginning with R or S.#:" 7. Beginning with T to Z.:" Press 8 to end.$:" Press 9 for 'SELECT' menu.:" Press key 1 to 9 Z~:Z49{Z}8: 40::" The program lines 64055 - 64090 may be0:" called as a subroutine. Define N$ as a0 :" file name e.g MYSPRITE.DAT, GOSUB640400:" add 64091 RETURN, use in your program.+@4,23;" Press any key to go on.";:Z~Z~:Z~0s64025#("Name of sprite file?";N$-N$~""s64040 264115 7A$(30) >>V?g?q??8@@g+p6;2>C>S>">s>[F[FQX[F[F[F[F[F̀>!>">oX:~(:(#">2>6so͢s+=*>:>w *>|>!>!>w#w? ? bk"Q:>(/840->2>ɯ2>2;*"o?*A55"`(*o?"OXCATͫ? ~" #~(~( "(# +?#( ͬ?[A*N#F#^#V# :? ?R0ì@~:#2=@"?!?6#6?!?#6#6!?6#6Qͫ"(LÜ ͭ?[@?P@K:=@>2=@(:?*?À{8ü z r(M01>M0͝BKiÔ>E[ CHAIN 60000 FOR ALL CHAIN 59999 DEFFN ONLYG\ CHAIN 59998 STRINGS ONLY CHAIN 59997 NUMERIC ONLY ]VNUM~1:VSTR~0:VFUN~0:60001 ^VNUM~0:VSTR~1:VFUN~0:60001%_VNUM~0:VSTR~0:VFUN~1:VF~1:60001`VNUM~1:VSTR~1:VFUN~1:VF~0aVX~(14):VY~(15):VO~0cVN~VXrVYu1p8fVG~(VNt3)y(8)&iVG}0zVG}1zVG}4sVN~VNt8:60006lV$~(65t(VNt3)x8)AoVO~VOt1:(VOx20)~VOx20s" Press a key to continue.";:VZ~:'rVS~65536w(VNt2)t256w(VNt1)t(VN)uVCOUNT~1r5:60054:@xVG~1zVSTR~1s60066:VG~4zVFUN~1s60075:VNUM~0sVO~VOu1::L{VP~(VNt4):VH~(VNt7):VH~0zVP}0 sV$~V$t"%":VM~VP:VM%~VM:VM~VM%:60051~VH~0zVP~0sVM~0:60051VH~VHu128:VH~2vVH:VM~VHx2(VNt6)}127sVB~u1:VB~1VM~VMt((VNt6)z127)wVHx256'VM~VMt(VNt5)wVHx65536:VH~VHx65536VM~VMt(VNt4)wVHx256 VM~VMwVB" ";V$;" = ";VM::VT~VSy(64):VS~(VSx64) (VT}10zVT18){VT}43{VT~0s VT~VTt47%V$~(V$,1)t(VT)t(V$,(V$)u1):"VU~(VNt6):VV~(VNt4):VA$" code to be operated safely. Others,:" need binary or hex to be workable.,:" I hope you will eventually wish to,:" find about these things, but this,:" program sticks to what is required':" to operate XBAS successfully. 3001::" Other words cannot be used if you do/:" not have suitable peripherals such as :" a joystick or printer..:" Some words would only be used by an.:" experienced Basic programmer, thus-:" being beyond this program's scope. 3000::" More often, the words have been left/:" out because they did not fit into any/:" particular topic and were not vitally-:" important. These will be explained. 300'#hO3001::" Other words cannot be used if you do/:" not have suitable peripherals such as :" a joystick or printer..:" Some words would only be used by an.:" experienced Basic programmer, thus-:" being beyond this pro10 CR~DN s Y~YuDIS: 2810 CR~UP s Y~YtDIS: 2810 R s 2810 Y17 s Y~17# CR}0 s 4920: KEY CONTOLS' Y17 s Y~17: NOT BELOW THE POTS PEN s 2840O 8,X,Yt16,INKCOL,144: 9,Xt8,Yt24,INKCOL,148: 10,Xt16,Yt32,INKCOL,152 DR~u1 s r X,Y: 2680:" DR~2 s DIS~2: X,Y: Xu1,Y: Xt1,Y:Xu1,Yt1: X,Yt1S, DR~2 s Xt1,Yt1: Y18 s 2880: DR~2 s X,Yu1: Xt1,Yu1: Xu1,Yu1: 2880 6 R s @ 2680J T ^ ** KEY-SCAN **h 8r &B000:CR~(&B010): CR}&60 z CR&7B s CR~CR z &DF|   **CHANGE-COLOUR **  XS~X:YS~Y:PENS~PEN:PEN~u1& Y~16: ALONG THE TOP OF INK WELLS( MES$~CMESS$: 3560: OUTPUT MESSAGE X~(INKCOLw16)u4! 3470: UPDATE PEN POSITION CR~&20 s W~0 r 50: W 2900: SCAN KEYBOARD6 CR~&0D s INKCOL,0:PEN~PENS: : 3080:EXIT7 CR~&20 s INKCOL~INKCOLt1 : INKCOL}15 s INKCOL~1 3010. SPACE~u1: 3560: REMOVE THE INSTRUCTIONS/ X~XS:Y~YS:: RETURN WITH X AND Y REC!:N~76s%H!N~1r60:X$~Q$(N)sX~Q(N):X:N~65M!:N~66s%R!N~1r60:X$~S$(N)sX~S(N):X:N~70W!:N~71s \!:32(#P$(5),Q$(60),R$(68),S$(60),Q(60),R(68),S(60)--#" Please wait 12 secs. to set up arrays2#P~0:Q~0:R~0:S~0<#C~110:C$~""F#N~(2)t1r(6)u2P#C$~C$t((N)z127)Z#(Nt1)}127s9500d#: %C~Ct1"&%C116sP~Pt1:P$(P)~C$:C$~"":E0%C128{(C}195zC234)sQ~Qt1:Q$(Q)~C$:Q(Q)~((7)t2w(Qu1)):C$~"":7:%C196sR~Rt1:R$(R)~C$:R(R)~((6)t2w(Ru1)):C$~"":2;%S~St1:S$(Su1)Track-Info ' *'''''''''' ~" "%VL~1rVV:VA$~VA$t((VUtVLu1)):" ";V$;"$ = ";VA$::V1~(VNt6):V2~(VNt4)>VF~0s" List FNs too? Y/N.(It may be slow.)";:VF~z223:VF~78s:VB$~(65t(V1u1)x8):VC$~""+V3~(V2):V3}110s60096:V2~V2t1:60087/V3}0zV3}58sVC$~VC$t(V3):V2~V2t1:60087)" ";"FN ";V$;"(";VB$;") = ";VC$::V4~14784:V5~110V3}180sV4~15093:V5~195(V4)}127sV5~V5t1V5}~V3s60108V4~V4t1:60099VC$~VC$t((V4)z127) V4~V4t1*(V4)128sVC$~VC$t((V4)):60111: hcIy)*^ 0^$ R@%!It may be slow.)";:VF~z223:VF~78s:VB$~(65t(V1u1)x8):VC$~""+V3~(V2):V3}110s60096:V2~V2t1:60087/V3}0zV3}58sVC$~VC$t(V3):V2~V2t1:60087)" ";"FN ";V$;"(";VB$;") = ";VC$::V4~14784:V5~110V3}180sV4~15093:V5~195(V4)}127sV5~V5t1V5}~V3s60108V4~V4t1:60099VC$~VC$t((V4)z127) V4~V4t1*(V4)128sVC$~VC$t((V4)): :4 15,2:A(X)~(Xw100t.5)x1001:" Enter details where the cursor flashes.,(" Put X if you don't know! Then ENTER.521::" What units (e.g `, dollars) do you want<" to use?"F:" Cost price?"P:" Selling price?"Z:" Profit %?"d@9,7;:" ";U$i(U$)}8sU$~(U$,8)j((U$)z223)~88s120>nU$~"$"{U$~"`"s@18,9;U$:@18,11;U$:@30,9;U$:@30,11;U$s@30,13;"%"x@20,9;:" ";C$8C$~"X"sA~1:B~Bt1:C~0:C~(C$):C~0s@20,9;o9):120@20,11;:" ";C$9C$~"X"sD~1:B~Bt1:S~0:S~(C$):S~0s@20,11;o9):140 B~2s4001B~0sP~(SuC)xCw100:10,1:@20,13;A(P):300@20,13;:" ";C$C$~"X"s4000P~(C$):P~0{P~u100s(5):@20,13;o9):1709A~1s@20,9;o9):10,1:@20,9;A(Sw100x(100tP)):3001@20,11;o9):10,1:@20,11;A(Cw(100tP)x100) ,15,631@1,20;"Press W for working, A another, E end.26Z~:Z~Zz223:Z~87s500:Z~65s:Z~69s:310.15,2:@1,21;"Insufficient information."':" Press any key to try again.";Z~:Z~0s420:10:4,9:U$~"$"{U$~"`"sV$~U$:U$~""A~1s700D~1s600B~0s510$@1,21;"Press A another, E end."Z~z223:Z~65s:Z~69s:508!:" Cost price is ";V$;C;U$$:" Selling price is ";V$;S;U$":" So profit is ";V$;SuC;U$! :" Profit/c.p.is ";(SuC)xC":" Profit% is ";(SuC)xCw1005:" Answer to 2 dec places is ";A((SuC)xCw100)X:" Profit is ";P;" %"!]:" Cost price is ";V$;C;U$)b:" Profit is ";P;"/100 * ";V$;C;U$,g:" Which works out to ";V$;CwPx100;U$3l:" So selling price is ";V$;A(CtCwPx100);U$q:" Profit is ";P;" %"$:" Selling price is ";V$;S;U$):" Let cost price be ";V$;" x ";U$&:" Profit will be x *";P;"/100$:" So x + x *";P;"/100 = ";S:" Multiply by 100."!:" 100 x +";P;"x =";Sw100:" ";100tP;"x =";Sw100':" x =";A(Sw100x(100tP))+:" THIS IS THE COST PRICE IN ";U$;V$$>E;5 38 38 39 FF FF FF FF FF FF FF 21 52 8C 52 21 00 00 00 C2 F3 F3 F3 F3 F3 FF FF 08 94 62 94 08 00 00 00 FF 7F 08 14 14 08 00 00 FF FE 10 28 28 10 AE D6 EF DF F9 5D FB 32 04 0C 10 00 40 40 C0 80 FKEY BSSMSPR BS+TUVCP0 BS]TRAIN DATPFL3 XBSSENSE DAT[PFL2 XBS,\]^SILIT DAT4)C* CM$~"Y" s JS~u1:@0,10;JMESS$:JMES1$:JMES2$:JMES3$: 4680;4 CM$~"N" s JS~ 0:@12,10;"Joystick not in use": 4680 > 4640DH @4,22;"Press SPACE to return to the menu.": $}" " s 4680R\f** -FILL-ERROR-TRAP **pz** CIRCLE-ROUTINE **BR~u1:DRS~DR:DR~0:SPACE~u1: 3560:MES$~RMESS$: 3560: MESSAGE@XS~X:YS~Y: W~0 r 500: W:SPACE~u1: 3560:MES$~RMES1$:3560% 2680: 2900: CR}&0D s 4790XR~XuXS:YR~(YuYS)x1.333bRD~((XRwXRtYRwYR)):YSu(RDw1.333)16 s X~XS:Y~YS:MES$~RMES2$:3560::W~0r300:3480: 47701 XS,YS,RD:R~0:SPACE~u1: 3560:DR~DRS: X,Y** SET-ALPHA-LOCK-ON **R (&FB3E)128 s &FB3E,(&FB3E)t128: &22,0: IF LOWER CASE THEN UPPER CASE$** KEY-CONTROLS **.8 CR~&31 s :DIS~1B CR~&32 s :DIS~2L CR~&33 s :DIS~4 V CR~&34 s :DIS~8: SPEED4` CR~&42 s : 3100: CHANGE BACKGROUND COLOUR)j CR~&43 s : 2950: CHANGE COLOUR7t CR~&4F s :DR~0:SPACE~u1: 3560: TURN OFF DRAW"~ CR~&52 s : 4740: CIRCLEI CR~&53 s :DR~u1 : X,Y r X,Y:DR~u1:SPACE~u1: 3560: START DRAW9 CR~&44 s : r X,Y:SPACE~u1: 3560: DRAW TO PEN' CR~&45 s ::: END OF PICTURE  CR~&46 s : 3200: FILLC CR~&54 s : :PEN~ PEN: : W~0 r 100: W: TOGGLE PEN: CR~&55 s :DR~2:DIS~2:MES$~UMESS$: 3560: RUB OUT CR~&48 s 3330: HELP }@A