Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_22.ADF » F/MUSTXT1
F/MUSTXT1
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_22.ADF |
Filename: | F/MUSTXT1 |
Read OK: | ✔ |
File size: | 19B2 bytes |
Load address: | 4D204556 |
Exec address: | 58545355 |
File contents
�..>......*.......*.......*.......*.......*.......*.......*.......*.......*.< Writing the screen for EUG22 Starting with the sound command details of which are in the user guide, I wrote a simple sound: 10 SOUND 1,-15,0,5 This produced a short tone. The third parameter sets the pitch of the sound. I set this to A% so that I could vary it: 10 SOUND 1,-15,A%,5 Now in order to get those values into the routine they need to be listed and put in in some sort of order. The way I did this was with a FOR NEXT loop and the READ statement. The values for A% are in the DATA statements. Initially I set these to play a short scale and used 8 notes. Because I wanted the data statements read one at a time alternating with the text being printed onto the screen I put each value into a separate line each begining with the command DATA. To make it easier to access these DATA statements with the program I started the DATA lines at 100. These DATA statements are read into the program with a read statement READ A%. To make the program cycle through each DATA value I used the FOR NEXT loop. This is B%=100 TO 170 STEP 10. The FOR NEXT loop has two effects. The first is to make the program cycle eight times, 100 to 170 in increments of 10. If this had been the only use of the FOR NEXT loop I could have used 1 to 7 but I needed to specify the line numbers from which the READ A% should access data. I put in the command RESTORE B%. RESTORE states which line the first DATA value can be found and is most useful when there are more than one sets of DATA lines and the two should not be mixed up. In this case there will be since the text is also in its own DATA lines. So B% starts off as being equal to 100 and with each cycle of the loop increases by 10 to 110, 120, 130 and so on. Finally I put in the NEXT command but added B% again because there is more than one FOR NEXT loop and I wanted to make sure that this loop didn't respond to the wrong NEXT. So now I had: 10 FOR B% = 100 to 170 STEP 10 20 SOUND 1,-15,A%,5 30 RESTORE B% 40 READ A% 50 NEXT B% 100 DATA 4 110 DATA 12 120 DATA 20 ect. The program will cycle eight times, reading a value for A% form a DATA line each time inserting this into the SOUND command which will play a note. Now onto the text, and back to the music later. The text routine isn't too different from the music routine. I started it at line 400 to give me plenty of space to expand the music routine later without having to renumber. The first line is a FOR NEXT loop this time using E% and counts from 500 to 600 in increments of 10 so that it cycles 11 times. Then a RESTORE statement followed by a READ this time the value was D$, $ because I am using string varibles, that is letters which need to be treated as they appear rather than numeric variables, indicated with %, which have to be used to calculate something else. So now I have: 400 FOR E% = 500 TO 600 STEP 10 410 RESTORE E% 420 READ D$ 430 PRINT D$SPC1; 440 NEXT 450 500 DATA EUG22 510 DATA MORE 520 DATA FUN ect. I put SPC1; into line 430 after the D$ to format the printout of the DATA to make it more attractive. To be honest the words were the first things which came into my head and when I tried to change them I had some trouble formatting new ones to make them visually interesting. And after all the point of the opening screen is visual effect rather than conveying information of any importance. Now back to the music. The first thing to do was to make sure that the text and music would be called up more or less at the same time. The easiest way to do this was to treat the text as a subroutine. This is like a procedure but is called with the command GOSUB <line number> . To my mind a subroutine isn't as flexable as a procedure or as good but PCs don't tend to use procedures and subroutines were on my mind at the time. I seem to remember an article in EU once which may have implyed that subroutines are faster. I'll have to look it up to check. Anyway subroutine it is and that means that at the end of the subroutine itself there must be a command RETURN to instruct the program to return to the main program: 450 RETURN Now it was quite important that the whole program continually cycled, printing a full screen of text then scrolling upwards to print more so giving that visual effect. If I just put GOSUB 400 then the text routine would have run for the length of the music routine's FOR NEXT loop and then restarted. This would have printed a few line of text then the screen would blank and another few lines of test would have been printed again from the top and so on. So I put: IF B%< 170 GOSUB 400 ELSE GOTO 10 This meant that the GOSUB was not called on the final cycle of the music's FOR NEXT loop and so was not reset. Now another problem is that BBC BASIC won't nest more than 10 FOR NEXT loops at a time, it it does an error is generated. Easy to deal with, start the program with: ON ERROR RUN Now I needed to have some means of stopping the program by pressing the SPACE bar and loading the main menu. I have used A=GET in the past but this won't work here since it will stop the program on each cycle. So I used: IF INKEY(-99) THEN CHAIN "MENU". INKEY(-99) will look for a key press in this case the key deemed (-99) which is the SPACE bar. If it detects it it will hijack the program otherwise it does nothing. By putting this line in the middle of the music loop it will be checked once with each cycle. So now the begining of my program looks like this: 10 ON ERROR RUN This causes errors to be ignored 20 MODE 3 For the text 30 FOR B% = 100 TO 170 STEP 10 Good old FOR NEXT loop 40 Back to this in a moment 50 SOUND 1,-15,A%,5 To make the music 60 IF B%< 170 GOSUB 400 ELSE GOTO 30 Calling the subroutine 70 IF INKEY(-99) THEN CHAIN "MENU" Leaving the program 80 RESTORE B% First line of DATA for READ A% 90 READ A%: NEXT Two statements on one line because I was running short of lines. 100 DATA 4 Value for 'C' in the SOUND table see the user guide.
00000000 81 2e 2e 3e 2e 2e 2e 2e 2e 2e 2a 2e 2e 2e 2e 2e |...>......*.....| 00000010 2e 2e 2a 2e 2e 2e 2e 2e 2e 2e 2a 2e 2e 2e 2e 2e |..*.......*.....| * 00000040 2e 2e 2a 2e 2e 2e 2e 2e 2e 2e 2a 2e 3c 0d 57 72 |..*.......*.<.Wr| 00000050 69 74 69 6e 67 20 74 68 65 20 73 63 72 65 65 6e |iting the screen| 00000060 20 66 6f 72 20 45 55 47 32 32 0d 0d 53 74 61 72 | for EUG22..Star| 00000070 74 69 6e 67 20 77 69 74 68 20 74 68 65 20 73 6f |ting with the so| 00000080 75 6e 64 20 63 6f 6d 6d 61 6e 64 20 64 65 74 61 |und command deta| 00000090 69 6c 73 20 6f 66 20 77 68 69 63 68 20 61 72 65 |ils of which are| 000000a0 20 69 6e 20 74 68 65 20 20 75 73 65 72 0d 67 75 | in the user.gu| 000000b0 69 64 65 2c 20 49 20 77 72 6f 74 65 20 61 20 73 |ide, I wrote a s| 000000c0 69 6d 70 6c 65 20 73 6f 75 6e 64 3a 0d 31 30 20 |imple sound:.10 | 000000d0 53 4f 55 4e 44 20 31 2c 2d 31 35 2c 30 2c 35 0d |SOUND 1,-15,0,5.| 000000e0 0d 54 68 69 73 20 70 72 6f 64 75 63 65 64 20 61 |.This produced a| 000000f0 20 73 68 6f 72 74 20 74 6f 6e 65 2e 0d 0d 54 68 | short tone...Th| 00000100 65 20 74 68 69 72 64 20 70 61 72 61 6d 65 74 65 |e third paramete| 00000110 72 20 73 65 74 73 20 74 68 65 20 70 69 74 63 68 |r sets the pitch| 00000120 20 6f 66 20 74 68 65 20 73 6f 75 6e 64 2e 20 49 | of the sound. I| 00000130 20 73 65 74 20 74 68 69 73 20 74 6f 20 41 25 0d | set this to A%.| 00000140 73 6f 20 74 68 61 74 20 49 20 63 6f 75 6c 64 20 |so that I could | 00000150 76 61 72 79 20 69 74 3a 0d 31 30 20 53 4f 55 4e |vary it:.10 SOUN| 00000160 44 20 31 2c 2d 31 35 2c 41 25 2c 35 0d 0d 4e 6f |D 1,-15,A%,5..No| 00000170 77 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 67 65 |w in order to ge| 00000180 74 20 74 68 6f 73 65 20 76 61 6c 75 65 73 20 69 |t those values i| 00000190 6e 74 6f 20 74 68 65 20 72 6f 75 74 69 6e 65 20 |nto the routine | 000001a0 74 68 65 79 20 6e 65 65 64 20 74 6f 20 62 65 20 |they need to be | 000001b0 6c 69 73 74 65 64 0d 61 6e 64 20 70 75 74 20 69 |listed.and put i| 000001c0 6e 20 69 6e 20 73 6f 6d 65 20 73 6f 72 74 20 6f |n in some sort o| 000001d0 66 20 6f 72 64 65 72 2e 20 54 68 65 20 77 61 79 |f order. The way| 000001e0 20 49 20 64 69 64 20 74 68 69 73 20 77 61 73 20 | I did this was | 000001f0 77 69 74 68 20 61 20 46 4f 52 20 4e 45 58 54 0d |with a FOR NEXT.| 00000200 6c 6f 6f 70 20 61 6e 64 20 74 68 65 20 52 45 41 |loop and the REA| 00000210 44 20 73 74 61 74 65 6d 65 6e 74 2e 0d 0d 54 68 |D statement...Th| 00000220 65 20 76 61 6c 75 65 73 20 66 6f 72 20 41 25 20 |e values for A% | 00000230 61 72 65 20 69 6e 20 74 68 65 20 44 41 54 41 20 |are in the DATA | 00000240 73 74 61 74 65 6d 65 6e 74 73 2e 20 49 6e 69 74 |statements. Init| 00000250 69 61 6c 6c 79 20 49 20 73 65 74 20 74 68 65 73 |ially I set thes| 00000260 65 20 74 6f 0d 70 6c 61 79 20 61 20 73 68 6f 72 |e to.play a shor| 00000270 74 20 73 63 61 6c 65 20 61 6e 64 20 75 73 65 64 |t scale and used| 00000280 20 38 20 6e 6f 74 65 73 2e 20 42 65 63 61 75 73 | 8 notes. Becaus| 00000290 65 20 49 20 77 61 6e 74 65 64 20 74 68 65 20 64 |e I wanted the d| 000002a0 61 74 61 20 73 74 61 74 65 6d 65 6e 74 73 0d 72 |ata statements.r| 000002b0 65 61 64 20 6f 6e 65 20 61 74 20 61 20 74 69 6d |ead one at a tim| 000002c0 65 20 61 6c 74 65 72 6e 61 74 69 6e 67 20 77 69 |e alternating wi| 000002d0 74 68 20 74 68 65 20 74 65 78 74 20 62 65 69 6e |th the text bein| 000002e0 67 20 70 72 69 6e 74 65 64 20 6f 6e 74 6f 20 74 |g printed onto t| 000002f0 68 65 20 73 63 72 65 65 6e 0d 49 20 70 75 74 20 |he screen.I put | 00000300 65 61 63 68 20 76 61 6c 75 65 20 69 6e 74 6f 20 |each value into | 00000310 61 20 73 65 70 61 72 61 74 65 20 6c 69 6e 65 20 |a separate line | 00000320 65 61 63 68 20 62 65 67 69 6e 69 6e 67 20 77 69 |each begining wi| 00000330 74 68 20 74 68 65 20 63 6f 6d 6d 61 6e 64 20 44 |th the command D| 00000340 41 54 41 2e 0d 54 6f 20 6d 61 6b 65 20 69 74 20 |ATA..To make it | 00000350 65 61 73 69 65 72 20 74 6f 20 61 63 63 65 73 73 |easier to access| 00000360 20 74 68 65 73 65 20 44 41 54 41 20 73 74 61 74 | these DATA stat| 00000370 65 6d 65 6e 74 73 20 77 69 74 68 20 74 68 65 20 |ements with the | 00000380 70 72 6f 67 72 61 6d 20 49 0d 73 74 61 72 74 65 |program I.starte| 00000390 64 20 74 68 65 20 44 41 54 41 20 6c 69 6e 65 73 |d the DATA lines| 000003a0 20 61 74 20 31 30 30 2e 20 0d 0d 54 68 65 73 65 | at 100. ..These| 000003b0 20 44 41 54 41 20 73 74 61 74 65 6d 65 6e 74 73 | DATA statements| 000003c0 20 61 72 65 20 72 65 61 64 20 69 6e 74 6f 20 74 | are read into t| 000003d0 68 65 20 70 72 6f 67 72 61 6d 20 77 69 74 68 20 |he program with | 000003e0 61 20 72 65 61 64 20 73 74 61 74 65 6d 65 6e 74 |a read statement| 000003f0 20 0d 52 45 41 44 20 41 25 2e 20 54 6f 20 6d 61 | .READ A%. To ma| 00000400 6b 65 20 74 68 65 20 70 72 6f 67 72 61 6d 20 63 |ke the program c| 00000410 79 63 6c 65 20 74 68 72 6f 75 67 68 20 65 61 63 |ycle through eac| 00000420 68 20 44 41 54 41 20 76 61 6c 75 65 20 49 20 75 |h DATA value I u| 00000430 73 65 64 20 74 68 65 20 46 4f 52 0d 4e 45 58 54 |sed the FOR.NEXT| 00000440 20 6c 6f 6f 70 2e 20 54 68 69 73 20 69 73 20 42 | loop. This is B| 00000450 25 3d 31 30 30 20 54 4f 20 31 37 30 20 53 54 45 |%=100 TO 170 STE| 00000460 50 20 31 30 2e 0d 0d 54 68 65 20 46 4f 52 20 4e |P 10...The FOR N| 00000470 45 58 54 20 6c 6f 6f 70 20 68 61 73 20 74 77 6f |EXT loop has two| 00000480 20 65 66 66 65 63 74 73 2e 20 54 68 65 20 66 69 | effects. The fi| 00000490 72 73 74 20 69 73 20 74 6f 20 6d 61 6b 65 20 74 |rst is to make t| 000004a0 68 65 20 70 72 6f 67 72 61 6d 20 63 79 63 6c 65 |he program cycle| 000004b0 0d 65 69 67 68 74 20 74 69 6d 65 73 2c 20 31 30 |.eight times, 10| 000004c0 30 20 74 6f 20 31 37 30 20 69 6e 20 69 6e 63 72 |0 to 170 in incr| 000004d0 65 6d 65 6e 74 73 20 6f 66 20 31 30 2e 20 49 66 |ements of 10. If| 000004e0 20 74 68 69 73 20 68 61 64 20 62 65 65 6e 20 74 | this had been t| 000004f0 68 65 20 6f 6e 6c 79 20 75 73 65 0d 6f 66 20 74 |he only use.of t| 00000500 68 65 20 46 4f 52 20 4e 45 58 54 20 6c 6f 6f 70 |he FOR NEXT loop| 00000510 20 49 20 63 6f 75 6c 64 20 68 61 76 65 20 75 73 | I could have us| 00000520 65 64 20 31 20 74 6f 20 37 20 62 75 74 20 49 20 |ed 1 to 7 but I | 00000530 6e 65 65 64 65 64 20 74 6f 20 73 70 65 63 69 66 |needed to specif| 00000540 79 20 74 68 65 0d 6c 69 6e 65 20 6e 75 6d 62 65 |y the.line numbe| 00000550 72 73 20 66 72 6f 6d 20 77 68 69 63 68 20 74 68 |rs from which th| 00000560 65 20 52 45 41 44 20 41 25 20 73 68 6f 75 6c 64 |e READ A% should| 00000570 20 61 63 63 65 73 73 20 64 61 74 61 2e 20 49 20 | access data. I | 00000580 70 75 74 20 69 6e 20 74 68 65 20 63 6f 6d 6d 61 |put in the comma| 00000590 6e 64 0d 52 45 53 54 4f 52 45 20 42 25 2e 20 52 |nd.RESTORE B%. R| 000005a0 45 53 54 4f 52 45 20 73 74 61 74 65 73 20 77 68 |ESTORE states wh| 000005b0 69 63 68 20 6c 69 6e 65 20 74 68 65 20 66 69 72 |ich line the fir| 000005c0 73 74 20 44 41 54 41 20 76 61 6c 75 65 20 63 61 |st DATA value ca| 000005d0 6e 20 62 65 20 66 6f 75 6e 64 0d 61 6e 64 20 69 |n be found.and i| 000005e0 73 20 6d 6f 73 74 20 75 73 65 66 75 6c 20 77 68 |s most useful wh| 000005f0 65 6e 20 74 68 65 72 65 20 61 72 65 20 6d 6f 72 |en there are mor| 00000600 65 20 74 68 61 6e 20 6f 6e 65 20 73 65 74 73 20 |e than one sets | 00000610 6f 66 20 44 41 54 41 20 6c 69 6e 65 73 20 61 6e |of DATA lines an| 00000620 64 20 74 68 65 0d 74 77 6f 20 73 68 6f 75 6c 64 |d the.two should| 00000630 20 6e 6f 74 20 62 65 20 6d 69 78 65 64 20 75 70 | not be mixed up| 00000640 2e 20 49 6e 20 74 68 69 73 20 63 61 73 65 20 74 |. In this case t| 00000650 68 65 72 65 20 77 69 6c 6c 20 62 65 20 73 69 6e |here will be sin| 00000660 63 65 20 74 68 65 20 74 65 78 74 20 69 73 0d 61 |ce the text is.a| 00000670 6c 73 6f 20 69 6e 20 69 74 73 20 6f 77 6e 20 44 |lso in its own D| 00000680 41 54 41 20 6c 69 6e 65 73 2e 20 53 6f 20 42 25 |ATA lines. So B%| 00000690 20 73 74 61 72 74 73 20 6f 66 66 20 61 73 20 62 | starts off as b| 000006a0 65 69 6e 67 20 65 71 75 61 6c 20 74 6f 20 31 30 |eing equal to 10| 000006b0 30 20 61 6e 64 0d 77 69 74 68 20 65 61 63 68 20 |0 and.with each | 000006c0 63 79 63 6c 65 20 6f 66 20 74 68 65 20 6c 6f 6f |cycle of the loo| 000006d0 70 20 69 6e 63 72 65 61 73 65 73 20 62 79 20 31 |p increases by 1| 000006e0 30 20 74 6f 20 31 31 30 2c 20 31 32 30 2c 20 31 |0 to 110, 120, 1| 000006f0 33 30 20 61 6e 64 20 73 6f 20 6f 6e 2e 20 0d 0d |30 and so on. ..| 00000700 46 69 6e 61 6c 6c 79 20 49 20 70 75 74 20 69 6e |Finally I put in| 00000710 20 74 68 65 20 4e 45 58 54 20 63 6f 6d 6d 61 6e | the NEXT comman| 00000720 64 20 62 75 74 20 61 64 64 65 64 20 42 25 20 61 |d but added B% a| 00000730 67 61 69 6e 20 62 65 63 61 75 73 65 20 74 68 65 |gain because the| 00000740 72 65 20 69 73 20 6d 6f 72 65 0d 74 68 61 6e 20 |re is more.than | 00000750 6f 6e 65 20 46 4f 52 20 4e 45 58 54 20 6c 6f 6f |one FOR NEXT loo| 00000760 70 20 61 6e 64 20 49 20 77 61 6e 74 65 64 20 74 |p and I wanted t| 00000770 6f 20 6d 61 6b 65 20 73 75 72 65 20 74 68 61 74 |o make sure that| 00000780 20 74 68 69 73 20 6c 6f 6f 70 20 64 69 64 6e 27 | this loop didn'| 00000790 74 0d 72 65 73 70 6f 6e 64 20 74 6f 20 74 68 65 |t.respond to the| 000007a0 20 77 72 6f 6e 67 20 4e 45 58 54 2e 0d 0d 53 6f | wrong NEXT...So| 000007b0 20 6e 6f 77 20 49 20 68 61 64 3a 20 20 31 30 20 | now I had: 10 | 000007c0 46 4f 52 20 42 25 20 3d 20 31 30 30 20 74 6f 20 |FOR B% = 100 to | 000007d0 31 37 30 20 53 54 45 50 20 31 30 0d 20 20 20 20 |170 STEP 10. | 000007e0 20 20 20 20 20 20 20 20 20 20 20 32 30 20 53 4f | 20 SO| 000007f0 55 4e 44 20 31 2c 2d 31 35 2c 41 25 2c 35 0d 20 |UND 1,-15,A%,5. | 00000800 20 20 20 20 20 20 20 20 20 20 20 20 20 20 33 30 | 30| 00000810 20 52 45 53 54 4f 52 45 20 42 25 0d 20 20 20 20 | RESTORE B%. | 00000820 20 20 20 20 20 20 20 20 20 20 20 34 30 20 52 45 | 40 RE| 00000830 41 44 20 41 25 0d 20 20 20 20 20 20 20 20 20 20 |AD A%. | 00000840 20 20 20 20 20 35 30 20 4e 45 58 54 20 42 25 0d | 50 NEXT B%.| 00000850 20 20 20 20 20 20 20 20 20 20 20 20 20 20 31 30 | 10| 00000860 30 20 44 41 54 41 20 34 0d 20 20 20 20 20 20 20 |0 DATA 4. | 00000870 20 20 20 20 20 20 20 31 31 30 20 44 41 54 41 20 | 110 DATA | 00000880 31 32 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 |12. | 00000890 20 31 32 30 20 44 41 54 41 20 32 30 0d 20 20 20 | 120 DATA 20. | 000008a0 20 20 20 20 20 20 20 20 20 20 20 65 63 74 2e 0d | ect..| 000008b0 54 68 65 20 70 72 6f 67 72 61 6d 20 77 69 6c 6c |The program will| 000008c0 20 63 79 63 6c 65 20 65 69 67 68 74 20 74 69 6d | cycle eight tim| 000008d0 65 73 2c 20 72 65 61 64 69 6e 67 20 61 20 76 61 |es, reading a va| 000008e0 6c 75 65 20 66 6f 72 20 41 25 20 66 6f 72 6d 20 |lue for A% form | 000008f0 61 20 44 41 54 41 0d 6c 69 6e 65 20 65 61 63 68 |a DATA.line each| 00000900 20 74 69 6d 65 20 69 6e 73 65 72 74 69 6e 67 20 | time inserting | 00000910 74 68 69 73 20 69 6e 74 6f 20 74 68 65 20 53 4f |this into the SO| 00000920 55 4e 44 20 63 6f 6d 6d 61 6e 64 20 77 68 69 63 |UND command whic| 00000930 68 20 77 69 6c 6c 20 70 6c 61 79 20 61 0d 6e 6f |h will play a.no| 00000940 74 65 2e 0d 0d 4e 6f 77 20 6f 6e 74 6f 20 74 68 |te...Now onto th| 00000950 65 20 74 65 78 74 2c 20 61 6e 64 20 62 61 63 6b |e text, and back| 00000960 20 74 6f 20 74 68 65 20 6d 75 73 69 63 20 6c 61 | to the music la| 00000970 74 65 72 2e 0d 0d 54 68 65 20 74 65 78 74 20 72 |ter...The text r| 00000980 6f 75 74 69 6e 65 20 69 73 6e 27 74 20 74 6f 6f |outine isn't too| 00000990 20 64 69 66 66 65 72 65 6e 74 20 66 72 6f 6d 20 | different from | 000009a0 74 68 65 20 6d 75 73 69 63 20 72 6f 75 74 69 6e |the music routin| 000009b0 65 2e 20 49 20 73 74 61 72 74 65 64 20 69 74 0d |e. I started it.| 000009c0 61 74 20 6c 69 6e 65 20 34 30 30 20 74 6f 20 67 |at line 400 to g| 000009d0 69 76 65 20 6d 65 20 70 6c 65 6e 74 79 20 6f 66 |ive me plenty of| 000009e0 20 73 70 61 63 65 20 74 6f 20 65 78 70 61 6e 64 | space to expand| 000009f0 20 74 68 65 20 6d 75 73 69 63 20 72 6f 75 74 69 | the music routi| 00000a00 6e 65 20 6c 61 74 65 72 0d 77 69 74 68 6f 75 74 |ne later.without| 00000a10 20 68 61 76 69 6e 67 20 74 6f 20 72 65 6e 75 6d | having to renum| 00000a20 62 65 72 2e 20 54 68 65 20 66 69 72 73 74 20 6c |ber. The first l| 00000a30 69 6e 65 20 69 73 20 61 20 46 4f 52 20 4e 45 58 |ine is a FOR NEX| 00000a40 54 20 6c 6f 6f 70 20 74 68 69 73 20 74 69 6d 65 |T loop this time| 00000a50 0d 75 73 69 6e 67 20 45 25 20 61 6e 64 20 63 6f |.using E% and co| 00000a60 75 6e 74 73 20 66 72 6f 6d 20 35 30 30 20 74 6f |unts from 500 to| 00000a70 20 36 30 30 20 69 6e 20 69 6e 63 72 65 6d 65 6e | 600 in incremen| 00000a80 74 73 20 6f 66 20 31 30 20 73 6f 20 74 68 61 74 |ts of 10 so that| 00000a90 20 69 74 20 63 79 63 6c 65 73 0d 31 31 20 74 69 | it cycles.11 ti| 00000aa0 6d 65 73 2e 20 54 68 65 6e 20 61 20 52 45 53 54 |mes. Then a REST| 00000ab0 4f 52 45 20 73 74 61 74 65 6d 65 6e 74 20 66 6f |ORE statement fo| 00000ac0 6c 6c 6f 77 65 64 20 62 79 20 61 20 52 45 41 44 |llowed by a READ| 00000ad0 20 74 68 69 73 20 74 69 6d 65 20 74 68 65 20 76 | this time the v| 00000ae0 61 6c 75 65 0d 77 61 73 20 44 24 2c 20 24 20 62 |alue.was D$, $ b| 00000af0 65 63 61 75 73 65 20 49 20 61 6d 20 75 73 69 6e |ecause I am usin| 00000b00 67 20 73 74 72 69 6e 67 20 76 61 72 69 62 6c 65 |g string varible| 00000b10 73 2c 20 74 68 61 74 20 69 73 20 6c 65 74 74 65 |s, that is lette| 00000b20 72 73 20 77 68 69 63 68 20 6e 65 65 64 0d 74 6f |rs which need.to| 00000b30 20 62 65 20 74 72 65 61 74 65 64 20 61 73 20 74 | be treated as t| 00000b40 68 65 79 20 61 70 70 65 61 72 20 72 61 74 68 65 |hey appear rathe| 00000b50 72 20 74 68 61 6e 20 6e 75 6d 65 72 69 63 20 76 |r than numeric v| 00000b60 61 72 69 61 62 6c 65 73 2c 20 69 6e 64 69 63 61 |ariables, indica| 00000b70 74 65 64 0d 77 69 74 68 20 25 2c 20 77 68 69 63 |ted.with %, whic| 00000b80 68 20 68 61 76 65 20 74 6f 20 62 65 20 75 73 65 |h have to be use| 00000b90 64 20 74 6f 20 63 61 6c 63 75 6c 61 74 65 20 73 |d to calculate s| 00000ba0 6f 6d 65 74 68 69 6e 67 20 65 6c 73 65 2e 0d 0d |omething else...| 00000bb0 53 6f 20 6e 6f 77 20 49 20 68 61 76 65 3a 20 34 |So now I have: 4| 00000bc0 30 30 20 46 4f 52 20 45 25 20 3d 20 35 30 30 20 |00 FOR E% = 500 | 00000bd0 54 4f 20 36 30 30 20 53 54 45 50 20 31 30 0d 20 |TO 600 STEP 10. | 00000be0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 34 31 | 41| 00000bf0 30 20 52 45 53 54 4f 52 45 20 45 25 0d 20 20 20 |0 RESTORE E%. | 00000c00 20 20 20 20 20 20 20 20 20 20 20 20 34 32 30 20 | 420 | 00000c10 52 45 41 44 20 44 24 0d 20 20 20 20 20 20 20 20 |READ D$. | 00000c20 20 20 20 20 20 20 20 34 33 30 20 50 52 49 4e 54 | 430 PRINT| 00000c30 20 44 24 53 50 43 31 3b 0d 20 20 20 20 20 20 20 | D$SPC1;. | 00000c40 20 20 20 20 20 20 20 20 34 34 30 20 4e 45 58 54 | 440 NEXT| 00000c50 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |. | 00000c60 34 35 30 20 0d 20 20 20 20 20 20 20 20 20 20 20 |450 . | 00000c70 20 20 20 20 35 30 30 20 44 41 54 41 20 45 55 47 | 500 DATA EUG| 00000c80 32 32 0d 20 20 20 20 20 20 20 20 20 20 20 20 20 |22. | 00000c90 20 20 35 31 30 20 44 41 54 41 20 4d 4f 52 45 0d | 510 DATA MORE.| 00000ca0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 35 | 5| 00000cb0 32 30 20 44 41 54 41 20 46 55 4e 0d 20 20 20 20 |20 DATA FUN. | 00000cc0 20 20 20 20 20 20 20 20 20 20 20 65 63 74 2e 0d | ect..| 00000cd0 0d 49 20 70 75 74 20 53 50 43 31 3b 20 69 6e 74 |.I put SPC1; int| 00000ce0 6f 20 6c 69 6e 65 20 34 33 30 20 61 66 74 65 72 |o line 430 after| 00000cf0 20 74 68 65 20 44 24 20 74 6f 20 66 6f 72 6d 61 | the D$ to forma| 00000d00 74 20 74 68 65 20 70 72 69 6e 74 6f 75 74 20 6f |t the printout o| 00000d10 66 20 74 68 65 20 44 41 54 41 0d 74 6f 20 6d 61 |f the DATA.to ma| 00000d20 6b 65 20 69 74 20 6d 6f 72 65 20 61 74 74 72 61 |ke it more attra| 00000d30 63 74 69 76 65 2e 20 54 6f 20 62 65 20 68 6f 6e |ctive. To be hon| 00000d40 65 73 74 20 74 68 65 20 77 6f 72 64 73 20 77 65 |est the words we| 00000d50 72 65 20 74 68 65 20 66 69 72 73 74 20 74 68 69 |re the first thi| 00000d60 6e 67 73 0d 77 68 69 63 68 20 63 61 6d 65 20 69 |ngs.which came i| 00000d70 6e 74 6f 20 6d 79 20 68 65 61 64 20 61 6e 64 20 |nto my head and | 00000d80 77 68 65 6e 20 49 20 74 72 69 65 64 20 74 6f 20 |when I tried to | 00000d90 63 68 61 6e 67 65 20 74 68 65 6d 20 49 20 68 61 |change them I ha| 00000da0 64 20 73 6f 6d 65 20 74 72 6f 75 62 6c 65 0d 66 |d some trouble.f| 00000db0 6f 72 6d 61 74 74 69 6e 67 20 6e 65 77 20 6f 6e |ormatting new on| 00000dc0 65 73 20 74 6f 20 6d 61 6b 65 20 74 68 65 6d 20 |es to make them | 00000dd0 76 69 73 75 61 6c 6c 79 20 69 6e 74 65 72 65 73 |visually interes| 00000de0 74 69 6e 67 2e 20 41 6e 64 20 61 66 74 65 72 20 |ting. And after | 00000df0 61 6c 6c 20 74 68 65 0d 70 6f 69 6e 74 20 6f 66 |all the.point of| 00000e00 20 74 68 65 20 6f 70 65 6e 69 6e 67 20 73 63 72 | the opening scr| 00000e10 65 65 6e 20 69 73 20 76 69 73 75 61 6c 20 65 66 |een is visual ef| 00000e20 66 65 63 74 20 72 61 74 68 65 72 20 74 68 61 6e |fect rather than| 00000e30 20 63 6f 6e 76 65 79 69 6e 67 0d 69 6e 66 6f 72 | conveying.infor| 00000e40 6d 61 74 69 6f 6e 20 6f 66 20 61 6e 79 20 69 6d |mation of any im| 00000e50 70 6f 72 74 61 6e 63 65 2e 0d 0d 4e 6f 77 20 62 |portance...Now b| 00000e60 61 63 6b 20 74 6f 20 74 68 65 20 6d 75 73 69 63 |ack to the music| 00000e70 2e 0d 0d 54 68 65 20 66 69 72 73 74 20 74 68 69 |...The first thi| 00000e80 6e 67 20 74 6f 20 64 6f 20 77 61 73 20 74 6f 20 |ng to do was to | 00000e90 6d 61 6b 65 20 73 75 72 65 20 74 68 61 74 20 74 |make sure that t| 00000ea0 68 65 20 74 65 78 74 20 61 6e 64 20 6d 75 73 69 |he text and musi| 00000eb0 63 20 77 6f 75 6c 64 20 62 65 0d 63 61 6c 6c 65 |c would be.calle| 00000ec0 64 20 75 70 20 6d 6f 72 65 20 6f 72 20 6c 65 73 |d up more or les| 00000ed0 73 20 61 74 20 74 68 65 20 73 61 6d 65 20 74 69 |s at the same ti| 00000ee0 6d 65 2e 20 54 68 65 20 65 61 73 69 65 73 74 20 |me. The easiest | 00000ef0 77 61 79 20 74 6f 20 64 6f 20 74 68 69 73 20 77 |way to do this w| 00000f00 61 73 20 74 6f 0d 74 72 65 61 74 20 74 68 65 20 |as to.treat the | 00000f10 74 65 78 74 20 61 73 20 61 20 73 75 62 72 6f 75 |text as a subrou| 00000f20 74 69 6e 65 2e 20 54 68 69 73 20 69 73 20 6c 69 |tine. This is li| 00000f30 6b 65 20 61 20 70 72 6f 63 65 64 75 72 65 20 62 |ke a procedure b| 00000f40 75 74 20 69 73 20 63 61 6c 6c 65 64 0d 77 69 74 |ut is called.wit| 00000f50 68 20 74 68 65 20 63 6f 6d 6d 61 6e 64 20 47 4f |h the command GO| 00000f60 53 55 42 20 3c 6c 69 6e 65 20 6e 75 6d 62 65 72 |SUB <line number| 00000f70 3e 20 2e 20 54 6f 20 6d 79 20 6d 69 6e 64 20 61 |> . To my mind a| 00000f80 20 73 75 62 72 6f 75 74 69 6e 65 20 69 73 6e 27 | subroutine isn'| 00000f90 74 20 61 73 0d 66 6c 65 78 61 62 6c 65 20 61 73 |t as.flexable as| 00000fa0 20 61 20 70 72 6f 63 65 64 75 72 65 20 6f 72 20 | a procedure or | 00000fb0 61 73 20 67 6f 6f 64 20 62 75 74 20 50 43 73 20 |as good but PCs | 00000fc0 64 6f 6e 27 74 20 74 65 6e 64 20 74 6f 20 75 73 |don't tend to us| 00000fd0 65 20 70 72 6f 63 65 64 75 72 65 73 0d 61 6e 64 |e procedures.and| 00000fe0 20 73 75 62 72 6f 75 74 69 6e 65 73 20 77 65 72 | subroutines wer| 00000ff0 65 20 6f 6e 20 6d 79 20 6d 69 6e 64 20 61 74 20 |e on my mind at | 00001000 74 68 65 20 74 69 6d 65 2e 20 49 20 73 65 65 6d |the time. I seem| 00001010 20 74 6f 20 72 65 6d 65 6d 62 65 72 20 61 6e 20 | to remember an | 00001020 61 72 74 69 63 6c 65 0d 69 6e 20 45 55 20 6f 6e |article.in EU on| 00001030 63 65 20 77 68 69 63 68 20 6d 61 79 20 68 61 76 |ce which may hav| 00001040 65 20 69 6d 70 6c 79 65 64 20 74 68 61 74 20 73 |e implyed that s| 00001050 75 62 72 6f 75 74 69 6e 65 73 20 61 72 65 20 66 |ubroutines are f| 00001060 61 73 74 65 72 2e 20 49 27 6c 6c 20 68 61 76 65 |aster. I'll have| 00001070 0d 74 6f 20 6c 6f 6f 6b 20 69 74 20 75 70 20 74 |.to look it up t| 00001080 6f 20 63 68 65 63 6b 2e 0d 0d 41 6e 79 77 61 79 |o check...Anyway| 00001090 20 73 75 62 72 6f 75 74 69 6e 65 20 69 74 20 69 | subroutine it i| 000010a0 73 20 61 6e 64 20 74 68 61 74 20 6d 65 61 6e 73 |s and that means| 000010b0 20 74 68 61 74 20 61 74 20 74 68 65 20 65 6e 64 | that at the end| 000010c0 20 6f 66 20 74 68 65 20 73 75 62 72 6f 75 74 69 | of the subrouti| 000010d0 6e 65 0d 69 74 73 65 6c 66 20 74 68 65 72 65 20 |ne.itself there | 000010e0 6d 75 73 74 20 62 65 20 61 20 63 6f 6d 6d 61 6e |must be a comman| 000010f0 64 20 52 45 54 55 52 4e 20 74 6f 20 69 6e 73 74 |d RETURN to inst| 00001100 72 75 63 74 20 74 68 65 20 70 72 6f 67 72 61 6d |ruct the program| 00001110 20 74 6f 20 72 65 74 75 72 6e 20 74 6f 0d 74 68 | to return to.th| 00001120 65 20 6d 61 69 6e 20 70 72 6f 67 72 61 6d 3a 0d |e main program:.| 00001130 0d 34 35 30 20 52 45 54 55 52 4e 0d 0d 4e 6f 77 |.450 RETURN..Now| 00001140 20 69 74 20 77 61 73 20 71 75 69 74 65 20 69 6d | it was quite im| 00001150 70 6f 72 74 61 6e 74 20 74 68 61 74 20 74 68 65 |portant that the| 00001160 20 77 68 6f 6c 65 20 70 72 6f 67 72 61 6d 20 63 | whole program c| 00001170 6f 6e 74 69 6e 75 61 6c 6c 79 20 63 79 63 6c 65 |ontinually cycle| 00001180 64 2c 0d 70 72 69 6e 74 69 6e 67 20 61 20 66 75 |d,.printing a fu| 00001190 6c 6c 20 73 63 72 65 65 6e 20 6f 66 20 74 65 78 |ll screen of tex| 000011a0 74 20 74 68 65 6e 20 73 63 72 6f 6c 6c 69 6e 67 |t then scrolling| 000011b0 20 75 70 77 61 72 64 73 20 74 6f 20 70 72 69 6e | upwards to prin| 000011c0 74 20 6d 6f 72 65 20 73 6f 0d 67 69 76 69 6e 67 |t more so.giving| 000011d0 20 74 68 61 74 20 76 69 73 75 61 6c 20 65 66 66 | that visual eff| 000011e0 65 63 74 2e 20 49 66 20 49 20 6a 75 73 74 20 70 |ect. If I just p| 000011f0 75 74 20 47 4f 53 55 42 20 34 30 30 20 74 68 65 |ut GOSUB 400 the| 00001200 6e 20 74 68 65 20 74 65 78 74 20 72 6f 75 74 69 |n the text routi| 00001210 6e 65 0d 77 6f 75 6c 64 20 68 61 76 65 20 72 75 |ne.would have ru| 00001220 6e 20 66 6f 72 20 74 68 65 20 6c 65 6e 67 74 68 |n for the length| 00001230 20 6f 66 20 74 68 65 20 6d 75 73 69 63 20 72 6f | of the music ro| 00001240 75 74 69 6e 65 27 73 20 46 4f 52 20 4e 45 58 54 |utine's FOR NEXT| 00001250 20 6c 6f 6f 70 20 61 6e 64 0d 74 68 65 6e 20 72 | loop and.then r| 00001260 65 73 74 61 72 74 65 64 2e 20 54 68 69 73 20 77 |estarted. This w| 00001270 6f 75 6c 64 20 68 61 76 65 20 70 72 69 6e 74 65 |ould have printe| 00001280 64 20 61 20 66 65 77 20 6c 69 6e 65 20 6f 66 20 |d a few line of | 00001290 74 65 78 74 20 74 68 65 6e 20 74 68 65 20 73 63 |text then the sc| 000012a0 72 65 65 6e 0d 77 6f 75 6c 64 20 62 6c 61 6e 6b |reen.would blank| 000012b0 20 61 6e 64 20 61 6e 6f 74 68 65 72 20 66 65 77 | and another few| 000012c0 20 6c 69 6e 65 73 20 6f 66 20 74 65 73 74 20 77 | lines of test w| 000012d0 6f 75 6c 64 20 68 61 76 65 20 62 65 65 6e 20 70 |ould have been p| 000012e0 72 69 6e 74 65 64 20 61 67 61 69 6e 0d 66 72 6f |rinted again.fro| 000012f0 6d 20 74 68 65 20 74 6f 70 20 61 6e 64 20 73 6f |m the top and so| 00001300 20 6f 6e 2e 20 53 6f 20 49 20 70 75 74 3a 20 49 | on. So I put: I| 00001310 46 20 42 25 3c 20 31 37 30 20 47 4f 53 55 42 20 |F B%< 170 GOSUB | 00001320 34 30 30 20 45 4c 53 45 20 47 4f 54 4f 20 31 30 |400 ELSE GOTO 10| 00001330 0d 0d 54 68 69 73 20 6d 65 61 6e 74 20 74 68 61 |..This meant tha| 00001340 74 20 74 68 65 20 47 4f 53 55 42 20 77 61 73 20 |t the GOSUB was | 00001350 6e 6f 74 20 63 61 6c 6c 65 64 20 6f 6e 20 74 68 |not called on th| 00001360 65 20 66 69 6e 61 6c 20 63 79 63 6c 65 20 6f 66 |e final cycle of| 00001370 20 74 68 65 20 6d 75 73 69 63 27 73 0d 46 4f 52 | the music's.FOR| 00001380 20 4e 45 58 54 20 6c 6f 6f 70 20 61 6e 64 20 73 | NEXT loop and s| 00001390 6f 20 77 61 73 20 6e 6f 74 20 72 65 73 65 74 2e |o was not reset.| 000013a0 0d 0d 4e 6f 77 20 61 6e 6f 74 68 65 72 20 70 72 |..Now another pr| 000013b0 6f 62 6c 65 6d 20 69 73 20 74 68 61 74 20 42 42 |oblem is that BB| 000013c0 43 20 42 41 53 49 43 20 77 6f 6e 27 74 20 6e 65 |C BASIC won't ne| 000013d0 73 74 20 6d 6f 72 65 20 74 68 61 6e 20 31 30 20 |st more than 10 | 000013e0 46 4f 52 20 4e 45 58 54 0d 6c 6f 6f 70 73 20 61 |FOR NEXT.loops a| 000013f0 74 20 61 20 74 69 6d 65 2c 20 69 74 20 69 74 20 |t a time, it it | 00001400 64 6f 65 73 20 61 6e 20 65 72 72 6f 72 20 69 73 |does an error is| 00001410 20 67 65 6e 65 72 61 74 65 64 2e 20 45 61 73 79 | generated. Easy| 00001420 20 74 6f 20 64 65 61 6c 20 77 69 74 68 2c 0d 73 | to deal with,.s| 00001430 74 61 72 74 20 74 68 65 20 70 72 6f 67 72 61 6d |tart the program| 00001440 20 77 69 74 68 3a 20 4f 4e 20 45 52 52 4f 52 20 | with: ON ERROR | 00001450 52 55 4e 0d 0d 4e 6f 77 20 49 20 6e 65 65 64 65 |RUN..Now I neede| 00001460 64 20 74 6f 20 68 61 76 65 20 73 6f 6d 65 20 6d |d to have some m| 00001470 65 61 6e 73 20 6f 66 20 73 74 6f 70 70 69 6e 67 |eans of stopping| 00001480 20 74 68 65 20 70 72 6f 67 72 61 6d 20 62 79 20 | the program by | 00001490 70 72 65 73 73 69 6e 67 20 74 68 65 0d 53 50 41 |pressing the.SPA| 000014a0 43 45 20 62 61 72 20 61 6e 64 20 6c 6f 61 64 69 |CE bar and loadi| 000014b0 6e 67 20 74 68 65 20 6d 61 69 6e 20 6d 65 6e 75 |ng the main menu| 000014c0 2e 20 0d 0d 49 20 68 61 76 65 20 75 73 65 64 20 |. ..I have used | 000014d0 41 3d 47 45 54 20 69 6e 20 74 68 65 20 70 61 73 |A=GET in the pas| 000014e0 74 20 62 75 74 20 74 68 69 73 20 77 6f 6e 27 74 |t but this won't| 000014f0 20 77 6f 72 6b 20 68 65 72 65 20 73 69 6e 63 65 | work here since| 00001500 20 69 74 20 77 69 6c 6c 20 73 74 6f 70 0d 74 68 | it will stop.th| 00001510 65 20 70 72 6f 67 72 61 6d 20 6f 6e 20 65 61 63 |e program on eac| 00001520 68 20 63 79 63 6c 65 2e 20 53 6f 20 49 20 75 73 |h cycle. So I us| 00001530 65 64 3a 20 49 46 20 49 4e 4b 45 59 28 2d 39 39 |ed: IF INKEY(-99| 00001540 29 20 54 48 45 4e 20 43 48 41 49 4e 20 22 4d 45 |) THEN CHAIN "ME| 00001550 4e 55 22 2e 0d 0d 49 4e 4b 45 59 28 2d 39 39 29 |NU"...INKEY(-99)| 00001560 20 77 69 6c 6c 20 6c 6f 6f 6b 20 66 6f 72 20 61 | will look for a| 00001570 20 6b 65 79 20 70 72 65 73 73 20 69 6e 20 74 68 | key press in th| 00001580 69 73 20 63 61 73 65 20 74 68 65 20 6b 65 79 20 |is case the key | 00001590 64 65 65 6d 65 64 20 28 2d 39 39 29 0d 77 68 69 |deemed (-99).whi| 000015a0 63 68 20 69 73 20 74 68 65 20 53 50 41 43 45 20 |ch is the SPACE | 000015b0 62 61 72 2e 20 49 66 20 69 74 20 64 65 74 65 63 |bar. If it detec| 000015c0 74 73 20 69 74 20 69 74 20 77 69 6c 6c 20 68 69 |ts it it will hi| 000015d0 6a 61 63 6b 20 74 68 65 20 70 72 6f 67 72 61 6d |jack the program| 000015e0 0d 6f 74 68 65 72 77 69 73 65 20 69 74 20 64 6f |.otherwise it do| 000015f0 65 73 20 6e 6f 74 68 69 6e 67 2e 20 42 79 20 70 |es nothing. By p| 00001600 75 74 74 69 6e 67 20 74 68 69 73 20 6c 69 6e 65 |utting this line| 00001610 20 69 6e 20 74 68 65 20 6d 69 64 64 6c 65 20 6f | in the middle o| 00001620 66 20 74 68 65 20 6d 75 73 69 63 0d 6c 6f 6f 70 |f the music.loop| 00001630 20 69 74 20 77 69 6c 6c 20 62 65 20 63 68 65 63 | it will be chec| 00001640 6b 65 64 20 6f 6e 63 65 20 77 69 74 68 20 65 61 |ked once with ea| 00001650 63 68 20 63 79 63 6c 65 2e 0d 0d 53 6f 20 6e 6f |ch cycle...So no| 00001660 77 20 74 68 65 20 62 65 67 69 6e 69 6e 67 20 6f |w the begining o| 00001670 66 20 6d 79 20 70 72 6f 67 72 61 6d 20 6c 6f 6f |f my program loo| 00001680 6b 73 20 6c 69 6b 65 20 74 68 69 73 3a 0d 31 30 |ks like this:.10| 00001690 20 4f 4e 20 45 52 52 4f 52 20 52 55 4e 20 20 20 | ON ERROR RUN | 000016a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000016b0 20 20 20 20 20 20 20 20 54 68 69 73 20 63 61 75 | This cau| 000016c0 73 65 73 20 65 72 72 6f 72 73 20 74 6f 20 62 65 |ses errors to be| 000016d0 20 69 67 6e 6f 72 65 64 0d 32 30 20 4d 4f 44 45 | ignored.20 MODE| 000016e0 20 33 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | 3 | 000016f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001700 20 20 20 46 6f 72 20 74 68 65 20 74 65 78 74 0d | For the text.| 00001710 33 30 20 46 4f 52 20 42 25 20 3d 20 31 30 30 20 |30 FOR B% = 100 | 00001720 54 4f 20 31 37 30 20 53 54 45 50 20 31 30 20 20 |TO 170 STEP 10 | 00001730 20 20 20 20 20 20 20 20 20 20 47 6f 6f 64 20 6f | Good o| 00001740 6c 64 20 46 4f 52 20 4e 45 58 54 20 6c 6f 6f 70 |ld FOR NEXT loop| 00001750 0d 34 30 20 20 20 20 20 20 20 20 20 20 20 20 20 |.40 | 00001760 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001770 20 20 20 20 20 20 20 20 20 20 20 42 61 63 6b 20 | Back | 00001780 74 6f 20 74 68 69 73 20 69 6e 20 61 20 6d 6f 6d |to this in a mom| 00001790 65 6e 74 0d 35 30 20 53 4f 55 4e 44 20 31 2c 2d |ent.50 SOUND 1,-| 000017a0 31 35 2c 41 25 2c 35 20 20 20 20 20 20 20 20 20 |15,A%,5 | 000017b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 6f | To| 000017c0 20 6d 61 6b 65 20 74 68 65 20 6d 75 73 69 63 20 | make the music | 000017d0 0d 36 30 20 49 46 20 42 25 3c 20 31 37 30 20 47 |.60 IF B%< 170 G| 000017e0 4f 53 55 42 20 34 30 30 20 45 4c 53 45 20 47 4f |OSUB 400 ELSE GO| 000017f0 54 4f 20 33 30 20 20 20 20 20 20 43 61 6c 6c 69 |TO 30 Calli| 00001800 6e 67 20 74 68 65 20 73 75 62 72 6f 75 74 69 6e |ng the subroutin| 00001810 65 0d 37 30 20 49 46 20 49 4e 4b 45 59 28 2d 39 |e.70 IF INKEY(-9| 00001820 39 29 20 54 48 45 4e 20 43 48 41 49 4e 20 22 4d |9) THEN CHAIN "M| 00001830 45 4e 55 22 20 20 20 20 20 20 20 20 4c 65 61 76 |ENU" Leav| 00001840 69 6e 67 20 74 68 65 20 70 72 6f 67 72 61 6d 0d |ing the program.| 00001850 38 30 20 52 45 53 54 4f 52 45 20 42 25 20 20 20 |80 RESTORE B% | 00001860 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001870 20 20 20 20 20 20 20 20 20 20 46 69 72 73 74 20 | First | 00001880 6c 69 6e 65 20 6f 66 20 44 41 54 41 20 66 6f 72 |line of DATA for| 00001890 20 52 45 41 44 20 41 25 0d 39 30 20 52 45 41 44 | READ A%.90 READ| 000018a0 20 41 25 3a 20 4e 45 58 54 20 20 20 20 20 20 20 | A%: NEXT | 000018b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000018c0 20 20 20 54 77 6f 20 73 74 61 74 65 6d 65 6e 74 | Two statement| 000018d0 73 20 6f 6e 20 6f 6e 65 20 6c 69 6e 65 0d 20 20 |s on one line. | 000018e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00001900 20 20 20 62 65 63 61 75 73 65 20 49 20 77 61 73 | because I was| 00001910 20 72 75 6e 6e 69 6e 67 20 73 68 6f 72 74 20 6f | running short o| 00001920 66 20 6c 69 6e 65 73 2e 0d 31 30 30 20 44 41 54 |f lines..100 DAT| 00001930 41 20 34 20 20 20 20 20 20 20 20 20 20 20 20 20 |A 4 | 00001940 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001950 20 20 20 56 61 6c 75 65 20 66 6f 72 20 27 43 27 | Value for 'C'| 00001960 20 69 6e 20 74 68 65 20 53 4f 55 4e 44 20 74 61 | in the SOUND ta| 00001970 62 6c 65 0d 20 20 20 20 20 20 20 20 20 20 20 20 |ble. | 00001980 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001990 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 65 | se| 000019a0 65 20 74 68 65 20 75 73 65 72 20 67 75 69 64 65 |e the user guide| 000019b0 2e 0d |..| 000019b2