Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_29.ADF » P/+MANDE1
P/+MANDE1
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_29.ADF |
Filename: | P/+MANDE1 |
Read OK: | ✔ |
File size: | 0F59 bytes |
Load address: | 2B204556 |
Exec address: | 444E414D |
File contents
Mandelbrot Programs with 4 or 16 colours by Mark Bellis ------------------------------------------------------- Files required: File: Format: Blurb: 16C1SRC 6502 M/C Source code for 16-colour mode 1 SHVGEN BASIC Mandelbrot generator for 16 colour "Sea-horse valley" picture files SHVPIC1 and SHVPIC2. SHVPIC1 SCREEN 4-colour Mandelbrot picture of "Sea-horse valley" SHVPIC2 SCREEN Used with SHVPIC1 to give the 16 colour picture SHVLOAD BASIC Loader for 16 colour "Sea-horse valley" picture MBGEN BASIC Mandelbrot generator for 4 colour mode 1 (for all machines, so even people without shadow RAM can plot mandelbrots.) To see what the mandelbrot programs produce either: CHAIN "SHVLOAD" (on machines with shadow RAM) or: MODE 1 *LOAD SHVPIC1 3000 SHVPIC2 is closely related to SHVPIC1: each picture is a 4-colour mode 1 picture, and SHVLOAD uses both together (one in main RAM and the other in shadow RAM) to produce the 16-colour picture. Please be warned if you are a shadow RAM machine owner who is allergic to strobes that the 16-colour effect is rather flickery due to the screen refresh effectively being at 25Hz instead of 50Hz. There follows an explanation of how the mandelbrot programs work: 10-20 Both mandelbrot programs begin by resetting the machine, in case code such as the 16-colour code is already running. 30 Reset to root directory (matters more for ADFS) 40-60 Header 70-80 Initialise screen (80 is for 16 colours only) 90 Ensure that variables don't overrun 100 Turn cursor off 110-140 Initialise colour array (16 colours only) 150 Compile 16 colour code 160 Clear graphics window 170 Set the maximum number of iterations. With MI% at 600, the program takes ages to run - the more "sea" area there is, the longer it takes - sea pixels take MI% iterations each to plot, whereas coloured ones take fewer iterations. 180 Set pixel resolution for each axis. Change XN% to 2 for mode 0 or 8 for mode 2. 190-200 Set axis steps. These variables enable approximate plots to be made in order to find a good bit of the Mandelbrot set ot plot. There are 256 pixels on each axis (see line 230), so setting the steps to a power of 2 is what I have done when I wanted to find a good place to plot (the main reason for the steps is to save time - the plot to find "Sea-horse valley" took 20 minutes to run, the final 16 colour plot took over 37 hours!) 210-220 Set the coordinates for the plot. To get the full Mandelbrot set, make these lines read: 210 XL=-4:XR=4 220 YLO=-4:YUP=4 This plot should take little more than an hour with MI% set to 30 in line 170 (no need for high resolution for the full set) 230 Set the number of pixels on each axis. 256 each way leaves room for you to put the coordinates in the window on the right (similar to the Mandelbrot generator I saw on the A3000 at school a few years back) 240-380 Take the coordinates and interpolate between them to generate an array of points to plot. 390-400 Set up a loop for each axis 410 Get the colour of each pixel (the time consuming bit) 420 switch screens (16 colours only) 430 set plotting colour 440 plot the pixel 450-470 plot the pixel on the other screen (16 colours only) 480-490 close the axis loops 500-530 save the picture (16 colour version has to set the memory accessed to be main or shadow RAM in order to save) 540 reset cursor (16 colours only) 550 END
00000000 4d 61 6e 64 65 6c 62 72 6f 74 20 50 72 6f 67 72 |Mandelbrot Progr| 00000010 61 6d 73 20 77 69 74 68 20 34 20 6f 72 20 31 36 |ams with 4 or 16| 00000020 20 63 6f 6c 6f 75 72 73 20 62 79 20 4d 61 72 6b | colours by Mark| 00000030 20 42 65 6c 6c 69 73 0d 2d 2d 2d 2d 2d 2d 2d 2d | Bellis.--------| 00000040 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000060 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d |---------------.| 00000070 0d 46 69 6c 65 73 20 72 65 71 75 69 72 65 64 3a |.Files required:| 00000080 0d 0d 46 69 6c 65 3a 20 20 20 20 20 20 46 6f 72 |..File: For| 00000090 6d 61 74 3a 20 20 20 20 20 42 6c 75 72 62 3a 0d |mat: Blurb:.| 000000a0 0d 31 36 43 31 53 52 43 20 20 20 20 36 35 30 32 |.16C1SRC 6502| 000000b0 20 4d 2f 43 20 20 20 20 53 6f 75 72 63 65 20 63 | M/C Source c| 000000c0 6f 64 65 20 66 6f 72 20 31 36 2d 63 6f 6c 6f 75 |ode for 16-colou| 000000d0 72 20 6d 6f 64 65 20 31 0d 0d 53 48 56 47 45 4e |r mode 1..SHVGEN| 000000e0 20 20 20 20 20 42 41 53 49 43 20 20 20 20 20 20 | BASIC | 000000f0 20 4d 61 6e 64 65 6c 62 72 6f 74 20 67 65 6e 65 | Mandelbrot gene| 00000100 72 61 74 6f 72 20 66 6f 72 20 31 36 20 63 6f 6c |rator for 16 col| 00000110 6f 75 72 20 22 53 65 61 2d 68 6f 72 73 65 0d 20 |our "Sea-horse. | 00000120 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000130 20 20 20 20 20 20 76 61 6c 6c 65 79 22 20 70 69 | valley" pi| 00000140 63 74 75 72 65 20 66 69 6c 65 73 20 53 48 56 50 |cture files SHVP| 00000150 49 43 31 20 61 6e 64 20 53 48 56 50 49 43 32 2e |IC1 and SHVPIC2.| 00000160 0d 0d 53 48 56 50 49 43 31 20 20 20 20 53 43 52 |..SHVPIC1 SCR| 00000170 45 45 4e 20 20 20 20 20 20 34 2d 63 6f 6c 6f 75 |EEN 4-colou| 00000180 72 20 4d 61 6e 64 65 6c 62 72 6f 74 20 70 69 63 |r Mandelbrot pic| 00000190 74 75 72 65 20 6f 66 20 22 53 65 61 2d 68 6f 72 |ture of "Sea-hor| 000001a0 73 65 20 76 61 6c 6c 65 79 22 0d 0d 53 48 56 50 |se valley"..SHVP| 000001b0 49 43 32 20 20 20 20 53 43 52 45 45 4e 20 20 20 |IC2 SCREEN | 000001c0 20 20 20 55 73 65 64 20 77 69 74 68 20 53 48 56 | Used with SHV| 000001d0 50 49 43 31 20 74 6f 20 67 69 76 65 20 74 68 65 |PIC1 to give the| 000001e0 20 31 36 20 63 6f 6c 6f 75 72 20 70 69 63 74 75 | 16 colour pictu| 000001f0 72 65 0d 0d 53 48 56 4c 4f 41 44 20 20 20 20 42 |re..SHVLOAD B| 00000200 41 53 49 43 20 20 20 20 20 20 20 4c 6f 61 64 65 |ASIC Loade| 00000210 72 20 66 6f 72 20 31 36 20 63 6f 6c 6f 75 72 20 |r for 16 colour | 00000220 22 53 65 61 2d 68 6f 72 73 65 20 76 61 6c 6c 65 |"Sea-horse valle| 00000230 79 22 20 70 69 63 74 75 72 65 0d 0d 4d 42 47 45 |y" picture..MBGE| 00000240 4e 20 20 20 20 20 20 42 41 53 49 43 20 20 20 20 |N BASIC | 00000250 20 20 20 4d 61 6e 64 65 6c 62 72 6f 74 20 67 65 | Mandelbrot ge| 00000260 6e 65 72 61 74 6f 72 20 66 6f 72 20 34 20 63 6f |nerator for 4 co| 00000270 6c 6f 75 72 20 6d 6f 64 65 20 31 20 28 66 6f 72 |lour mode 1 (for| 00000280 20 61 6c 6c 0d 20 20 20 20 20 20 20 20 20 20 20 | all. | 00000290 20 20 20 20 20 20 20 20 20 20 20 20 6d 61 63 68 | mach| 000002a0 69 6e 65 73 2c 20 73 6f 20 65 76 65 6e 20 70 65 |ines, so even pe| 000002b0 6f 70 6c 65 20 77 69 74 68 6f 75 74 20 73 68 61 |ople without sha| 000002c0 64 6f 77 20 52 41 4d 20 63 61 6e 0d 20 20 20 20 |dow RAM can. | 000002d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000002e0 20 20 20 70 6c 6f 74 20 6d 61 6e 64 65 6c 62 72 | plot mandelbr| 000002f0 6f 74 73 2e 29 0d 0d 54 6f 20 73 65 65 20 77 68 |ots.)..To see wh| 00000300 61 74 20 74 68 65 20 6d 61 6e 64 65 6c 62 72 6f |at the mandelbro| 00000310 74 20 70 72 6f 67 72 61 6d 73 20 70 72 6f 64 75 |t programs produ| 00000320 63 65 20 65 69 74 68 65 72 3a 0d 20 20 20 20 43 |ce either:. C| 00000330 48 41 49 4e 20 22 53 48 56 4c 4f 41 44 22 20 28 |HAIN "SHVLOAD" (| 00000340 6f 6e 20 6d 61 63 68 69 6e 65 73 20 77 69 74 68 |on machines with| 00000350 20 73 68 61 64 6f 77 20 52 41 4d 29 0d 6f 72 3a | shadow RAM).or:| 00000360 0d 20 20 20 20 4d 4f 44 45 20 31 0d 20 20 20 20 |. MODE 1. | 00000370 2a 4c 4f 41 44 20 53 48 56 50 49 43 31 20 33 30 |*LOAD SHVPIC1 30| 00000380 30 30 0d 0d 53 48 56 50 49 43 32 20 69 73 20 63 |00..SHVPIC2 is c| 00000390 6c 6f 73 65 6c 79 20 72 65 6c 61 74 65 64 20 74 |losely related t| 000003a0 6f 20 53 48 56 50 49 43 31 3a 20 20 65 61 63 68 |o SHVPIC1: each| 000003b0 20 70 69 63 74 75 72 65 20 69 73 20 61 20 34 2d | picture is a 4-| 000003c0 63 6f 6c 6f 75 72 0d 6d 6f 64 65 20 31 20 70 69 |colour.mode 1 pi| 000003d0 63 74 75 72 65 2c 20 61 6e 64 20 53 48 56 4c 4f |cture, and SHVLO| 000003e0 41 44 20 75 73 65 73 20 62 6f 74 68 20 74 6f 67 |AD uses both tog| 000003f0 65 74 68 65 72 20 28 6f 6e 65 20 69 6e 20 6d 61 |ether (one in ma| 00000400 69 6e 20 52 41 4d 20 61 6e 64 0d 74 68 65 20 6f |in RAM and.the o| 00000410 74 68 65 72 20 69 6e 20 73 68 61 64 6f 77 20 52 |ther in shadow R| 00000420 41 4d 29 20 74 6f 20 70 72 6f 64 75 63 65 20 74 |AM) to produce t| 00000430 68 65 20 31 36 2d 63 6f 6c 6f 75 72 20 70 69 63 |he 16-colour pic| 00000440 74 75 72 65 2e 20 20 50 6c 65 61 73 65 0d 62 65 |ture. Please.be| 00000450 20 77 61 72 6e 65 64 20 69 66 20 79 6f 75 20 61 | warned if you a| 00000460 72 65 20 61 20 73 68 61 64 6f 77 20 52 41 4d 20 |re a shadow RAM | 00000470 6d 61 63 68 69 6e 65 20 6f 77 6e 65 72 20 77 68 |machine owner wh| 00000480 6f 20 69 73 20 61 6c 6c 65 72 67 69 63 20 74 6f |o is allergic to| 00000490 0d 73 74 72 6f 62 65 73 20 74 68 61 74 20 74 68 |.strobes that th| 000004a0 65 20 31 36 2d 63 6f 6c 6f 75 72 20 65 66 66 65 |e 16-colour effe| 000004b0 63 74 20 69 73 20 72 61 74 68 65 72 20 66 6c 69 |ct is rather fli| 000004c0 63 6b 65 72 79 20 64 75 65 20 74 6f 20 74 68 65 |ckery due to the| 000004d0 0d 73 63 72 65 65 6e 20 72 65 66 72 65 73 68 20 |.screen refresh | 000004e0 65 66 66 65 63 74 69 76 65 6c 79 20 62 65 69 6e |effectively bein| 000004f0 67 20 61 74 20 32 35 48 7a 20 69 6e 73 74 65 61 |g at 25Hz instea| 00000500 64 20 6f 66 20 35 30 48 7a 2e 0d 0d 54 68 65 72 |d of 50Hz...Ther| 00000510 65 20 66 6f 6c 6c 6f 77 73 20 61 6e 20 65 78 70 |e follows an exp| 00000520 6c 61 6e 61 74 69 6f 6e 20 6f 66 20 68 6f 77 20 |lanation of how | 00000530 74 68 65 20 6d 61 6e 64 65 6c 62 72 6f 74 20 70 |the mandelbrot p| 00000540 72 6f 67 72 61 6d 73 20 77 6f 72 6b 3a 0d 0d 31 |rograms work:..1| 00000550 30 2d 32 30 20 20 20 20 20 20 42 6f 74 68 20 6d |0-20 Both m| 00000560 61 6e 64 65 6c 62 72 6f 74 20 70 72 6f 67 72 61 |andelbrot progra| 00000570 6d 73 20 62 65 67 69 6e 20 62 79 20 72 65 73 65 |ms begin by rese| 00000580 74 74 69 6e 67 20 74 68 65 20 6d 61 63 68 69 6e |tting the machin| 00000590 65 2c 0d 20 20 20 20 20 20 20 20 20 20 20 69 6e |e,. in| 000005a0 20 63 61 73 65 20 63 6f 64 65 20 73 75 63 68 20 | case code such | 000005b0 61 73 20 74 68 65 20 31 36 2d 63 6f 6c 6f 75 72 |as the 16-colour| 000005c0 20 63 6f 64 65 20 69 73 20 61 6c 72 65 61 64 79 | code is already| 000005d0 20 72 75 6e 6e 69 6e 67 2e 0d 0d 33 30 20 20 20 | running...30 | 000005e0 20 20 20 20 20 20 52 65 73 65 74 20 74 6f 20 72 | Reset to r| 000005f0 6f 6f 74 20 64 69 72 65 63 74 6f 72 79 20 28 6d |oot directory (m| 00000600 61 74 74 65 72 73 20 6d 6f 72 65 20 66 6f 72 20 |atters more for | 00000610 41 44 46 53 29 0d 0d 34 30 2d 36 30 20 20 20 20 |ADFS)..40-60 | 00000620 20 20 48 65 61 64 65 72 0d 0d 37 30 2d 38 30 20 | Header..70-80 | 00000630 20 20 20 20 20 49 6e 69 74 69 61 6c 69 73 65 20 | Initialise | 00000640 73 63 72 65 65 6e 20 28 38 30 20 69 73 20 66 6f |screen (80 is fo| 00000650 72 20 31 36 20 63 6f 6c 6f 75 72 73 20 6f 6e 6c |r 16 colours onl| 00000660 79 29 0d 0d 39 30 20 20 20 20 20 20 20 20 20 45 |y)..90 E| 00000670 6e 73 75 72 65 20 74 68 61 74 20 76 61 72 69 61 |nsure that varia| 00000680 62 6c 65 73 20 64 6f 6e 27 74 20 6f 76 65 72 72 |bles don't overr| 00000690 75 6e 0d 0d 31 30 30 20 20 20 20 20 20 20 20 54 |un..100 T| 000006a0 75 72 6e 20 63 75 72 73 6f 72 20 6f 66 66 0d 0d |urn cursor off..| 000006b0 31 31 30 2d 31 34 30 20 20 20 20 49 6e 69 74 69 |110-140 Initi| 000006c0 61 6c 69 73 65 20 63 6f 6c 6f 75 72 20 61 72 72 |alise colour arr| 000006d0 61 79 20 28 31 36 20 63 6f 6c 6f 75 72 73 20 6f |ay (16 colours o| 000006e0 6e 6c 79 29 0d 0d 31 35 30 20 20 20 20 20 20 20 |nly)..150 | 000006f0 20 43 6f 6d 70 69 6c 65 20 31 36 20 63 6f 6c 6f | Compile 16 colo| 00000700 75 72 20 63 6f 64 65 0d 0d 31 36 30 20 20 20 20 |ur code..160 | 00000710 20 20 20 20 43 6c 65 61 72 20 67 72 61 70 68 69 | Clear graphi| 00000720 63 73 20 77 69 6e 64 6f 77 0d 0d 31 37 30 20 20 |cs window..170 | 00000730 20 20 20 20 20 20 53 65 74 20 74 68 65 20 6d 61 | Set the ma| 00000740 78 69 6d 75 6d 20 6e 75 6d 62 65 72 20 6f 66 20 |ximum number of | 00000750 69 74 65 72 61 74 69 6f 6e 73 2e 20 20 57 69 74 |iterations. Wit| 00000760 68 20 4d 49 25 20 61 74 20 36 30 30 2c 0d 20 20 |h MI% at 600,. | 00000770 20 20 20 20 20 20 20 20 20 74 68 65 20 70 72 6f | the pro| 00000780 67 72 61 6d 20 74 61 6b 65 73 20 61 67 65 73 20 |gram takes ages | 00000790 74 6f 20 72 75 6e 20 2d 20 74 68 65 20 6d 6f 72 |to run - the mor| 000007a0 65 20 22 73 65 61 22 20 61 72 65 61 20 74 68 65 |e "sea" area the| 000007b0 72 65 0d 20 20 20 20 20 20 20 20 20 20 20 69 73 |re. is| 000007c0 2c 20 74 68 65 20 6c 6f 6e 67 65 72 20 69 74 20 |, the longer it | 000007d0 74 61 6b 65 73 20 2d 20 73 65 61 20 70 69 78 65 |takes - sea pixe| 000007e0 6c 73 20 74 61 6b 65 20 4d 49 25 20 69 74 65 72 |ls take MI% iter| 000007f0 61 74 69 6f 6e 73 0d 20 20 20 20 20 20 20 20 20 |ations. | 00000800 20 20 65 61 63 68 20 74 6f 20 70 6c 6f 74 2c 20 | each to plot, | 00000810 77 68 65 72 65 61 73 20 63 6f 6c 6f 75 72 65 64 |whereas coloured| 00000820 20 6f 6e 65 73 20 74 61 6b 65 20 66 65 77 65 72 | ones take fewer| 00000830 20 69 74 65 72 61 74 69 6f 6e 73 2e 0d 0d 31 38 | iterations...18| 00000840 30 20 20 20 20 20 20 20 20 53 65 74 20 70 69 78 |0 Set pix| 00000850 65 6c 20 72 65 73 6f 6c 75 74 69 6f 6e 20 66 6f |el resolution fo| 00000860 72 20 65 61 63 68 20 61 78 69 73 2e 20 20 43 68 |r each axis. Ch| 00000870 61 6e 67 65 20 58 4e 25 20 74 6f 20 32 20 66 6f |ange XN% to 2 fo| 00000880 72 0d 20 20 20 20 20 20 20 20 20 20 20 6d 6f 64 |r. mod| 00000890 65 20 30 20 6f 72 20 38 20 66 6f 72 20 6d 6f 64 |e 0 or 8 for mod| 000008a0 65 20 32 2e 0d 0d 31 39 30 2d 32 30 30 20 20 20 |e 2...190-200 | 000008b0 20 53 65 74 20 61 78 69 73 20 73 74 65 70 73 2e | Set axis steps.| 000008c0 20 20 54 68 65 73 65 20 76 61 72 69 61 62 6c 65 | These variable| 000008d0 73 20 65 6e 61 62 6c 65 20 61 70 70 72 6f 78 69 |s enable approxi| 000008e0 6d 61 74 65 20 70 6c 6f 74 73 0d 20 20 20 20 20 |mate plots. | 000008f0 20 20 20 20 20 20 74 6f 20 62 65 20 6d 61 64 65 | to be made| 00000900 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 66 69 6e | in order to fin| 00000910 64 20 61 20 67 6f 6f 64 20 62 69 74 20 6f 66 20 |d a good bit of | 00000920 74 68 65 20 4d 61 6e 64 65 6c 62 72 6f 74 0d 20 |the Mandelbrot. | 00000930 20 20 20 20 20 20 20 20 20 20 73 65 74 20 6f 74 | set ot| 00000940 20 70 6c 6f 74 2e 20 20 54 68 65 72 65 20 61 72 | plot. There ar| 00000950 65 20 32 35 36 20 70 69 78 65 6c 73 20 6f 6e 20 |e 256 pixels on | 00000960 65 61 63 68 20 61 78 69 73 20 28 73 65 65 20 6c |each axis (see l| 00000970 69 6e 65 20 0d 20 20 20 20 20 20 20 20 20 20 20 |ine . | 00000980 32 33 30 29 2c 20 73 6f 20 73 65 74 74 69 6e 67 |230), so setting| 00000990 20 74 68 65 20 73 74 65 70 73 20 74 6f 20 61 20 | the steps to a | 000009a0 70 6f 77 65 72 20 6f 66 20 32 20 69 73 20 77 68 |power of 2 is wh| 000009b0 61 74 20 49 20 68 61 76 65 0d 20 20 20 20 20 20 |at I have. | 000009c0 20 20 20 20 20 64 6f 6e 65 20 77 68 65 6e 20 49 | done when I| 000009d0 20 77 61 6e 74 65 64 20 74 6f 20 66 69 6e 64 20 | wanted to find | 000009e0 61 20 67 6f 6f 64 20 70 6c 61 63 65 20 74 6f 20 |a good place to | 000009f0 70 6c 6f 74 20 28 74 68 65 20 6d 61 69 6e 0d 20 |plot (the main. | 00000a00 20 20 20 20 20 20 20 20 20 20 72 65 61 73 6f 6e | reason| 00000a10 20 66 6f 72 20 74 68 65 20 73 74 65 70 73 20 69 | for the steps i| 00000a20 73 20 74 6f 20 73 61 76 65 20 74 69 6d 65 20 2d |s to save time -| 00000a30 20 74 68 65 20 70 6c 6f 74 20 74 6f 20 66 69 6e | the plot to fin| 00000a40 64 0d 20 20 20 20 20 20 20 20 20 20 20 22 53 65 |d. "Se| 00000a50 61 2d 68 6f 72 73 65 20 76 61 6c 6c 65 79 22 20 |a-horse valley" | 00000a60 74 6f 6f 6b 20 32 30 20 6d 69 6e 75 74 65 73 20 |took 20 minutes | 00000a70 74 6f 20 72 75 6e 2c 20 74 68 65 20 66 69 6e 61 |to run, the fina| 00000a80 6c 0d 20 20 20 20 20 20 20 20 20 20 20 31 36 20 |l. 16 | 00000a90 63 6f 6c 6f 75 72 20 70 6c 6f 74 20 74 6f 6f 6b |colour plot took| 00000aa0 20 6f 76 65 72 20 33 37 20 68 6f 75 72 73 21 29 | over 37 hours!)| 00000ab0 0d 0d 32 31 30 2d 32 32 30 20 20 20 20 53 65 74 |..210-220 Set| 00000ac0 20 74 68 65 20 63 6f 6f 72 64 69 6e 61 74 65 73 | the coordinates| 00000ad0 20 66 6f 72 20 74 68 65 20 70 6c 6f 74 2e 20 20 | for the plot. | 00000ae0 54 6f 20 67 65 74 20 74 68 65 20 66 75 6c 6c 0d |To get the full.| 00000af0 20 20 20 20 20 20 20 20 20 20 20 4d 61 6e 64 65 | Mande| 00000b00 6c 62 72 6f 74 20 73 65 74 2c 20 20 6d 61 6b 65 |lbrot set, make| 00000b10 20 74 68 65 73 65 20 6c 69 6e 65 73 20 72 65 61 | these lines rea| 00000b20 64 3a 0d 20 20 20 20 20 20 20 20 20 20 20 32 31 |d:. 21| 00000b30 30 20 58 4c 3d 2d 34 3a 58 52 3d 34 0d 20 20 20 |0 XL=-4:XR=4. | 00000b40 20 20 20 20 20 20 20 20 32 32 30 20 59 4c 4f 3d | 220 YLO=| 00000b50 2d 34 3a 59 55 50 3d 34 0d 20 20 20 20 20 20 20 |-4:YUP=4. | 00000b60 20 20 20 20 54 68 69 73 20 70 6c 6f 74 20 73 68 | This plot sh| 00000b70 6f 75 6c 64 20 74 61 6b 65 20 6c 69 74 74 6c 65 |ould take little| 00000b80 20 6d 6f 72 65 20 74 68 61 6e 20 61 6e 20 68 6f | more than an ho| 00000b90 75 72 20 77 69 74 68 0d 20 20 20 20 20 20 20 20 |ur with. | 00000ba0 20 20 20 4d 49 25 20 73 65 74 20 74 6f 20 33 30 | MI% set to 30| 00000bb0 20 69 6e 20 6c 69 6e 65 20 31 37 30 20 28 6e 6f | in line 170 (no| 00000bc0 20 6e 65 65 64 20 66 6f 72 20 68 69 67 68 20 72 | need for high r| 00000bd0 65 73 6f 6c 75 74 69 6f 6e 0d 20 20 20 20 20 20 |esolution. | 00000be0 20 20 20 20 20 66 6f 72 20 74 68 65 20 66 75 6c | for the ful| 00000bf0 6c 20 73 65 74 29 0d 0d 32 33 30 20 20 20 20 20 |l set)..230 | 00000c00 20 20 20 53 65 74 20 74 68 65 20 6e 75 6d 62 65 | Set the numbe| 00000c10 72 20 6f 66 20 70 69 78 65 6c 73 20 6f 6e 20 65 |r of pixels on e| 00000c20 61 63 68 20 61 78 69 73 2e 20 20 32 35 36 20 65 |ach axis. 256 e| 00000c30 61 63 68 20 77 61 79 0d 20 20 20 20 20 20 20 20 |ach way. | 00000c40 20 20 20 6c 65 61 76 65 73 20 72 6f 6f 6d 20 66 | leaves room f| 00000c50 6f 72 20 79 6f 75 20 74 6f 20 70 75 74 20 74 68 |or you to put th| 00000c60 65 20 63 6f 6f 72 64 69 6e 61 74 65 73 20 69 6e |e coordinates in| 00000c70 20 74 68 65 0d 20 20 20 20 20 20 20 20 20 20 20 | the. | 00000c80 77 69 6e 64 6f 77 20 6f 6e 20 74 68 65 20 72 69 |window on the ri| 00000c90 67 68 74 20 28 73 69 6d 69 6c 61 72 20 74 6f 20 |ght (similar to | 00000ca0 74 68 65 20 4d 61 6e 64 65 6c 62 72 6f 74 20 67 |the Mandelbrot g| 00000cb0 65 6e 65 72 61 74 6f 72 0d 20 20 20 20 20 20 20 |enerator. | 00000cc0 20 20 20 20 49 20 73 61 77 20 6f 6e 20 74 68 65 | I saw on the| 00000cd0 20 41 33 30 30 30 20 61 74 20 73 63 68 6f 6f 6c | A3000 at school| 00000ce0 20 61 20 66 65 77 20 79 65 61 72 73 20 62 61 63 | a few years bac| 00000cf0 6b 29 0d 0d 32 34 30 2d 33 38 30 20 20 20 20 54 |k)..240-380 T| 00000d00 61 6b 65 20 74 68 65 20 63 6f 6f 72 64 69 6e 61 |ake the coordina| 00000d10 74 65 73 20 61 6e 64 20 69 6e 74 65 72 70 6f 6c |tes and interpol| 00000d20 61 74 65 20 62 65 74 77 65 65 6e 20 74 68 65 6d |ate between them| 00000d30 20 74 6f 0d 20 20 20 20 20 20 20 20 20 20 20 67 | to. g| 00000d40 65 6e 65 72 61 74 65 20 61 6e 20 61 72 72 61 79 |enerate an array| 00000d50 20 6f 66 20 70 6f 69 6e 74 73 20 74 6f 20 70 6c | of points to pl| 00000d60 6f 74 2e 0d 0d 33 39 30 2d 34 30 30 20 20 20 20 |ot...390-400 | 00000d70 53 65 74 20 75 70 20 61 20 6c 6f 6f 70 20 66 6f |Set up a loop fo| 00000d80 72 20 65 61 63 68 20 61 78 69 73 0d 0d 34 31 30 |r each axis..410| 00000d90 20 20 20 20 20 20 20 20 47 65 74 20 74 68 65 20 | Get the | 00000da0 63 6f 6c 6f 75 72 20 6f 66 20 65 61 63 68 20 70 |colour of each p| 00000db0 69 78 65 6c 20 28 74 68 65 20 74 69 6d 65 20 63 |ixel (the time c| 00000dc0 6f 6e 73 75 6d 69 6e 67 20 62 69 74 29 0d 0d 34 |onsuming bit)..4| 00000dd0 32 30 20 20 20 20 20 20 20 20 73 77 69 74 63 68 |20 switch| 00000de0 20 73 63 72 65 65 6e 73 20 28 31 36 20 63 6f 6c | screens (16 col| 00000df0 6f 75 72 73 20 6f 6e 6c 79 29 0d 0d 34 33 30 20 |ours only)..430 | 00000e00 20 20 20 20 20 20 20 73 65 74 20 70 6c 6f 74 74 | set plott| 00000e10 69 6e 67 20 63 6f 6c 6f 75 72 0d 0d 34 34 30 20 |ing colour..440 | 00000e20 20 20 20 20 20 20 20 70 6c 6f 74 20 74 68 65 20 | plot the | 00000e30 70 69 78 65 6c 0d 0d 34 35 30 2d 34 37 30 20 20 |pixel..450-470 | 00000e40 20 20 70 6c 6f 74 20 74 68 65 20 70 69 78 65 6c | plot the pixel| 00000e50 20 6f 6e 20 74 68 65 20 6f 74 68 65 72 20 73 63 | on the other sc| 00000e60 72 65 65 6e 20 28 31 36 20 63 6f 6c 6f 75 72 73 |reen (16 colours| 00000e70 20 6f 6e 6c 79 29 0d 0d 34 38 30 2d 34 39 30 20 | only)..480-490 | 00000e80 20 20 20 63 6c 6f 73 65 20 74 68 65 20 61 78 69 | close the axi| 00000e90 73 20 6c 6f 6f 70 73 0d 0d 35 30 30 2d 35 33 30 |s loops..500-530| 00000ea0 20 20 20 20 73 61 76 65 20 74 68 65 20 70 69 63 | save the pic| 00000eb0 74 75 72 65 20 28 31 36 20 63 6f 6c 6f 75 72 20 |ture (16 colour | 00000ec0 76 65 72 73 69 6f 6e 20 68 61 73 20 74 6f 20 73 |version has to s| 00000ed0 65 74 20 74 68 65 20 6d 65 6d 6f 72 79 0d 20 20 |et the memory. | 00000ee0 20 20 20 20 20 20 20 20 20 61 63 63 65 73 73 65 | accesse| 00000ef0 64 20 74 6f 20 62 65 20 6d 61 69 6e 20 6f 72 20 |d to be main or | 00000f00 73 68 61 64 6f 77 20 52 41 4d 20 69 6e 20 6f 72 |shadow RAM in or| 00000f10 64 65 72 20 74 6f 20 73 61 76 65 29 0d 0d 35 34 |der to save)..54| 00000f20 30 20 20 20 20 20 20 20 20 72 65 73 65 74 20 63 |0 reset c| 00000f30 75 72 73 6f 72 20 28 31 36 20 63 6f 6c 6f 75 72 |ursor (16 colour| 00000f40 73 20 6f 6e 6c 79 29 0d 0d 35 35 30 20 20 20 20 |s only)..550 | 00000f50 20 20 20 20 45 4e 44 0d 0d | END..| 00000f59