Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_23.ADF » F/M\Ctut1
F/M\Ctut1
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_23.ADF |
Filename: | F/M\Ctut1 |
Read OK: | ✔ |
File size: | 1A5B bytes |
Load address: | 4D206576 |
Exec address: | 7574432F |
File contents
USING THE ASSEMBLER 6 ~~~~~~~~~~~~~~~~~~~~~ By Richard Dimond As promised, I now will describe the making of maps for arcade type games as I wanted to publish my version of Mr Miner which was published as a hybrid (BASIC plus M/code) program in EU Sep 1987. This is really the same as in BASIC but the DATA is loaded to an address within the M/code file. A map consists of data for the various characters represented by letters or numbers. In this game the letters A to I are used to represent - A - Brick wall B - Rock C - Diamond D - Mushroom E - Earth F - Space G - Man H - Safe (containing a diamond) I - Flashing key I have included a program (MAZELD) which LOADs and SAVEs the original levels. These are SAVEd as MAZE1. The program asks for the suffix number before the file is SAVEd. The files are saved for loading at &1EE0 as is needed for the M/code file. The data lines are arranged in 25 lines of 18 characters, which is the size of the play area for each level, so that you may be able see how the map will appear on the screen by comparing the codes used. You can alter these lines and re-SAVE the file with a different suffix number to see the effect. I will now describe how I have made up the M/code for the game and comment on the routines used. Due to the length of the assembler listings, the code is assembled in two parts and then these are LOADed together and SAVEd as one file with the short program MINERldr. This must be RUN at &E00. Do NOT run this program without first setting up the code with MINsrc2 as P% will not be set the end of the code. In both parts, I found it more convenient to assemble the code below PAGE and the assembler programs must be RUN with PAGE at &1D00. The code is then assembled at &E00 but as if assembled at the correct address. This is done by using OPT 4 - 7 instead of OPT 0 - 3. This assembles at O% but with addresses as for P%. PAGE must be initially at &E00 so ADFS users will not be able to use these programs (unless they use tape?) but can LIST them to see how they are made up. Also, the length of the second part needs HIMEM to be raised too. I have included a short program (MINs2rn) which sets PAGE and HIMEM before CHAINing MINsrc2 for those with 32k Elks who might like to experiment with these. Both programs are set to RUN at &1D00 by line 50 in each program. Program 1 (MINsrc1) is the assembler listing of the original M/code and DATA though I have altered the addresses so as to combine the code into one file which is to be loaded to &1D00. This saves the file MIN1 (addresses &1D00 to &2B7C) Line 60 loads the sprite data to &1D00, DATA lines 140 - 200 Lines 70-90 loads the map data to &1EE0, DATA lines 210 - 320 Line 100 loads the tune data to &27AA, DATA lines 330 - 360 The PROCassem is then called to assemble the code at &2885. I will not describe this in too much detail, partly because I have not studied it enough to do so but I want say more about what I have done in the second part. I hope the following brief notes will be of interest. I will refer to the lines of the assembler listing which produce the code for each routine. Subroutine Z% (lines 450-470) is the code for the tune at &2885. This loads the value for pitch and duration, depending on the value of the variable 'p', which are loaded into the sound buffer at &AF0 (line 460). The value of 'p' decrases by each time the code is called so producing a different note. Because the event vector is set to Z%, the tune will start by using *FX14,4 and continue until *FX13,4 is used. Subroutine S% (480-830) reads the character number from the data and, after the comparison, loads the address of the character data into &80 and &81. This is then used by the print subroutine to print the sprite. This routine was explained in a series of articles in EU (Feb - Sep 1988). Subroutine R% (840-1060) is concerned with the falling of rocks and squashing of mushrooms and whether you lose a life. Subroutine T% (1070-1120) replaces safes with diamonds when the key is collected. Program 2 (MINsrc2) is my additional M/code and includes several routines already described. This creates file MIN2 for loading to &2B7D. It is arranged in three sections as in the program for the tutorial. 1. Main loop (lines 80 - 470) 2. Subroutines (lines 480 - 1570) 3. Data (lines 1580 - 2090) I will first write notes on the subroutines. p (480,490) is the loop given last time for giving the commands in the data lines as was explained. dh (500-520) is the double size printing routine as given earlier. choose (530-670) responds to the key pressed. P ends the procedure to start the game L calls the subroutine mload for loading other maze files S and Q call the subroutines for turning the sound on/off 1, 2 and 3 set the value the variable spd to set the speed of the game as explained in an earlier article. I had to experiment with the number of ASL As and also add the SBC in line 630 to get a good choice of speeds. Those who are able to re-assemble the code may like to experiment with this. init (680-740) sets the variables. Loads &5300 to &56FF with the brick character number(224) lines 700,710. This is done so that, when each level is loaded over this area, there is a border three bricks wide around the play area. The routine also loads &5700 to &57FF with space characters(229) and calls the subroutine env for setting up the sound envelopes. sdoff and sdon (750,760) are the M/code equivalents of *FX210,1 and *FX210,0. sond1 to sond6 (770-820) when called give the sounds needed. The values of A, X and Y need to be preserved each time and therefore PUSHed and PULLed from the stack. The sound is given by using osword with register A loaded with 7 and the address of the data in X and Y registers. The data needed are the four sound parameters entered as words (EQUW), DATA lines 1880-1930. env (830-850) set up the three envelopes. Each is set up with osword in the same way but with A register loaded with 8 and data lines with the 14 parameters entered as bytes (EQUB), DATA lines 1850-1870. delsp, dels and dell (860-880) are delay routines and are simply nested loops as given in an earlier article. dels and dell are short and long delays and delsp depends on the value of the variable spd which has been selcted. Again the number NOPs could be varied if anyone wishes to do this.
00000000 0d 55 53 49 4e 47 20 54 48 45 20 41 53 53 45 4d |.USING THE ASSEM| 00000010 42 4c 45 52 20 36 0d 7e 7e 7e 7e 7e 7e 7e 7e 7e |BLER 6.~~~~~~~~~| 00000020 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 0d 42 79 20 |~~~~~~~~~~~~.By | 00000030 52 69 63 68 61 72 64 20 44 69 6d 6f 6e 64 0d 0d |Richard Dimond..| 00000040 41 73 20 70 72 6f 6d 69 73 65 64 2c 20 49 20 6e |As promised, I n| 00000050 6f 77 20 77 69 6c 6c 1a 20 64 65 73 63 72 69 62 |ow will. describ| 00000060 65 20 74 68 65 20 6d 61 6b 69 6e 67 20 6f 66 20 |e the making of | 00000070 6d 61 70 73 20 66 6f 72 20 61 72 63 61 64 65 20 |maps for arcade | 00000080 74 79 70 65 20 67 61 6d 65 73 0d 61 73 20 49 20 |type games.as I | 00000090 77 61 6e 74 65 64 20 74 6f 20 70 75 62 6c 69 73 |wanted to publis| 000000a0 68 20 6d 79 1a 20 76 65 72 73 69 6f 6e 1a 20 6f |h my. version. o| 000000b0 66 1a 20 4d 72 1a 20 4d 69 6e 65 72 20 77 68 69 |f. Mr. Miner whi| 000000c0 63 68 20 77 61 73 20 70 75 62 6c 69 73 68 65 64 |ch was published| 000000d0 20 61 73 20 61 0d 68 79 62 72 69 64 20 28 42 41 | as a.hybrid (BA| 000000e0 53 49 43 20 70 6c 75 73 20 4d 2f 63 6f 64 65 29 |SIC plus M/code)| 000000f0 20 70 72 6f 67 72 61 6d 20 69 6e 20 45 55 20 53 | program in EU S| 00000100 65 70 20 31 39 38 37 2e 0d 0d 54 68 69 73 20 69 |ep 1987...This i| 00000110 73 20 72 65 61 6c 6c 79 20 74 68 65 20 73 61 6d |s really the sam| 00000120 65 20 61 73 20 69 6e 20 42 41 53 49 43 20 62 75 |e as in BASIC bu| 00000130 74 20 74 68 65 1a 20 44 41 54 41 1a 20 69 73 20 |t the. DATA. is | 00000140 6c 6f 61 64 65 64 20 74 6f 20 61 6e 20 61 64 64 |loaded to an add| 00000150 72 65 73 73 0d 77 69 74 68 69 6e 20 74 68 65 20 |ress.within the | 00000160 4d 2f 63 6f 64 65 20 66 69 6c 65 2e 0d 0d 41 20 |M/code file...A | 00000170 6d 61 70 20 63 6f 6e 73 69 73 74 73 20 6f 66 20 |map consists of | 00000180 64 61 74 61 20 66 6f 72 20 74 68 65 1a 20 76 61 |data for the. va| 00000190 72 69 6f 75 73 1a 20 63 68 61 72 61 63 74 65 72 |rious. character| 000001a0 73 20 72 65 70 72 65 73 65 6e 74 65 64 20 62 79 |s represented by| 000001b0 20 6c 65 74 74 65 72 73 0d 6f 72 20 6e 75 6d 62 | letters.or numb| 000001c0 65 72 73 2e 20 20 49 6e 20 74 68 69 73 20 67 61 |ers. In this ga| 000001d0 6d 65 20 74 68 65 20 6c 65 74 74 65 72 73 20 41 |me the letters A| 000001e0 20 74 6f 20 49 20 61 72 65 20 75 73 65 64 20 74 | to I are used t| 000001f0 6f 20 72 65 70 72 65 73 65 6e 74 20 2d 0d 0d 20 |o represent -.. | 00000200 20 20 20 20 20 20 41 20 2d 20 42 72 69 63 6b 20 | A - Brick | 00000210 77 61 6c 6c 0d 20 20 20 20 20 20 20 42 20 2d 20 |wall. B - | 00000220 52 6f 63 6b 0d 20 20 20 20 20 20 20 43 20 2d 20 |Rock. C - | 00000230 44 69 61 6d 6f 6e 64 0d 20 20 20 20 20 20 20 44 |Diamond. D| 00000240 20 2d 20 4d 75 73 68 72 6f 6f 6d 0d 20 20 20 20 | - Mushroom. | 00000250 20 20 20 45 20 2d 20 45 61 72 74 68 0d 20 20 20 | E - Earth. | 00000260 20 20 20 20 46 20 2d 20 53 70 61 63 65 0d 20 20 | F - Space. | 00000270 20 20 20 20 20 47 20 2d 20 4d 61 6e 0d 20 20 20 | G - Man. | 00000280 20 20 20 20 48 20 2d 20 53 61 66 65 20 28 63 6f | H - Safe (co| 00000290 6e 74 61 69 6e 69 6e 67 20 61 20 64 69 61 6d 6f |ntaining a diamo| 000002a0 6e 64 29 0d 20 20 20 20 20 20 20 49 20 2d 20 46 |nd). I - F| 000002b0 6c 61 73 68 69 6e 67 20 6b 65 79 0d 0d 49 20 68 |lashing key..I h| 000002c0 61 76 65 1a 20 69 6e 63 6c 75 64 65 64 1a 20 61 |ave. included. a| 000002d0 1a 20 70 72 6f 67 72 61 6d 1a 20 28 4d 41 5a 45 |. program. (MAZE| 000002e0 4c 44 29 1a 20 77 68 69 63 68 20 4c 4f 41 44 73 |LD). which LOADs| 000002f0 20 61 6e 64 20 53 41 56 45 73 20 74 68 65 20 6f | and SAVEs the o| 00000300 72 69 67 69 6e 61 6c 0d 6c 65 76 65 6c 73 2e 20 |riginal.levels. | 00000310 20 54 68 65 73 65 20 61 72 65 20 53 41 56 45 64 | These are SAVEd| 00000320 20 61 73 20 4d 41 5a 45 31 2e 20 20 54 68 65 20 | as MAZE1. The | 00000330 70 72 6f 67 72 61 6d 20 61 73 6b 73 20 66 6f 72 |program asks for| 00000340 20 74 68 65 20 73 75 66 66 69 78 20 6e 75 6d 62 | the suffix numb| 00000350 65 72 0d 62 65 66 6f 72 65 20 74 68 65 20 66 69 |er.before the fi| 00000360 6c 65 20 69 73 20 53 41 56 45 64 2e 20 20 20 54 |le is SAVEd. T| 00000370 68 65 20 66 69 6c 65 73 20 61 72 65 20 73 61 76 |he files are sav| 00000380 65 64 20 66 6f 72 20 6c 6f 61 64 69 6e 67 20 61 |ed for loading a| 00000390 74 20 26 31 45 45 30 20 61 73 20 69 73 0d 6e 65 |t &1EE0 as is.ne| 000003a0 65 64 65 64 20 66 6f 72 20 74 68 65 20 4d 2f 63 |eded for the M/c| 000003b0 6f 64 65 20 66 69 6c 65 2e 0d 0d 54 68 65 1a 20 |ode file...The. | 000003c0 64 61 74 61 1a 20 6c 69 6e 65 73 1a 20 61 72 65 |data. lines. are| 000003d0 1a 20 61 72 72 61 6e 67 65 64 20 69 6e 20 32 35 |. arranged in 25| 000003e0 20 6c 69 6e 65 73 20 6f 66 20 31 38 20 63 68 61 | lines of 18 cha| 000003f0 72 61 63 74 65 72 73 2c 20 77 68 69 63 68 20 69 |racters, which i| 00000400 73 20 74 68 65 0d 73 69 7a 65 20 6f 66 20 74 68 |s the.size of th| 00000410 65 20 70 6c 61 79 20 61 72 65 61 1a 20 66 6f 72 |e play area. for| 00000420 20 65 61 63 68 20 6c 65 76 65 6c 2c 20 73 6f 20 | each level, so | 00000430 74 68 61 74 20 79 6f 75 20 6d 61 79 20 62 65 20 |that you may be | 00000440 61 62 6c 65 20 73 65 65 20 68 6f 77 20 74 68 65 |able see how the| 00000450 0d 6d 61 70 20 77 69 6c 6c 20 61 70 70 65 61 72 |.map will appear| 00000460 20 6f 6e 20 74 68 65 1a 20 73 63 72 65 65 6e 20 | on the. screen | 00000470 62 79 20 63 6f 6d 70 61 72 69 6e 67 20 74 68 65 |by comparing the| 00000480 20 63 6f 64 65 73 20 75 73 65 64 2e 20 20 59 6f | codes used. Yo| 00000490 75 20 63 61 6e 20 61 6c 74 65 72 0d 74 68 65 73 |u can alter.thes| 000004a0 65 20 6c 69 6e 65 73 20 61 6e 64 20 72 65 2d 53 |e lines and re-S| 000004b0 41 56 45 20 74 68 65 20 66 69 6c 65 20 77 69 74 |AVE the file wit| 000004c0 68 20 61 20 64 69 66 66 65 72 65 6e 74 20 73 75 |h a different su| 000004d0 66 66 69 78 20 6e 75 6d 62 65 72 20 74 6f 20 73 |ffix number to s| 000004e0 65 65 20 74 68 65 0d 65 66 66 65 63 74 2e 0d 0d |ee the.effect...| 000004f0 49 20 77 69 6c 6c 20 6e 6f 77 20 64 65 73 63 72 |I will now descr| 00000500 69 62 65 20 68 6f 77 20 49 20 68 61 76 65 20 6d |ibe how I have m| 00000510 61 64 65 20 75 70 20 74 68 65 20 4d 2f 63 6f 64 |ade up the M/cod| 00000520 65 20 66 6f 72 20 74 68 65 20 67 61 6d 65 20 61 |e for the game a| 00000530 6e 64 20 63 6f 6d 6d 65 6e 74 0d 6f 6e 20 74 68 |nd comment.on th| 00000540 65 20 72 6f 75 74 69 6e 65 73 20 75 73 65 64 2e |e routines used.| 00000550 0d 0d 44 75 65 20 74 6f 20 74 68 65 20 6c 65 6e |..Due to the len| 00000560 67 74 68 20 6f 66 20 74 68 65 1a 20 61 73 73 65 |gth of the. asse| 00000570 6d 62 6c 65 72 20 6c 69 73 74 69 6e 67 73 2c 20 |mbler listings, | 00000580 74 68 65 20 63 6f 64 65 20 69 73 20 61 73 73 65 |the code is asse| 00000590 6d 62 6c 65 64 20 69 6e 20 74 77 6f 0d 70 61 72 |mbled in two.par| 000005a0 74 73 1a 20 61 6e 64 20 74 68 65 6e 20 74 68 65 |ts. and then the| 000005b0 73 65 20 61 72 65 20 4c 4f 41 44 65 64 20 74 6f |se are LOADed to| 000005c0 67 65 74 68 65 72 20 61 6e 64 20 53 41 56 45 64 |gether and SAVEd| 000005d0 20 61 73 20 6f 6e 65 20 66 69 6c 65 1a 20 77 69 | as one file. wi| 000005e0 74 68 1a 20 74 68 65 0d 73 68 6f 72 74 1a 20 70 |th. the.short. p| 000005f0 72 6f 67 72 61 6d 1a 20 4d 49 4e 45 52 6c 64 72 |rogram. MINERldr| 00000600 2e 1a 20 20 54 68 69 73 1a 20 6d 75 73 74 1a 20 |.. This. must. | 00000610 62 65 1a 20 52 55 4e 1a 20 61 74 20 26 45 30 30 |be. RUN. at &E00| 00000620 2e 20 20 44 6f 20 4e 4f 54 20 72 75 6e 20 74 68 |. Do NOT run th| 00000630 69 73 0d 70 72 6f 67 72 61 6d 20 77 69 74 68 6f |is.program witho| 00000640 75 74 20 66 69 72 73 74 20 73 65 74 74 69 6e 67 |ut first setting| 00000650 20 75 70 20 74 68 65 20 63 6f 64 65 20 77 69 74 | up the code wit| 00000660 68 1a 20 4d 49 4e 73 72 63 32 1a 20 61 73 20 50 |h. MINsrc2. as P| 00000670 25 20 77 69 6c 6c 20 6e 6f 74 20 62 65 0d 73 65 |% will not be.se| 00000680 74 20 74 68 65 20 65 6e 64 20 6f 66 20 74 68 65 |t the end of the| 00000690 20 63 6f 64 65 2e 0d 0d 49 6e 20 62 6f 74 68 20 | code...In both | 000006a0 70 61 72 74 73 2c 20 49 20 66 6f 75 6e 64 1a 20 |parts, I found. | 000006b0 69 74 20 6d 6f 72 65 20 63 6f 6e 76 65 6e 69 65 |it more convenie| 000006c0 6e 74 20 74 6f 20 61 73 73 65 6d 62 6c 65 20 74 |nt to assemble t| 000006d0 68 65 20 63 6f 64 65 20 62 65 6c 6f 77 20 50 41 |he code below PA| 000006e0 47 45 0d 61 6e 64 20 74 68 65 20 61 73 73 65 6d |GE.and the assem| 000006f0 62 6c 65 72 20 70 72 6f 67 72 61 6d 73 20 6d 75 |bler programs mu| 00000700 73 74 20 62 65 1a 20 52 55 4e 1a 20 77 69 74 68 |st be. RUN. with| 00000710 1a 20 50 41 47 45 20 61 74 20 26 31 44 30 30 2e |. PAGE at &1D00.| 00000720 20 20 54 68 65 20 63 6f 64 65 20 69 73 0d 74 68 | The code is.th| 00000730 65 6e 20 61 73 73 65 6d 62 6c 65 64 20 61 74 20 |en assembled at | 00000740 26 45 30 30 20 62 75 74 20 61 73 20 69 66 20 61 |&E00 but as if a| 00000750 73 73 65 6d 62 6c 65 64 20 61 74 1a 20 74 68 65 |ssembled at. the| 00000760 1a 20 63 6f 72 72 65 63 74 20 61 64 64 72 65 73 |. correct addres| 00000770 73 2e 20 20 54 68 69 73 0d 69 73 20 64 6f 6e 65 |s. This.is done| 00000780 20 62 79 20 75 73 69 6e 67 20 4f 50 54 20 34 20 | by using OPT 4 | 00000790 2d 20 37 20 69 6e 73 74 65 61 64 20 6f 66 20 4f |- 7 instead of O| 000007a0 50 54 20 30 20 2d 20 33 2e 20 20 54 68 69 73 20 |PT 0 - 3. This | 000007b0 61 73 73 65 6d 62 6c 65 73 20 61 74 20 4f 25 20 |assembles at O% | 000007c0 62 75 74 0d 77 69 74 68 20 61 64 64 72 65 73 73 |but.with address| 000007d0 65 73 20 61 73 20 66 6f 72 20 50 25 2e 0d 0d 50 |es as for P%...P| 000007e0 41 47 45 20 6d 75 73 74 20 62 65 20 69 6e 69 74 |AGE must be init| 000007f0 69 61 6c 6c 79 20 61 74 20 26 45 30 30 20 73 6f |ially at &E00 so| 00000800 20 41 44 46 53 20 75 73 65 72 73 20 77 69 6c 6c | ADFS users will| 00000810 20 6e 6f 74 20 62 65 20 61 62 6c 65 20 74 6f 20 | not be able to | 00000820 75 73 65 20 74 68 65 73 65 0d 70 72 6f 67 72 61 |use these.progra| 00000830 6d 73 20 28 75 6e 6c 65 73 73 20 74 68 65 79 20 |ms (unless they | 00000840 75 73 65 20 74 61 70 65 3f 29 1a 20 62 75 74 1a |use tape?). but.| 00000850 20 63 61 6e 1a 20 4c 49 53 54 1a 20 74 68 65 6d | can. LIST. them| 00000860 20 74 6f 20 73 65 65 20 68 6f 77 20 74 68 65 79 | to see how they| 00000870 20 61 72 65 0d 6d 61 64 65 20 75 70 2e 20 20 41 | are.made up. A| 00000880 6c 73 6f 2c 20 74 68 65 20 6c 65 6e 67 74 68 20 |lso, the length | 00000890 6f 66 20 74 68 65 20 73 65 63 6f 6e 64 20 70 61 |of the second pa| 000008a0 72 74 1a 20 6e 65 65 64 73 1a 20 48 49 4d 45 4d |rt. needs. HIMEM| 000008b0 1a 20 74 6f 1a 20 62 65 20 72 61 69 73 65 64 0d |. to. be raised.| 000008c0 74 6f 6f 2e 1a 20 20 49 20 68 61 76 65 20 69 6e |too.. I have in| 000008d0 63 6c 75 64 65 64 20 61 20 73 68 6f 72 74 20 70 |cluded a short p| 000008e0 72 6f 67 72 61 6d 20 28 4d 49 4e 73 32 72 6e 29 |rogram (MINs2rn)| 000008f0 20 77 68 69 63 68 20 73 65 74 73 20 50 41 47 45 | which sets PAGE| 00000900 20 61 6e 64 20 48 49 4d 45 4d 0d 62 65 66 6f 72 | and HIMEM.befor| 00000910 65 20 43 48 41 49 4e 69 6e 67 1a 20 4d 49 4e 73 |e CHAINing. MINs| 00000920 72 63 32 1a 20 66 6f 72 1a 20 74 68 6f 73 65 1a |rc2. for. those.| 00000930 20 77 69 74 68 1a 20 33 32 6b 1a 20 45 6c 6b 73 | with. 32k. Elks| 00000940 1a 20 77 68 6f 1a 20 6d 69 67 68 74 1a 20 6c 69 |. who. might. li| 00000950 6b 65 20 74 6f 0d 65 78 70 65 72 69 6d 65 6e 74 |ke to.experiment| 00000960 20 77 69 74 68 20 74 68 65 73 65 2e 0d 0d 42 6f | with these...Bo| 00000970 74 68 20 70 72 6f 67 72 61 6d 73 20 61 72 65 20 |th programs are | 00000980 73 65 74 20 74 6f 20 52 55 4e 20 61 74 20 26 31 |set to RUN at &1| 00000990 44 30 30 20 62 79 20 6c 69 6e 65 20 35 30 20 69 |D00 by line 50 i| 000009a0 6e 20 65 61 63 68 20 70 72 6f 67 72 61 6d 2e 0d |n each program..| 000009b0 0d 50 72 6f 67 72 61 6d 1a 20 31 1a 20 28 4d 49 |.Program. 1. (MI| 000009c0 4e 73 72 63 31 29 1a 20 69 73 20 74 68 65 20 61 |Nsrc1). is the a| 000009d0 73 73 65 6d 62 6c 65 72 20 6c 69 73 74 69 6e 67 |ssembler listing| 000009e0 20 6f 66 20 74 68 65 20 6f 72 69 67 69 6e 61 6c | of the original| 000009f0 20 4d 2f 63 6f 64 65 20 61 6e 64 0d 44 41 54 41 | M/code and.DATA| 00000a00 20 74 68 6f 75 67 68 20 49 20 68 61 76 65 1a 20 | though I have. | 00000a10 61 6c 74 65 72 65 64 1a 20 74 68 65 1a 20 61 64 |altered. the. ad| 00000a20 64 72 65 73 73 65 73 20 73 6f 20 61 73 20 74 6f |dresses so as to| 00000a30 20 63 6f 6d 62 69 6e 65 20 74 68 65 20 63 6f 64 | combine the cod| 00000a40 65 20 69 6e 74 6f 0d 6f 6e 65 20 66 69 6c 65 20 |e into.one file | 00000a50 77 68 69 63 68 20 69 73 20 74 6f 1a 20 62 65 1a |which is to. be.| 00000a60 20 6c 6f 61 64 65 64 1a 20 74 6f 1a 20 26 31 44 | loaded. to. &1D| 00000a70 30 30 2e 1a 20 20 54 68 69 73 1a 20 73 61 76 65 |00.. This. save| 00000a80 73 1a 20 74 68 65 1a 20 66 69 6c 65 20 4d 49 4e |s. the. file MIN| 00000a90 31 0d 28 61 64 64 72 65 73 73 65 73 20 26 31 44 |1.(addresses &1D| 00000aa0 30 30 20 74 6f 20 26 32 42 37 43 29 0d 0d 20 20 |00 to &2B7C).. | 00000ab0 20 20 4c 69 6e 65 20 36 30 20 6c 6f 61 64 73 20 | Line 60 loads | 00000ac0 74 68 65 20 73 70 72 69 74 65 20 64 61 74 61 20 |the sprite data | 00000ad0 74 6f 20 20 26 31 44 30 30 2c 20 44 41 54 41 20 |to &1D00, DATA | 00000ae0 6c 69 6e 65 73 20 31 34 30 20 2d 20 32 30 30 0d |lines 140 - 200.| 00000af0 20 20 20 20 4c 69 6e 65 73 20 37 30 2d 39 30 20 | Lines 70-90 | 00000b00 6c 6f 61 64 73 20 74 68 65 20 6d 61 70 20 64 61 |loads the map da| 00000b10 74 61 20 74 6f 20 26 31 45 45 30 2c 20 44 41 54 |ta to &1EE0, DAT| 00000b20 41 20 6c 69 6e 65 73 20 32 31 30 20 2d 20 33 32 |A lines 210 - 32| 00000b30 30 0d 20 20 20 20 4c 69 6e 65 20 31 30 30 20 6c |0. Line 100 l| 00000b40 6f 61 64 73 20 74 68 65 20 74 75 6e 65 20 64 61 |oads the tune da| 00000b50 74 61 20 74 6f 20 20 20 26 32 37 41 41 2c 20 44 |ta to &27AA, D| 00000b60 41 54 41 20 6c 69 6e 65 73 20 33 33 30 20 2d 20 |ATA lines 330 - | 00000b70 33 36 30 0d 0d 54 68 65 20 50 52 4f 43 61 73 73 |360..The PROCass| 00000b80 65 6d 20 69 73 20 74 68 65 6e 20 63 61 6c 6c 65 |em is then calle| 00000b90 64 1a 20 74 6f 1a 20 61 73 73 65 6d 62 6c 65 1a |d. to. assemble.| 00000ba0 20 74 68 65 20 63 6f 64 65 20 61 74 20 26 32 38 | the code at &28| 00000bb0 38 35 2e 20 20 49 20 77 69 6c 6c 20 6e 6f 74 0d |85. I will not.| 00000bc0 64 65 73 63 72 69 62 65 20 74 68 69 73 20 69 6e |describe this in| 00000bd0 20 74 6f 6f 20 6d 75 63 68 20 64 65 74 61 69 6c | too much detail| 00000be0 2c 20 70 61 72 74 6c 79 20 62 65 63 61 75 73 65 |, partly because| 00000bf0 1a 20 49 1a 20 68 61 76 65 1a 20 6e 6f 74 1a 20 |. I. have. not. | 00000c00 73 74 75 64 69 65 64 20 69 74 0d 65 6e 6f 75 67 |studied it.enoug| 00000c10 68 20 74 6f 20 64 6f 20 73 6f 20 62 75 74 20 49 |h to do so but I| 00000c20 20 77 61 6e 74 20 73 61 79 20 6d 6f 72 65 20 61 | want say more a| 00000c30 62 6f 75 74 20 77 68 61 74 20 49 1a 20 68 61 76 |bout what I. hav| 00000c40 65 1a 20 64 6f 6e 65 20 69 6e 20 74 68 65 20 73 |e. done in the s| 00000c50 65 63 6f 6e 64 0d 70 61 72 74 2e 20 20 49 20 68 |econd.part. I h| 00000c60 6f 70 65 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e |ope the followin| 00000c70 67 20 62 72 69 65 66 20 6e 6f 74 65 73 20 77 69 |g brief notes wi| 00000c80 6c 6c 20 62 65 20 6f 66 20 69 6e 74 65 72 65 73 |ll be of interes| 00000c90 74 2e 20 20 49 20 77 69 6c 6c 20 72 65 66 65 72 |t. I will refer| 00000ca0 0d 74 6f 1a 20 74 68 65 1a 20 6c 69 6e 65 73 1a |.to. the. lines.| 00000cb0 20 6f 66 1a 20 74 68 65 1a 20 61 73 73 65 6d 62 | of. the. assemb| 00000cc0 6c 65 72 20 6c 69 73 74 69 6e 67 20 77 68 69 63 |ler listing whic| 00000cd0 68 20 70 72 6f 64 75 63 65 20 74 68 65 20 63 6f |h produce the co| 00000ce0 64 65 20 66 6f 72 20 65 61 63 68 0d 72 6f 75 74 |de for each.rout| 00000cf0 69 6e 65 2e 0d 0d 53 75 62 72 6f 75 74 69 6e 65 |ine...Subroutine| 00000d00 20 5a 25 20 28 6c 69 6e 65 73 20 34 35 30 2d 34 | Z% (lines 450-4| 00000d10 37 30 29 20 69 73 1a 20 74 68 65 1a 20 63 6f 64 |70) is. the. cod| 00000d20 65 1a 20 66 6f 72 1a 20 74 68 65 20 74 75 6e 65 |e. for. the tune| 00000d30 20 61 74 20 26 32 38 38 35 2e 20 20 54 68 69 73 | at &2885. This| 00000d40 0d 6c 6f 61 64 73 1a 20 74 68 65 20 76 61 6c 75 |.loads. the valu| 00000d50 65 20 66 6f 72 20 70 69 74 63 68 20 61 6e 64 20 |e for pitch and | 00000d60 64 75 72 61 74 69 6f 6e 2c 20 64 65 70 65 6e 64 |duration, depend| 00000d70 69 6e 67 20 6f 6e 1a 20 74 68 65 1a 20 76 61 6c |ing on. the. val| 00000d80 75 65 1a 20 6f 66 1a 20 74 68 65 0d 76 61 72 69 |ue. of. the.vari| 00000d90 61 62 6c 65 20 27 70 27 2c 20 77 68 69 63 68 20 |able 'p', which | 00000da0 61 72 65 20 6c 6f 61 64 65 64 1a 20 69 6e 74 6f |are loaded. into| 00000db0 1a 20 74 68 65 20 73 6f 75 6e 64 20 62 75 66 66 |. the sound buff| 00000dc0 65 72 20 61 74 20 26 41 46 30 20 28 6c 69 6e 65 |er at &AF0 (line| 00000dd0 20 34 36 30 29 2e 20 0d 54 68 65 20 76 61 6c 75 | 460). .The valu| 00000de0 65 20 6f 66 20 27 70 27 20 64 65 63 72 61 73 65 |e of 'p' decrase| 00000df0 73 20 62 79 20 65 61 63 68 1a 20 74 69 6d 65 1a |s by each. time.| 00000e00 20 74 68 65 20 63 6f 64 65 20 69 73 20 63 61 6c | the code is cal| 00000e10 6c 65 64 20 73 6f 20 70 72 6f 64 75 63 69 6e 67 |led so producing| 00000e20 20 61 0d 64 69 66 66 65 72 65 6e 74 1a 20 6e 6f | a.different. no| 00000e30 74 65 2e 20 20 42 65 63 61 75 73 65 20 74 68 65 |te. Because the| 00000e40 20 65 76 65 6e 74 20 76 65 63 74 6f 72 20 69 73 | event vector is| 00000e50 20 73 65 74 20 74 6f 1a 20 5a 25 2c 1a 20 74 68 | set to. Z%,. th| 00000e60 65 1a 20 74 75 6e 65 1a 20 77 69 6c 6c 0d 73 74 |e. tune. will.st| 00000e70 61 72 74 20 62 79 20 75 73 69 6e 67 20 2a 46 58 |art by using *FX| 00000e80 31 34 2c 34 20 61 6e 64 20 63 6f 6e 74 69 6e 75 |14,4 and continu| 00000e90 65 20 75 6e 74 69 6c 20 2a 46 58 31 33 2c 34 20 |e until *FX13,4 | 00000ea0 69 73 20 75 73 65 64 2e 0d 0d 53 75 62 72 6f 75 |is used...Subrou| 00000eb0 74 69 6e 65 20 53 25 20 28 34 38 30 2d 38 33 30 |tine S% (480-830| 00000ec0 29 20 72 65 61 64 73 20 74 68 65 1a 20 63 68 61 |) reads the. cha| 00000ed0 72 61 63 74 65 72 1a 20 6e 75 6d 62 65 72 1a 20 |racter. number. | 00000ee0 66 72 6f 6d 1a 20 74 68 65 1a 20 64 61 74 61 20 |from. the. data | 00000ef0 61 6e 64 2c 0d 61 66 74 65 72 20 74 68 65 20 63 |and,.after the c| 00000f00 6f 6d 70 61 72 69 73 6f 6e 2c 20 6c 6f 61 64 73 |omparison, loads| 00000f10 20 74 68 65 20 61 64 64 72 65 73 73 20 6f 66 20 | the address of | 00000f20 74 68 65 20 63 68 61 72 61 63 74 65 72 20 64 61 |the character da| 00000f30 74 61 20 69 6e 74 6f 20 26 38 30 20 61 6e 64 0d |ta into &80 and.| 00000f40 26 38 31 2e 20 54 68 69 73 20 69 73 20 74 68 65 |&81. This is the| 00000f50 6e 20 75 73 65 64 20 62 79 20 74 68 65 20 70 72 |n used by the pr| 00000f60 69 6e 74 20 73 75 62 72 6f 75 74 69 6e 65 20 74 |int subroutine t| 00000f70 6f 1a 20 70 72 69 6e 74 20 74 68 65 20 73 70 72 |o. print the spr| 00000f80 69 74 65 2e 20 20 54 68 69 73 0d 72 6f 75 74 69 |ite. This.routi| 00000f90 6e 65 20 77 61 73 20 65 78 70 6c 61 69 6e 65 64 |ne was explained| 00000fa0 20 69 6e 20 61 20 73 65 72 69 65 73 20 6f 66 20 | in a series of | 00000fb0 61 72 74 69 63 6c 65 73 20 69 6e 20 45 55 20 28 |articles in EU (| 00000fc0 46 65 62 20 2d 20 53 65 70 20 31 39 38 38 29 2e |Feb - Sep 1988).| 00000fd0 0d 0d 53 75 62 72 6f 75 74 69 6e 65 1a 20 52 25 |..Subroutine. R%| 00000fe0 20 28 38 34 30 2d 31 30 36 30 29 20 69 73 20 63 | (840-1060) is c| 00000ff0 6f 6e 63 65 72 6e 65 64 1a 20 77 69 74 68 1a 20 |oncerned. with. | 00001000 74 68 65 1a 20 66 61 6c 6c 69 6e 67 1a 20 6f 66 |the. falling. of| 00001010 1a 20 72 6f 63 6b 73 1a 20 61 6e 64 0d 73 71 75 |. rocks. and.squ| 00001020 61 73 68 69 6e 67 20 6f 66 20 6d 75 73 68 72 6f |ashing of mushro| 00001030 6f 6d 73 20 61 6e 64 20 77 68 65 74 68 65 72 20 |oms and whether | 00001040 79 6f 75 20 6c 6f 73 65 20 61 20 6c 69 66 65 2e |you lose a life.| 00001050 0d 0d 53 75 62 72 6f 75 74 69 6e 65 20 54 25 20 |..Subroutine T% | 00001060 28 31 30 37 30 2d 31 31 32 30 29 20 72 65 70 6c |(1070-1120) repl| 00001070 61 63 65 73 20 73 61 66 65 73 1a 20 77 69 74 68 |aces safes. with| 00001080 1a 20 64 69 61 6d 6f 6e 64 73 1a 20 77 68 65 6e |. diamonds. when| 00001090 1a 20 74 68 65 20 6b 65 79 20 69 73 0d 63 6f 6c |. the key is.col| 000010a0 6c 65 63 74 65 64 2e 0d 0d 50 72 6f 67 72 61 6d |lected...Program| 000010b0 20 32 20 28 4d 49 4e 73 72 63 32 29 20 69 73 20 | 2 (MINsrc2) is | 000010c0 6d 79 20 61 64 64 69 74 69 6f 6e 61 6c 20 4d 2f |my additional M/| 000010d0 63 6f 64 65 1a 20 61 6e 64 20 69 6e 63 6c 75 64 |code. and includ| 000010e0 65 73 20 73 65 76 65 72 61 6c 20 72 6f 75 74 69 |es several routi| 000010f0 6e 65 73 0d 61 6c 72 65 61 64 79 20 64 65 73 63 |nes.already desc| 00001100 72 69 62 65 64 2e 20 20 54 68 69 73 20 63 72 65 |ribed. This cre| 00001110 61 74 65 73 20 66 69 6c 65 1a 20 4d 49 4e 32 1a |ates file. MIN2.| 00001120 20 66 6f 72 1a 20 6c 6f 61 64 69 6e 67 20 74 6f | for. loading to| 00001130 20 26 32 42 37 44 2e 20 20 49 74 20 69 73 0d 61 | &2B7D. It is.a| 00001140 72 72 61 6e 67 65 64 20 69 6e 20 74 68 72 65 65 |rranged in three| 00001150 20 73 65 63 74 69 6f 6e 73 20 61 73 20 69 6e 20 | sections as in | 00001160 74 68 65 20 70 72 6f 67 72 61 6d 20 66 6f 72 20 |the program for | 00001170 74 68 65 20 74 75 74 6f 72 69 61 6c 2e 0d 0d 20 |the tutorial... | 00001180 20 20 20 20 20 31 2e 20 4d 61 69 6e 20 6c 6f 6f | 1. Main loo| 00001190 70 20 20 20 20 20 20 20 20 20 28 6c 69 6e 65 73 |p (lines| 000011a0 20 38 30 20 2d 20 34 37 30 29 0d 20 20 20 20 20 | 80 - 470). | 000011b0 20 32 2e 20 53 75 62 72 6f 75 74 69 6e 65 73 20 | 2. Subroutines | 000011c0 20 20 20 20 20 20 28 6c 69 6e 65 73 20 34 38 30 | (lines 480| 000011d0 20 2d 20 31 35 37 30 29 0d 20 20 20 20 20 20 33 | - 1570). 3| 000011e0 2e 20 44 61 74 61 20 20 20 20 20 20 20 20 20 20 |. Data | 000011f0 20 20 20 20 28 6c 69 6e 65 73 20 31 35 38 30 20 | (lines 1580 | 00001200 2d 20 32 30 39 30 29 0d 0d 49 20 77 69 6c 6c 20 |- 2090)..I will | 00001210 66 69 72 73 74 20 77 72 69 74 65 20 6e 6f 74 65 |first write note| 00001220 73 20 6f 6e 20 74 68 65 20 73 75 62 72 6f 75 74 |s on the subrout| 00001230 69 6e 65 73 2e 0d 0d 70 20 28 34 38 30 2c 34 39 |ines...p (480,49| 00001240 30 29 20 69 73 20 74 68 65 20 6c 6f 6f 70 20 67 |0) is the loop g| 00001250 69 76 65 6e 20 6c 61 73 74 20 74 69 6d 65 1a 20 |iven last time. | 00001260 66 6f 72 1a 20 67 69 76 69 6e 67 1a 20 74 68 65 |for. giving. the| 00001270 1a 20 63 6f 6d 6d 61 6e 64 73 20 69 6e 20 74 68 |. commands in th| 00001280 65 0d 64 61 74 61 20 6c 69 6e 65 73 20 61 73 20 |e.data lines as | 00001290 77 61 73 20 65 78 70 6c 61 69 6e 65 64 2e 0d 0d |was explained...| 000012a0 64 68 20 28 35 30 30 2d 35 32 30 29 20 69 73 20 |dh (500-520) is | 000012b0 74 68 65 20 64 6f 75 62 6c 65 20 73 69 7a 65 20 |the double size | 000012c0 70 72 69 6e 74 69 6e 67 20 72 6f 75 74 69 6e 65 |printing routine| 000012d0 20 61 73 20 67 69 76 65 6e 20 65 61 72 6c 69 65 | as given earlie| 000012e0 72 2e 0d 0d 63 68 6f 6f 73 65 20 28 35 33 30 2d |r...choose (530-| 000012f0 36 37 30 29 20 72 65 73 70 6f 6e 64 73 20 74 6f |670) responds to| 00001300 20 74 68 65 20 6b 65 79 20 70 72 65 73 73 65 64 | the key pressed| 00001310 2e 0d 20 20 20 20 20 50 20 65 6e 64 73 20 74 68 |.. P ends th| 00001320 65 20 70 72 6f 63 65 64 75 72 65 20 74 6f 20 73 |e procedure to s| 00001330 74 61 72 74 20 74 68 65 20 67 61 6d 65 0d 20 20 |tart the game. | 00001340 20 20 20 4c 20 63 61 6c 6c 73 20 74 68 65 20 73 | L calls the s| 00001350 75 62 72 6f 75 74 69 6e 65 20 6d 6c 6f 61 64 20 |ubroutine mload | 00001360 66 6f 72 20 6c 6f 61 64 69 6e 67 20 6f 74 68 65 |for loading othe| 00001370 72 20 6d 61 7a 65 20 66 69 6c 65 73 0d 20 20 20 |r maze files. | 00001380 20 20 53 20 61 6e 64 20 51 20 63 61 6c 6c 20 74 | S and Q call t| 00001390 68 65 20 73 75 62 72 6f 75 74 69 6e 65 73 20 66 |he subroutines f| 000013a0 6f 72 20 74 75 72 6e 69 6e 67 20 74 68 65 20 73 |or turning the s| 000013b0 6f 75 6e 64 20 6f 6e 2f 6f 66 66 0d 20 20 20 20 |ound on/off. | 000013c0 20 31 2c 20 32 20 61 6e 64 20 33 20 73 65 74 20 | 1, 2 and 3 set | 000013d0 74 68 65 20 76 61 6c 75 65 20 74 68 65 20 76 61 |the value the va| 000013e0 72 69 61 62 6c 65 20 73 70 64 20 74 6f 20 73 65 |riable spd to se| 000013f0 74 1a 20 74 68 65 1a 20 73 70 65 65 64 1a 20 6f |t. the. speed. o| 00001400 66 1a 20 74 68 65 0d 20 20 20 20 20 20 20 67 61 |f. the. ga| 00001410 6d 65 20 61 73 20 65 78 70 6c 61 69 6e 65 64 20 |me as explained | 00001420 69 6e 20 61 6e 20 65 61 72 6c 69 65 72 20 61 72 |in an earlier ar| 00001430 74 69 63 6c 65 2e 0d 0d 49 20 68 61 64 20 74 6f |ticle...I had to| 00001440 20 65 78 70 65 72 69 6d 65 6e 74 20 77 69 74 68 | experiment with| 00001450 20 74 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 41 | the number of A| 00001460 53 4c 20 41 73 20 61 6e 64 20 61 6c 73 6f 20 61 |SL As and also a| 00001470 64 64 20 74 68 65 20 53 42 43 20 69 6e 20 6c 69 |dd the SBC in li| 00001480 6e 65 0d 36 33 30 20 74 6f 20 67 65 74 20 61 20 |ne.630 to get a | 00001490 67 6f 6f 64 20 63 68 6f 69 63 65 20 6f 66 20 73 |good choice of s| 000014a0 70 65 65 64 73 2e 20 20 54 68 6f 73 65 20 77 68 |peeds. Those wh| 000014b0 6f 20 61 72 65 20 61 62 6c 65 20 74 6f 20 72 65 |o are able to re| 000014c0 2d 61 73 73 65 6d 62 6c 65 20 74 68 65 0d 63 6f |-assemble the.co| 000014d0 64 65 20 6d 61 79 20 6c 69 6b 65 20 74 6f 20 65 |de may like to e| 000014e0 78 70 65 72 69 6d 65 6e 74 20 77 69 74 68 20 74 |xperiment with t| 000014f0 68 69 73 2e 0d 0d 69 6e 69 74 1a 20 28 36 38 30 |his...init. (680| 00001500 2d 37 34 30 29 1a 20 73 65 74 73 1a 20 74 68 65 |-740). sets. the| 00001510 20 76 61 72 69 61 62 6c 65 73 2e 20 20 4c 6f 61 | variables. Loa| 00001520 64 73 20 26 35 33 30 30 20 74 6f 20 26 35 36 46 |ds &5300 to &56F| 00001530 46 20 77 69 74 68 20 74 68 65 20 62 72 69 63 6b |F with the brick| 00001540 0d 63 68 61 72 61 63 74 65 72 20 6e 75 6d 62 65 |.character numbe| 00001550 72 28 32 32 34 29 20 6c 69 6e 65 73 20 37 30 30 |r(224) lines 700| 00001560 2c 37 31 30 2e 20 20 54 68 69 73 1a 20 69 73 1a |,710. This. is.| 00001570 20 64 6f 6e 65 1a 20 73 6f 1a 20 74 68 61 74 2c | done. so. that,| 00001580 1a 20 77 68 65 6e 20 65 61 63 68 0d 6c 65 76 65 |. when each.leve| 00001590 6c 20 69 73 20 6c 6f 61 64 65 64 20 6f 76 65 72 |l is loaded over| 000015a0 20 74 68 69 73 20 61 72 65 61 2c 20 74 68 65 72 | this area, ther| 000015b0 65 20 69 73 20 61 20 62 6f 72 64 65 72 20 74 68 |e is a border th| 000015c0 72 65 65 20 62 72 69 63 6b 73 20 77 69 64 65 20 |ree bricks wide | 000015d0 61 72 6f 75 6e 64 0d 74 68 65 1a 20 70 6c 61 79 |around.the. play| 000015e0 1a 20 61 72 65 61 2e 1a 20 54 68 65 1a 20 72 6f |. area.. The. ro| 000015f0 75 74 69 6e 65 1a 20 61 6c 73 6f 1a 20 6c 6f 61 |utine. also. loa| 00001600 64 73 1a 20 26 35 37 30 30 1a 20 74 6f 1a 20 26 |ds. &5700. to. &| 00001610 35 37 46 46 1a 20 77 69 74 68 1a 20 73 70 61 63 |57FF. with. spac| 00001620 65 0d 63 68 61 72 61 63 74 65 72 73 28 32 32 39 |e.characters(229| 00001630 29 1a 20 61 6e 64 1a 20 63 61 6c 6c 73 1a 20 74 |). and. calls. t| 00001640 68 65 1a 20 73 75 62 72 6f 75 74 69 6e 65 1a 20 |he. subroutine. | 00001650 65 6e 76 20 66 6f 72 20 73 65 74 74 69 6e 67 20 |env for setting | 00001660 75 70 20 74 68 65 20 73 6f 75 6e 64 0d 65 6e 76 |up the sound.env| 00001670 65 6c 6f 70 65 73 2e 0d 0d 73 64 6f 66 66 1a 20 |elopes...sdoff. | 00001680 61 6e 64 1a 20 73 64 6f 6e 20 28 37 35 30 2c 37 |and. sdon (750,7| 00001690 36 30 29 20 61 72 65 20 74 68 65 1a 20 4d 2f 63 |60) are the. M/c| 000016a0 6f 64 65 1a 20 65 71 75 69 76 61 6c 65 6e 74 73 |ode. equivalents| 000016b0 1a 20 6f 66 1a 20 2a 46 58 32 31 30 2c 31 1a 20 |. of. *FX210,1. | 000016c0 61 6e 64 0d 2a 46 58 32 31 30 2c 30 2e 0d 0d 73 |and.*FX210,0...s| 000016d0 6f 6e 64 31 20 74 6f 20 73 6f 6e 64 36 1a 20 28 |ond1 to sond6. (| 000016e0 37 37 30 2d 38 32 30 29 1a 20 77 68 65 6e 20 63 |770-820). when c| 000016f0 61 6c 6c 65 64 20 67 69 76 65 20 74 68 65 20 73 |alled give the s| 00001700 6f 75 6e 64 73 20 6e 65 65 64 65 64 2e 20 20 54 |ounds needed. T| 00001710 68 65 20 76 61 6c 75 65 73 0d 6f 66 20 41 2c 20 |he values.of A, | 00001720 58 20 61 6e 64 20 59 1a 20 6e 65 65 64 1a 20 74 |X and Y. need. t| 00001730 6f 1a 20 62 65 1a 20 70 72 65 73 65 72 76 65 64 |o. be. preserved| 00001740 1a 20 65 61 63 68 20 74 69 6d 65 20 61 6e 64 20 |. each time and | 00001750 74 68 65 72 65 66 6f 72 65 20 50 55 53 48 65 64 |therefore PUSHed| 00001760 20 61 6e 64 0d 50 55 4c 4c 65 64 20 66 72 6f 6d | and.PULLed from| 00001770 20 74 68 65 20 73 74 61 63 6b 2e 20 20 20 54 68 | the stack. Th| 00001780 65 20 73 6f 75 6e 64 20 69 73 20 67 69 76 65 6e |e sound is given| 00001790 20 62 79 20 75 73 69 6e 67 20 6f 73 77 6f 72 64 | by using osword| 000017a0 1a 20 77 69 74 68 20 72 65 67 69 73 74 65 72 0d |. with register.| 000017b0 41 20 6c 6f 61 64 65 64 20 77 69 74 68 20 37 20 |A loaded with 7 | 000017c0 61 6e 64 1a 20 74 68 65 1a 20 61 64 64 72 65 73 |and. the. addres| 000017d0 73 1a 20 6f 66 1a 20 74 68 65 20 64 61 74 61 20 |s. of. the data | 000017e0 69 6e 20 58 20 61 6e 64 20 59 20 72 65 67 69 73 |in X and Y regis| 000017f0 74 65 72 73 2e 20 20 54 68 65 0d 64 61 74 61 20 |ters. The.data | 00001800 6e 65 65 64 65 64 1a 20 61 72 65 1a 20 74 68 65 |needed. are. the| 00001810 1a 20 66 6f 75 72 20 73 6f 75 6e 64 20 70 61 72 |. four sound par| 00001820 61 6d 65 74 65 72 73 20 65 6e 74 65 72 65 64 20 |ameters entered | 00001830 61 73 20 77 6f 72 64 73 20 28 45 51 55 57 29 2c |as words (EQUW),| 00001840 20 44 41 54 41 0d 6c 69 6e 65 73 20 31 38 38 30 | DATA.lines 1880| 00001850 2d 31 39 33 30 2e 0d 0d 65 6e 76 20 28 38 33 30 |-1930...env (830| 00001860 2d 38 35 30 29 20 73 65 74 20 75 70 20 74 68 65 |-850) set up the| 00001870 20 74 68 72 65 65 20 65 6e 76 65 6c 6f 70 65 73 | three envelopes| 00001880 2e 20 20 45 61 63 68 20 69 73 20 73 65 74 20 75 |. Each is set u| 00001890 70 1a 20 77 69 74 68 1a 20 6f 73 77 6f 72 64 20 |p. with. osword | 000018a0 69 6e 0d 74 68 65 20 73 61 6d 65 20 77 61 79 20 |in.the same way | 000018b0 62 75 74 20 77 69 74 68 20 41 20 72 65 67 69 73 |but with A regis| 000018c0 74 65 72 20 6c 6f 61 64 65 64 20 77 69 74 68 20 |ter loaded with | 000018d0 38 20 61 6e 64 20 64 61 74 61 20 6c 69 6e 65 73 |8 and data lines| 000018e0 1a 20 77 69 74 68 20 74 68 65 20 31 34 0d 70 61 |. with the 14.pa| 000018f0 72 61 6d 65 74 65 72 73 20 65 6e 74 65 72 65 64 |rameters entered| 00001900 20 61 73 20 62 79 74 65 73 20 28 45 51 55 42 29 | as bytes (EQUB)| 00001910 2c 20 44 41 54 41 20 6c 69 6e 65 73 20 31 38 35 |, DATA lines 185| 00001920 30 2d 31 38 37 30 2e 0d 0d 64 65 6c 73 70 2c 1a |0-1870...delsp,.| 00001930 20 64 65 6c 73 1a 20 61 6e 64 1a 20 64 65 6c 6c | dels. and. dell| 00001940 20 28 38 36 30 2d 38 38 30 29 20 61 72 65 20 64 | (860-880) are d| 00001950 65 6c 61 79 20 72 6f 75 74 69 6e 65 73 20 61 6e |elay routines an| 00001960 64 20 61 72 65 20 73 69 6d 70 6c 79 20 6e 65 73 |d are simply nes| 00001970 74 65 64 0d 6c 6f 6f 70 73 20 61 73 20 67 69 76 |ted.loops as giv| 00001980 65 6e 20 69 6e 20 61 6e 1a 20 65 61 72 6c 69 65 |en in an. earlie| 00001990 72 1a 20 61 72 74 69 63 6c 65 2e 1a 20 64 65 6c |r. article.. del| 000019a0 73 1a 20 61 6e 64 20 64 65 6c 6c 20 61 72 65 20 |s. and dell are | 000019b0 73 68 6f 72 74 20 61 6e 64 20 6c 6f 6e 67 0d 64 |short and long.d| 000019c0 65 6c 61 79 73 20 61 6e 64 20 64 65 6c 73 70 20 |elays and delsp | 000019d0 64 65 70 65 6e 64 73 20 6f 6e 20 74 68 65 20 76 |depends on the v| 000019e0 61 6c 75 65 20 6f 66 20 74 68 65 1a 20 76 61 72 |alue of the. var| 000019f0 69 61 62 6c 65 1a 20 73 70 64 20 77 68 69 63 68 |iable. spd which| 00001a00 20 68 61 73 20 62 65 65 6e 0d 73 65 6c 63 74 65 | has been.selcte| 00001a10 64 2e 1a 20 20 41 67 61 69 6e 1a 20 74 68 65 20 |d.. Again. the | 00001a20 6e 75 6d 62 65 72 20 4e 4f 50 73 20 63 6f 75 6c |number NOPs coul| 00001a30 64 20 62 65 20 76 61 72 69 65 64 20 69 66 20 61 |d be varied if a| 00001a40 6e 79 6f 6e 65 20 77 69 73 68 65 73 1a 20 74 6f |nyone wishes. to| 00001a50 1a 20 64 6f 0d 74 68 69 73 2e 0d |. do.this..| 00001a5b