Home » Personal collection » Acorn tapes » Own_Work » drawer_tr_tape01b_hf90_acorn_mandel.wav » Mandel2

Mandel2

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 tapes » Own_Work » drawer_tr_tape01b_hf90_acorn_mandel.wav
Filename: Mandel2
Read OK:
File size: 08C0 bytes
Load address: FFFF0E00
Exec address: FFFF8023
File contents

� PROGRAM MANDLEBROT PLOT
� VERSION B0.2
� AUTHOR Kate Crennell
(� BEEBUG MAY 1986
2"� PROGRAM SUBJECT TO COPYRIGHT
<:
d� KOL%(4),C$(7)
n� � � �DTA
x�C$(0)=�135+"BLACK,  ":C$(1)=�129+"RED,   ":C$(2)=�130+"GREEN, ":C$(3)=�131+"YELLOW,":C31,H%,0:@%=4:�T%+3:@%=&20508:�XMIN;:@%=&10308:�W;:@%=&20508:�YMIN;:@%=10308:�H:@%=11-%*4:�I%=0�C%:�?(&C10+I%);:�?(&C00+I%):�255:�7:�:@%=8/M%
�(E%=6:�4,23;8202;0;0;0;28,G%,31,H%,29
��mandel(XMIN,YMIN,DX,DY)
�E%=5:�7,4,28,G%,31,H%,26:�
�6�"Save Y/N";:�Q:�A$="Y"�"Filename",F$:�TDA � �TvA
'�F$,"""")<>0�dz@ � � �(F$)>6�dz@
F$="P."+�(M%+2+2*T%)+F$
+�M%=1 �I%=0�3:?(I%+&7FFC)=KOL%(I%)�16:�
"!$&C80="SAVE "+F$+" 3000 8000"
,/U%=X%:V%=Y%:X%=&80:Y%=&C:�&FFF7:X%=U%:Y%=V%
6�box:�A$="Y"�7:�tj@
@#�:�OL%(I%))+" ";
�H�:�'"Other possible colours:":�I%=0�7:F%=0:�N%=0�3:�KOL%(N%)=I% F%=1
��:�F%=0 �;C$(I%);�1;
��
�5I%=10:�'"Which colour",A$:�A$=""�TrE � A$=�A$,3)
�"�N%=0�7:�A$=�C$(N%),2,3) I%=N%
��
��I%=10�tpD
��M%=2 ?(&BFF+K%)=I%:�ThE
�2F%=0:�N%=0�3:�I%=KOL%(N%) ?(&BFF+K%))=N%:F%=-1
�"�F%=0KOL%(?(&BFF+K%))=I%:�ThE
�.�:�F%>0KOL%(F%-1)=I%:?(&BFF+K%)=F%-1:�ThE
"�F%=0KOL%(?(&BFF+K%))=I%:�ThE

-�I%=0�3:F%=0:�N%=0�C%:�?(&C00+N%)=I% F%=1
�:�F%=0KOL%(I%)=16
�
(�K%=1�d|C
27�"What n width="W'"Low Y bound="YMIN;", height="H':�ask:�A$="Y"��t~E
��"New left X",XMIN
��"New width",W:�W=0�t`E
��"New bottom Y",YMIN
��"New height",H:�H=0�ttE
�EL%=256/M%:R=�(H/W):�R>1 Y%=L%-1:X%=Y%/R+0.5 � X%=L%-1:Y%=X%*R+0.5
�Y@%=4:�'"The plot will have ";X%+1;" columns"'"and ";Y%+1;" rows."'':�ask:�A$="Y"��dfE
�`�'"New number of columns ( <";L%+1" )";:�,I%:�I%<1 � I%>L% �" Illegal value":�dRE � X%=I%-1
�\�"New number of rows ( <";L%+1" )";:�,I%:�I%<1 � I%>L% �" Illegal value":�dRE � Y%=I%-1
�DX=W/X%:DY=H/Y%:�
�:
�	��ask

*FX202,40
�;" Is this OK (Y/N)";�Q:�
��Q:�;"?";
"(A$=�(� � 223):�A$<>"Y"� A$<>"N"�TbF
,
�;A$:�
6:
@
��mode
JT%=-1:@%=10
T'�:�7,1)�134"The Mandelbrot Set"'''
^��"There are two available plot modes:"''"1)"+�131+"High resolution (256 lines) and"'"four colours,"''"2) Low resolution (128 lines) and"'�131+"eight"+�135+"colours."'
hD�M%=0 �'"Which mode would you like (1 or 2)? ";:M%=�-48 � � �D|F
�
00000000  0d 00 0a 1d f4 20 50 52  4f 47 52 41 4d 20 4d 41  |..... PROGRAM MA|
00000010  4e 44 4c 45 42 52 4f 54  20 50 4c 4f 54 0d 00 14  |NDLEBROT PLOT...|
00000020  12 f4 20 56 45 52 53 49  4f 4e 20 42 30 2e 32 0d  |.. VERSION B0.2.|
00000030  00 1e 1a f4 20 41 55 54  48 4f 52 20 4b 61 74 65  |.... AUTHOR Kate|
00000040  20 43 72 65 6e 6e 65 6c  6c 0d 00 28 15 f4 20 42  | Crennell..(.. B|
00000050  45 45 42 55 47 20 4d 41  59 20 31 39 38 36 0d 00  |EEBUG MAY 1986..|
00000060  32 22 f4 20 50 52 4f 47  52 41 4d 20 53 55 42 4a  |2". PROGRAM SUBJ|
00000070  45 43 54 20 54 4f 20 43  4f 50 59 52 49 47 48 54  |ECT TO COPYRIGHT|
00000080  0d 00 3c 05 3a 0d 00 64  13 de 20 4b 4f 4c 25 28  |..<.:..d.. KOL%(|
00000090  34 29 2c 43 24 28 37 29  0d 00 6e 0e ee 20 85 20  |4),C$(7)..n.. . |
000000a0  e5 20 8d 44 54 41 0d 00  78 ad 43 24 28 30 29 3d  |. .DTA..x.C$(0)=|
000000b0  bd 31 33 35 2b 22 42 4c  41 43 4b 2c 20 20 22 3a  |.135+"BLACK,  ":|
000000c0  43 24 28 31 29 3d bd 31  32 39 2b 22 52 45 44 2c  |C$(1)=.129+"RED,|
000000d0  20 20 20 22 3a 43 24 28  32 29 3d bd 31 33 30 2b  |   ":C$(2)=.130+|
000000e0  22 47 52 45 45 4e 2c 20  22 3a 43 24 28 33 29 3d  |"GREEN, ":C$(3)=|
000000f0  bd 31 33 31 2b 22 59 45  4c 4c 4f 57 2c 22 3a 43  |.131+"YELLOW,":C|
00000100  33 31 2c 48 25 2c 30 3a  40 25 3d 34 3a f1 54 25  |31,H%,0:@%=4:.T%|
00000110  2b 33 3a 40 25 3d 26 32  30 35 30 38 3a f1 58 4d  |+3:@%=&20508:.XM|
00000120  49 4e 3b 3a 40 25 3d 26  31 30 33 30 38 3a f1 57  |IN;:@%=&10308:.W|
00000130  3b 3a 40 25 3d 26 32 30  35 30 38 3a f1 59 4d 49  |;:@%=&20508:.YMI|
00000140  4e 3b 3a 40 25 3d 31 30  33 30 38 3a f1 48 3a 40  |N;:@%=10308:.H:@|
00000150  25 3d 31 31 2d 25 2a 34  3a e3 49 25 3d 30 b8 43  |%=11-%*4:.I%=0.C|
00000160  25 3a f1 3f 28 26 43 31  30 2b 49 25 29 3b 3a fb  |%:.?(&C10+I%);:.|
00000170  3f 28 26 43 30 30 2b 49  25 29 3a ef 32 35 35 3a  |?(&C00+I%):.255:|
00000180  fb 37 3a ed 3a 40 25 3d  38 2f 4d 25 0d 00 dc 28  |.7:.:@%=8/M%...(|
00000190  45 25 3d 36 3a ef 34 2c  32 33 3b 38 32 30 32 3b  |E%=6:.4,23;8202;|
000001a0  30 3b 30 3b 30 3b 32 38  2c 47 25 2c 33 31 2c 48  |0;0;0;28,G%,31,H|
000001b0  25 2c 32 39 0d 00 e6 1c  f2 6d 61 6e 64 65 6c 28  |%,29.....mandel(|
000001c0  58 4d 49 4e 2c 59 4d 49  4e 2c 44 58 2c 44 59 29  |XMIN,YMIN,DX,DY)|
000001d0  0d 00 f0 1e 45 25 3d 35  3a ef 37 2c 34 2c 32 38  |....E%=5:.7,4,28|
000001e0  2c 47 25 2c 33 31 2c 48  25 2c 32 36 3a db 0d 00  |,G%,31,H%,26:...|
000001f0  fa 36 f1 22 53 61 76 65  20 59 2f 4e 22 3b 3a f2  |.6."Save Y/N";:.|
00000200  51 3a e7 41 24 3d 22 59  22 e8 22 46 69 6c 65 6e  |Q:.A$="Y"."Filen|
00000210  61 6d 65 22 2c 46 24 3a  e5 8d 54 44 41 20 8b 20  |ame",F$:..TDA . |
00000220  8d 54 76 41 0d 01 04 27  e7 a7 46 24 2c 22 22 22  |.TvA...'..F$,"""|
00000230  22 29 3c 3e 30 e5 8d 64  7a 40 20 8b 20 e7 20 a9  |")<>0..dz@ . . .|
00000240  28 46 24 29 3e 36 e5 8d  64 7a 40 0d 01 0e 1b 46  |(F$)>6..dz@....F|
00000250  24 3d 22 50 2e 22 2b c3  28 4d 25 2b 32 2b 32 2a  |$="P."+.(M%+2+2*|
00000260  54 25 29 2b 46 24 0d 01  18 2b e7 4d 25 3d 31 20  |T%)+F$...+.M%=1 |
00000270  e3 49 25 3d 30 b8 33 3a  3f 28 49 25 2b 26 37 46  |.I%=0.3:?(I%+&7F|
00000280  46 43 29 3d 4b 4f 4c 25  28 49 25 29 83 31 36 3a  |FC)=KOL%(I%).16:|
00000290  ed 0d 01 22 21 24 26 43  38 30 3d 22 53 41 56 45  |..."!$&C80="SAVE|
000002a0  20 22 2b 46 24 2b 22 20  33 30 30 30 20 38 30 30  | "+F$+" 3000 800|
000002b0  30 22 0d 01 2c 2f 55 25  3d 58 25 3a 56 25 3d 59  |0"..,/U%=X%:V%=Y|
000002c0  25 3a 58 25 3d 26 38 30  3a 59 25 3d 26 43 3a d6  |%:X%=&80:Y%=&C:.|
000002d0  26 46 46 46 37 3a 58 25  3d 55 25 3a 59 25 3d 56  |&FFF7:X%=U%:Y%=V|
000002e0  25 0d 01 36 18 f2 62 6f  78 3a e7 41 24 3d 22 59  |%..6..box:.A$="Y|
000002f0  22 eb 37 3a e5 8d 74 6a  40 0d 01 40 23 db 3a f1  |".7:..tj@..@#.:.|
00000300  4f 4c 25 28 49 25 29 29  2b 22 20 22 3b 0d 04 92  |OL%(I%))+" ";...|
00000310  48 ed 3a f1 27 22 4f 74  68 65 72 20 70 6f 73 73  |H.:.'"Other poss|
00000320  69 62 6c 65 20 63 6f 6c  6f 75 72 73 3a 22 3a e3  |ible colours:":.|
00000330  49 25 3d 30 b8 37 3a 46  25 3d 30 3a e3 4e 25 3d  |I%=0.7:F%=0:.N%=|
00000340  30 b8 33 3a e7 4b 4f 4c  25 28 4e 25 29 3d 49 25  |0.3:.KOL%(N%)=I%|
00000350  20 46 25 3d 31 0d 04 9c  18 ed 3a e7 46 25 3d 30  | F%=1.....:.F%=0|
00000360  20 f1 3b 43 24 28 49 25  29 3b 89 31 3b 0d 04 a6  | .;C$(I%);.1;...|
00000370  05 ed 0d 04 b0 35 49 25  3d 31 30 3a e8 27 22 57  |.....5I%=10:.'"W|
00000380  68 69 63 68 20 63 6f 6c  6f 75 72 22 2c 41 24 3a  |hich colour",A$:|
00000390  e7 41 24 3d 22 22 e5 8d  54 72 45 20 8b 20 41 24  |.A$=""..TrE . A$|
000003a0  3d c0 41 24 2c 33 29 0d  04 ba 22 e3 4e 25 3d 30  |=.A$,3)...".N%=0|
000003b0  b8 37 3a e7 41 24 3d c0  43 24 28 4e 25 29 2c 32  |.7:.A$=.C$(N%),2|
000003c0  2c 33 29 20 49 25 3d 4e  25 0d 04 c4 05 ed 0d 04  |,3) I%=N%.......|
000003d0  ce 0f e7 49 25 3d 31 30  e5 8d 74 70 44 0d 04 d8  |...I%=10..tpD...|
000003e0  1d e7 4d 25 3d 32 20 3f  28 26 42 46 46 2b 4b 25  |..M%=2 ?(&BFF+K%|
000003f0  29 3d 49 25 3a e5 8d 54  68 45 0d 04 e2 32 46 25  |)=I%:..ThE...2F%|
00000400  3d 30 3a e3 4e 25 3d 30  b8 33 3a e7 49 25 3d 4b  |=0:.N%=0.3:.I%=K|
00000410  4f 4c 25 28 4e 25 29 20  3f 28 26 42 46 46 2b 4b  |OL%(N%) ?(&BFF+K|
00000420  25 29 29 3d 4e 25 3a 46  25 3d 2d 31 0d 04 ec 22  |%))=N%:F%=-1..."|
00000430  e7 46 25 3d 30 4b 4f 4c  25 28 3f 28 26 42 46 46  |.F%=0KOL%(?(&BFF|
00000440  2b 4b 25 29 29 3d 49 25  3a e5 8d 54 68 45 0d 04  |+K%))=I%:..ThE..|
00000450  f6 2e ed 3a e7 46 25 3e  30 4b 4f 4c 25 28 46 25  |...:.F%>0KOL%(F%|
00000460  2d 31 29 3d 49 25 3a 3f  28 26 42 46 46 2b 4b 25  |-1)=I%:?(&BFF+K%|
00000470  29 3d 46 25 2d 31 3a e5  8d 54 68 45 0d 05 00 22  |)=F%-1:..ThE..."|
00000480  e7 46 25 3d 30 4b 4f 4c  25 28 3f 28 26 42 46 46  |.F%=0KOL%(?(&BFF|
00000490  2b 4b 25 29 29 3d 49 25  3a e5 8d 54 68 45 0d 05  |+K%))=I%:..ThE..|
000004a0  0a 2d e3 49 25 3d 30 b8  33 3a 46 25 3d 30 3a e3  |.-.I%=0.3:F%=0:.|
000004b0  4e 25 3d 30 b8 43 25 3a  e7 3f 28 26 43 30 30 2b  |N%=0.C%:.?(&C00+|
000004c0  4e 25 29 3d 49 25 20 46  25 3d 31 0d 05 14 16 ed  |N%)=I% F%=1.....|
000004d0  3a e7 46 25 3d 30 4b 4f  4c 25 28 49 25 29 3d 31  |:.F%=0KOL%(I%)=1|
000004e0  36 0d 05 1e 05 ed 0d 05  28 0e e7 4b 25 3d 31 e5  |6.......(..K%=1.|
000004f0  8d 64 7c 43 0d 05 32 37  e8 22 57 68 61 74 20 6e  |.d|C..27."What n|
00000500  20 77 69 64 74 68 3d 22  57 27 22 4c 6f 77 20 59  | width="W'"Low Y|
00000510  20 62 6f 75 6e 64 3d 22  59 4d 49 4e 3b 22 2c 20  | bound="YMIN;", |
00000520  68 65 69 67 68 74 3d 22  48 27 3a f2 61 73 6b 3a  |height="H':.ask:|
00000530  e7 41 24 3d 22 59 22 8c  8d 74 7e 45 0d 05 96 16  |.A$="Y"..t~E....|
00000540  e8 22 4e 65 77 20 6c 65  66 74 20 58 22 2c 58 4d  |."New left X",XM|
00000550  49 4e 0d 05 a0 1c e8 22  4e 65 77 20 77 69 64 74  |IN....."New widt|
00000560  68 22 2c 57 3a e7 57 3d  30 e5 8d 74 60 45 0d 05  |h",W:.W=0..t`E..|
00000570  aa 18 e8 22 4e 65 77 20  62 6f 74 74 6f 6d 20 59  |..."New bottom Y|
00000580  22 2c 59 4d 49 4e 0d 05  b4 1d e8 22 4e 65 77 20  |",YMIN....."New |
00000590  68 65 69 67 68 74 22 2c  48 3a e7 48 3d 30 e5 8d  |height",H:.H=0..|
000005a0  74 74 45 0d 05 be 45 4c  25 3d 32 35 36 2f 4d 25  |ttE...EL%=256/M%|
000005b0  3a 52 3d 94 28 48 2f 57  29 3a e7 52 3e 31 20 59  |:R=.(H/W):.R>1 Y|
000005c0  25 3d 4c 25 2d 31 3a 58  25 3d 59 25 2f 52 2b 30  |%=L%-1:X%=Y%/R+0|
000005d0  2e 35 20 8b 20 58 25 3d  4c 25 2d 31 3a 59 25 3d  |.5 . X%=L%-1:Y%=|
000005e0  58 25 2a 52 2b 30 2e 35  0d 05 c8 59 40 25 3d 34  |X%*R+0.5...Y@%=4|
000005f0  3a f1 27 22 54 68 65 20  70 6c 6f 74 20 77 69 6c  |:.'"The plot wil|
00000600  6c 20 68 61 76 65 20 22  3b 58 25 2b 31 3b 22 20  |l have ";X%+1;" |
00000610  63 6f 6c 75 6d 6e 73 22  27 22 61 6e 64 20 22 3b  |columns"'"and ";|
00000620  59 25 2b 31 3b 22 20 72  6f 77 73 2e 22 27 27 3a  |Y%+1;" rows."'':|
00000630  f2 61 73 6b 3a e7 41 24  3d 22 59 22 8c 8d 64 66  |.ask:.A$="Y"..df|
00000640  45 0d 05 d2 60 f1 27 22  4e 65 77 20 6e 75 6d 62  |E...`.'"New numb|
00000650  65 72 20 6f 66 20 63 6f  6c 75 6d 6e 73 20 28 20  |er of columns ( |
00000660  3c 22 3b 4c 25 2b 31 22  20 29 22 3b 3a e8 2c 49  |<";L%+1" )";:.,I|
00000670  25 3a e7 49 25 3c 31 20  84 20 49 25 3e 4c 25 20  |%:.I%<1 . I%>L% |
00000680  f1 22 20 49 6c 6c 65 67  61 6c 20 76 61 6c 75 65  |." Illegal value|
00000690  22 3a e5 8d 64 52 45 20  8b 20 58 25 3d 49 25 2d  |":..dRE . X%=I%-|
000006a0  31 0d 05 dc 5c f1 22 4e  65 77 20 6e 75 6d 62 65  |1...\."New numbe|
000006b0  72 20 6f 66 20 72 6f 77  73 20 28 20 3c 22 3b 4c  |r of rows ( <";L|
000006c0  25 2b 31 22 20 29 22 3b  3a e8 2c 49 25 3a e7 49  |%+1" )";:.,I%:.I|
000006d0  25 3c 31 20 84 20 49 25  3e 4c 25 20 f1 22 20 49  |%<1 . I%>L% ." I|
000006e0  6c 6c 65 67 61 6c 20 76  61 6c 75 65 22 3a e5 8d  |llegal value":..|
000006f0  64 52 45 20 8b 20 59 25  3d 49 25 2d 31 0d 05 e6  |dRE . Y%=I%-1...|
00000700  15 44 58 3d 57 2f 58 25  3a 44 59 3d 48 2f 59 25  |.DX=W/X%:DY=H/Y%|
00000710  3a e1 0d 05 f0 05 3a 0d  05 fa 09 dd f2 61 73 6b  |:.....:......ask|
00000720  0d 06 04 0d 2a 46 58 32  30 32 2c 34 30 0d 06 0e  |....*FX202,40...|
00000730  1e f1 3b 22 20 49 73 20  74 68 69 73 20 4f 4b 20  |..;" Is this OK |
00000740  28 59 2f 4e 29 22 3b f2  51 3a e1 0d 06 18 0e dd  |(Y/N)";.Q:......|
00000750  f2 51 3a f1 3b 22 3f 22  3b 0d 06 22 28 41 24 3d  |.Q:.;"?";.."(A$=|
00000760  bd 28 a5 20 80 20 32 32  33 29 3a e7 41 24 3c 3e  |.(. . 223):.A$<>|
00000770  22 59 22 80 20 41 24 3c  3e 22 4e 22 e5 8d 54 62  |"Y". A$<>"N"..Tb|
00000780  46 0d 06 2c 0a f1 3b 41  24 3a e1 0d 06 36 05 3a  |F..,..;A$:...6.:|
00000790  0d 06 40 0a dd f2 6d 6f  64 65 0d 06 4a 0f 54 25  |..@...mode..J.T%|
000007a0  3d 2d 31 3a 40 25 3d 31  30 0d 06 54 27 db 3a f1  |=-1:@%=10..T'.:.|
000007b0  8a 37 2c 31 29 bd 31 33  34 22 54 68 65 20 4d 61  |.7,1).134"The Ma|
000007c0  6e 64 65 6c 62 72 6f 74  20 53 65 74 22 27 27 27  |ndelbrot Set"'''|
000007d0  0d 06 5e aa f1 22 54 68  65 72 65 20 61 72 65 20  |..^.."There are |
000007e0  74 77 6f 20 61 76 61 69  6c 61 62 6c 65 20 70 6c  |two available pl|
000007f0  6f 74 20 6d 6f 64 65 73  3a 22 27 27 22 31 29 22  |ot modes:"''"1)"|
00000800  2b bd 31 33 31 2b 22 48  69 67 68 20 72 65 73 6f  |+.131+"High reso|
00000810  6c 75 74 69 6f 6e 20 28  32 35 36 20 6c 69 6e 65  |lution (256 line|
00000820  73 29 20 61 6e 64 22 27  22 66 6f 75 72 20 63 6f  |s) and"'"four co|
00000830  6c 6f 75 72 73 2c 22 27  27 22 32 29 20 4c 6f 77  |lours,"''"2) Low|
00000840  20 72 65 73 6f 6c 75 74  69 6f 6e 20 28 31 32 38  | resolution (128|
00000850  20 6c 69 6e 65 73 29 20  61 6e 64 22 27 bd 31 33  | lines) and"'.13|
00000860  31 2b 22 65 69 67 68 74  22 2b bd 31 33 35 2b 22  |1+"eight"+.135+"|
00000870  63 6f 6c 6f 75 72 73 2e  22 27 0d 06 68 44 e7 4d  |colours."'..hD.M|
00000880  25 3d 30 20 f1 27 22 57  68 69 63 68 20 6d 6f 64  |%=0 .'"Which mod|
00000890  65 20 77 6f 75 6c 64 20  79 6f 75 20 6c 69 6b 65  |e would you like|
000008a0  20 28 31 20 6f 72 20 32  29 3f 20 22 3b 3a 4d 25  | (1 or 2)? ";:M%|
000008b0  3d a5 2d 34 38 20 8b 20  e5 20 8d 44 7c 46 0d ff  |=.-48 . . .D|F..|
000008c0
Mandel2.m0
Mandel2.m1
Mandel2.m2
Mandel2.m4
Mandel2.m5